| library test; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/inference/top_level_return_and_yield.dart:18:36: Error: A value of type 'dynamic Function(dynamic)' can't be returned from an async function with return type 'Future<int Function(int)>'. |
| // - 'Future' is from 'dart:async'. |
| // return /*@ returnType=dynamic */ (/*@ type=dynamic */ x) => x; |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| import "dart:async" as asy; |
| |
| import "dart:async"; |
| |
| typedef IntToInt = (core::int) → core::int; |
| static method a() → (core::int) → core::int { |
| return (core::int x) → core::int => x; |
| } |
| static method b() → asy::Future<(core::int) → core::int> async /* emittedValueType= (core::int) → core::int */ { |
| return invalid-expression "pkg/front_end/testcases/inference/top_level_return_and_yield.dart:18:36: Error: A value of type 'dynamic Function(dynamic)' can't be returned from an async function with return type 'Future<int Function(int)>'. |
| - 'Future' is from 'dart:async'. |
| return /*@ returnType=dynamic */ (/*@ type=dynamic */ x) => x; |
| ^" in ((dynamic x) → dynamic => x) as{TypeError} (core::int) → core::int; |
| } |
| static method c() → core::Iterable<(core::int) → core::int> sync* /* emittedValueType= (core::int) → core::int */ { |
| yield(core::int x) → core::int => x; |
| } |
| static method d() → core::Iterable<(core::int) → core::int> sync* /* emittedValueType= (core::int) → core::int */ { |
| yield* core::_GrowableList::_literal1<(core::int) → core::int>((core::int x) → core::int => x); |
| } |
| static method e() → asy::Stream<(core::int) → core::int> async* /* emittedValueType= (core::int) → core::int */ { |
| yield(core::int x) → core::int => x; |
| } |
| static method f() → asy::Stream<(core::int) → core::int> async* /* emittedValueType= (core::int) → core::int */ { |
| yield* asy::Stream::fromIterable<(core::int) → core::int>(core::_GrowableList::_literal1<(core::int) → core::int>((core::int x) → core::int => x)); |
| } |
| static method main() → dynamic {} |