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