Skip to content

[augmentations] No error if there is metadata named augmented in augmentation scope #59774

@sgrekhov

Description

@sgrekhov

In an augmentation scope augmented is a reserved world and can be used for calling introductory declaration only. Any other use of this word is a compile-time error. But there is no expected error in the analyzer below:

class augmented {
  const augmented();
}
class C {}

augment class C {
  @augmented()  // There should be an error here but there isn't
  void foo() {}
}

Appropriate co19 test, for example, https://github.com/dart-lang/co19/blob/master/LanguageFeatures/Augmentation-libraries/augmented_expression_A03_t33.dart

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onarea-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.feature-augmentationsImplementation of the augmentations feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions