ExhaustiveMatching
ExhaustiveMatching copied to clipboard
Null Reference exception from analyzer
Using ExhaustinveMatching.Analyzer 0.5.0
Analyzer 'ExhaustiveMatching.Analyzer.ExhaustiveMatchAnalyzer' threw an exception of type 'System.Exception' with message 'Uncaught exception in analyzer: System.NullReferenceException: Object reference not set to an instance of an object.
at ExhaustiveMatching.Analyzer.TypeDeclarationAnalyzer.<>c.<CheckClosedAttributes>b__3_0(AttributeSyntax a)
at System.Linq.Enumerable.<SelectManyIterator>d__17`2.MoveNext()
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.<OfTypeIterator>d__95`1.MoveNext()
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Lookup`2.Create[TSource](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at System.Linq.GroupedEnumerable`3.GetEnumerator()
at System.Linq.Enumerable.<SelectManyIterator>d__17`2.MoveNext()
at ExhaustiveMatching.Analyzer.TypeDeclarationAnalyzer.CheckClosedAttributes(SyntaxNodeAnalysisContext context, IList`1 closedAttributes)
at ExhaustiveMatching.Analyzer.TypeDeclarationAnalyzer.Analyze(SyntaxNodeAnalysisContext context, TypeDeclarationSyntax typeDeclaration)
at ExhaustiveMatching.Analyzer.ExhaustiveMatchAnalyzer.AnalyzeTypeDeclaration(SyntaxNodeAnalysisContext context)'.
Code that reproduces the issue
[Closed]
public abstract class Base
{
}
public sealed class Derived : Base
{
}