Skip to content

Incorrect line numbers for missing record field errors #263

@j14159

Description

@j14159
module mod
let foo :b = {b=0}
let foo :a = {a=true, b=0}

The typer currently and _incorrectly reports a missing member a on line 3:

{error, {missing_record_field, mod, 3, a}}

I believe this is because even though it's correctly finding the lower bound (a record with a and b members), the environment doesn't track the source (line) of the initial type, {b: bool} and thus can't accurately report the true problem location.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions