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 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 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 631 // This is used as an exception. | 631 // This is used as an exception. |
| 632 static const MessageKind INVALID_SOURCE_FILE_LOCATION = const MessageKind(''' | 632 static const MessageKind INVALID_SOURCE_FILE_LOCATION = const MessageKind(''' |
| 633 Invalid offset (#{offset}) in source map. | 633 Invalid offset (#{offset}) in source map. |
| 634 File: #{fileName} | 634 File: #{fileName} |
| 635 Length: #{length}'''); | 635 Length: #{length}'''); |
| 636 | 636 |
| 637 static const MessageKind TOP_LEVEL_VARIABLE_DECLARED_STATIC = | 637 static const MessageKind TOP_LEVEL_VARIABLE_DECLARED_STATIC = |
| 638 const MessageKind( | 638 const MessageKind( |
| 639 'Error: Top-level variable cannot be declared static.'); | 639 'Error: Top-level variable cannot be declared static.'); |
| 640 | 640 |
| 641 static const MessageKind REFERENCE_IN_INITIALIZATION = const MessageKind( | |
| 642 "Error: Variable '#{variableName}' is referenced during its " | |
| 643 "initialization.", | |
| 644 howToFix: "If you trying to reference a shadowed variable, rename" | |
|
ngeoffray
2013/09/10 11:39:48
If you are
karlklose
2013/09/10 11:45:53
Done.
| |
| 645 "one of the variables.", | |
| 646 examples: const[""" | |
|
ngeoffray
2013/09/10 11:39:48
space before [.
karlklose
2013/09/10 11:45:53
Done.
| |
| 647 foo(t) { | |
| 648 var t = t; | |
| 649 return t; | |
| 650 } | |
| 651 | |
| 652 main() => foo(1); | |
| 653 """]); | |
| 654 | |
| 655 | |
| 641 static const MessageKind WRONG_NUMBER_OF_ARGUMENTS_FOR_ASSERT = | 656 static const MessageKind WRONG_NUMBER_OF_ARGUMENTS_FOR_ASSERT = |
| 642 const MessageKind( | 657 const MessageKind( |
| 643 'Error: Wrong number of arguments to assert. Should be 1, but given ' | 658 'Error: Wrong number of arguments to assert. Should be 1, but given ' |
| 644 '#{argumentCount}.'); | 659 '#{argumentCount}.'); |
| 645 | 660 |
| 646 static const MessageKind ASSERT_IS_GIVEN_NAMED_ARGUMENTS = const MessageKind( | 661 static const MessageKind ASSERT_IS_GIVEN_NAMED_ARGUMENTS = const MessageKind( |
| 647 'Error: "assert" takes no named arguments, but given #{argumentCount}.'); | 662 'Error: "assert" takes no named arguments, but given #{argumentCount}.'); |
| 648 | 663 |
| 649 static const MessageKind FACTORY_REDIRECTION_IN_NON_FACTORY = | 664 static const MessageKind FACTORY_REDIRECTION_IN_NON_FACTORY = |
| 650 const MessageKind( | 665 const MessageKind( |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1085 | 1100 |
| 1086 class CompileTimeConstantError extends Diagnostic { | 1101 class CompileTimeConstantError extends Diagnostic { |
| 1087 CompileTimeConstantError(MessageKind kind, Map arguments, bool terse) | 1102 CompileTimeConstantError(MessageKind kind, Map arguments, bool terse) |
| 1088 : super(kind, arguments, terse); | 1103 : super(kind, arguments, terse); |
| 1089 } | 1104 } |
| 1090 | 1105 |
| 1091 class CompilationError extends Diagnostic { | 1106 class CompilationError extends Diagnostic { |
| 1092 CompilationError(MessageKind kind, Map arguments, bool terse) | 1107 CompilationError(MessageKind kind, Map arguments, bool terse) |
| 1093 : super(kind, arguments, terse); | 1108 : super(kind, arguments, terse); |
| 1094 } | 1109 } |
| OLD | NEW |