Skip to content
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

Fix #6640 #6670

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

NewellClark
Copy link
Contributor

I've fixed issue #6640, and added unit tests to confirm.

@NewellClark NewellClark requested a review from a team as a code owner June 6, 2023 02:02
@codecov
Copy link

codecov bot commented Jun 6, 2023

Codecov Report

Merging #6670 (5ecdfd6) into main (4d80bf2) will increase coverage by 0.07%.
The diff coverage is 100.00%.

❗ Current head 5ecdfd6 differs from pull request most recent head b02af8f. Consider uploading reports for the commit b02af8f to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6670      +/-   ##
==========================================
+ Coverage   96.32%   96.39%   +0.07%     
==========================================
  Files        1389     1379      -10     
  Lines      325529   322268    -3261     
  Branches    10729    10460     -269     
==========================================
- Hits       313579   310666    -2913     
+ Misses       9237     9110     -127     
+ Partials     2713     2492     -221     

@@ -99,7 +99,7 @@ private static void AnalyzeSymbol(SymbolAnalysisContext symbolContext)
// don't report a diagnostic on the `op_False` method because then the user would see two diagnostics for what is really one error
// special-case looking for `IsTrue` instance property
// named properties can't be overloaded so there will only ever be 0 or 1
IPropertySymbol property = typeSymbol.GetMembers(IsTrueText).OfType<IPropertySymbol>().FirstOrDefault();
IPropertySymbol property = typeSymbol.GetBaseTypesAndThis().SelectMany(x => x.GetMembers(IsTrueText).OfType<IPropertySymbol>()).FirstOrDefault();
Copy link
Member

@mavasani mavasani Jun 19, 2023

Choose a reason for hiding this comment

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

I believe this is the case where using a loop with a break on first found match would be more efficient than linq. A local function would also work.

@mavasani
Copy link
Member

mavasani commented Jul 5, 2023

@NewellClark are you able to address the feedback and resolve the merge conflicts? Thanks!

@NewellClark
Copy link
Contributor Author

NewellClark commented Jul 5, 2023

Looks like the file has changed sufficiently in main that it would be easier for me to simply reimplement this than try to merge. I'll do this tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants