Chromium Code Reviews| 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 /** | 7 /** |
| 8 * The messages in this file should meet the following guide lines: | 8 * The messages in this file should meet the following guide lines: |
| 9 * | 9 * |
| 10 * 1. The message should start with exactly one of "Error", "Internal error", | 10 * 1. The message should start with exactly one of "Error", "Internal error", |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 461 | 461 |
| 462 static const MessageKind TERNARY_OPERATOR_BAD_ARITY = const MessageKind( | 462 static const MessageKind TERNARY_OPERATOR_BAD_ARITY = const MessageKind( |
| 463 'Error: Operator "#{operatorName}" must have exactly 2 parameters.'); | 463 'Error: Operator "#{operatorName}" must have exactly 2 parameters.'); |
| 464 | 464 |
| 465 static const MessageKind OPERATOR_OPTIONAL_PARAMETERS = const MessageKind( | 465 static const MessageKind OPERATOR_OPTIONAL_PARAMETERS = const MessageKind( |
| 466 'Error: Operator "#{operatorName}" cannot have optional parameters.'); | 466 'Error: Operator "#{operatorName}" cannot have optional parameters.'); |
| 467 | 467 |
| 468 static const MessageKind OPERATOR_NAMED_PARAMETERS = const MessageKind( | 468 static const MessageKind OPERATOR_NAMED_PARAMETERS = const MessageKind( |
| 469 'Error: Operator "#{operatorName}" cannot have named parameters.'); | 469 'Error: Operator "#{operatorName}" cannot have named parameters.'); |
| 470 | 470 |
| 471 // TODO(ahe): This message is hard to localize. This is acceptable, | |
| 472 // as it will be removed when we ship Dart version 1.0. | |
| 473 static const MessageKind DEPRECATED_FEATURE_WARNING = const MessageKind( | |
| 474 'Warning: Deprecated language feature, #{featureName}, ' | |
| 475 'will be removed in a future Dart milestone.'); | |
| 476 | |
| 477 // TODO(ahe): This message is hard to localize. This is acceptable, | |
| 478 // as it will be removed when we ship Dart version 1.0. | |
| 479 static const MessageKind DEPRECATED_FEATURE_ERROR = const MessageKind( | |
| 480 'Error: #{featureName} are not legal ' | |
| 481 'due to option --reject-deprecated-language-features.'); | |
| 482 | |
| 483 static const MessageKind CONSTRUCTOR_WITH_RETURN_TYPE = const MessageKind( | 471 static const MessageKind CONSTRUCTOR_WITH_RETURN_TYPE = const MessageKind( |
| 484 'Error: Cannot have return type for constructor.'); | 472 'Error: Cannot have return type for constructor.'); |
| 485 | 473 |
| 486 static const MessageKind ILLEGAL_FINAL_METHOD_MODIFIER = const MessageKind( | 474 static const MessageKind ILLEGAL_FINAL_METHOD_MODIFIER = const MessageKind( |
| 487 'Error: Cannot have final modifier on method.'); | 475 'Error: Cannot have final modifier on method.'); |
| 488 | 476 |
| 489 static const MessageKind ILLEGAL_CONSTRUCTOR_MODIFIERS = const MessageKind( | 477 static const MessageKind ILLEGAL_CONSTRUCTOR_MODIFIERS = const MessageKind( |
| 490 'Error: Illegal constructor modifiers: "#{modifiers}".'); | 478 'Error: Illegal constructor modifiers: "#{modifiers}".'); |
| 491 | 479 |
| 492 static const MessageKind ILLEGAL_MIXIN_APPLICATION_MODIFIERS = | 480 static const MessageKind ILLEGAL_MIXIN_APPLICATION_MODIFIERS = |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 608 | 596 |
| 609 static const MessageKind IMPORTED_HERE = const MessageKind( | 597 static const MessageKind IMPORTED_HERE = const MessageKind( |
| 610 'Info: "#{element}" is imported here.'); | 598 'Info: "#{element}" is imported here.'); |
| 611 | 599 |
| 612 static const MessageKind OVERRIDE_EQUALS_NOT_HASH_CODE = const MessageKind( | 600 static const MessageKind OVERRIDE_EQUALS_NOT_HASH_CODE = const MessageKind( |
| 613 'Hint: The class "#{class}" overrides "operator==", ' | 601 'Hint: The class "#{class}" overrides "operator==", ' |
| 614 'but not "get hashCode".'); | 602 'but not "get hashCode".'); |
| 615 | 603 |
| 616 static const MessageKind PACKAGE_ROOT_NOT_SET = const MessageKind( | 604 static const MessageKind PACKAGE_ROOT_NOT_SET = const MessageKind( |
| 617 'Error: Cannot resolve "#{uri}". Package root has not been set.'); | 605 'Error: Cannot resolve "#{uri}". Package root has not been set.'); |
| 606 | |
| 607 static const MessageKind UNSUPPORTED_EQ_EQ_EQ = const MessageKind( | |
| 608 'Error: Operator === not supported. Use "identical" instead.'); | |
|
ahe
2013/08/06 14:48:40
I'm not sure that the suggestion is good. If you m
Johnni Winther
2013/08/07 06:56:25
Done.
| |
| 609 | |
| 610 static const MessageKind UNSUPPORTED_BANG_EQ_EQ = const MessageKind( | |
| 611 'Error: Operator !== not supported. Use "!identical" instead.'); | |
|
ahe
2013/08/06 14:48:40
Ditto.
Johnni Winther
2013/08/07 06:56:25
Done.
| |
| 612 | |
| 613 static const MessageKind UNSUPPORTED_THROW_WITHOUT_EXP = const MessageKind( | |
| 614 'Error: "throw" without an expression is unsupported. ' | |
| 615 'Use "rethrow" instead.'); | |
|
ahe
2013/08/06 14:48:40
Error: No expression after "throw".
Did you mean "
Johnni Winther
2013/08/07 06:56:25
Done.
| |
| 618 | 616 |
| 619 static const MessageKind COMPILER_CRASHED = const MessageKind( | 617 static const MessageKind COMPILER_CRASHED = const MessageKind( |
| 620 'Error: The compiler crashed when compiling this element.'); | 618 'Error: The compiler crashed when compiling this element.'); |
| 621 | 619 |
| 622 static const MessageKind PLEASE_REPORT_THE_CRASH = const MessageKind(''' | 620 static const MessageKind PLEASE_REPORT_THE_CRASH = const MessageKind(''' |
| 623 The compiler is broken. | 621 The compiler is broken. |
| 624 | 622 |
| 625 When compiling the above element, the compiler crashed. It is not | 623 When compiling the above element, the compiler crashed. It is not |
| 626 possible to tell if this is caused by a problem in your program or | 624 possible to tell if this is caused by a problem in your program or |
| 627 not. Regardless, the compiler should not crash. | 625 not. Regardless, the compiler should not crash. |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 812 | 810 |
| 813 class CompileTimeConstantError extends Diagnostic { | 811 class CompileTimeConstantError extends Diagnostic { |
| 814 CompileTimeConstantError(MessageKind kind, [Map arguments = const {}]) | 812 CompileTimeConstantError(MessageKind kind, [Map arguments = const {}]) |
| 815 : super(kind, arguments); | 813 : super(kind, arguments); |
| 816 } | 814 } |
| 817 | 815 |
| 818 class CompilationError extends Diagnostic { | 816 class CompilationError extends Diagnostic { |
| 819 CompilationError(MessageKind kind, [Map arguments = const {}]) | 817 CompilationError(MessageKind kind, [Map arguments = const {}]) |
| 820 : super(kind, arguments); | 818 : super(kind, arguments); |
| 821 } | 819 } |
| OLD | NEW |