-
Notifications
You must be signed in to change notification settings - Fork 511
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
SA1008 threw a NullReferenceException #2354
Comments
I had a quick look at the sources and I don't see an obvious bug there. The call stack indicates that either the token being processed (the opening parenthesis) or the previous token has a |
This happens for example if there is no token before the opening parenthesis, since GetPreviousToken would then return a default SyntaxToken. Seems a bit unlikely that that was what happened, but it could be. I don't see any other possibility. I am creating a pull request. |
Using StyleCopAnalyzers 1.0 in VS2017 for a .NET 4.5 project, C#6. While refactoring I got the following error. At some point during my refactorings the file referenced in the error was removed, don't know if that is related or if this error occurred before that.
The text was updated successfully, but these errors were encountered: