Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | |
| 2 // for details. All rights reserved. Use of this source code is governed by a | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 /*@testedFeatures=inference*/ | |
| 6 library test; | |
| 7 | |
| 8 class C<T> { | |
| 9 C(List<T> x); | |
| 10 } | |
| 11 | |
| 12 main() { | |
| 13 bool b = false; | |
| 14 List<int> l1 = /*@typeArgs=int*/ [1]; | |
| 15 List<int> l2 = /*@typeArgs=int*/ [2]; | |
| 16 var /*@type=C<int>*/ x = new /*@typeArgs=int*/ C(l1); | |
| 17 var /*@type=C<int>*/ y = new /*@typeArgs=int*/ C(l2); | |
| 18 var /*@type=C<int>*/ z = new /*@typeArgs=int*/ C(b ? l1 : l2); | |
| 19 } | |
| OLD | NEW |