| OLD | NEW |
| 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 void main() { | 8 void main() { |
| 9 List<int> o; | 9 List<int> o; |
| 10 int y = /*@promotedType=none*/ o. /*@typeArgs=int*/ /*@target=List::fold*/ fol
d( | 10 int y = o. /*@typeArgs=int*/ /*@target=List::fold*/ fold( |
| 11 0, | 11 0, |
| 12 /*@returnType=int*/ (/*@type=int*/ x, | 12 /*@returnType=int*/ (/*@type=int*/ x, |
| 13 /*@type=int*/ y) => /*@promotedType=none*/ x /*@target=num::+*/ + /*@p
romotedType=none*/ y); | 13 /*@type=int*/ y) => |
| 14 var /*@type=dynamic*/ z = /*@promotedType=none*/ o | 14 x /*@target=num::+*/ + y); |
| 15 . /*@typeArgs=dynamic*/ /*@target=List::fold*/ fold( | 15 var /*@type=dynamic*/ z = |
| 16 o. /*@typeArgs=dynamic*/ /*@target=List::fold*/ fold( |
| 16 0, | 17 0, |
| 17 /*@returnType=dynamic*/ (/*@type=dynamic*/ x, | 18 /*@returnType=dynamic*/ (/*@type=dynamic*/ x, |
| 18 /*@type=int*/ y) => /*info:DYNAMIC_INVOKE*/ /*@promotedType=none*/
x + /*@promotedType=none*/ y); | 19 /*@type=int*/ y) => /*info:DYNAMIC_INVOKE*/ x + y); |
| 19 y = /*info:DYNAMIC_CAST*/ /*@promotedType=none*/ z; | 20 y = /*info:DYNAMIC_CAST*/ z; |
| 20 } | 21 } |
| 21 | 22 |
| 22 void functionExpressionInvocation() { | 23 void functionExpressionInvocation() { |
| 23 List<int> o; | 24 List<int> o; |
| 24 int y = (/*@promotedType=none*/ o.fold)( | 25 int y = (o.fold)( |
| 25 0, | 26 0, |
| 26 /*@returnType=int*/ (/*@type=int*/ x, | 27 /*@returnType=int*/ (/*@type=int*/ x, |
| 27 /*@type=int*/ y) => /*@promotedType=none*/ x /*@target=num::+*/ + /*@p
romotedType=none*/ y); | 28 /*@type=int*/ y) => |
| 28 var /*@type=dynamic*/ z = (/*@promotedType=none*/ o.fold)( | 29 x /*@target=num::+*/ + y); |
| 30 var /*@type=dynamic*/ z = (o.fold)( |
| 29 0, | 31 0, |
| 30 /*@returnType=dynamic*/ (/*@type=dynamic*/ x, | 32 /*@returnType=dynamic*/ (/*@type=dynamic*/ x, |
| 31 /*@type=int*/ y) => /*info:DYNAMIC_INVOKE*/ /*@promotedType=none*/ x +
/*@promotedType=none*/ y); | 33 /*@type=int*/ y) => /*info:DYNAMIC_INVOKE*/ x + y); |
| 32 y = /*info:DYNAMIC_CAST*/ /*@promotedType=none*/ z; | 34 y = /*info:DYNAMIC_CAST*/ z; |
| 33 } | 35 } |
| OLD | NEW |