Fix methods tagged as Member instead of Method in tooltips#19507
Open
Fix methods tagged as Member instead of Method in tooltips#19507
Conversation
Member
|
@copilot : Try again |
Copilot stopped work on behalf of
T-Gro due to an error
March 27, 2026 08:32
Member
|
@copilot : Try again. |
Copilot stopped work on behalf of
T-Gro due to an error
March 27, 2026 11:44
Member
|
@copilot : Try again. |
Contributor
❗ Release notes required
|
Copilot stopped work on behalf of
T-Gro due to an error
March 30, 2026 14:44
Member
|
@copilot Try again |
Contributor
Author
Fixed in 7bd4f64. Changes:
|
Copilot
AI
changed the title
[WIP] Copilot Request
Fix methods tagged as Member instead of Method in tooltips
Mar 31, 2026
16d59f5 to
73884dd
Compare
In NicePrint.fs, the SynMemberKind.Member case unconditionally used tagMember for all members. Now checks isNil argInfos to use tagMethod for methods vs tagMember for property-like members. In TypedTreeOps.fs fullDisplayTextOfValRefAsLayout, checks ValReprInfo.ArgInfos length to distinguish methods from property-like members (instance >1 arg group, static >0). Added 5 regression tests: instance method, method with params, static method, property-like member, and auto property. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
73884dd to
9697305
Compare
auduchinok
reviewed
Apr 10, 2026
Member
auduchinok
left a comment
There was a problem hiding this comment.
Cool, this is nice! Thank you 🙂
| if short then tauL | ||
| else | ||
| let nameL = layoutMemberName denv vref niceMethodTypars argInfos tagMember vref.DisplayNameCoreMangled true | ||
| let tag = if isNil argInfos then tagMember else tagMethod |
Member
There was a problem hiding this comment.
Could you also check properties with parameters and indexers?
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.
Fix for methods being tagged as
Memberinstead ofMethodin tooltips, a regression from #9563.Root Cause
In
NicePrint.fsandTypedTreeOps.fs, theSynMemberKind.Membercase unconditionally usedtagMemberfor all members, without distinguishing between actual methods (with parameters) and property-like members (without parameters).Changes Made
src/Compiler/Checking/NicePrint.fs: In theSynMemberKind.Membertooltip layout, check ifargInfosis non-empty to usetagMethodfor methods vstagMemberfor property-like members.src/Compiler/TypedTree/TypedTreeOps.fs: InfullDisplayTextOfValRefAsLayout, checkValReprInfo.ArgInfoslength to distinguish methods from property-like members (instance methods have >1 arg groups, static methods have >0).TooltipTests.fs: instance method, method with parameters, static method, property-like member, and auto property — verifying correctTextTagclassification.Testing
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.