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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart2js; 5 part of dart2js;
6 6
7 const DONT_KNOW_HOW_TO_FIX = ""; 7 const DONT_KNOW_HOW_TO_FIX = "";
8 8
9 /** 9 /**
10 * The messages in this file should meet the following guide lines: 10 * The messages in this file should meet the following guide lines:
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 main() {}""", 313 main() {}""",
314 'decl1.dart': "class Class {}", 314 'decl1.dart': "class Class {}",
315 'decl2.dart': "class Class {}"}]); 315 'decl2.dart': "class Class {}"}]);
316 316
317 static const MessageKind DUPLICATE_EXPORT_CONT = const MessageKind( 317 static const MessageKind DUPLICATE_EXPORT_CONT = const MessageKind(
318 "This is another export of '#{name}'."); 318 "This is another export of '#{name}'.");
319 319
320 static const MessageKind DUPLICATE_EXPORT_DECL = const MessageKind( 320 static const MessageKind DUPLICATE_EXPORT_DECL = const MessageKind(
321 "The exported '#{name}' from export #{uriString} is defined here."); 321 "The exported '#{name}' from export #{uriString} is defined here.");
322 322
323 static const MessageKind HIDDEN_IMPLICIT_EXPORT = const MessageKind(
324 "'#{name}' from library '#{hiddenUri}' is hidden by '#{name}' "
325 "from library '#{hidingUri}'.",
326 howToFix: "Try adding an explicit "
327 "'export \"#{hiddenUri}\" hide #{name}'.",
328 examples: const [
329 const {
330 'conflictsWithDartHtml.dart':
331 """
332 typedef CanvasElement();
333 """,
334
335 'reexport.dart':
336 r"""
337 export 'dart:html';
338 export 'conflictsWithDartHtml.dart';
339 """,
340
341 'main.dart':
342 r"""
343 import 'reexport.dart';
344
345 main() {
346 print(main is CanvasElement);
347 }
348 """}]);
349
350
323 static const MessageKind NOT_A_TYPE = const MessageKind( 351 static const MessageKind NOT_A_TYPE = const MessageKind(
324 "'#{node}' is not a type."); 352 "'#{node}' is not a type.");
325 353
326 static const MessageKind NOT_A_PREFIX = const MessageKind( 354 static const MessageKind NOT_A_PREFIX = const MessageKind(
327 "'#{node}' is not a prefix."); 355 "'#{node}' is not a prefix.");
328 356
329 static const MessageKind CANNOT_FIND_CONSTRUCTOR = const MessageKind( 357 static const MessageKind CANNOT_FIND_CONSTRUCTOR = const MessageKind(
330 "Cannot find constructor '#{constructorName}'."); 358 "Cannot find constructor '#{constructorName}'.");
331 359
332 static const MessageKind CYCLIC_CLASS_HIERARCHY = const MessageKind( 360 static const MessageKind CYCLIC_CLASS_HIERARCHY = const MessageKind(
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
1249 1277
1250 static const MessageKind AMBIGUOUS_REEXPORT = const MessageKind( 1278 static const MessageKind AMBIGUOUS_REEXPORT = const MessageKind(
1251 "'#{name}' is (re)exported by multiple libraries."); 1279 "'#{name}' is (re)exported by multiple libraries.");
1252 1280
1253 static const MessageKind AMBIGUOUS_LOCATION = const MessageKind( 1281 static const MessageKind AMBIGUOUS_LOCATION = const MessageKind(
1254 "'#{name}' is defined here."); 1282 "'#{name}' is defined here.");
1255 1283
1256 static const MessageKind IMPORTED_HERE = const MessageKind( 1284 static const MessageKind IMPORTED_HERE = const MessageKind(
1257 "'#{name}' is imported here."); 1285 "'#{name}' is imported here.");
1258 1286
1287 static const MessageKind EXPORTED_HERE = const MessageKind(
1288 "'#{name}' from '#{uri}' is exported here.");
1289
1259 static const MessageKind OVERRIDE_EQUALS_NOT_HASH_CODE = const MessageKind( 1290 static const MessageKind OVERRIDE_EQUALS_NOT_HASH_CODE = const MessageKind(
1260 "The class '#{class}' overrides 'operator==', " 1291 "The class '#{class}' overrides 'operator==', "
1261 "but not 'get hashCode'."); 1292 "but not 'get hashCode'.");
1262 1293
1263 static const MessageKind PACKAGE_ROOT_NOT_SET = const MessageKind( 1294 static const MessageKind PACKAGE_ROOT_NOT_SET = const MessageKind(
1264 "Cannot resolve '#{uri}'. Package root has not been set."); 1295 "Cannot resolve '#{uri}'. Package root has not been set.");
1265 1296
1266 static const MessageKind INTERNAL_LIBRARY_FROM = const MessageKind( 1297 static const MessageKind INTERNAL_LIBRARY_FROM = const MessageKind(
1267 "Internal library '#{resolvedUri}' is not accessible from " 1298 "Internal library '#{resolvedUri}' is not accessible from "
1268 "'#{importingUri}'."); 1299 "'#{importingUri}'.");
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
2120 static String convertToString(value) { 2151 static String convertToString(value) {
2121 if (value is ErrorToken) { 2152 if (value is ErrorToken) {
2122 // Shouldn't happen. 2153 // Shouldn't happen.
2123 return value.assertionMessage; 2154 return value.assertionMessage;
2124 } else if (value is Token) { 2155 } else if (value is Token) {
2125 value = value.value; 2156 value = value.value;
2126 } 2157 }
2127 return '$value'; 2158 return '$value';
2128 } 2159 }
2129 } 2160 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698