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

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

Issue 2904263003: Implement type inference for await expressions in front_end. (Closed)
Patch Set: Created 3 years, 7 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/future_union_async_conditional.dart
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional.dart b/pkg/front_end/testcases/inference/future_union_async_conditional.dart
index ee6e6a82e206cf465de59c469f4f04dc2be48168..9681b80a2a5dbcc037dbc588a10bb8c23717d644 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional.dart
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional.dart
@@ -25,6 +25,8 @@ Future<int> g2(bool x) async =>
? 42
: new /*@typeArgs=int*/ Future.value(42);
Future<int> g3(bool x) async {
- var /*@type=Object*/ y = x ? 42 : new /*@typeArgs=dynamic*/ Future.value(42);
+ var /*@type=Object*/ y = x ? 42 : new /*@typeArgs=int*/ Future.value(42);
return /*info:DOWN_CAST_COMPOSITE*/ y;
}
+
+main() {}

Powered by Google App Engine
This is Rietveld 408576698