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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 ErroneousElement erroneousElement = superMember; | 214 ErroneousElement erroneousElement = superMember; |
215 compiler.registerCompiletimeError(constructor, | 215 compiler.registerCompiletimeError( |
216 reporter.createMessage(node, | 216 constructor, |
217 erroneousElement.messageKind, | 217 reporter.createMessage(node, erroneousElement.messageKind, |
218 erroneousElement.messageArguments)); | 218 erroneousElement.messageArguments)); |
219 } | 219 } |
220 element.setDefaultConstructor(constructor, reporter); | 220 element.setDefaultConstructor(constructor, reporter); |
221 } | 221 } |
222 return element.computeType(resolution); | 222 return element.computeType(resolution); |
223 } | 223 } |
224 | 224 |
225 @override | 225 @override |
226 DartType visitEnum(Enum node) { | 226 DartType visitEnum(Enum node) { |
227 if (element == null) { | 227 if (element == null) { |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 Identifier selector = node.selector.asIdentifier(); | 649 Identifier selector = node.selector.asIdentifier(); |
650 var e = prefixElement.lookupLocalMember(selector.source); | 650 var e = prefixElement.lookupLocalMember(selector.source); |
651 if (e == null || !e.impliesType) { | 651 if (e == null || !e.impliesType) { |
652 reporter.reportErrorMessage(node.selector, | 652 reporter.reportErrorMessage(node.selector, |
653 MessageKind.CANNOT_RESOLVE_TYPE, {'typeName': node.selector}); | 653 MessageKind.CANNOT_RESOLVE_TYPE, {'typeName': node.selector}); |
654 return; | 654 return; |
655 } | 655 } |
656 loadSupertype(e, node); | 656 loadSupertype(e, node); |
657 } | 657 } |
658 } | 658 } |
OLD | NEW |