-
Notifications
You must be signed in to change notification settings - Fork 825
Include range of attributes in parent (implementation files) #11495
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
@@ -651,11 +651,11 @@ type T() = | |||
""" | |||
=> [ (2, 5, 11, 12), (2, 7, 11, 12) | |||
(3, 4, 4, 12), (3, 7, 4, 12) | |||
(3, 4, 4, 12), (4, 8, 4, 12) | |||
(3, 4, 4, 12), (3, 10, 4, 12) |
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.
@auduchinok I winged this test a bit 😅.
In the parser I updated the range of SynMemberDefn.Member(SynBinding (None, SynBindingKind.Normal, false, false, $1, grabXmlDoc(parseState, 3), valSynData, declPat, None, expr, mWholeBindLhs, DebugPointAtBinding.NoneAtInvisible), m)
(see line 1988
) to only included the lhs
of the SynBinding and not the entire range m
.
This is the case with all the other SynBindings, so I thought I could fix this and make it consistent.
So, that leads to a change in getOutliningRanges
(in ServiceStructure.fs
) where at this point I'm not really sure what I did is correct. Any thoughts here?
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.
We ignore some of these ranges in ServiceStructure in Rider, and from a glance it looks like it won't affect us. Not sure about other users, though.
0de1c85
to
555a5f3
Compare
Ready for review. |
555a5f3
to
de3588c
Compare
de3588c
to
5cd90a9
Compare
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.
Thanks!
I believe this should also fix a problem in the quick fixer that removes unused bindings where the attribute(s) could be left dangling. |
Fixes #11486.
In this PR I tried to take attributes into account when constructing the range of SynBinding and others.
Most likely some tests outside of FCS might break due to corrected ranges.
I'll tackle those if they pop up.