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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 MISSING_FORMALS = const MessageKind( | 216 static final MISSING_FORMALS = const MessageKind( |
217 "Error: Formal parameters are missing."); | 217 "Error: Formal parameters are missing."); |
218 | 218 |
219 // TODO(ahe): Change the message below when it becomes an error. | 219 // TODO(ahe): Change the message below when it becomes an error. |
220 static final EXTRA_FORMALS = const MessageKind( | 220 static final EXTRA_FORMALS = const MessageKind( |
221 "Warning: Formal parameters will not be allowed here in M1."); | 221 "Warning: Formal parameters will not be allowed here in M1."); |
222 | 222 |
| 223 static final CONSTRUCTOR_WITH_RETURN_TYPE = const MessageKind( |
| 224 "Error: cannot have return type for constructor."); |
| 225 |
| 226 static final ILLEGAL_FINAL_METHOD_MODIFIER = const MessageKind( |
| 227 "Error: cannot have final modifier on method."); |
| 228 |
| 229 static final ILLEGAL_CONSTRUCTOR_MODIFIERS = const MessageKind( |
| 230 "Error: illegal constructor modifiers: #{1}."); |
| 231 |
223 static final COMPILER_CRASHED = const MessageKind( | 232 static final COMPILER_CRASHED = const MessageKind( |
224 "Error: The compiler crashed when compiling this element."); | 233 "Error: The compiler crashed when compiling this element."); |
225 | 234 |
226 static final PLEASE_REPORT_THE_CRASH = const MessageKind(''' | 235 static final PLEASE_REPORT_THE_CRASH = const MessageKind(''' |
227 The compiler is broken. | 236 The compiler is broken. |
228 | 237 |
229 When compiling the above element, the compiler crashed. It is not | 238 When compiling the above element, the compiler crashed. It is not |
230 possible to tell if this is caused by a problem in your program or | 239 possible to tell if this is caused by a problem in your program or |
231 not. Regardless, the compiler should not crash. | 240 not. Regardless, the compiler should not crash. |
232 | 241 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 | 319 |
311 class CompileTimeConstantError extends Diagnostic { | 320 class CompileTimeConstantError extends Diagnostic { |
312 CompileTimeConstantError(MessageKind kind, List<Type> arguments) | 321 CompileTimeConstantError(MessageKind kind, List<Type> arguments) |
313 : super(kind, arguments); | 322 : super(kind, arguments); |
314 } | 323 } |
315 | 324 |
316 class CompilationError extends Diagnostic { | 325 class CompilationError extends Diagnostic { |
317 CompilationError(MessageKind kind, List<Type> arguments) | 326 CompilationError(MessageKind kind, List<Type> arguments) |
318 : super(kind, arguments); | 327 : super(kind, arguments); |
319 } | 328 } |
OLD | NEW |