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 = "Computer says no!"; | 7 const DONT_KNOW_HOW_TO_FIX = "Computer says no!"; |
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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 123 |
124 static const MessageKind METHOD_NOT_FOUND = const MessageKind( | 124 static const MessageKind METHOD_NOT_FOUND = const MessageKind( |
125 "No method named '#{memberName}' in class '#{className}'."); | 125 "No method named '#{memberName}' in class '#{className}'."); |
126 | 126 |
127 static const MessageKind OPERATOR_NOT_FOUND = const MessageKind( | 127 static const MessageKind OPERATOR_NOT_FOUND = const MessageKind( |
128 "No operator '#{memberName}' in class '#{className}'."); | 128 "No operator '#{memberName}' in class '#{className}'."); |
129 | 129 |
130 static const MessageKind SETTER_NOT_FOUND = const MessageKind( | 130 static const MessageKind SETTER_NOT_FOUND = const MessageKind( |
131 "No setter named '#{memberName}' in class '#{className}'."); | 131 "No setter named '#{memberName}' in class '#{className}'."); |
132 | 132 |
| 133 static const MessageKind SETTER_NOT_FOUND_IN_SUPER = const MessageKind( |
| 134 "No setter named '#{name}' in superclass of '#{className}'."); |
| 135 |
133 static const MessageKind GETTER_NOT_FOUND = const MessageKind( | 136 static const MessageKind GETTER_NOT_FOUND = const MessageKind( |
134 "No getter named '#{memberName}' in class '#{className}'."); | 137 "No getter named '#{memberName}' in class '#{className}'."); |
135 | 138 |
136 static const MessageKind NOT_CALLABLE = const MessageKind( | 139 static const MessageKind NOT_CALLABLE = const MessageKind( |
137 "'#{elementName}' is not callable."); | 140 "'#{elementName}' is not callable."); |
138 | 141 |
139 static const MessageKind MEMBER_NOT_STATIC = const MessageKind( | 142 static const MessageKind MEMBER_NOT_STATIC = const MessageKind( |
140 "'#{className}.#{memberName}' is not static."); | 143 "'#{className}.#{memberName}' is not static."); |
141 | 144 |
142 static const MessageKind NO_INSTANCE_AVAILABLE = const MessageKind( | 145 static const MessageKind NO_INSTANCE_AVAILABLE = const MessageKind( |
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1119 | 1122 |
1120 static const MessageKind CANNOT_RESOLVE_GETTER = const MessageKind( | 1123 static const MessageKind CANNOT_RESOLVE_GETTER = const MessageKind( |
1121 "Cannot resolve getter."); | 1124 "Cannot resolve getter."); |
1122 | 1125 |
1123 static const MessageKind CANNOT_RESOLVE_SETTER = const MessageKind( | 1126 static const MessageKind CANNOT_RESOLVE_SETTER = const MessageKind( |
1124 "Cannot resolve setter."); | 1127 "Cannot resolve setter."); |
1125 | 1128 |
1126 static const MessageKind ASSIGNING_METHOD = const MessageKind( | 1129 static const MessageKind ASSIGNING_METHOD = const MessageKind( |
1127 "Cannot assign a value to a method."); | 1130 "Cannot assign a value to a method."); |
1128 | 1131 |
| 1132 static const MessageKind ASSIGNING_METHOD_IN_SUPER = const MessageKind( |
| 1133 "Cannot assign a value to method '#{name}' " |
| 1134 "in superclass '#{superclassName}'."); |
| 1135 |
1129 static const MessageKind ASSIGNING_TYPE = const MessageKind( | 1136 static const MessageKind ASSIGNING_TYPE = const MessageKind( |
1130 "Cannot assign a value to a type."); | 1137 "Cannot assign a value to a type."); |
1131 | 1138 |
1132 static const MessageKind VOID_NOT_ALLOWED = const MessageKind( | 1139 static const MessageKind VOID_NOT_ALLOWED = const MessageKind( |
1133 "Type 'void' can't be used here because it isn't a return type.", | 1140 "Type 'void' can't be used here because it isn't a return type.", |
1134 howToFix: "Try removing 'void' keyword or replace it with 'var', 'final'," | 1141 howToFix: "Try removing 'void' keyword or replace it with 'var', 'final'," |
1135 " or a type.", | 1142 " or a type.", |
1136 examples: const [ | 1143 examples: const [ |
1137 "void x; main() {}", | 1144 "void x; main() {}", |
1138 "foo(void x) {} main() { foo(null); }", | 1145 "foo(void x) {} main() { foo(null); }", |
(...skipping 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2499 static String convertToString(value) { | 2506 static String convertToString(value) { |
2500 if (value is ErrorToken) { | 2507 if (value is ErrorToken) { |
2501 // Shouldn't happen. | 2508 // Shouldn't happen. |
2502 return value.assertionMessage; | 2509 return value.assertionMessage; |
2503 } else if (value is Token) { | 2510 } else if (value is Token) { |
2504 value = value.value; | 2511 value = value.value; |
2505 } | 2512 } |
2506 return '$value'; | 2513 return '$value'; |
2507 } | 2514 } |
2508 } | 2515 } |
OLD | NEW |