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

Unified Diff: pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level_2.dart

Issue 2954063002: Small fixes to top level type inference. (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_new/downwards_inference_inside_top_level_2.dart
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart b/pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level_2.dart
similarity index 61%
copy from pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart
copy to pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level_2.dart
index cdae18320ec55b10bfda61c45dae92196d2f9744..ec0be4d4e384c4ec777e48b5edb7838897ce5e6b 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart
+++ b/pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level_2.dart
@@ -5,11 +5,13 @@
/*@testedFeatures=inference*/
library test;
-List<T> f<T>(T g()) => <T>[g()];
-var /*@topType=dynamic*/ v = (f) /*@typeArgs=int*/ (/*@returnType=int*/ () {
- return 1;
-});
-
-main() {
- v;
+class A<T> {
+ A(T x);
}
+
+var /*@topType=List<A<int>>*/ t2 = /*@typeArgs=A<int>*/ [
+ new
+ /*error:TOP_LEVEL_TYPE_ARGUMENTS*/ /*@typeArgs=int*/ A(2)
+];
+
+main() {}

Powered by Google App Engine
This is Rietveld 408576698