-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-trait-systemArea: Trait systemArea: Trait systemA-type-systemArea: Type systemArea: Type system
Description
(Original title: More helpful error message for "missing 'self'")
The test for the improved error message was xfailed in SHA: 93d3b8a ; we want to un-xfail it.
Original bug report follows
Currently, if I write x
inside a class that has field x
, and x
isn't in the outer scope, the error I get is "unresolved name". I could see that being confusing. Ideally the typechecker would suggest "did you mean self.x
?" if self
has a field named x
.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-trait-systemArea: Trait systemArea: Trait systemA-type-systemArea: Type systemArea: Type system