Skip to content

New getter syntax slightly ambiguous. #4598

Closed
@peter-ahe-google

Description

@peter-ahe-google

I'm currently working on updating our tests to use the new getter syntax. I noticed this case:

class SubAbstract2 extends Abstract {
  abstract get x();
}

In the new syntax, this turns into:

class SubAbstract2 extends Abstract {
  abstract get x;
}

As far as I understand, the abstract keyword is going away, so it becomes:

class SubAbstract2 extends Abstract {
  get x;
}

This looks like a field declaration.

I don't care whether or not this is changed, I just want to bring it up as I'm not sure this was intentional.

Metadata

Metadata

Assignees

Labels

area-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions