-
Notifications
You must be signed in to change notification settings - Fork 830
Detect get/set combination for GetStructuredToolTipText. #15586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I think it's not. There should be a single symbol for the property on the identifier range. The property symbol should then return the separate accessors symbols in In addition to the property symbol, there should/may be accessor symbols reported at their declaration ranges. We have another regression in tests showing exactly this case, where the additional setter symbol breaks things for us, and I was going to report it today as well. 🙂 |
|
Yeah, a single symbol that captures both get and set would indeed be the cleanest.
I did some investigation and it gets complicated after: fsharp/src/Compiler/Checking/CheckDeclarations.fs Lines 4143 to 4228 in 723b1dc
The members eventually end up in: fsharp/src/Compiler/Checking/CheckDeclarations.fs Lines 921 to 948 in 723b1dc
And once fsharp/src/Compiler/Checking/CheckExpressions.fs Lines 1362 to 1368 in 256c7b2
Maybe fsharp/src/Compiler/Checking/CheckExpressions.fs Lines 1351 to 1360 in 256c7b2
can be extended, not to report the two members. And afterwards, report the |
T-Gro
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK as a hotfix for the current tooltip behavior.
|
@nojaf Thanks for such a good analysis!
Or the getter and setter could be reported at the
That sounds great, but I'm not sure yet how easy that would be. 🙂 |
Yeah, but when you have
Yeah, got somewhere in #15589 but it is a can of worms for sure. |
Yes, something like |
Fixes #15584.
Due to #15213, there are now two symbols for auto properties (which I still think is correct).
This leads to the double tooltip, as a first fix I'm only showing the tooltip for the getter.
Which was the original behaviour.
Ideally, this would show
with get, setbut that proves to be a bit more challenging.