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 in the analyzer when enum's implicit getter is augmented #56418

Open
sgrekhov opened this issue Aug 9, 2024 · 0 comments
Labels
analyzer-spec Issues with the analyzer's implementation of the language spec area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. feature-augmentations Implementation of the augmentations feature P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@sgrekhov
Copy link
Contributor

sgrekhov commented Aug 9, 2024

According to the feature specification

Enum values can only be augmented by enum values, and the implicit getter introduced by them is not augmentable.

But the analyzer doesn't produce the following expected errors.

enum E2 {
  e0;
}

enum E3 {
  e0;
}

augment enum E2 {
  e1;
  augment static E2 get e0 => e0;
//^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
}

augment enum E3 {
  e1;
  augment static E3 get e0 => augmented;
//^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
}
@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 Aug 9, 2024
@pq pq added P2 A bug or feature request we're likely to work on analyzer-spec Issues with the analyzer's implementation of the language spec labels Aug 9, 2024
@srawlins srawlins added the type-enhancement A request for a change that isn't a bug label Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-spec Issues with the analyzer's implementation of the language spec area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. feature-augmentations Implementation of the augmentations feature P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

3 participants