| 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 | 172 |
| 173 static final ADDITIONAL_TYPE_ARGUMENT = const MessageKind( | 173 static final ADDITIONAL_TYPE_ARGUMENT = const MessageKind( |
| 174 "additional type argument"); | 174 "additional type argument"); |
| 175 | 175 |
| 176 static final MISSING_TYPE_ARGUMENT = const MessageKind( | 176 static final MISSING_TYPE_ARGUMENT = const MessageKind( |
| 177 "missing type argument"); | 177 "missing type argument"); |
| 178 | 178 |
| 179 static final MISSING_ARGUMENTS_TO_ASSERT = const MessageKind( | 179 static final MISSING_ARGUMENTS_TO_ASSERT = const MessageKind( |
| 180 "missing arguments to assert"); | 180 "missing arguments to assert"); |
| 181 | 181 |
| 182 static final GETTER_MISMATCH = const MessageKind( | |
| 183 "Error: setter disagrees on: #{1}."); | |
| 184 | |
| 185 static final SETTER_MISMATCH = const MessageKind( | |
| 186 "Error: getter disagrees on: #{1}."); | |
| 187 | |
| 188 static final NO_STATIC_OVERRIDE = const MessageKind( | |
| 189 "Error: static member cannot override instance member '#{1}' of '#{2}'."); | |
| 190 | |
| 191 static final NO_STATIC_OVERRIDE_CONT = const MessageKind( | |
| 192 "Info: this is the instance member that cannot be overridden " | |
| 193 "by a static member."); | |
| 194 | |
| 195 static final CANNOT_OVERRIDE_FIELD_WITH_METHOD = const MessageKind( | |
| 196 "Error: method cannot override field '#{1}' of '#{2}'."); | |
| 197 | |
| 198 static final CANNOT_OVERRIDE_FIELD_WITH_METHOD_CONT = const MessageKind( | |
| 199 "Info: this is the field that cannot be overridden by a method."); | |
| 200 | |
| 201 static final CANNOT_OVERRIDE_METHOD_WITH_FIELD = const MessageKind( | |
| 202 "Error: field cannot override method '#{1}' of '#{2}'."); | |
| 203 | |
| 204 static final CANNOT_OVERRIDE_METHOD_WITH_FIELD_CONT = const MessageKind( | |
| 205 "Info: this is the method that cannot be overridden by a field."); | |
| 206 | |
| 207 static final BAD_ARITY_OVERRIDE = const MessageKind( | |
| 208 "Error: cannot override method '#{1}' in '#{2}'; " | |
| 209 "the parameters do not match."); | |
| 210 | |
| 211 static final BAD_ARITY_OVERRIDE_CONT = const MessageKind( | |
| 212 "Info: this is the method whose parameters do not match."); | |
| 213 | |
| 214 static final COMPILER_CRASHED = const MessageKind( | 182 static final COMPILER_CRASHED = const MessageKind( |
| 215 "Error: The compiler crashed when compiling this element."); | 183 "Error: The compiler crashed when compiling this element."); |
| 216 | 184 |
| 217 static final PLEASE_REPORT_THE_CRASH = const MessageKind(''' | 185 static final PLEASE_REPORT_THE_CRASH = const MessageKind(''' |
| 218 The compiler is broken. | 186 The compiler is broken. |
| 219 | 187 |
| 220 When compiling the above element, the compiler crashed. It is not | 188 When compiling the above element, the compiler crashed. It is not |
| 221 possible to tell if this is caused by a problem in your program or | 189 possible to tell if this is caused by a problem in your program or |
| 222 not. Regardless, the compiler should not crash. | 190 not. Regardless, the compiler should not crash. |
| 223 | 191 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 | 269 |
| 302 class CompileTimeConstantError extends Diagnostic { | 270 class CompileTimeConstantError extends Diagnostic { |
| 303 CompileTimeConstantError(MessageKind kind, List<Type> arguments) | 271 CompileTimeConstantError(MessageKind kind, List<Type> arguments) |
| 304 : super(kind, arguments); | 272 : super(kind, arguments); |
| 305 } | 273 } |
| 306 | 274 |
| 307 class CompilationError extends Diagnostic { | 275 class CompilationError extends Diagnostic { |
| 308 CompilationError(MessageKind kind, List<Type> arguments) | 276 CompilationError(MessageKind kind, List<Type> arguments) |
| 309 : super(kind, arguments); | 277 : super(kind, arguments); |
| 310 } | 278 } |
| OLD | NEW |