Open
Description
(noticed while working on #22671 at a spree)
Minimized code
Welcome to Scala 3.6.4 (17.0.14, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
scala> def x = 3
def x: Int
scala> x = 4
Output
-- [E052] Type Error: ----------------------------------------------------------
1 |x = 4
|^^^^^
|Reassignment to val x
Expectation
x
isn't a val
, it's a def
, so it's nonsensical for the error to refer to "val x"