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

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

Issue 2867113002: Update expectations for instance creations to match front_end. (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 Future<int> make(int x) => 10 Future<int> make(int x) =>
11 (/*@typeArgs=int*/ new Future(/*@returnType=int*/ () => x)); 11 (new /*@typeArgs=int*/ Future(/*@returnType=int*/ () => x));
12 12
13 main() { 13 main() {
14 Iterable<Future<int>> list = <int>[1, 2, 3].map(make); 14 Iterable<Future<int>> list = <int>[1, 2, 3].map(make);
15 Future<List<int>> results = Future.wait(/*@promotedType=none*/ list); 15 Future<List<int>> results = Future.wait(/*@promotedType=none*/ list);
16 Future<String> results2 = /*@promotedType=none*/ results.then( 16 Future<String> results2 = /*@promotedType=none*/ results.then(
17 /*@returnType=FutureOr<String>*/ (List<int> list) => list.fold( 17 /*@returnType=FutureOr<String>*/ (List<int> list) => list.fold(
18 '', 18 '',
19 /*@returnType=FutureOr<String>*/ (/*@type=FutureOr<String>*/ x, 19 /*@returnType=FutureOr<String>*/ (/*@type=FutureOr<String>*/ x,
20 /*@type=int*/ y) => /*info:DYNAMIC_CAST,info:DYNAMIC_INVOKE*/ x /*error:UNDEFINED_OPERATOR*/ + 20 /*@type=int*/ y) => /*info:DYNAMIC_CAST,info:DYNAMIC_INVOKE*/ x /*error:UNDEFINED_OPERATOR*/ +
21 y.toString())); 21 y.toString()));
22 22
23 Future<String> results3 = /*@promotedType=none*/ results.then( 23 Future<String> results3 = /*@promotedType=none*/ results.then(
24 /*@returnType=FutureOr<String>*/ (List<int> list) => list.fold( 24 /*@returnType=FutureOr<String>*/ (List<int> list) => list.fold(
25 '', 25 '',
26 /*info:INFERRED_TYPE_CLOSURE,error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ /*@r eturnType=String*/ (String 26 /*info:INFERRED_TYPE_CLOSURE,error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ /*@r eturnType=String*/ (String
27 x, 27 x,
28 /*@type=int*/ y) => 28 /*@type=int*/ y) =>
29 x + y.toString())); 29 x + y.toString()));
30 30
31 Future<String> results4 = /*@promotedType=none*/ results.then( 31 Future<String> results4 = /*@promotedType=none*/ results.then(
32 /*@returnType=String*/ (List<int> list) => list.fold<String>( 32 /*@returnType=String*/ (List<int> list) => list.fold<String>(
33 '', 33 '',
34 /*@returnType=String*/ (/*@type=String*/ x, /*@type=int*/ y) => 34 /*@returnType=String*/ (/*@type=String*/ x, /*@type=int*/ y) =>
35 x + y.toString())); 35 x + y.toString()));
36 } 36 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698