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

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

Open
sgrekhov opened this issue Dec 20, 2024 · 0 comments
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. feature-augmentations Implementation of the augmentations feature

Comments

@sgrekhov
Copy link
Contributor

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

@sgrekhov sgrekhov added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. feature-augmentations Implementation of the augmentations feature labels Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. feature-augmentations Implementation of the augmentations feature
Projects
None yet
Development

No branches or pull requests

1 participant