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

Unified Diff: sdk/lib/_internal/compiler/implementation/warnings.dart

Issue 25864002: Update handling of exports. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status Created 7 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
Index: sdk/lib/_internal/compiler/implementation/warnings.dart
diff --git a/sdk/lib/_internal/compiler/implementation/warnings.dart b/sdk/lib/_internal/compiler/implementation/warnings.dart
index 3c3729e54ef56b18d984d313298683d0ce92222b..221f3af820341813bcb16c5d5d3aa9fd98aae3cd 100644
--- a/sdk/lib/_internal/compiler/implementation/warnings.dart
+++ b/sdk/lib/_internal/compiler/implementation/warnings.dart
@@ -278,7 +278,22 @@ library type;
class Type {}"""}]);
static const MessageKind DUPLICATE_EXPORT = const MessageKind(
- "Error: Duplicate export of '#{name}'.");
+ "Error: Duplicate export of '#{name}'.",
+ howToFix: "Trying adding 'hide #{name}' to one of the exports.",
+ examples: const [const {
+'main.dart': """
+export 'decl1.dart';
+export 'decl2.dart';
+
+main() {}""",
+'decl1.dart': "class Class {}",
+'decl2.dart': "class Class {}"}]);
+
+ static const MessageKind DUPLICATE_EXPORT_CONT = const MessageKind(
+ "Info: This is another export of '#{name}'.");
+
+ static const MessageKind DUPLICATE_EXPORT_DECL = const MessageKind(
+ "Info: The exported '#{name}' from export #{uriString} is defined here.");
static const DualKind NOT_A_TYPE = const DualKind(
error: const MessageKind("Error: '#{node}' is not a type."),
@@ -674,11 +689,11 @@ main() { F f = null; }"""]);
examples: const ["""
class C extends Object with String {}
-main() => new C();
+main() => new C();
""", """
typedef C = Object with String;
-main() => new C();
+main() => new C();
"""]);
static const MessageKind DUPLICATE_EXTENDS_IMPLEMENTS = const MessageKind(
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/library_loader.dart ('k') | tests/language/duplicate_export_liba.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698