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

Unified Diff: pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level.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.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.dart
similarity index 58%
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.dart
index cdae18320ec55b10bfda61c45dae92196d2f9744..98bd7ec1de69599dac7861ce3ed58a856fd3dfdf 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.dart
@@ -5,11 +5,17 @@
/*@testedFeatures=inference*/
library test;
-List<T> f<T>(T g()) => <T>[g()];
-var /*@topType=dynamic*/ v = (f) /*@typeArgs=int*/ (/*@returnType=int*/ () {
- return 1;
-});
+class A {
+ B<int> b;
+}
-main() {
- v;
+class B<T> {
+ B(T x);
}
+
+var /*@topType=List<B<int>>*/ t3 = /*@typeArgs=B<int>*/ [
+ new
+ /*error:TOP_LEVEL_TYPE_ARGUMENTS*/ /*@typeArgs=int*/ B(3)
+];
+
+main() {}

Powered by Google App Engine
This is Rietveld 408576698