| Index: pkg/front_end/testcases/inference/local_constructor_from_arguments.dart
|
| diff --git a/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart b/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..62baee35a5f1efeb4dee823ebf0ba5d87a39aefb
|
| --- /dev/null
|
| +++ b/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart
|
| @@ -0,0 +1,24 @@
|
| +// 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.md file.
|
| +
|
| +/*@testedFeatures=inference*/
|
| +library test;
|
| +
|
| +class C<T> {
|
| + T t;
|
| + C(this.t);
|
| +}
|
| +
|
| +main() {
|
| + var /*@type=C<int>*/ x = /*@type=C<int>*/ new C(42);
|
| +
|
| + num y;
|
| + C<int> c_int = /*@type=C<int>*/ new C(
|
| + /*info:DOWN_CAST_IMPLICIT*/ /*@promotedType=none*/ y);
|
| +
|
| + C<num> c_num = /*@type=C<num>*/ new C(123);
|
| +
|
| + // Don't infer from explicit dynamic.
|
| + var /*@type=C<dynamic>*/ c_dynamic = new C<dynamic>(42);
|
| +}
|
|
|