blob: fa9c6919c5553f21ae386b15c4a9c71c9812cc2c [file] [log] [blame]
library test;
import self as self;
import "dart:core" as core;
import "dart:async" as asy;
import "dart:async";
class MyFuture<T extends core::Object* = dynamic> extends core::Object implements asy::Future<self::MyFuture::T*> {
constructor •() self::MyFuture<self::MyFuture::T*>*
: super core::Object::•() {}
constructor value(self::MyFuture::T* x) self::MyFuture<self::MyFuture::T*>*
: super core::Object::•() {}
method noSuchMethod(core::Invocation* invocation) dynamic
return null;
method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* asy::FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError = #C1}) → self::MyFuture<self::MyFuture::then::S*>*
return null;
no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C4: test}))) as{TypeError} asy::Future<self::MyFuture::T*>*;
no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() →* asy::FutureOr<dynamic>* action) asy::Future<self::MyFuture::T*>*
return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))) as{TypeError} asy::Future<self::MyFuture::T*>*;
no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration* timeLimit, {generic-covariant-impl () →* asy::FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C9: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T*>*;
no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() asy::Stream<self::MyFuture::T*>*
return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C10, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))) as{TypeError} 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 {}
constants {
#C1 = null
#C2 = #catchError
#C3 = <core::Type*>[]
#C4 = #test
#C5 = #whenComplete
#C6 = <dynamic>[]
#C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
#C8 = #timeout
#C9 = #onTimeout
#C10 = #asStream
}