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

Unified Diff: pkg/front_end/testcases/inference/infer_local_function_return_type.dart

Issue 2939523003: Add expectations to infer_local_function_return_type. (Closed)
Patch Set: Created 3 years, 6 months 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: pkg/front_end/testcases/inference/infer_local_function_return_type.dart
diff --git a/pkg/front_end/testcases/inference/infer_local_function_return_type.dart b/pkg/front_end/testcases/inference/infer_local_function_return_type.dart
index 860325f42d1840c3bf32d8c16d10f3ebc31190b9..a708bf85b8317e373069ec7294708144624b91bc 100644
--- a/pkg/front_end/testcases/inference/infer_local_function_return_type.dart
+++ b/pkg/front_end/testcases/inference/infer_local_function_return_type.dart
@@ -5,7 +5,7 @@
/*@testedFeatures=inference*/
library test;
-main() {
+test() {
f0() => 42;
f1() async => 42;
@@ -30,4 +30,17 @@ main() {
f7() => f7();
f8() => /*error:REFERENCED_BEFORE_DECLARATION*/ f9();
f9() => f5();
+
+ var /*@type=() -> int*/ v0 = f0;
+ var /*@type=() -> Future<int>*/ v1 = f1;
+ var /*@type=() -> int*/ v2 = f2;
+ var /*@type=() -> Future<int>*/ v3 = f3;
+ var /*@type=() -> Iterable<int>*/ v4 = f4;
+ var /*@type=() -> Stream<int>*/ v5 = f5;
+ var /*@type=() -> num*/ v6 = f6;
+ var /*@type=() -> dynamic*/ v7 = f7;
+ var /*@type=() -> dynamic*/ v8 = f8;
+ var /*@type=() -> Stream<int>*/ v9 = f9;
}
+
+main() {}

Powered by Google App Engine
This is Rietveld 408576698