| 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 | 5 |
| 6 /** | 6 /** |
| 7 * The messages in this file should meet the following guide lines: | 7 * The messages in this file should meet the following guide lines: |
| 8 * | 8 * |
| 9 * 1. The message should be a complete sentence starting with an uppercase | 9 * 1. The message should be a complete sentence starting with an uppercase |
| 10 * letter, and ending with a period. | 10 * letter, and ending with a period. |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 CANNOT_RESOLVE_SETTER, | 139 CANNOT_RESOLVE_SETTER, |
| 140 CANNOT_RESOLVE_TYPE, | 140 CANNOT_RESOLVE_TYPE, |
| 141 CANNOT_RETURN_FROM_CONSTRUCTOR, | 141 CANNOT_RETURN_FROM_CONSTRUCTOR, |
| 142 CLASS_NAME_EXPECTED, | 142 CLASS_NAME_EXPECTED, |
| 143 COMPILER_CRASHED, | 143 COMPILER_CRASHED, |
| 144 COMPLEX_RETURNING_NSM, | 144 COMPLEX_RETURNING_NSM, |
| 145 COMPLEX_THROWING_NSM, | 145 COMPLEX_THROWING_NSM, |
| 146 CONSIDER_ANALYZE_ALL, | 146 CONSIDER_ANALYZE_ALL, |
| 147 CONST_CALLS_NON_CONST, | 147 CONST_CALLS_NON_CONST, |
| 148 CONST_CALLS_NON_CONST_FOR_IMPLICIT, | 148 CONST_CALLS_NON_CONST_FOR_IMPLICIT, |
| 149 CONST_CONSTRUCTOR_HAS_BODY, | 149 CONST_CONSTRUCTOR_OR_FACTORY_WITH_BODY, |
| 150 CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS, | 150 CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS, |
| 151 CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_CONSTRUCTOR, | 151 CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_CONSTRUCTOR, |
| 152 CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_FIELD, | 152 CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_FIELD, |
| 153 CONST_LOOP_VARIABLE, | 153 CONST_LOOP_VARIABLE, |
| 154 CONST_MAP_KEY_OVERRIDES_EQUALS, | 154 CONST_MAP_KEY_OVERRIDES_EQUALS, |
| 155 CONST_WITHOUT_INITIALIZER, | 155 CONST_WITHOUT_INITIALIZER, |
| 156 CONSTRUCTOR_CALL_EXPECTED, | 156 CONSTRUCTOR_CALL_EXPECTED, |
| 157 CONSTRUCTOR_IS_NOT_CONST, | 157 CONSTRUCTOR_IS_NOT_CONST, |
| 158 CONSTRUCTOR_WITH_RETURN_TYPE, | 158 CONSTRUCTOR_WITH_RETURN_TYPE, |
| 159 CYCLIC_CLASS_HIERARCHY, | 159 CYCLIC_CLASS_HIERARCHY, |
| (...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 972 "Only constructors can have initializers."), | 972 "Only constructors can have initializers."), |
| 973 | 973 |
| 974 MessageKind.REDIRECTING_CONSTRUCTOR_CYCLE: | 974 MessageKind.REDIRECTING_CONSTRUCTOR_CYCLE: |
| 975 const MessageTemplate(MessageKind.REDIRECTING_CONSTRUCTOR_CYCLE, | 975 const MessageTemplate(MessageKind.REDIRECTING_CONSTRUCTOR_CYCLE, |
| 976 "Cyclic constructor redirection."), | 976 "Cyclic constructor redirection."), |
| 977 | 977 |
| 978 MessageKind.REDIRECTING_CONSTRUCTOR_HAS_BODY: | 978 MessageKind.REDIRECTING_CONSTRUCTOR_HAS_BODY: |
| 979 const MessageTemplate(MessageKind.REDIRECTING_CONSTRUCTOR_HAS_BODY, | 979 const MessageTemplate(MessageKind.REDIRECTING_CONSTRUCTOR_HAS_BODY, |
| 980 "Redirecting constructor can't have a body."), | 980 "Redirecting constructor can't have a body."), |
| 981 | 981 |
| 982 MessageKind.CONST_CONSTRUCTOR_HAS_BODY: | |
| 983 const MessageTemplate(MessageKind.CONST_CONSTRUCTOR_HAS_BODY, | |
| 984 "Const constructor or factory can't have a body.", | |
| 985 howToFix: "Remove the 'const' keyword or the body", | |
| 986 examples: const [""" | |
| 987 class C { | |
| 988 const C() {} | |
| 989 } | |
| 990 | |
| 991 main() => new C();"""]), | |
| 992 | |
| 993 MessageKind.REDIRECTING_CONSTRUCTOR_HAS_INITIALIZER: | 982 MessageKind.REDIRECTING_CONSTRUCTOR_HAS_INITIALIZER: |
| 994 const MessageTemplate( | 983 const MessageTemplate( |
| 995 MessageKind.REDIRECTING_CONSTRUCTOR_HAS_INITIALIZER, | 984 MessageKind.REDIRECTING_CONSTRUCTOR_HAS_INITIALIZER, |
| 996 "Redirecting constructor cannot have other initializers."), | 985 "Redirecting constructor cannot have other initializers."), |
| 997 | 986 |
| 998 MessageKind.SUPER_INITIALIZER_IN_OBJECT: | 987 MessageKind.SUPER_INITIALIZER_IN_OBJECT: |
| 999 const MessageTemplate(MessageKind.SUPER_INITIALIZER_IN_OBJECT, | 988 const MessageTemplate(MessageKind.SUPER_INITIALIZER_IN_OBJECT, |
| 1000 "'Object' cannot have a super initializer."), | 989 "'Object' cannot have a super initializer."), |
| 1001 | 990 |
| 1002 MessageKind.DUPLICATE_SUPER_INITIALIZER: | 991 MessageKind.DUPLICATE_SUPER_INITIALIZER: |
| (...skipping 2723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3726 static String convertToString(value) { | 3715 static String convertToString(value) { |
| 3727 if (value is ErrorToken) { | 3716 if (value is ErrorToken) { |
| 3728 // Shouldn't happen. | 3717 // Shouldn't happen. |
| 3729 return value.assertionMessage; | 3718 return value.assertionMessage; |
| 3730 } else if (value is Token) { | 3719 } else if (value is Token) { |
| 3731 value = value.value; | 3720 value = value.value; |
| 3732 } | 3721 } |
| 3733 return '$value'; | 3722 return '$value'; |
| 3734 } | 3723 } |
| 3735 } | 3724 } |
| OLD | NEW |