| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 static final EXISTING_LABEL = const MessageKind( | 115 static final EXISTING_LABEL = const MessageKind( |
| 116 'original declaration of duplicate label #{1}'); | 116 'original declaration of duplicate label #{1}'); |
| 117 static final DUPLICATE_LABEL = const MessageKind( | 117 static final DUPLICATE_LABEL = const MessageKind( |
| 118 'duplicate declaration of label #{1}'); | 118 'duplicate declaration of label #{1}'); |
| 119 static final UNUSED_LABEL = const MessageKind( | 119 static final UNUSED_LABEL = const MessageKind( |
| 120 'unused label #{1}'); | 120 'unused label #{1}'); |
| 121 static final INVALID_CONTINUE = const MessageKind( | 121 static final INVALID_CONTINUE = const MessageKind( |
| 122 'target of continue is not a loop or switch case'); | 122 'target of continue is not a loop or switch case'); |
| 123 static final TYPE_VARIABLE_AS_CONSTRUCTOR = const MessageKind( | 123 static final TYPE_VARIABLE_AS_CONSTRUCTOR = const MessageKind( |
| 124 'cannot use type variable as constructor'); | 124 'cannot use type variable as constructor'); |
| 125 static final DUPLICATE_TYPE_VARIABLE_NAME = const MessageKind( |
| 126 'type variable #{1} already declared'); |
| 125 static final INVALID_BREAK = const MessageKind( | 127 static final INVALID_BREAK = const MessageKind( |
| 126 'target of break is not a statement'); | 128 'target of break is not a statement'); |
| 127 static final INVALID_USE_OF_SUPER = const MessageKind( | 129 static final INVALID_USE_OF_SUPER = const MessageKind( |
| 128 'super not allowed here'); | 130 'super not allowed here'); |
| 129 static final INVALID_CASE_DEFAULT = const MessageKind( | 131 static final INVALID_CASE_DEFAULT = const MessageKind( |
| 130 'default only allowed on last case of a switch'); | 132 'default only allowed on last case of a switch'); |
| 131 static final INVALID_CASE_EXPRESSION = const MessageKind( | 133 static final INVALID_CASE_EXPRESSION = const MessageKind( |
| 132 'case expression is not a compile-time constant int or string.'); | 134 'case expression is not a compile-time constant int or string.'); |
| 133 static final INVALID_CASE_EXPRESSION_TYPE = const MessageKind( | 135 static final INVALID_CASE_EXPRESSION_TYPE = const MessageKind( |
| 134 "case expressions don't all have the same type " | 136 "case expressions don't all have the same type " |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 | 303 |
| 302 class CompileTimeConstantError extends Diagnostic { | 304 class CompileTimeConstantError extends Diagnostic { |
| 303 CompileTimeConstantError(MessageKind kind, List<Type> arguments) | 305 CompileTimeConstantError(MessageKind kind, List<Type> arguments) |
| 304 : super(kind, arguments); | 306 : super(kind, arguments); |
| 305 } | 307 } |
| 306 | 308 |
| 307 class CompilationError extends Diagnostic { | 309 class CompilationError extends Diagnostic { |
| 308 CompilationError(MessageKind kind, List<Type> arguments) | 310 CompilationError(MessageKind kind, List<Type> arguments) |
| 309 : super(kind, arguments); | 311 : super(kind, arguments); |
| 310 } | 312 } |
| OLD | NEW |