New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use $this in string interpolation #5856
Comments
Imported From: https://issues.scala-lang.org/browse/SI-5856?orig=1 |
@xeno-by said: |
@retronym said: class C { s"${this}" } |
@dgruntz said: scala> val `yield` = 1
yield: Int = 1
scala> val `extends` = 2
extends: Int = 2
scala> s"$yield / $extends"
res23: String = 1 / 2 Or do you expect that one should have to write scala> s"$`yield`"
<console>:1: error: invalid string interpolation
s"$`yield`" (which currently issues an error message), as in scala> s"${`yield` + `extends`}"
res24: String = 3 ? |
@retronym said: |
@dgruntz said: The final question I have is whether to support |
@retronym said: |
@dgruntz said: |
@dgruntz said: |
The text was updated successfully, but these errors were encountered: