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

Side by Side 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 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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 271
272 void main() {}""", 272 void main() {}""",
273 273
274 'type.dart': 274 'type.dart':
275 """ 275 """
276 library type; 276 library type;
277 277
278 class Type {}"""}]); 278 class Type {}"""}]);
279 279
280 static const MessageKind DUPLICATE_EXPORT = const MessageKind( 280 static const MessageKind DUPLICATE_EXPORT = const MessageKind(
281 "Error: Duplicate export of '#{name}'."); 281 "Error: Duplicate export of '#{name}'.",
282 howToFix: "Trying adding 'hide #{name}' to one of the exports.",
283 examples: const [const {
284 'main.dart': """
285 export 'decl1.dart';
286 export 'decl2.dart';
287
288 main() {}""",
289 'decl1.dart': "class Class {}",
290 'decl2.dart': "class Class {}"}]);
291
292 static const MessageKind DUPLICATE_EXPORT_CONT = const MessageKind(
293 "Info: This is another export of '#{name}'.");
294
295 static const MessageKind DUPLICATE_EXPORT_DECL = const MessageKind(
296 "Info: The exported '#{name}' from export #{uriString} is defined here.");
282 297
283 static const DualKind NOT_A_TYPE = const DualKind( 298 static const DualKind NOT_A_TYPE = const DualKind(
284 error: const MessageKind("Error: '#{node}' is not a type."), 299 error: const MessageKind("Error: '#{node}' is not a type."),
285 warning: const MessageKind("Warning: '#{node}' is not a type.")); 300 warning: const MessageKind("Warning: '#{node}' is not a type."));
286 301
287 static const MessageKind NOT_A_PREFIX = const MessageKind( 302 static const MessageKind NOT_A_PREFIX = const MessageKind(
288 "Error: '#{node}' is not a prefix."); 303 "Error: '#{node}' is not a prefix.");
289 304
290 static const DualKind CANNOT_FIND_CONSTRUCTOR = const DualKind( 305 static const DualKind CANNOT_FIND_CONSTRUCTOR = const DualKind(
291 error: const MessageKind( 306 error: const MessageKind(
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 682
668 static const MessageKind CANNOT_IMPLEMENT = const MessageKind( 683 static const MessageKind CANNOT_IMPLEMENT = const MessageKind(
669 "Error: '#{type}' cannot be implemented."); 684 "Error: '#{type}' cannot be implemented.");
670 685
671 static const MessageKind CANNOT_MIXIN = const MessageKind( 686 static const MessageKind CANNOT_MIXIN = const MessageKind(
672 "Error: The type '#{type}' can't be mixed in.", 687 "Error: The type '#{type}' can't be mixed in.",
673 howToFix: "Try removing '#{type}' from the 'with' clause.", 688 howToFix: "Try removing '#{type}' from the 'with' clause.",
674 examples: const [""" 689 examples: const ["""
675 class C extends Object with String {} 690 class C extends Object with String {}
676 691
677 main() => new C(); 692 main() => new C();
678 """, """ 693 """, """
679 typedef C = Object with String; 694 typedef C = Object with String;
680 695
681 main() => new C(); 696 main() => new C();
682 """]); 697 """]);
683 698
684 static const MessageKind DUPLICATE_EXTENDS_IMPLEMENTS = const MessageKind( 699 static const MessageKind DUPLICATE_EXTENDS_IMPLEMENTS = const MessageKind(
685 "Error: '#{type}' can not be both extended and implemented."); 700 "Error: '#{type}' can not be both extended and implemented.");
686 701
687 static const MessageKind DUPLICATE_IMPLEMENTS = const MessageKind( 702 static const MessageKind DUPLICATE_IMPLEMENTS = const MessageKind(
688 "Error: '#{type}' must not occur more than once " 703 "Error: '#{type}' must not occur more than once "
689 "in the implements clause."); 704 "in the implements clause.");
690 705
691 static const MessageKind ILLEGAL_SUPER_SEND = const MessageKind( 706 static const MessageKind ILLEGAL_SUPER_SEND = const MessageKind(
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
1382 1397
1383 class CompileTimeConstantError extends Diagnostic { 1398 class CompileTimeConstantError extends Diagnostic {
1384 CompileTimeConstantError(MessageKind kind, Map arguments, bool terse) 1399 CompileTimeConstantError(MessageKind kind, Map arguments, bool terse)
1385 : super(kind, arguments, terse); 1400 : super(kind, arguments, terse);
1386 } 1401 }
1387 1402
1388 class CompilationError extends Diagnostic { 1403 class CompilationError extends Diagnostic {
1389 CompilationError(MessageKind kind, Map arguments, bool terse) 1404 CompilationError(MessageKind kind, Map arguments, bool terse)
1390 : super(kind, arguments, terse); 1405 : super(kind, arguments, terse);
1391 } 1406 }
OLDNEW
« 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