Skip to content

Parser and analyzer AST should be updated to reject augmented enum values #62280

Description

@stereotype441

In dart-lang/language@ebd9e18, the ability to augment an enum value was removed. But the parser still accepts this code:

enum E {
  foo
}

augment enum E {
  augment foo
}

And the analyzer AST still has a slot for EnumConstantDeclaration.augmentKeyword.

Note that EnumConstantDeclaration.augmentKeyword is part of the analyzer public API, and is neither experimental nor deprecated, so to adhere strictly to semantic versioning, we should deprecate it and remove it in a future analyzer version bump.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.feature-augmentationsImplementation of the augmentations featuremodel-parserParser issues in the analyzer/CFE

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions