Skip to content

DDC failing for tests/language/invalid_returns/async_valid_returns_test #41900

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
rileyporter opened this issue May 14, 2020 · 1 comment
Closed
Labels
legacy-area-front-end Legacy: Use area-dart-model instead. NNBD Issues related to NNBD Release

Comments

@rileyporter
Copy link
Contributor

DDC is failing with CompileTimeErrors for tests/language/invalid_returns/async_valid_returns_test.dart. Here is a link to the failing logs.

Example code causing the error:

int vi = 0;
Future<int> async_dynamic_to_Future_int__e() async =>
    vi as dynamic; // No await.

Example CompileTimeError for that code:

org-dartlang-app:/tests/language/invalid_returns/async_valid_returns_test.dart:489:8: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<int>'.
 - 'Future' is from 'dart:async'.
 - 'FutureOr' is from 'dart:async'.
    vi as dynamic; // No await.
       ^

I reached out to Erik, and he verified that with null-safe assignability rules this test should be valid since dynamic is assignable to int. It sounds like the spec has changed and this may be a new requirement with null-safety.

@rileyporter rileyporter added web-dev-compiler area-web-js Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop. labels May 14, 2020
@nshahan nshahan added the NNBD Issues related to NNBD Release label May 14, 2020
@nshahan nshahan added legacy-area-front-end Legacy: Use area-dart-model instead. and removed area-web-js Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop. web-dev-compiler labels May 21, 2020
@nshahan
Copy link
Contributor

nshahan commented May 21, 2020

When we talked about it earlier I missed the fact that this is an unexpected compile time error. Relabeling this to the front end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy-area-front-end Legacy: Use area-dart-model instead. NNBD Issues related to NNBD Release
Projects
None yet
Development

No branches or pull requests

2 participants