We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Scala version: 2.13.12
In Test.scala:
trait Trait { def foo: Any } class Test extends Trait{ case object `val` override def foo = `val` }
When you run scalac -quickfix:any -Xsource:3 Test.scala, the file gets updated to
scalac -quickfix:any -Xsource:3 Test.scala
trait Trait { def foo: Any } class Test extends Trait{ case object `val` override def foo: Test.this.val.type = `val` }
which does not compile (the val in the type should be surrounded with backticks)
val
Quickfixes should escape keywords as needed
The text was updated successfully, but these errors were encountered:
Printing with backticks would solve related tickets in REPL and autocomplete.
Sorry, something went wrong.
attn @lrytz
We could special case keywords (80 / 20), that idea is in tree printers https://github.com/scala/scala/blob/v2.13.12/src/reflect/scala/reflect/internal/Printers.scala#L34.
Alternatively sprinkle the BackquotedIdentifierAttachment attachement more widely. @som-snytt wdyt?
BackquotedIdentifierAttachment
Either way, I don't see this as a blocker for 2.13.13.
WIP: https://github.com/scala/scala/compare/2.13.x...lrytz:scala:t12942?expand=1
No branches or pull requests
Reproduction steps
Scala version: 2.13.12
In Test.scala:
When you run
scalac -quickfix:any -Xsource:3 Test.scala
, the file gets updated towhich does not compile (the
val
in the type should be surrounded with backticks)Problem
Quickfixes should escape keywords as needed
The text was updated successfully, but these errors were encountered: