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 class MessageKind { | 5 class MessageKind { |
6 final String template; | 6 final String template; |
7 const MessageKind(this.template); | 7 const MessageKind(this.template); |
8 | 8 |
9 static final GENERIC = const MessageKind('#{1}'); | 9 static final GENERIC = const MessageKind('#{1}'); |
10 | 10 |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 static final CANNOT_OVERRIDE_METHOD_WITH_FIELD_CONT = const MessageKind( | 206 static final CANNOT_OVERRIDE_METHOD_WITH_FIELD_CONT = const MessageKind( |
207 "Info: this is the method that cannot be overridden by a field."); | 207 "Info: this is the method that cannot be overridden by a field."); |
208 | 208 |
209 static final BAD_ARITY_OVERRIDE = const MessageKind( | 209 static final BAD_ARITY_OVERRIDE = const MessageKind( |
210 "Error: cannot override method '#{1}' in '#{2}'; " | 210 "Error: cannot override method '#{1}' in '#{2}'; " |
211 "the parameters do not match."); | 211 "the parameters do not match."); |
212 | 212 |
213 static final BAD_ARITY_OVERRIDE_CONT = const MessageKind( | 213 static final BAD_ARITY_OVERRIDE_CONT = const MessageKind( |
214 "Info: this is the method whose parameters do not match."); | 214 "Info: this is the method whose parameters do not match."); |
215 | 215 |
| 216 static final CONSTRUCTOR_WITH_RETURN_TYPE = const MessageKind( |
| 217 "Error: cannot have return type for constructor."); |
| 218 |
| 219 static final ILLEGAL_FINAL_METHOD_MODIFIER = const MessageKind( |
| 220 "Error: cannot have final modifier on method."); |
| 221 |
| 222 static final ILLEGAL_CONSTRUCTOR_MODIFIERS = const MessageKind( |
| 223 "Error: illegal constructor modifiers: #{1}."); |
| 224 |
216 static final COMPILER_CRASHED = const MessageKind( | 225 static final COMPILER_CRASHED = const MessageKind( |
217 "Error: The compiler crashed when compiling this element."); | 226 "Error: The compiler crashed when compiling this element."); |
218 | 227 |
219 static final PLEASE_REPORT_THE_CRASH = const MessageKind(''' | 228 static final PLEASE_REPORT_THE_CRASH = const MessageKind(''' |
220 The compiler is broken. | 229 The compiler is broken. |
221 | 230 |
222 When compiling the above element, the compiler crashed. It is not | 231 When compiling the above element, the compiler crashed. It is not |
223 possible to tell if this is caused by a problem in your program or | 232 possible to tell if this is caused by a problem in your program or |
224 not. Regardless, the compiler should not crash. | 233 not. Regardless, the compiler should not crash. |
225 | 234 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 | 312 |
304 class CompileTimeConstantError extends Diagnostic { | 313 class CompileTimeConstantError extends Diagnostic { |
305 CompileTimeConstantError(MessageKind kind, List<Type> arguments) | 314 CompileTimeConstantError(MessageKind kind, List<Type> arguments) |
306 : super(kind, arguments); | 315 : super(kind, arguments); |
307 } | 316 } |
308 | 317 |
309 class CompilationError extends Diagnostic { | 318 class CompilationError extends Diagnostic { |
310 CompilationError(MessageKind kind, List<Type> arguments) | 319 CompilationError(MessageKind kind, List<Type> arguments) |
311 : super(kind, arguments); | 320 : super(kind, arguments); |
312 } | 321 } |
OLD | NEW |