4bf22f41f3
Change-Id: Ideee9917b2e5b819672c7e441d051f9bc57c86c6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366342 Reviewed-by: Jens Johansen <jensj@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com>
34 lines
1.2 KiB
Plaintext
34 lines
1.2 KiB
Plaintext
library;
|
|
import self as self;
|
|
import "dart:async" as asy;
|
|
import "dart:core" as core;
|
|
|
|
import "dart:async";
|
|
|
|
static field core::List<core::String> stringList = <core::String>["bar"];
|
|
static method asyncString() → asy::Future<core::String> async /* emittedValueType= core::String */ {
|
|
return "foo";
|
|
}
|
|
static method asyncString2() → asy::Future<core::String> async /* emittedValueType= core::String */ {
|
|
return self::asyncString();
|
|
}
|
|
static method syncStarString() → core::Iterable<core::String> sync* /* emittedValueType= core::String */ {
|
|
yield "foo";
|
|
yield* self::syncStarString2();
|
|
yield* self::stringList;
|
|
}
|
|
static method syncStarString2() → core::Iterable<core::String> sync* /* emittedValueType= core::String */ {
|
|
yield "foo";
|
|
}
|
|
static method asyncStarString() → asy::Stream<core::String> async* /* emittedValueType= core::String */ {
|
|
yield "foo";
|
|
yield* self::asyncStarString2();
|
|
yield await self::asyncString();
|
|
}
|
|
static method asyncStarString2() → asy::Stream<core::String> async* /* emittedValueType= core::String */ {
|
|
yield "bar";
|
|
}
|
|
static method main() → dynamic async /* emittedValueType= dynamic */ {
|
|
core::String str = await self::asyncString();
|
|
}
|