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

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

Issue 2868133002: Fix annotation of promoted parameters in Fasta inference tests. (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/downwards_inference_on_function_expressions.dart
diff --git a/pkg/front_end/testcases/inference/downwards_inference_on_function_expressions.dart b/pkg/front_end/testcases/inference/downwards_inference_on_function_expressions.dart
index 04a20f2afd3aaabf164212510254394d8100251d..f63dcdb8e54b473a225b946eb85cc6ac341cf121 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_on_function_expressions.dart
+++ b/pkg/front_end/testcases/inference/downwards_inference_on_function_expressions.dart
@@ -32,7 +32,7 @@ void main() {
return /*error:RETURN_OF_INVALID_TYPE*/ 3;
};
Function2<int, String> l4 = /*@returnType=String*/ (/*@type=int*/ x) {
- return /*error:RETURN_OF_INVALID_TYPE*/ x;
+ return /*error:RETURN_OF_INVALID_TYPE*/ /*@promotedType=none*/ x;
};
}
{
@@ -54,15 +54,19 @@ void main() {
};
}
{
- Function2<int, int> l0 = /*@returnType=int*/ (/*@type=int*/ x) => x;
- Function2<int, int> l1 = /*@returnType=int*/ (/*@type=int*/ x) => x + 1;
+ Function2<int, int>
+ l0 = /*@returnType=int*/ (/*@type=int*/ x) => /*@promotedType=none*/ x;
+ Function2<int, int>
+ l1 = /*@returnType=int*/ (/*@type=int*/ x) => /*@promotedType=none*/ x +
+ 1;
Function2<int, String>
l2 = /*error:INVALID_ASSIGNMENT*/ /*@returnType=int*/ (/*@type=int*/ x) =>
- x;
+ /*@promotedType=none*/ x;
Function2<int, String>
- l3 = /*@returnType=String*/ (/*@type=int*/ x) => /*info:DYNAMIC_CAST, info:DYNAMIC_INVOKE*/ x
+ l3 = /*@returnType=String*/ (/*@type=int*/ x) => /*info:DYNAMIC_CAST, info:DYNAMIC_INVOKE*/ /*@promotedType=none*/ x
.substring(3);
Function2<String, String>
- l4 = /*@returnType=String*/ (/*@type=String*/ x) => x.substring(3);
+ l4 = /*@returnType=String*/ (/*@type=String*/ x) => /*@promotedType=none*/ x
+ .substring(3);
}
}

Powered by Google App Engine
This is Rietveld 408576698