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}'."); |