Skip to content

Potentially fixed a bug regarding static items not bolding#44797

Merged
akhera99 merged 6 commits intodotnet:masterfrom
akhera99:fix_nameof_bolding
Jun 5, 2020
Merged

Potentially fixed a bug regarding static items not bolding#44797
akhera99 merged 6 commits intodotnet:masterfrom
akhera99:fix_nameof_bolding

Conversation

@akhera99
Copy link
Member

@akhera99 akhera99 commented Jun 2, 2020

Fixes #38781

Issue:
The issue here was that certain static defined items were not being bolded properly. This was due to the fact that we classified static methods only if there was a single symbol match. Since, in the example provided, nameof is ambiguous then we also need to classify static methods in that case.

Fix:
To fix this, I needed to modify the TryClassifyAmbiguousSymbol method. I added a boolean flag to indicate if at least one of the references were static. Then, if they all resolved at the set remained at a size of 1, I checked to see if any of those references were static. If they were, I also added a static classification to the result. In the case of multiple overloaded methods with the same name, some being static and some not, we decided to resolve it to just be bolded.

@akhera99 akhera99 requested a review from a team as a code owner June 2, 2020 19:07
@dnfclas
Copy link

dnfclas commented Jun 2, 2020

CLA assistant check
All CLA requirements met.

@CyrusNajmabadi
Copy link
Contributor

Hi @akhera99 I'll take a look at thsi :) Thanks for the contribution.

Copy link
Contributor

@CyrusNajmabadi CyrusNajmabadi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done with pass.

@CyrusNajmabadi
Copy link
Contributor

Done with pass.

@akhera99 akhera99 requested a review from CyrusNajmabadi June 3, 2020 20:54
@akhera99 akhera99 merged commit da02b3e into dotnet:master Jun 5, 2020
@ghost ghost added this to the Next milestone Jun 5, 2020
@RikkiGibson RikkiGibson modified the milestones: Next, 16.7.P3 Jun 8, 2020
@akhera99 akhera99 deleted the fix_nameof_bolding branch June 18, 2024 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Static method isn't rendered in bold in nameof operator

5 participants