(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.
(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
xinside a class that has fieldx, andxisn'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 meanself.x?" ifselfhas a field namedx.