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

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

Issue 24736002: Handle hiding dart:core imports specially. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove unused variables. Created 7 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 | « sdk/lib/_internal/compiler/implementation/elements/modelx.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7e641bf8e24746377dd9696f4a5cca16abc41801..b44e3ecbec758dbfc46f3316aa9eac360071d78a 100644
--- a/sdk/lib/_internal/compiler/implementation/warnings.dart
+++ b/sdk/lib/_internal/compiler/implementation/warnings.dart
@@ -204,7 +204,7 @@ main() => new B();
warning: const MessageKind("Warning: Duplicate import of '#{name}'."));
static const MessageKind HIDDEN_IMPORT = const MessageKind(
- "Warning: '#{name}' from library '#{hiddenUri}' by '#{name}' "
+ "Warning: '#{name}' from library '#{hiddenUri}' is hidden by '#{name}' "
"from library '#{hidingUri}'.",
howToFix: "Try adding 'hide #{name}' to the import of '#{hiddenUri}'.",
examples: const [
@@ -256,6 +256,27 @@ library export;
export 'future.dart';"""}]);
+
+ static const MessageKind HIDDEN_IMPLICIT_IMPORT = const MessageKind(
+ "Warning: '#{name}' from library '#{hiddenUri}' is hidden by '#{name}' "
+ "from library '#{hidingUri}'.",
+ howToFix: "Try adding an explicit "
+ "'import \"#{hiddenUri}\" hide #{name}'.",
+ examples: const [
+ const {
+'main.dart':
+"""
+// This hides the implicit import of class Type from dart:core.
+import 'type.dart';
+
+void main() {}""",
+
+'type.dart':
+"""
+library type;
+
+class Type {}"""}]);
+
static const MessageKind DUPLICATE_EXPORT = const MessageKind(
"Error: Duplicate export of '#{name}'.");
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/elements/modelx.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698