Index: pkg/front_end/testcases/inference/parameter_defaults_upwards.dart |
diff --git a/pkg/front_end/testcases/inference/parameter_defaults_upwards.dart b/pkg/front_end/testcases/inference/parameter_defaults_upwards.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8ed6133f1ea1d7180ae799eaf490691020588956 |
--- /dev/null |
+++ b/pkg/front_end/testcases/inference/parameter_defaults_upwards.dart |
@@ -0,0 +1,34 @@ |
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+/*@testedFeatures=inference*/ |
+library test; |
+ |
+class C<T> { |
+ C.optional(void func([T x])) {} |
+ C.named(void func({T x})) {} |
+} |
+ |
+void optional_toplevel([x = /*@typeArgs=int*/ const [0]]) {} |
+ |
+void named_toplevel({x: /*@typeArgs=int*/ const [0]}) {} |
+ |
+main() { |
+ void optional_local([x = /*@typeArgs=int*/ const [0]]) {} |
+ void named_local({x: /*@typeArgs=int*/ const [0]}) {} |
+ var /*@type=C<dynamic>*/ c_optional_toplevel = |
+ new /*@typeArgs=dynamic*/ C.optional(optional_toplevel); |
+ var /*@type=C<dynamic>*/ c_named_toplevel = |
+ new /*@typeArgs=dynamic*/ C.named(named_toplevel); |
+ var /*@type=C<dynamic>*/ c_optional_local = |
+ new /*@typeArgs=dynamic*/ C.optional(optional_local); |
+ var /*@type=C<dynamic>*/ c_named_local = |
+ new /*@typeArgs=dynamic*/ C.named(named_local); |
+ var /*@type=C<dynamic>*/ c_optional_closure = |
+ new /*@typeArgs=dynamic*/ C.optional(/*@returnType=Null*/ ( |
+ [/*@type=dynamic*/ x = /*@typeArgs=int*/ const [0]]) {}); |
+ var /*@type=C<dynamic>*/ c_named_closure = new /*@typeArgs=dynamic*/ C.named( |
+ /*@returnType=Null*/ ( |
+ {/*@type=dynamic*/ x: /*@typeArgs=int*/ const [0]}) {}); |
+} |