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

Immutability analyzer doesn't see destructuring assignments #738

Open
j3parker opened this issue Apr 8, 2021 · 0 comments
Open

Immutability analyzer doesn't see destructuring assignments #738

j3parker opened this issue Apr 8, 2021 · 0 comments

Comments

@j3parker
Copy link
Member

j3parker commented Apr 8, 2021

[Immutable]
public sealed class Whatever {
  private readonly object x;

  public Whatever() {
    x = new object(); // ok
    (x) = new ValueTuple<object>(new List<string>()); // needs to be caught
  }
}

while we're here, add a test case for the left hand side being parenthesized but not destructuring:

image

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

No branches or pull requests

1 participant