blob: 32dbcf82ee538ba87c4dfbb9e6525c946e1c4fbf [file] [log] [blame]
library test;
import self as self;
import "dart:core" as core;
import "dart:async" as asy;
class MyFuture<T extends core::Object> extends core::Object implements asy::Future<self::MyFuture::T> {
constructor •() void
: super core::Object::•() {}
constructor value(self::MyFuture::T x) void
: super core::Object::•() {}
method noSuchMethod(dynamic invocation) dynamic
return null;
method then<S extends core::Object>((self::MyFuture::T) asy::FutureOr<self::MyFuture::then::S> f, {core::Function onError = null}) self::MyFuture<self::MyFuture::then::S>
return null;
abstract no-such-method-forwarder method /* from org-dartlang-testcase-sdk:///sdk/lib/async/future.dart */ catchError(core::Function onError, {(core::Object) core::bool test = null}) asy::Future<self::MyFuture::T>;
abstract no-such-method-forwarder method /* from org-dartlang-testcase-sdk:///sdk/lib/async/future.dart */ whenComplete(() asy::FutureOr<dynamic> action) asy::Future<self::MyFuture::T>;
abstract no-such-method-forwarder method /* from org-dartlang-testcase-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() asy::FutureOr<self::MyFuture::T> onTimeout = null}) asy::Future<self::MyFuture::T>;
abstract no-such-method-forwarder method /* from org-dartlang-testcase-sdk:///sdk/lib/async/future.dart */ asStream() asy::Stream<self::MyFuture::T>;
}
static method test() void {
asy::Future<core::bool> f;
asy::Future<core::int> t1 = f.then((dynamic x) asy::Future<dynamic> async => x ? 2 : await new self::MyFuture::value<core::int>(3));
asy::Future<core::int> t2 = f.then((dynamic x) asy::Future<dynamic> async {
return await x ? 2 : new self::MyFuture::value<core::int>(3);
});
asy::Future<core::int> t5 = f.then((dynamic x) dynamic => x ? 2 : new self::MyFuture::value<core::int>(3));
asy::Future<core::int> t6 = f.then((dynamic x) dynamic {
return x ? 2 : new self::MyFuture::value<core::int>(3);
});
}
static method main() dynamic {}