| 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 | 6 import |
| 6 '../../../sdk/lib/_internal/compiler/implementation/types/types.dart' | 7 '../../../sdk/lib/_internal/compiler/implementation/types/types.dart' |
| 7 show TypeMask; | 8 show TypeMask; |
| 8 | 9 |
| 9 import 'compiler_helper.dart'; | 10 import 'compiler_helper.dart'; |
| 10 import 'parser_helper.dart'; | 11 import 'parser_helper.dart'; |
| 11 | 12 |
| 12 const String TEST = """ | 13 const String TEST = """ |
| 13 returnNum1(a) { | 14 returnNum1(a) { |
| 14 if (a) return 1; | 15 if (a) return 1; |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 checkReturnInClass('B', 'returnNum8', typesInferrer.numType); | 179 checkReturnInClass('B', 'returnNum8', typesInferrer.numType); |
| 179 | 180 |
| 180 checkFactoryConstructor(String className) { | 181 checkFactoryConstructor(String className) { |
| 181 var cls = findElement(compiler, className); | 182 var cls = findElement(compiler, className); |
| 182 var element = cls.localLookup(buildSourceString(className)); | 183 var element = cls.localLookup(buildSourceString(className)); |
| 183 Expect.equals(new TypeMask.nonNullExact(cls.rawType), | 184 Expect.equals(new TypeMask.nonNullExact(cls.rawType), |
| 184 typesInferrer.returnTypeOf[element]); | 185 typesInferrer.returnTypeOf[element]); |
| 185 } | 186 } |
| 186 checkFactoryConstructor('A'); | 187 checkFactoryConstructor('A'); |
| 187 } | 188 } |
| OLD | NEW |