| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 import 'package:expect/expect.dart'; |
| 5 import 'compiler_helper.dart'; | 6 import 'compiler_helper.dart'; |
| 6 | 7 |
| 7 const String TEST = """ | 8 const String TEST = """ |
| 8 returnInt1() { | 9 returnInt1() { |
| 9 var a = 42; | 10 var a = 42; |
| 10 var f = () { | 11 var f = () { |
| 11 return a; | 12 return a; |
| 12 }; | 13 }; |
| 13 return a; | 14 return a; |
| 14 } | 15 } |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // variables anymore, because they could lead to optimistic results | 95 // variables anymore, because they could lead to optimistic results |
| 95 // needing to be re-analyzed. | 96 // needing to be re-analyzed. |
| 96 checkReturn('returnInt2', typesInferrer.dynamicType); | 97 checkReturn('returnInt2', typesInferrer.dynamicType); |
| 97 checkReturn('returnInt3', typesInferrer.intType); | 98 checkReturn('returnInt3', typesInferrer.intType); |
| 98 checkReturn('returnInt4', typesInferrer.intType); | 99 checkReturn('returnInt4', typesInferrer.intType); |
| 99 | 100 |
| 100 checkReturn('returnDyn1', typesInferrer.dynamicType); | 101 checkReturn('returnDyn1', typesInferrer.dynamicType); |
| 101 checkReturn('returnDyn2', typesInferrer.dynamicType); | 102 checkReturn('returnDyn2', typesInferrer.dynamicType); |
| 102 checkReturn('returnDyn3', typesInferrer.dynamicType); | 103 checkReturn('returnDyn3', typesInferrer.dynamicType); |
| 103 } | 104 } |
| OLD | NEW |