-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
area:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etcbetter-errorsIssues concerned with improving confusing/unhelpful diagnostic messagesIssues concerned with improving confusing/unhelpful diagnostic messagesitype:bug
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"
Metadata
Metadata
Assignees
Labels
area:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etcbetter-errorsIssues concerned with improving confusing/unhelpful diagnostic messagesIssues concerned with improving confusing/unhelpful diagnostic messagesitype:bug