Skip to content

Improve error reporting for anonymous records declarations - #15824

Merged
T-Gro merged 7 commits into
dotnet:mainfrom
edgarfgp:improve-error-reporting-for-anon-records-declarations
Aug 21, 2023
Merged

Improve error reporting for anonymous records declarations#15824
T-Gro merged 7 commits into
dotnet:mainfrom
edgarfgp:improve-error-reporting-for-anon-records-declarations

Conversation

@edgarfgp

@edgarfgpedgarfgp commented Aug 20, 2023

Copy link
Copy Markdown
Contributor

Currently records and anonymous records show duplicated fields using inconsistent ranges

Screenshot 2023-08-20 144236

This PR shows consistent error ranges in records and anonymous records. See tests

@edgarfgp
edgarfgp requested a review from a team as a code ownerAugust 20, 2023 12:46
@edgarfgpedgarfgp changed the title Improve error reporting for anon records declarationsImprove error reporting for anonymous records declarationsAug 20, 2023
@edgarfgp

edgarfgp commented Aug 21, 2023

Copy link
Copy Markdown
ContributorAuthor

This is ready.
One thing that noticed while working on this. In theory, we should not need the specific 3523. We could use the same diagnostic that records uses to check for duplicated fields. Not sure if removing 3523 will be an option here

Comment threadsrc/Compiler/Checking/CheckExpressions.fs Outdated
Co-authored-by: Adam Boniecki <20281641+abonie@users.noreply.github.com>
Comment threadsrc/Compiler/Checking/CheckExpressions.fs Outdated
Comment threadsrc/Compiler/Checking/CheckExpressions.fs Outdated
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants

@edgarfgp@abonie@T-Gro