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