sdk icon indicating copy to clipboard operation
sdk copied to clipboard

INVALID_FIELD_NAME_POSITIONAL reported even when there is no conflict

Open scheglov opened this issue 3 years ago • 3 comments

The specification says: A field name that collides with the synthesized getter name of a positional field. For example: (int, $0: int) since the named field '$0' collides with the getter for the first positional field.

The example (int, $0: int) is weird and probably should be (int, {int $0}), but the intention seems to disallow only when there is a conflict, not always.

Happens for co19/LanguageFeatures/Records/record_type_annotations_A07_t02.

scheglov avatar Sep 19 '22 17:09 scheglov

The fix should wait until we have clarity on which names should be checked.

bwilkerson avatar Sep 19 '22 18:09 bwilkerson

co19/LanguageFeatures/Records/record_expressions_A05_t02

scheglov avatar Sep 19 '22 18:09 scheglov

co19/LanguageFeatures/Records/record_type_annotations_A05_t05

scheglov avatar Sep 19 '22 19:09 scheglov

I believe that this should now be fixed by https://dart-review.googlesource.com/c/sdk/+/260682

bwilkerson avatar Sep 23 '22 20:09 bwilkerson