-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
P2A bug or feature request we're likely to work onA 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.For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.feature-augmentationsImplementation of the augmentations featureImplementation of the augmentations featuretype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
Feature specification:
Redirecting generative constructors
...
It is a compile-time error if:
- The augmented constructor has an initializer list or a body, or it has a redirection.
But the code below has no such error in the analyzer.
class C {
int x;
C(this.x);
C.foo(int x);
}
augment class C {
augment C.foo(int x) : this(x + 1); // Ok
augment C.foo(int x) : this(x + 2); // Augmented constructor already has a redirection
// ^
// [analyzer] unspecified
// [cfe] unspecified
}Appropriate co19 test
Metadata
Metadata
Assignees
Labels
P2A bug or feature request we're likely to work onA 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.For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.feature-augmentationsImplementation of the augmentations featureImplementation of the augmentations featuretype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug