Skip to content

Incorrect parsing for incomplete index expression #42267

@scheglov

Description

@scheglov

When we parse this code, that target is ..publisherIds

void main() {
  FilterSet((builder) => builder..publisherIds[0]);
}

class FilterSet {}

image

If we remove the index expression, so get a synthetic SimpleIdentifier, the target is the whole closure 😱

void main() {
  FilterSet((builder) => builder..publisherIds[]);
}

class FilterSet {}

image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions