Parser: recover on unfinished abstract members - #20070
Merged
Merged
Conversation
auduchinok
force-pushed
the
parser-abstractMember
branch
from
July 21, 2026 09:55
103396b to
69339b8
Compare
auduchinok
force-pushed
the
parser-abstractMember
branch
from
July 24, 2026 11:36
69339b8 to
4aefde1
Compare
Member
Author
|
@T-Gro There seems to be an issue with posting the release notes comment, could you please take a look? |
This comment has been minimized.
This comment has been minimized.
Contributor
|
@auduchinok See #20081 |
T-Gro
approved these changes
Aug 3, 2026
T-Gro
left a comment
Member
There was a problem hiding this comment.
🤖 AI review (@expert-reviewer): no significant issues found. Please verify independently.
Reviewed the parser error-recovery changes for unfinished abstract members:
mkAbstractMemberextraction (ParseHelpers.fs) faithfully preserves the original inline grammar action. Since all fourclassDefnMemberproductions share the sameopt_attributes opt_access abstractMemberFlags opt_access opt_inlineprefix, therhs parseState 1/2ranges andgrabXmlDocpositions remain consistent when called from every rule.CheckDeclarations.fsguard (id.idText <> "") correctly skips only the fully name-less recovery slot (therecoverproduction with nonameop). Named-but-typeless recovery still flows throughTcAndPublishValSpecwith aSynType.FromParseErrortype, preserving IDE tooling info. No valid member (including operator names vianameop) yields an emptyidText, so nothing legitimate is filtered.- No correctness, security, or performance concerns identified. Full Azure
fsharp-cipasses, includingCheckCodeFormatting(grammar compiles with no new conflicts), and SyntaxTree baselines cover the new recovery cases.
T-Gro
self-requested a review
August 3, 2026 19:13
Contributor
❗ Release notes requiredYou can open this PR in browser to add release notes: open in github.dev
|
Contributor
|
🔍 Tooling Safety Check — Affects-Compiler-Output
|
Member
Author
|
This is ready. |
T-Gro
approved these changes
Aug 12, 2026
T-Gro
added a commit
to gusty/fsharp
that referenced
this pull request
Aug 18, 2026
Post-merge baseline drift, two independent causes: - 7 SyntaxTree parse baselines (Member/Abstract - Method 01/02, Abstract - Property 06/07/08/09, SynType/SynTypeAppNestedMultilineClosingGreaterAligned): main's dotnet#20070 ("Parser: recover on unfinished abstract members") added/updated these AFTER this branch last regenerated, emitting the old SynComponentInfo.longId shape `[T]`. This branch's SynComponentInfo.longId->synType change now prints `Some (LongIdent (SynLongIdent ([T], [], [None])))`. Pure representation change, consistent with the ~300 baselines already updated by this PR. - neg88.bsl (typecheck negative test): the SRTP constraint-solver changes shift the surfaced unification failure from FS0001 at the argument to FS0043 at the call site (+ an FS0193 for the fully-applied map3). All three invalid SRTP calls still error, so the negative test still correctly rejects the code; only the error shape changed. Regenerated baseline verified byte-for-byte against the net472 CI actual. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1389e318-3aed-41ba-8b6a-e2eaa465b0d6
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.
Fixes parsing of various unfinished abstract members, like the following: