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

Specification is not clear about metadata before enums #24425

Closed
alsemenov opened this issue Sep 24, 2015 · 2 comments
Closed

Specification is not clear about metadata before enums #24425

alsemenov opened this issue Sep 24, 2015 · 2 comments
Labels
area-specification (deprecated) Deprecated: use area-language and a language- label. closed-duplicate Closed in favor of an existing report type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@alsemenov
Copy link
Contributor

The Dart Programming Language Specification version 1.9 is not clear about metadata for enums.
Chapter '13 Enums' reads:

An enumerated type, or enum, is used to represent a fixed number of constant values.
enumType:
metadata enum id ‘{’ id [‘, ’ id]* [‘, ’] ‘}’
;

Metadata is allowed. But chapter '15 Metadata' reads:

Metadata can appear before a library, part header, class, typedef, type pa-
rameter, constructor, factory, function, field, parameter, or variable declaration
and before an import, export or part directive.

Enums are not mentioned here, i.e. not allowed for enums.
So it is not clear whether metadata can appear before enum or not.

@lrhn lrhn added Type-Defect area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). labels Sep 24, 2015
@kevmoo kevmoo added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed Type-Defect labels Mar 1, 2016
@munificent munificent added area-specification (deprecated) Deprecated: use area-language and a language- label. and removed area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). docs-language-spec labels Dec 13, 2016
@eernstg
Copy link
Member

eernstg commented Feb 6, 2018

No milestone now: Said correction should be performed (add enums in ch. 15), but this does not block Dart 2.

@eernstg eernstg added the closed-duplicate Closed in favor of an existing report label Feb 6, 2018
@eernstg
Copy link
Member

eernstg commented Feb 6, 2018

Noted that this had been reported already in dart-lang/language#3773. Closing this issue as a duplicate of that one.

@eernstg eernstg closed this as completed Feb 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-specification (deprecated) Deprecated: use area-language and a language- label. closed-duplicate Closed in favor of an existing report type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

6 participants