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

Unified Diff: pkg/analyzer/test/src/task/strong/checker_test.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/analyzer/test/src/task/strong/checker_test.dart
diff --git a/pkg/analyzer/test/src/task/strong/checker_test.dart b/pkg/analyzer/test/src/task/strong/checker_test.dart
index c5b45128e256db2d3ffaaa4fc824040e9496ecf8..99c6b46352d2474cc5c974ad632b455ff9f74414 100644
--- a/pkg/analyzer/test/src/task/strong/checker_test.dart
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart
@@ -922,16 +922,20 @@ dynamic x;
foo1() async => x;
Future foo2() async => x;
Future<int> foo3() async => /*info:DYNAMIC_CAST*/x;
-Future<int> foo4() async => new Future<int>.value(x);
+Future<int> foo4() async => new Future<int>.value(/*info:DYNAMIC_CAST*/x);
Future<int> foo5() async =>
- /*error:RETURN_OF_INVALID_TYPE*/new Future<String>.value(x);
+ /*error:RETURN_OF_INVALID_TYPE*/new Future<String>.value(
+ /*info:DYNAMIC_CAST*/x);
bar1() async { return x; }
Future bar2() async { return x; }
Future<int> bar3() async { return /*info:DYNAMIC_CAST*/x; }
-Future<int> bar4() async { return new Future<int>.value(x); }
+Future<int> bar4() async {
+ return new Future<int>.value(/*info:DYNAMIC_CAST*/x);
+}
Future<int> bar5() async {
- return /*error:RETURN_OF_INVALID_TYPE*/new Future<String>.value(x);
+ return /*error:RETURN_OF_INVALID_TYPE*/new Future<String>.value(
+ /*info:DYNAMIC_CAST*/x);
}
int y;
« no previous file with comments | « pkg/analyzer/test/src/context/mock_sdk.dart ('k') | pkg/analyzer/test/src/task/strong/inferred_type_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698