blob: c48a4c48eba42ef66dd8147aa9427f075af902ff [file] [log] [blame]
library test;
import self as self;
import "dart:core" as core;
import "dart:async" as asy;
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 {
return let dynamic _ = null in let final dynamic #t1 = let dynamic _ = null in invalid-expression "pkg/front_end/testcases/inference/top_level_return_and_yield.dart:18:34: Error: A value of type '(dynamic) \u8594 dynamic' can't be assigned to a variable of type 'dart.async::FutureOr<(dart.core::int) \u8594 dart.core::int>'.
Try changing the type of the left hand side, or casting the right hand side to 'dart.async::FutureOr<(dart.core::int) \u8594 dart.core::int>'.
return /*@returnType=dynamic*/ (/*@type=dynamic*/ x) => x;
^" in let final dynamic #t2 = (dynamic x) → dynamic => x in null;
}
static method c() → core::Iterable<(core::int) → core::int> sync* {
yield(core::int x) → core::int => x;
}
static method d() → core::Iterable<(core::int) → core::int> sync* {
yield*<(core::int) → core::int>[(core::int x) → core::int => x];
}
static method e() → asy::Stream<(core::int) → core::int> async* {
yield(core::int x) → core::int => x;
}
static method f() → asy::Stream<(core::int) → core::int> async* {
yield* asy::Stream::fromIterable<(core::int) → core::int>(<(core::int) → core::int>[(core::int x) → core::int => x]);
}
static method main() → dynamic {}