OLD | NEW |
1 library test; | 1 library test; |
2 import self as self; | 2 import self as self; |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:async" as asy; | 4 import "dart:async" as asy; |
5 | 5 |
6 class A extends core::Object { | 6 class A extends core::Object { |
7 constructor •() → void | 7 default constructor •() → void |
8 : super core::Object::•() | 8 : super core::Object::•() |
9 ; | 9 ; |
10 } | 10 } |
11 class B extends self::A { | 11 class B extends self::A { |
12 constructor •() → void | 12 default constructor •() → void |
13 : super self::A::•() | 13 : super self::A::•() |
14 ; | 14 ; |
15 } | 15 } |
16 class C extends self::A { | 16 class C extends self::A { |
17 constructor •() → void | 17 default constructor •() → void |
18 : super self::A::•() | 18 : super self::A::•() |
19 ; | 19 ; |
20 } | 20 } |
21 static method main() → dynamic async { | 21 static method main() → dynamic async { |
22 asy::Future<self::B> b = asy::Future::value<self::B>(new self::B::•()); | 22 asy::Future<self::B> b = asy::Future::value<self::B>(new self::B::•()); |
23 asy::Future<self::C> c = asy::Future::value<self::C>(new self::C::•()); | 23 asy::Future<self::C> c = asy::Future::value<self::C>(new self::C::•()); |
24 core::List<asy::Future<self::A>> lll = <asy::Future<self::A>>[b, c]; | 24 core::List<asy::Future<self::A>> lll = <asy::Future<self::A>>[b, c]; |
25 core::List<self::A> result = await asy::Future::wait<self::A>(lll); | 25 core::List<self::A> result = await asy::Future::wait<self::A>(lll); |
26 core::List<self::A> result2 = await asy::Future::wait<self::A>(<asy::Future<se
lf::A>>[b, c]); | 26 core::List<self::A> result2 = await asy::Future::wait<self::A>(<asy::Future<se
lf::A>>[b, c]); |
27 core::List<self::A> list = result; | 27 core::List<self::A> list = result; |
28 list = result2; | 28 list = result2; |
29 } | 29 } |
OLD | NEW |