OLD | NEW |
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 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
661 | 661 |
662 static const MessageKind CLASS_NAME_EXPECTED = const MessageKind( | 662 static const MessageKind CLASS_NAME_EXPECTED = const MessageKind( |
663 "Error: Class name expected."); | 663 "Error: Class name expected."); |
664 | 664 |
665 static const MessageKind CANNOT_EXTEND = const MessageKind( | 665 static const MessageKind CANNOT_EXTEND = const MessageKind( |
666 "Error: '#{type}' cannot be extended."); | 666 "Error: '#{type}' cannot be extended."); |
667 | 667 |
668 static const MessageKind CANNOT_IMPLEMENT = const MessageKind( | 668 static const MessageKind CANNOT_IMPLEMENT = const MessageKind( |
669 "Error: '#{type}' cannot be implemented."); | 669 "Error: '#{type}' cannot be implemented."); |
670 | 670 |
| 671 static const MessageKind CANNOT_MIXIN = const MessageKind( |
| 672 "Error: The type '#{type}' can't be mixed in.", |
| 673 howToFix: "Try removing '#{type}' from the 'with' clause.", |
| 674 examples: const [""" |
| 675 class C extends Object with String {} |
| 676 |
| 677 main() => new C(); |
| 678 """, """ |
| 679 typedef C = Object with String; |
| 680 |
| 681 main() => new C(); |
| 682 """]); |
| 683 |
671 static const MessageKind DUPLICATE_EXTENDS_IMPLEMENTS = const MessageKind( | 684 static const MessageKind DUPLICATE_EXTENDS_IMPLEMENTS = const MessageKind( |
672 "Error: '#{type}' can not be both extended and implemented."); | 685 "Error: '#{type}' can not be both extended and implemented."); |
673 | 686 |
674 static const MessageKind DUPLICATE_IMPLEMENTS = const MessageKind( | 687 static const MessageKind DUPLICATE_IMPLEMENTS = const MessageKind( |
675 "Error: '#{type}' must not occur more than once " | 688 "Error: '#{type}' must not occur more than once " |
676 "in the implements clause."); | 689 "in the implements clause."); |
677 | 690 |
678 static const MessageKind ILLEGAL_SUPER_SEND = const MessageKind( | 691 static const MessageKind ILLEGAL_SUPER_SEND = const MessageKind( |
679 "Error: '#{name}' cannot be called on super."); | 692 "Error: '#{name}' cannot be called on super."); |
680 | 693 |
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1369 | 1382 |
1370 class CompileTimeConstantError extends Diagnostic { | 1383 class CompileTimeConstantError extends Diagnostic { |
1371 CompileTimeConstantError(MessageKind kind, Map arguments, bool terse) | 1384 CompileTimeConstantError(MessageKind kind, Map arguments, bool terse) |
1372 : super(kind, arguments, terse); | 1385 : super(kind, arguments, terse); |
1373 } | 1386 } |
1374 | 1387 |
1375 class CompilationError extends Diagnostic { | 1388 class CompilationError extends Diagnostic { |
1376 CompilationError(MessageKind kind, Map arguments, bool terse) | 1389 CompilationError(MessageKind kind, Map arguments, bool terse) |
1377 : super(kind, arguments, terse); | 1390 : super(kind, arguments, terse); |
1378 } | 1391 } |
OLD | NEW |