Skip to content

New getter syntax slightly ambiguous. #4598

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
peter-ahe-google opened this issue Aug 20, 2012 · 4 comments
Closed

New getter syntax slightly ambiguous. #4598

peter-ahe-google opened this issue Aug 20, 2012 · 4 comments
Assignees
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language).
Milestone

Comments

@peter-ahe-google
Copy link
Contributor

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.

@gbracha
Copy link
Contributor

gbracha commented Aug 20, 2012

I think this is a matter for style guides: putting an abstract modifier might be optional, and recommended in a few cases such as this. I'll look into it.


Set owner to @gbracha.
Added Accepted label.

@gbracha
Copy link
Contributor

gbracha commented Aug 20, 2012

Added this to the M1 milestone.

@gbracha
Copy link
Contributor

gbracha commented Aug 21, 2012

Per the language meeting today, we will make the abstract modifier optional so as a matter of style people may choose to emphasize the abstractness.

@gbracha
Copy link
Contributor

gbracha commented Aug 28, 2012

Added Done label.

@peter-ahe-google peter-ahe-google added Type-Defect area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). labels Aug 28, 2012
@peter-ahe-google peter-ahe-google added this to the M1 milestone Aug 28, 2012
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language).
Projects
None yet
Development

No branches or pull requests

3 participants