OLD | NEW |
1 library; | 1 library; |
2 import self as self; | 2 import self as self; |
3 import "dart:async" as asy; | 3 import "dart:async" as asy; |
4 import "dart:core" as core; | 4 import "dart:core" as core; |
5 | 5 |
6 static field core::List<core::String> stringList = <core::String>["bar"]; | |
7 static method asyncString() → asy::Future<core::String> async { | 6 static method asyncString() → asy::Future<core::String> async { |
8 return "foo"; | 7 return "foo"; |
9 } | 8 } |
10 static method asyncString2() → asy::Future<core::String> async { | |
11 return self::asyncString(); | |
12 } | |
13 static method syncStarString() → core::Iterable<core::String> sync* { | |
14 yield "foo"; | |
15 yield* self::syncStarString2(); | |
16 yield* self::stringList; | |
17 } | |
18 static method syncStarString2() → core::Iterable<core::String> sync* { | |
19 yield "foo"; | |
20 } | |
21 static method asyncStarString() → asy::Stream<core::String> async* { | |
22 yield "foo"; | |
23 yield* self::asyncStarString2(); | |
24 yield await self::asyncString(); | |
25 } | |
26 static method asyncStarString2() → asy::Stream<core::String> async* { | |
27 yield "bar"; | |
28 } | |
29 static method main() → dynamic async { | 9 static method main() → dynamic async { |
30 core::String str = await self::asyncString(); | 10 core::String str = await self::asyncString(); |
31 } | 11 } |
OLD | NEW |