| library test /*isNonNullableByDefault*/; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/inference/future_then_downwards_method_target2.dart:14:41: Error: A value of type 'Future<List<dynamic>>' can't be assigned to a variable of type 'Future<List<int>>'. |
| // - 'Future' is from 'dart:async'. |
| // - 'List' is from 'dart:core'. |
| // . /*@target=Future.whenComplete*/ whenComplete( |
| // ^ |
| // |
| import self as self; |
| import "dart:async" as asy; |
| import "dart:core" as core; |
| |
| import "dart:async"; |
| |
| static method test(asy::Future<core::int> f) → dynamic { |
| asy::Future<core::List<core::int>> b = invalid-expression "pkg/front_end/testcases/inference/future_then_downwards_method_target2.dart:14:41: Error: A value of type 'Future<List<dynamic>>' can't be assigned to a variable of type 'Future<List<int>>'. |
| - 'Future' is from 'dart:async'. |
| - 'List' is from 'dart:core'. |
| . /*@target=Future.whenComplete*/ whenComplete( |
| ^" in f.{asy::Future::then}<core::List<dynamic>>((core::int x) → core::List<dynamic> => core::_GrowableList::•<dynamic>(0)){((core::int) → FutureOr<core::List<dynamic>>, {onError: core::Function?}) → asy::Future<core::List<dynamic>>}.{asy::Future::whenComplete}(() → Null {}){(() → FutureOr<void>) → asy::Future<core::List<dynamic>>} as{TypeError,ForNonNullableByDefault} asy::Future<core::List<core::int>>; |
| b = f.{asy::Future::then}<core::List<core::int>>((core::int x) → core::List<core::int> => core::_GrowableList::•<core::int>(0)){((core::int) → FutureOr<core::List<core::int>>, {onError: core::Function?}) → asy::Future<core::List<core::int>>}; |
| } |
| static method main() → dynamic {} |