Fix parsing errors using anonymous records and units of measures#18543
Merged
T-Gro merged 32 commits intodotnet:mainfrom May 22, 2025
Merged
Fix parsing errors using anonymous records and units of measures#18543T-Gro merged 32 commits intodotnet:mainfrom
T-Gro merged 32 commits intodotnet:mainfrom
Conversation
Contributor
❗ Release notes required
|
tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/AnonymousRecords.fs
Show resolved
Hide resolved
edgarfgp
commented
May 11, 2025
T-Gro
reviewed
May 14, 2025
T-Gro
approved these changes
May 16, 2025
auto-merge was automatically disabled
May 19, 2025 18:19
Head branch was pushed to by a user without write access
Contributor
Author
|
Fixed again another merge conflict :( |
Contributor
Author
|
@T-Gro This is ready |
T-Gro
approved these changes
May 22, 2025
Member
T-Gro
left a comment
There was a problem hiding this comment.
Thanks for finishing this @edgarfgp .
I do realize that my wishes to guard even simple improvements can be annoying at times, but our focus should be at the user who does not watch language evolution closely.
The situation with up-to-date local and outdated CI is quite real.When it comes to parser/lexer improvememnts, those errors (not reproducible locally) would be confusing (well, as they are currently before this change...) and hard to fix blindly.
This was referenced Jun 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Essentially the lexer could not understand
>|}. So I followed the same approach that the existing>|]handles this and then checked that in both cases produce the same AST.Fixes #10629
BEFORE
AFTER
Expr (AnonRecd (false, None, [(SynLongIdent ([a], [], [None]), Some (7,4--7,5), Const (Measure (Int32 1, (7,5--7,6), Seq ([Named ([m], (7,7--7,8))], (7,7--7,8)), { LessRange = (7,6--7,7) GreaterRange = (7,8--7,9) }), (7,5--7,9)))], (7,0--7,11), { OpeningBraceRange = (7,0--7,2) }), (7,0--7,11));Checklist