Skip to content

Un-xfail test of error message for "missing 'self'" #2356

Closed
@catamorphism

Description

@catamorphism

(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

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-trait-systemArea: Trait systemA-type-systemArea: Type system

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions