Debug.Assert hit within CompilationWithAnalyzers
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
this error
```
at Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.g__tryProcessTree|62_6(SyntaxTree partialTree, Nullable`1& scopeAndEvents, <>c__DisplayClass62_1& ) in C:\Users\t-gosingh\Documents\Github\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\CompilationWithAnalyzers.cs:line 958
at Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.g__processSymbolStartAnalyzers|62_3(SourceOrAdditionalFile originalFile, Nullable`1 originalSpan, ImmutableArray`1 compilationEventsForTree, ImmutableArray`1 symbolStartAnalyzers, Compilation compilation, AnalysisResultBuilder analysisResultBuilder, ArrayBuilder`1 builder, ImmutableArray`1 additionalFiles, CancellationToken cancellationToken) in C:\Users\t-gosingh\Documents\Github\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\CompilationWithAnalyzers.cs:line 924
at Microsoft.CodeAnalysis.Diagnostics.CompilationWithAnalyzers.d__62.MoveNex......
```
when running in debugger with this code:
```
namespace F.N
{
class D {
public class C
{
public static void Goo()
{
}
}
}
class G
{
//void Main()
//{
// var c = new C();
// c.Goo(); // This should appear in call hierarchy
//}
void Boo()
{
TestNameof()
}
public void TestNameof()
{
var methodName = nameof(F.N.D.C.Goo); // This should NOT appear
F.N.D.C.Goo(); // This should appear in call hierarchy
}
}
}
```
This is the code that is failing on line 958:
https://github.com/dotnet/roslyn/blob/efe5fafe3a159f01f76f0bc981a74485841f0601/src/Compilers/Core/Portable/DiagnosticAnalyzer/CompilationWithAnalyzers.cs#L947-L959
Contributor guide
Assessment
This issue has not been assessed yet.