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