Uh oh!
There was an error while loading. Please reload this page.
Fix F# semantic classification for delegates, slices, CEs, open type - #19960
Conversation
❗ Release notes requiredYou can open this PR in browser to add release notes: open in github.dev
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
4c44aad to
1637561Compare…5/7) Items 1/2/5/7 are completion-safe and shipped here: - item 1: suppress the synthesized delegate Invoke value over the `delegate of ...` RHS - item 2: classify CE builders inside list/array comprehensions as ComputationExpression - item 5: don't paint slice brackets as Method; fix open-ended slice upper-bound range - item 7: `open type T` is not unused when its static members/fields or DU cases are used Items 3/4/6 (generic `<...>` argument colorization) are deferred: narrowing the shared name-resolution range to fix colorization breaks find-all-references, completion and parameter-info, because the resolution sink matches symbol uses by exact range end. The correct fix requires separating classification ranges from symbol-use ranges in the sink. Guard tests assert the IDE features still work. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
abonie
commented
Jun 25, 2026
@copilot resolve the merge conflicts in this pull request |
T-Gro
left a comment
There was a problem hiding this comment.
🤖 This review was generated by AI (@expert-reviewer agent). Findings may contain inaccuracies — please verify independently.
Nice, well-targeted set of fixes with thorough regression tests. The range1 → range2 change in ExpandIndexArgs correctly attaches the synthesized None of an open-ended slice's upper bound to the upper-bound range. A few suppression heuristics look slightly broader than the bugs they target — flagged inline for verification (all editor-classification only, low severity).
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Responds to the expert-reviewer feedback on the editor semantic-classification fixes: - GetSlice/SetSlice suppression: document why the synthesized indexer (xs[a..]) cannot be distinguished from an explicit .GetSlice(..) call in this pass (no source text; both Item.MethodGroup resolutions cover the receiver). The broad suppression is an intentional trade-off. - open type unused-detection: clarify that recording static-member/static-field uses against the declaring entity mirrors existing open <module> behavior, and add a regression test asserting open type and open <module> behave consistently when their members are only ever used fully qualified. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Addresses #19905. Four F# editor semantic-classification errors:
delegate of …signature as a method.ComputationExpression.]of an open-ended slice (xs[0..]) is no longer classified asFunction/Method.open type Tis no longer reported as unused when its static members, static fields, or DU cases are used.The generic-argument colorization items (
Type<int>.Member, generic constructor/method calls) are deferred: narrowing the shared name-resolution range to fix coloring breaks find-all-references, completion, and parameter-info.