Chromium Code Reviews| 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 | 8 import '../common/resolution.dart' show |
| 9 Feature; | 9 Feature; |
| 10 import '../compiler.dart' show | 10 import '../compiler.dart' show |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 212 reporter.reportErrorMessage(node, kind, arguments); | 212 reporter.reportErrorMessage(node, kind, arguments); |
| 213 superMember = new ErroneousElementX( | 213 superMember = new ErroneousElementX( |
| 214 kind, arguments, '', element); | 214 kind, arguments, '', element); |
| 215 registry.registerFeature(Feature.THROW_NO_SUCH_METHOD); | 215 registry.registerFeature(Feature.THROW_NO_SUCH_METHOD); |
| 216 } else { | 216 } else { |
| 217 ConstructorElement superConstructor = superMember; | 217 ConstructorElement superConstructor = superMember; |
| 218 superConstructor.computeType(resolution); | 218 superConstructor.computeType(resolution); |
| 219 if (!CallStructure.NO_ARGS.signatureApplies( | 219 if (!CallStructure.NO_ARGS.signatureApplies( |
| 220 superConstructor.functionSignature)) { | 220 superConstructor.functionSignature)) { |
| 221 MessageKind kind = MessageKind.NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT; | 221 MessageKind kind = MessageKind.NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT; |
| 222 reporter.reportErrorMessage(node, kind); | 222 DiagnosticMessage message = reporter.createMessage(node, kind); |
| 223 reporter.reportError(message); | |
|
Johnni Winther
2015/12/14 11:31:20
This change doesn't seem to be needed.
sigurdm
2015/12/14 12:07:43
Done.
| |
| 223 superMember = new ErroneousElementX(kind, {}, '', element); | 224 superMember = new ErroneousElementX(kind, {}, '', element); |
| 224 } | 225 } |
| 225 } | 226 } |
| 226 FunctionElement constructor = | 227 FunctionElement constructor = |
| 227 new SynthesizedConstructorElementX.forDefault(superMember, element); | 228 new SynthesizedConstructorElementX.forDefault(superMember, element); |
| 228 if (superMember.isMalformed) { | 229 if (superMember.isMalformed) { |
| 229 compiler.elementsWithCompileTimeErrors.add(constructor); | 230 ErroneousElement erroneousElement = superMember; |
| 231 compiler.elementsWithCompileTimeErrors[constructor] = | |
| 232 reporter.createMessage(node, | |
| 233 erroneousElement.messageKind, | |
| 234 erroneousElement.messageArguments); | |
| 230 } | 235 } |
| 231 element.setDefaultConstructor(constructor, reporter); | 236 element.setDefaultConstructor(constructor, reporter); |
| 232 } | 237 } |
| 233 return element.computeType(resolution); | 238 return element.computeType(resolution); |
| 234 } | 239 } |
| 235 | 240 |
| 236 @override | 241 @override |
| 237 DartType visitEnum(Enum node) { | 242 DartType visitEnum(Enum node) { |
| 238 if (element == null) { | 243 if (element == null) { |
| 239 throw reporter.internalError(node, 'element is null'); | 244 throw reporter.internalError(node, 'element is null'); |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 718 if (e == null || !e.impliesType) { | 723 if (e == null || !e.impliesType) { |
| 719 reporter.reportErrorMessage( | 724 reporter.reportErrorMessage( |
| 720 node.selector, | 725 node.selector, |
| 721 MessageKind.CANNOT_RESOLVE_TYPE, | 726 MessageKind.CANNOT_RESOLVE_TYPE, |
| 722 {'typeName': node.selector}); | 727 {'typeName': node.selector}); |
| 723 return; | 728 return; |
| 724 } | 729 } |
| 725 loadSupertype(e, node); | 730 loadSupertype(e, node); |
| 726 } | 731 } |
| 727 } | 732 } |
| OLD | NEW |