OLD | NEW |
(Empty) | |
| 1 library test; |
| 2 import self as self; |
| 3 import "dart:core" as core; |
| 4 import "dart:async" as asy; |
| 5 |
| 6 class MyFuture<T extends core::Object> extends core::Object implements asy::Futu
re<self::MyFuture::T> { |
| 7 constructor •() → void |
| 8 : super core::Object::•() {} |
| 9 constructor value(self::MyFuture::T x) → void |
| 10 : super core::Object::•() {} |
| 11 abstract method noSuchMethod(dynamic invocation) → dynamic; |
| 12 method then<S extends core::Object>((self::MyFuture::T) → asy::FutureOr<self::
MyFuture::then::S> f, {core::Function onError = null}) → self::MyFuture<self::My
Future::then::S> |
| 13 return null; |
| 14 } |
| 15 static method test() → void { |
| 16 self::MyFuture<core::bool> f; |
| 17 self::MyFuture<core::int> t1 = f.then((dynamic x) → dynamic async => x ? 2 : a
wait new self::MyFuture::value<core::int>(3)); |
| 18 self::MyFuture<core::int> t2 = f.then((dynamic x) → dynamic async { |
| 19 return await x ? 2 : new self::MyFuture::value<core::int>(3); |
| 20 }); |
| 21 self::MyFuture<core::int> t5 = f.then((dynamic x) → dynamic => x ? 2 : new sel
f::MyFuture::value<core::int>(3)); |
| 22 self::MyFuture<core::int> t6 = f.then((dynamic x) → dynamic { |
| 23 return x ? 2 : new self::MyFuture::value<core::int>(3); |
| 24 }); |
| 25 } |
| 26 static method main() → dynamic {} |
OLD | NEW |