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

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

Issue 1525603002: Associate compile-time errors with elements (Closed) Base URL: git@github.com:dart-lang/sdk.git@_temporary_fletch_patches
Patch Set: Address review Created 5 years 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 8 import '../common/resolution.dart' show
9 Feature; 9 Feature;
10 import '../compiler.dart' show 10 import '../compiler.dart' show
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 reporter.reportErrorMessage(node, kind);
223 superMember = new ErroneousElementX(kind, {}, '', element); 223 superMember = new ErroneousElementX(kind, {}, '', element);
224 } 224 }
225 } 225 }
226 FunctionElement constructor = 226 FunctionElement constructor =
227 new SynthesizedConstructorElementX.forDefault(superMember, element); 227 new SynthesizedConstructorElementX.forDefault(superMember, element);
228 if (superMember.isMalformed) { 228 if (superMember.isMalformed) {
229 compiler.elementsWithCompileTimeErrors.add(constructor); 229 ErroneousElement erroneousElement = superMember;
230 compiler.registerCompiletimeError(constructor,
231 reporter.createMessage(node,
232 erroneousElement.messageKind,
233 erroneousElement.messageArguments));
230 } 234 }
231 element.setDefaultConstructor(constructor, reporter); 235 element.setDefaultConstructor(constructor, reporter);
232 } 236 }
233 return element.computeType(resolution); 237 return element.computeType(resolution);
234 } 238 }
235 239
236 @override 240 @override
237 DartType visitEnum(Enum node) { 241 DartType visitEnum(Enum node) {
238 if (element == null) { 242 if (element == null) {
239 throw reporter.internalError(node, 'element is null'); 243 throw reporter.internalError(node, 'element is null');
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 if (e == null || !e.impliesType) { 722 if (e == null || !e.impliesType) {
719 reporter.reportErrorMessage( 723 reporter.reportErrorMessage(
720 node.selector, 724 node.selector,
721 MessageKind.CANNOT_RESOLVE_TYPE, 725 MessageKind.CANNOT_RESOLVE_TYPE,
722 {'typeName': node.selector}); 726 {'typeName': node.selector});
723 return; 727 return;
724 } 728 }
725 loadSupertype(e, node); 729 loadSupertype(e, node);
726 } 730 }
727 } 731 }
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