| 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 import 'dart:async'; |
| 9 |
| 10 main() async { |
| 11 var /*@type=Future<B>*/ b = new Future<B>.value(new B()); |
| 12 var /*@type=Future<C>*/ c = new Future<C>.value(new C()); |
| 13 var /*@type=List<Future<A>>*/ lll = /*@typeArgs=Future<A>*/ [ |
| 14 /*@promotedType=none*/ b, |
| 15 /*@promotedType=none*/ c |
| 16 ]; |
| 17 var /*@type=List<A>*/ result = await Future.wait(/*@promotedType=none*/ lll); |
| 18 var /*@type=List<A>*/ result2 = await Future.wait(/*@typeArgs=Future<A>*/ [ |
| 19 /*@promotedType=none*/ b, |
| 20 /*@promotedType=none*/ c |
| 21 ]); |
| 22 List<A> list = /*@promotedType=none*/ result; |
| 23 list = /*@promotedType=none*/ result2; |
| 24 } |
| 25 |
| 26 class A {} |
| 27 |
| 28 class B extends A {} |
| 29 |
| 30 class C extends A {} |
| OLD | NEW |