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

[cfe] No error if factory extension type constructor redirects to a constructor with incompatible parameters #53209

Closed
sgrekhov opened this issue Aug 14, 2023 · 0 comments
Assignees
Labels
cfe-feature-extension-types Implement extension types feature in the CFE feature-extension-types Implementation of the extension type feature front-end-missing-error legacy-area-front-end Legacy: Use area-dart-model instead.

Comments

@sgrekhov
Copy link
Contributor

CFE doesn't report errors expected below

// SharedOptions=--enable-experiment=inline-class

extension type const ET1(int id) {
  ET1.c() : id = 0;
  factory ET1.f(int id) = ET1.c;
//                         ^^^^^
// [analyzer] unspecified
// [cfe] unspecified
}

extension type ET2(int id) {
  ET2.n(int a, int b) : id = a + b;
  factory ET2.f(int id) = ET2.n;
//                        ^^^^^
// [analyzer] unspecified
// [cfe] unspecified
}

main() {
  print(ET1);
  print(ET2);
}

This causes failure of LanguageFeatures/Extension-types/static_analysis_extension_types_A21_t06.dart in CFE

@sgrekhov sgrekhov added legacy-area-front-end Legacy: Use area-dart-model instead. front-end-missing-error labels Aug 14, 2023
@johnniwinther johnniwinther added the feature-extension-types Implementation of the extension type feature label Oct 3, 2023
@johnniwinther johnniwinther added the cfe-feature-extension-types Implement extension types feature in the CFE label Oct 13, 2023
@chloestefantsova chloestefantsova self-assigned this Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cfe-feature-extension-types Implement extension types feature in the CFE feature-extension-types Implementation of the extension type feature front-end-missing-error legacy-area-front-end Legacy: Use area-dart-model instead.
Projects
None yet
Development

No branches or pull requests

3 participants