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

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

Issue 1363993004: Report info messages together with their error, warning, or hint. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comment. Created 5 years, 3 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/serialization/modelz.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 04bb1780e49e13784f0efed68d1f6e470038058c..5fe7193ac23604198a42a07d6a1a3f6822e2dd4b 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.reportError(
+ compiler.reportErrorMessage(
identifier, MessageKind.REFERENCE_IN_INITIALIZATION,
{'variableName': name});
}
@@ -57,11 +57,13 @@ class VariableDefinitionsVisitor extends CommonResolverVisitor<Identifier> {
// The variable is initialized to null.
registry.registerInstantiatedClass(compiler.nullClass);
if (definitions.modifiers.isConst) {
- compiler.reportError(node, MessageKind.CONST_WITHOUT_INITIALIZER);
+ compiler.reportErrorMessage(
+ node, MessageKind.CONST_WITHOUT_INITIALIZER);
}
if (definitions.modifiers.isFinal &&
!resolver.allowFinalWithoutInitializer) {
- compiler.reportError(node, MessageKind.FINAL_WITHOUT_INITIALIZER);
+ compiler.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/serialization/modelz.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698