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

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

Issue 564403002: Handle implicitly hidden exports. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 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
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 8b1c8a58f46dd59bd9b3ed2dedc791a413efcd03..b51f5aabe06456fa5de17039c254ce3e83fb0d45 100644
--- a/sdk/lib/_internal/compiler/implementation/warnings.dart
+++ b/sdk/lib/_internal/compiler/implementation/warnings.dart
@@ -320,6 +320,34 @@ main() {}""",
static const MessageKind DUPLICATE_EXPORT_DECL = const MessageKind(
"The exported '#{name}' from export #{uriString} is defined here.");
+ static const MessageKind HIDDEN_IMPLICIT_EXPORT = const MessageKind(
+ "'#{name}' from library '#{hiddenUri}' is hidden by '#{name}' "
+ "from library '#{hidingUri}'.",
+ howToFix: "Try adding an explicit "
+ "'export \"#{hiddenUri}\" hide #{name}'.",
+ examples: const [
+ const {
+'conflictsWithDartHtml.dart':
+"""
+typedef CanvasElement();
+""",
+
+'reexport.dart':
+r"""
+export 'dart:html';
+export 'conflictsWithDartHtml.dart';
+""",
+
+'main.dart':
+r"""
+import 'reexport.dart';
+
+main() {
+ print(main is CanvasElement);
+}
+"""}]);
+
+
static const MessageKind NOT_A_TYPE = const MessageKind(
"'#{node}' is not a type.");
@@ -1256,6 +1284,9 @@ main() => A.A = 1;
static const MessageKind IMPORTED_HERE = const MessageKind(
"'#{name}' is imported here.");
+ static const MessageKind EXPORTED_HERE = const MessageKind(
+ "'#{name}' from '#{uri}' is exported here.");
+
static const MessageKind OVERRIDE_EQUALS_NOT_HASH_CODE = const MessageKind(
"The class '#{class}' overrides 'operator==', "
"but not 'get hashCode'.");
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/library_loader.dart ('k') | tests/language/language_analyzer.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698