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

Side by Side Diff: pkg/front_end/testcases/inference/future_union_upwards_generic_methods.dart

Issue 2867253004: Fix annotation of generic method invocations in Fasta inference tests. (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /*@testedFeatures=inference*/ 5 /*@testedFeatures=inference*/
6 library test; 6 library test;
7 7
8 import 'dart:async'; 8 import 'dart:async';
9 9
10 main() async { 10 main() async {
11 var /*@type=Future<B>*/ b = new Future<B>.value(new B()); 11 var /*@type=Future<B>*/ b = new Future<B>.value(new B());
12 var /*@type=Future<C>*/ c = new Future<C>.value(new C()); 12 var /*@type=Future<C>*/ c = new Future<C>.value(new C());
13 var /*@type=List<Future<A>>*/ lll = /*@typeArgs=Future<A>*/ [ 13 var /*@type=List<Future<A>>*/ lll = /*@typeArgs=Future<A>*/ [
14 /*@promotedType=none*/ b, 14 /*@promotedType=none*/ b,
15 /*@promotedType=none*/ c 15 /*@promotedType=none*/ c
16 ]; 16 ];
17 var /*@type=List<A>*/ result = await Future.wait(/*@promotedType=none*/ lll); 17 var /*@type=List<A>*/ result =
18 var /*@type=List<A>*/ result2 = await Future.wait(/*@typeArgs=Future<A>*/ [ 18 await Future. /*@typeArgs=A*/ wait(/*@promotedType=none*/ lll);
19 var /*@type=List<A>*/ result2 =
20 await Future. /*@typeArgs=A*/ wait(/*@typeArgs=Future<A>*/ [
19 /*@promotedType=none*/ b, 21 /*@promotedType=none*/ b,
20 /*@promotedType=none*/ c 22 /*@promotedType=none*/ c
21 ]); 23 ]);
22 List<A> list = /*@promotedType=none*/ result; 24 List<A> list = /*@promotedType=none*/ result;
23 list = /*@promotedType=none*/ result2; 25 list = /*@promotedType=none*/ result2;
24 } 26 }
25 27
26 class A {} 28 class A {}
27 29
28 class B extends A {} 30 class B extends A {}
29 31
30 class C extends A {} 32 class C extends A {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698