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 class MessageKind { | 7 class MessageKind { |
8 final String template; | 8 final String template; |
9 const MessageKind(this.template); | 9 const MessageKind(this.template); |
10 | 10 |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 static const BAD_ARITY_OVERRIDE = const MessageKind( | 236 static const BAD_ARITY_OVERRIDE = const MessageKind( |
237 "Error: cannot override method '#{1}' in '#{2}'; " | 237 "Error: cannot override method '#{1}' in '#{2}'; " |
238 "the parameters do not match."); | 238 "the parameters do not match."); |
239 | 239 |
240 static const BAD_ARITY_OVERRIDE_CONT = const MessageKind( | 240 static const BAD_ARITY_OVERRIDE_CONT = const MessageKind( |
241 "Info: this is the method whose parameters do not match."); | 241 "Info: this is the method whose parameters do not match."); |
242 | 242 |
243 static const MISSING_FORMALS = const MessageKind( | 243 static const MISSING_FORMALS = const MessageKind( |
244 "Error: Formal parameters are missing."); | 244 "Error: Formal parameters are missing."); |
245 | 245 |
246 // TODO(ahe): Change the message below when it becomes an error. | |
247 static const EXTRA_FORMALS = const MessageKind( | 246 static const EXTRA_FORMALS = const MessageKind( |
248 "Warning: Formal parameters will not be allowed here in M1."); | 247 "Error: Formal parameters are not allowed here."); |
| 248 |
| 249 // TODO(ahe): This message is hard to localize. This is acceptable, |
| 250 // as it will be removed when we ship Dart version 1.0. |
| 251 static const DEPRECATED_FEATURE_WARNING = const MessageKind( |
| 252 "Warning: deprecated language feature, #{1}, " |
| 253 "will be removed in a future Dart milestone."); |
| 254 |
| 255 // TODO(ahe): This message is hard to localize. This is acceptable, |
| 256 // as it will be removed when we ship Dart version 1.0. |
| 257 static const DEPRECATED_FEATURE_ERROR = const MessageKind( |
| 258 "Error: #{1} are not legal " |
| 259 "due to option --reject-deprecated-language-features."); |
249 | 260 |
250 static const CONSTRUCTOR_WITH_RETURN_TYPE = const MessageKind( | 261 static const CONSTRUCTOR_WITH_RETURN_TYPE = const MessageKind( |
251 "Error: cannot have return type for constructor."); | 262 "Error: cannot have return type for constructor."); |
252 | 263 |
253 static const ILLEGAL_FINAL_METHOD_MODIFIER = const MessageKind( | 264 static const ILLEGAL_FINAL_METHOD_MODIFIER = const MessageKind( |
254 "Error: cannot have final modifier on method."); | 265 "Error: cannot have final modifier on method."); |
255 | 266 |
256 static const ILLEGAL_CONSTRUCTOR_MODIFIERS = const MessageKind( | 267 static const ILLEGAL_CONSTRUCTOR_MODIFIERS = const MessageKind( |
257 "Error: illegal constructor modifiers: #{1}."); | 268 "Error: illegal constructor modifiers: #{1}."); |
258 | 269 |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 | 419 |
409 class CompileTimeConstantError extends Diagnostic { | 420 class CompileTimeConstantError extends Diagnostic { |
410 CompileTimeConstantError(MessageKind kind, List arguments) | 421 CompileTimeConstantError(MessageKind kind, List arguments) |
411 : super(kind, arguments); | 422 : super(kind, arguments); |
412 } | 423 } |
413 | 424 |
414 class CompilationError extends Diagnostic { | 425 class CompilationError extends Diagnostic { |
415 CompilationError(MessageKind kind, List arguments) | 426 CompilationError(MessageKind kind, List arguments) |
416 : super(kind, arguments); | 427 : super(kind, arguments); |
417 } | 428 } |
OLD | NEW |