blob: 7ba1b5b4d2b7780732d9696865b5049ec0ff8779 [file] [log] [blame]
// @dart = 2.9
library test;
import 'dart:async';
Future<int> g1(bool x) async {}
Future<int> g2(bool x) async => x ? 42 : new Future.value(42);
Future<int> g3(bool x) async {}
class MyFuture<T> implements Future<T> {
MyFuture() {}
MyFuture.value(x) {}
MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
dynamic noSuchMethod(invocation) => null;
}
main() {}