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

Unified Diff: pkg/compiler/lib/src/resolution/variables.dart

Issue 1383483006: Extract DiagnosticReporter implementation from Compiler. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fixes after rebase. Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/resolution/typedefs.dart ('k') | pkg/compiler/lib/src/scanner/scanner_task.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/variables.dart
diff --git a/pkg/compiler/lib/src/resolution/variables.dart b/pkg/compiler/lib/src/resolution/variables.dart
index 5fe7193ac23604198a42a07d6a1a3f6822e2dd4b..03d0fb846117c14a0aa903ba6bf345461bdd597d 100644
--- a/pkg/compiler/lib/src/resolution/variables.dart
+++ b/pkg/compiler/lib/src/resolution/variables.dart
@@ -46,7 +46,7 @@ class VariableDefinitionsVisitor extends CommonResolverVisitor<Identifier> {
new VariableDefinitionScope(resolver.scope, name);
resolver.visitIn(node.arguments.head, scope);
if (scope.variableReferencedInInitializer) {
- compiler.reportErrorMessage(
+ reporter.reportErrorMessage(
identifier, MessageKind.REFERENCE_IN_INITIALIZATION,
{'variableName': name});
}
@@ -57,12 +57,12 @@ class VariableDefinitionsVisitor extends CommonResolverVisitor<Identifier> {
// The variable is initialized to null.
registry.registerInstantiatedClass(compiler.nullClass);
if (definitions.modifiers.isConst) {
- compiler.reportErrorMessage(
+ reporter.reportErrorMessage(
node, MessageKind.CONST_WITHOUT_INITIALIZER);
}
if (definitions.modifiers.isFinal &&
!resolver.allowFinalWithoutInitializer) {
- compiler.reportErrorMessage(
+ reporter.reportErrorMessage(
node, MessageKind.FINAL_WITHOUT_INITIALIZER);
}
return node;
« no previous file with comments | « pkg/compiler/lib/src/resolution/typedefs.dart ('k') | pkg/compiler/lib/src/scanner/scanner_task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698