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 e8c1db3 commit f499a1fCopy full SHA for f499a1f
compiler/src/dotty/tools/dotc/typer/Dynamic.scala
@@ -15,6 +15,7 @@ import core.Symbols._
15
import core.Definitions
16
import Inferencing._
17
import ErrorReporting._
18
+import dotty.tools.dotc.reporting.diagnostic.messages.ReassignmentToVal
19
20
object Dynamic {
21
def isDynamicMethod(name: Name): Boolean =
@@ -99,7 +100,7 @@ trait Dynamic { self: Typer with Applications =>
99
100
case TypeApply(Select(qual, name), targs) if !isDynamicMethod(name) =>
101
typedDynamicAssign(qual, name, targs)
102
case _ =>
- errorTree(tree, "reassignment to val")
103
+ errorTree(tree, ReassignmentToVal(tree.lhs.symbol.name))
104
}
105
106
0 commit comments