Closed
Description
Dart VM version: 2.9.0-13.0.dev (dev) (Fri May 29 15:59:05 2020 +0200) on "windows_x64"
This issue is related with SDK Issues #41266, #41437, as well as with co19 issues 603 and 703.
Seems like after the 941 the following code should not throw compile error:
import "dart:async";
dynamic getNull() => null;
Future<bool> test1() async => await getNull();
main() {}
However, still dart behave in such a way.
Sample output is:
$> dart --enable-experiment=non-nullable test.dart
test.dart:3:31: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
- 'Future' is from 'dart:async'.
- 'FutureOr' is from 'dart:async'.
Future<bool> test1() async => await getNull();