Skip to content

[cfe] No error in if await e occurs ob extension type which is not subtype of Future #53207

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

Closed
sgrekhov opened this issue Aug 14, 2023 · 0 comments
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 expected errors below (analyzer does)

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

extension type V0(Future<int> id) {}

extension type V1(Future<int> id) {}

extension type V2<T extends Future<Object>>(T id) {}

extension type V3(Future<int> id) implements V0 {}

main() async {
  V1 v1 = V1(Future<int>.value(42));
  await v1;
//      ^^
// [analyzer] unspecified
// [cfe] unspecified

  V2<Future<String>> v2 = V2(Future<String>.value("42"));
  await v2;
//      ^^
// [analyzer] unspecified
// [cfe] unspecified

  V3 v3 = V3(Future<int>.value(42));
  await v3;
//      ^^
// [analyzer] unspecified
// [cfe] unspecified
}

Failure log, test co19/LanguageFeatures/Extension-types/static_analysis_extension_types_A08_t02

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

2 participants