Skip to content

Improve Error Reporting: Field suggestions not shown consistently #1445

@isaacabraham

Description

@isaacabraham

Related to #1102.

Given the following code snippet:

type Person = { Name : string; }

let x = { Person.Names = "Isaac" }
let y : Person = { Names = "Isaac" }
let z = { Names = "Isaac" }

The first error message reads: -

error FS0039: The field, constructor or member 'Names' is not defined

yet the remaining two give suggestions for replacement fields. I would expect the first two to give identical error messages.

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