| 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 'package:expect/expect.dart'; |
| 6 import | 6 import |
| 7 '../../../sdk/lib/_internal/compiler/implementation/types/types.dart' | 7 '../../../sdk/lib/_internal/compiler/implementation/types/types.dart' |
| 8 show TypeMask; | 8 show TypeMask; |
| 9 | 9 |
| 10 import 'compiler_helper.dart'; | 10 import 'compiler_helper.dart'; |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 checkReturnInClass('B', 'returnInt1', typesInferrer.intType); | 573 checkReturnInClass('B', 'returnInt1', typesInferrer.intType); |
| 574 checkReturnInClass('B', 'returnInt2', typesInferrer.intType); | 574 checkReturnInClass('B', 'returnInt2', typesInferrer.intType); |
| 575 checkReturnInClass('B', 'returnInt3', typesInferrer.intType); | 575 checkReturnInClass('B', 'returnInt3', typesInferrer.intType); |
| 576 checkReturnInClass('B', 'returnInt4', typesInferrer.intType); | 576 checkReturnInClass('B', 'returnInt4', typesInferrer.intType); |
| 577 checkReturnInClass('B', 'returnInt5', typesInferrer.intType); | 577 checkReturnInClass('B', 'returnInt5', typesInferrer.intType); |
| 578 checkReturnInClass('B', 'returnInt6', typesInferrer.intType); | 578 checkReturnInClass('B', 'returnInt6', typesInferrer.intType); |
| 579 checkReturnInClass('B', 'returnInt7', typesInferrer.intType); | 579 checkReturnInClass('B', 'returnInt7', typesInferrer.intType); |
| 580 checkReturnInClass('B', 'returnInt8', typesInferrer.intType); | 580 checkReturnInClass('B', 'returnInt8', typesInferrer.intType); |
| 581 checkReturnInClass('B', 'returnInt9', typesInferrer.intType); | 581 checkReturnInClass('B', 'returnInt9', typesInferrer.intType); |
| 582 | 582 |
| 583 checkFactoryConstructor(String className) { | 583 checkFactoryConstructor(String className, String factoryName) { |
| 584 var cls = findElement(compiler, className); | 584 var cls = findElement(compiler, className); |
| 585 var element = cls.localLookup(buildSourceString(className)); | 585 var element = cls.localLookup(buildSourceString(factoryName)); |
| 586 Expect.equals(new TypeMask.nonNullExact(cls.rawType), | 586 Expect.equals(new TypeMask.nonNullExact(cls.rawType), |
| 587 typesInferrer.getReturnTypeOfElement(element)); | 587 typesInferrer.getReturnTypeOfElement(element)); |
| 588 } | 588 } |
| 589 checkFactoryConstructor('A'); | 589 checkFactoryConstructor('A', ''); |
| 590 } | 590 } |
| OLD | NEW |