Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: pkg/compiler/lib/src/resolution/class_hierarchy.dart

Issue 1911443002: Associate compile-time errors with elements. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merged with 111a794141cd313460e4fe2593cfea9862fe1c0f Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698