Skip to content

Conversation

Kmeakin
Copy link
Contributor

@Kmeakin Kmeakin commented Feb 17, 2023

Distinguish between the three ways that RecordProj can be an error:

  • The head expression is not a record (eg Type.foo)
  • The head expression is a record, but it is empty (eg {}.foo)
  • The head expression is a non-empty record, but the field is missing (eg {x=foo}.foo)

I thought it was worth adding a separate diagnostic for accessing a field on a unit record, since a message about a missing field when there are no fields to choose from could be confusing

@Kmeakin Kmeakin force-pushed the record-proj-better-diagnostics branch from d876c48 to 49665d9 Compare February 17, 2023 06:19
@Kmeakin Kmeakin force-pushed the record-proj-better-diagnostics branch from 49665d9 to 2c152ca Compare February 17, 2023 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant