We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e3c5679 commit f13a7aaCopy full SHA for f13a7aa
compiler/src/dotty/tools/dotc/parsing/Scanners.scala
@@ -202,7 +202,8 @@ object Scanners {
202
private val commentBuf = new mutable.StringBuilder
203
204
private def handleMigration(keyword: Token): Token =
205
- if (!isScala2CompatMode) keyword
+ if (keyword == ERASED && !ctx.settings.YerasedTerms.value) IDENTIFIER
206
+ else if (!isScala2CompatMode) keyword
207
else if (scala3keywords.contains(keyword)) treatAsIdent()
208
else keyword
209
tests/pos/i7944.scala
@@ -0,0 +1,8 @@
1
+package hello
2
+
3
+object HelloWorld {
4
+ def main(args: Array[String]): Unit =
5
+ println(erased(5))
6
7
+ def erased(x: Int): Any = x
8
+}
0 commit comments