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

Unified Diff: pkg/compiler/lib/src/dart_backend/outputter.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/dart_backend/backend.dart ('k') | pkg/compiler/lib/src/deferred_load.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/dart_backend/outputter.dart
diff --git a/pkg/compiler/lib/src/dart_backend/outputter.dart b/pkg/compiler/lib/src/dart_backend/outputter.dart
index 82e51702def50095f7e85e843f127023ae6319fc..a8240adf14acfe59a65b23f5cefc1b2b689f2720 100644
--- a/pkg/compiler/lib/src/dart_backend/outputter.dart
+++ b/pkg/compiler/lib/src/dart_backend/outputter.dart
@@ -299,10 +299,18 @@ class LibraryInfo {
ClassElement existingEnumClass =
enumClassMap.putIfAbsent(cls.name, () => cls);
if (existingEnumClass != cls) {
- listener.reportError(cls, MessageKind.GENERIC,
- {'text': "Duplicate enum names are not supported in dart2dart."});
- listener.reportInfo(existingEnumClass, MessageKind.GENERIC,
- {'text': "This is the other declaration of '${cls.name}'."});
+ listener.reportError(
+ listener.createMessage(
+ cls,
+ MessageKind.GENERIC,
+ {'text': "Duplicate enum names are not supported "
+ "in dart2dart."}),
+ <DiagnosticMessage>[
+ listener.createMessage(
+ existingEnumClass,
+ MessageKind.GENERIC,
+ {'text': "This is the other declaration of '${cls.name}'."}),
+ ]);
}
}
}
« no previous file with comments | « pkg/compiler/lib/src/dart_backend/backend.dart ('k') | pkg/compiler/lib/src/deferred_load.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698