Skip to content

Error message placeholders aren't checked against the error's fields #169

Open

Description

@Kinflou

A placeholder naming a field the error doesn't have builds:

error F {
    message = f"bad {self.nope}"
}

Validators' messages are already checked this way; an error's message isn't. The generated Display then refers to a field that doesn't exist.

Fix: check each {self.…} placeholder against the error's fields, with "did you mean".

Found on core master (a8aee68).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2SoonbugSomething isn't workingcompilerParser, IR, CASdiagnosticsErrors and diagnostics

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions