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

SA1011 false positive, C#8.0 when using ! forgiveness operator #3052

Closed
AArnott opened this issue Nov 2, 2019 · 0 comments · Fixed by #3071
Closed

SA1011 false positive, C#8.0 when using ! forgiveness operator #3052

AArnott opened this issue Nov 2, 2019 · 0 comments · Fixed by #3071

Comments

@AArnott
Copy link
Contributor

AArnott commented Nov 2, 2019

IReadOnlyList<object?>? arguments; // a parameter or assigned elsewhere
object o = arguments[0]!; // SA1011 does not like the `!` so close to the `]` character

Similar to #2927
Repros with 1.2.0-beta.66

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants