| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 library dart2js.resolution.class_hierarchy; | 5 library dart2js.resolution.class_hierarchy; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../common/resolution.dart' show Feature; | 8 import '../common/resolution.dart' show Feature; |
| 9 import '../compiler.dart' show Compiler; | 9 import '../compiler.dart' show Compiler; |
| 10 import '../core_types.dart' show CoreClasses, CoreTypes; | 10 import '../core_types.dart' show CoreClasses, CoreTypes; |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 if (!CallStructure.NO_ARGS | 204 if (!CallStructure.NO_ARGS |
| 205 .signatureApplies(superConstructor.functionSignature)) { | 205 .signatureApplies(superConstructor.functionSignature)) { |
| 206 MessageKind kind = MessageKind.NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT; | 206 MessageKind kind = MessageKind.NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT; |
| 207 reporter.reportErrorMessage(node, kind); | 207 reporter.reportErrorMessage(node, kind); |
| 208 superMember = new ErroneousElementX(kind, {}, '', element); | 208 superMember = new ErroneousElementX(kind, {}, '', element); |
| 209 } | 209 } |
| 210 } | 210 } |
| 211 FunctionElement constructor = | 211 FunctionElement constructor = |
| 212 new SynthesizedConstructorElementX.forDefault(superMember, element); | 212 new SynthesizedConstructorElementX.forDefault(superMember, element); |
| 213 if (superMember.isMalformed) { | 213 if (superMember.isMalformed) { |
| 214 compiler.elementsWithCompileTimeErrors.add(constructor); | 214 ErroneousElement erroneousElement = superMember; |
| 215 compiler.registerCompiletimeError(constructor, |
| 216 reporter.createMessage(node, |
| 217 erroneousElement.messageKind, |
| 218 erroneousElement.messageArguments)); |
| 215 } | 219 } |
| 216 element.setDefaultConstructor(constructor, reporter); | 220 element.setDefaultConstructor(constructor, reporter); |
| 217 } | 221 } |
| 218 return element.computeType(resolution); | 222 return element.computeType(resolution); |
| 219 } | 223 } |
| 220 | 224 |
| 221 @override | 225 @override |
| 222 DartType visitEnum(Enum node) { | 226 DartType visitEnum(Enum node) { |
| 223 if (element == null) { | 227 if (element == null) { |
| 224 throw reporter.internalError(node, 'element is null'); | 228 throw reporter.internalError(node, 'element is null'); |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 Identifier selector = node.selector.asIdentifier(); | 649 Identifier selector = node.selector.asIdentifier(); |
| 646 var e = prefixElement.lookupLocalMember(selector.source); | 650 var e = prefixElement.lookupLocalMember(selector.source); |
| 647 if (e == null || !e.impliesType) { | 651 if (e == null || !e.impliesType) { |
| 648 reporter.reportErrorMessage(node.selector, | 652 reporter.reportErrorMessage(node.selector, |
| 649 MessageKind.CANNOT_RESOLVE_TYPE, {'typeName': node.selector}); | 653 MessageKind.CANNOT_RESOLVE_TYPE, {'typeName': node.selector}); |
| 650 return; | 654 return; |
| 651 } | 655 } |
| 652 loadSupertype(e, node); | 656 loadSupertype(e, node); |
| 653 } | 657 } |
| 654 } | 658 } |
| OLD | NEW |