Skip to content

ILC doesn't find backing fields that are loaded / stored to multiple times in the same getter / setter #118873

@jtschuster

Description

@jtschuster

ILC cannot find the backing field of a semi-auto getter when the field is loaded twice in the body, or stored twice in a setter. This causes the field to be considered unannotated and creates unexpected warnings.

[DAM(PublicFields)]
Type MyType {
  get
  {
    OtherField = field;
    return field; // Warning: k__backingField does not have matching annotations
  }
}

[DAM(PublicFields)]
Type OtherField {
  set
  {
    field = value;
    field = value;
    MyType = field; // warning k__backingField does not have matching annotations
  }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions