You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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:
Example CompileTimeError for that code:
I reached out to Erik, and he verified that with null-safe assignability rules this test should be valid since
dynamic
is assignable toint
. It sounds like the spec has changed and this may be a new requirement with null-safety.The text was updated successfully, but these errors were encountered: