Handle reference to non-source symbols in UseConcreteTypeAnalyzer#6959
Handle reference to non-source symbols in UseConcreteTypeAnalyzer#6959mavasani merged 1 commit intodotnet:mainfrom
Conversation
|
@carlossanlop @jeffhandley - we may consider this for backporting to 8.0 as this fixes an analyzer exception case. |
Codecov Report
@@ Coverage Diff @@
## main #6959 +/- ##
==========================================
- Coverage 96.42% 96.42% -0.01%
==========================================
Files 1398 1398
Lines 333549 333552 +3
Branches 11036 11038 +2
==========================================
Hits 321620 321620
- Misses 9166 9168 +2
- Partials 2763 2764 +1 |
|
/backport to release/8.0.1xx |
|
Started backporting to release/8.0.1xx: https://github.com/dotnet/roslyn-analyzers/actions/runs/6265062342 |
|
Looks good to me too. I will advocate for the backport to be approved once the issue template is filled out on #6960. |
The template is filled |
|
As @artl93 asked on the backport PR:
@mavasani / @buyaa-n -- since this fix is isolated to this specific analyzer, should we scout out this category of bug across other analyzers? I don't know how often we have logic similar to this. |
|
Just did a quick check, the API Found only one similar case that might cause this issue (CA2234): This is called for an invocation operation that could be referencing a method defined outside of the source: It might not noticed before because this analyzer is disabled by default |
Fixes #6852