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

SA1101 in property pattern #3472

Closed
JohanLarsson opened this issue Mar 21, 2022 · 1 comment · Fixed by #3483
Closed

SA1101 in property pattern #3472

JohanLarsson opened this issue Mar 21, 2022 · 1 comment · Fixed by #3483

Comments

@JohanLarsson
Copy link

image

internal object? P=> this.Value switch
{
    InvocationExpressionSyntax { Expression: LiteralExpressionSyntax { Token.ValueText: { } valueText } } =>null,
    _ => null,
};
@springy76
Copy link

Happens right after IDE0170 "simplify property pattern" - a C#10 feature?

BTW a simple if is enough:
if(something is { Page.PageNumber: > 1 })

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