Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1643)

Unified Diff: testcases/strong-mode/async_function.baseline.txt

Issue 2473523004: Fix expected return type in async functions (Closed)
Patch Set: Also handle yield* Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: testcases/strong-mode/async_function.baseline.txt
diff --git a/testcases/strong-mode/async_function.baseline.txt b/testcases/strong-mode/async_function.baseline.txt
new file mode 100644
index 0000000000000000000000000000000000000000..4cbc5e01ba858966964b34e41f739f104e0582e8
--- /dev/null
+++ b/testcases/strong-mode/async_function.baseline.txt
@@ -0,0 +1,31 @@
+library;
+import self as self;
+import "dart:async" as asy;
+import "dart:core" as core;
+
+static field core::List<core::String> stringList = <core::String>["bar"];
+static method asyncString() → asy::Future<core::String> async {
+ return "foo";
+}
+static method asyncString2() → asy::Future<core::String> async {
+ return self::asyncString();
+}
+static method syncStarString() → core::Iterable<core::String> sync* {
+ yield "foo";
+ yield* self::syncStarString2();
+ yield* self::stringList;
+}
+static method syncStarString2() → core::Iterable<core::String> sync* {
+ yield "foo";
+}
+static method asyncStarString() → asy::Stream<core::String> async* {
+ yield "foo";
+ yield* self::asyncStarString2();
+ yield await self::asyncString();
+}
+static method asyncStarString2() → asy::Stream<core::String> async* {
+ yield "bar";
+}
+static method main() → dynamic async {
+ core::String str = await self::asyncString();
+}
« no previous file with comments | « testcases/spec-mode/async_function.baseline.txt ('k') | testcases/type-propagation/async_function.baseline.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698