| 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 class X {} | 9 class X {} |
| 9 returnDyn1() { | 10 returnDyn1() { |
| 10 var a; | 11 var a; |
| 11 ((a = 52) == true) || ((a = 'foo') == true); | 12 ((a = 52) == true) || ((a = 'foo') == true); |
| 12 return a; | 13 return a; |
| 13 } | 14 } |
| 14 | 15 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 var subclassOfInterceptor = | 68 var subclassOfInterceptor = |
| 68 findTypeMask(compiler, 'Interceptor', 'nonNullSubclass'); | 69 findTypeMask(compiler, 'Interceptor', 'nonNullSubclass'); |
| 69 | 70 |
| 70 checkReturn('returnDyn1', subclassOfInterceptor); | 71 checkReturn('returnDyn1', subclassOfInterceptor); |
| 71 checkReturn('returnDyn2', subclassOfInterceptor); | 72 checkReturn('returnDyn2', subclassOfInterceptor); |
| 72 checkReturn('returnDyn3', subclassOfInterceptor); | 73 checkReturn('returnDyn3', subclassOfInterceptor); |
| 73 checkReturn('returnDyn4', typesInferrer.dynamicType); | 74 checkReturn('returnDyn4', typesInferrer.dynamicType); |
| 74 checkReturn('returnDyn5', typesInferrer.dynamicType); | 75 checkReturn('returnDyn5', typesInferrer.dynamicType); |
| 75 checkReturn('returnDyn6', typesInferrer.dynamicType); | 76 checkReturn('returnDyn6', typesInferrer.dynamicType); |
| 76 } | 77 } |
| OLD | NEW |