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

Null Reference exception from analyzer #53

Open
WalkerCodeRanger opened this issue Sep 6, 2024 · 0 comments
Open

Null Reference exception from analyzer #53

WalkerCodeRanger opened this issue Sep 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@WalkerCodeRanger
Copy link
Owner

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
{
}
@WalkerCodeRanger WalkerCodeRanger added the bug Something isn't working label Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant