Skip to content

Immutability analyzer doesn't see destructuring assignments #738

Description

@j3parker
[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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions