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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/resolution/class_hierarchy.dart
diff --git a/pkg/compiler/lib/src/resolution/class_hierarchy.dart b/pkg/compiler/lib/src/resolution/class_hierarchy.dart
index 64fb6a7593a34ed97faba97900228dd10c958655..9923f23403de8a882d3b11da18a1c5d9a1ba69d8 100644
--- a/pkg/compiler/lib/src/resolution/class_hierarchy.dart
+++ b/pkg/compiler/lib/src/resolution/class_hierarchy.dart
@@ -219,14 +219,19 @@ class ClassResolverVisitor extends TypeDefinitionVisitor {
if (!CallStructure.NO_ARGS.signatureApplies(
superConstructor.functionSignature)) {
MessageKind kind = MessageKind.NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT;
- reporter.reportErrorMessage(node, kind);
+ DiagnosticMessage message = reporter.createMessage(node, kind);
+ 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.
superMember = new ErroneousElementX(kind, {}, '', element);
}
}
FunctionElement constructor =
new SynthesizedConstructorElementX.forDefault(superMember, element);
if (superMember.isMalformed) {
- compiler.elementsWithCompileTimeErrors.add(constructor);
+ ErroneousElement erroneousElement = superMember;
+ compiler.elementsWithCompileTimeErrors[constructor] =
+ reporter.createMessage(node,
+ erroneousElement.messageKind,
+ erroneousElement.messageArguments);
}
element.setDefaultConstructor(constructor, reporter);
}

Powered by Google App Engine
This is Rietveld 408576698