Skip to content
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

[Enum Shorthands] Feature specification #59627

Open
2 tasks
Tracked by #57036
kallentu opened this issue Nov 27, 2024 · 4 comments
Open
2 tasks
Tracked by #57036

[Enum Shorthands] Feature specification #59627

kallentu opened this issue Nov 27, 2024 · 4 comments
Assignees
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). feature-enum-shorthands Implementation of the enum shorthands feature. language-spec-discuss

Comments

@kallentu kallentu added area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). feature-enum-shorthands Implementation of the enum shorthands feature. language-spec-discuss labels Nov 27, 2024
@lrhn
Copy link
Member

lrhn commented Nov 27, 2024

The "simple spec" has been updated with today's decisions.
(Do check that I didn't mess something up.)

@kallentu
Copy link
Member Author

The "simple spec" has been updated with today's decisions. (Do check that I didn't mess something up.)

Just read through it. It looks great and captures what we discussed at today's meeting. Thanks for writing it.

I think with that, we should have everything covered for the spec.
Unless there's something I'm missing.

@lrhn
Copy link
Member

lrhn commented Nov 29, 2024

I just updated the spec again. Mainly expanding and exemplifying, but I noticed a bug in the constant patterns grammar, where it allowed <staticMemberShorthand> in general.
That's a lot more than the non-shorthand patterns allow, they only allow <qualfiedIdentifier> (which must denote a constant variable) and <constObjectExpression> (which is a constant constructor invocation), with no selectors after.

I changed the constant pattern grammar to only allow shorthands of those two expressions.
(Do check that I did it correctly and didn't forget anything!)

@kallentu
Copy link
Member Author

kallentu commented Dec 2, 2024

Looks good. There were a couple of typos - I went ahead and fixed those. Everything else looks great. Thanks for the detailed explanations for the constants section.

I'll continue working on the language tests based on what's written.

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). feature-enum-shorthands Implementation of the enum shorthands feature. language-spec-discuss
Projects
None yet
Development

No branches or pull requests

2 participants