| 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 const GENERIC = const MessageKind('#{1}'); | 9 static const GENERIC = const MessageKind('#{1}'); |
| 10 | 10 |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 | 168 |
| 169 static const NO_SUCH_LIBRARY_MEMBER = const MessageKind( | 169 static const NO_SUCH_LIBRARY_MEMBER = const MessageKind( |
| 170 '#{1} has no member named #{2}'); | 170 '#{1} has no member named #{2}'); |
| 171 | 171 |
| 172 static const CANNOT_INSTANTIATE_INTERFACE = const MessageKind( | 172 static const CANNOT_INSTANTIATE_INTERFACE = const MessageKind( |
| 173 "cannot instantiate interface '#{1}'"); | 173 "cannot instantiate interface '#{1}'"); |
| 174 | 174 |
| 175 static const CANNOT_INSTANTIATE_TYPEDEF = const MessageKind( | 175 static const CANNOT_INSTANTIATE_TYPEDEF = const MessageKind( |
| 176 "cannot instantiate typedef '#{1}'"); | 176 "cannot instantiate typedef '#{1}'"); |
| 177 | 177 |
| 178 static const CANNOT_INSTANTIATE_TYPE_VARIABLE = const MessageKind( |
| 179 "cannot instantiate type variable '#{1}'"); |
| 180 |
| 178 static const NO_DEFAULT_CLASS = const MessageKind( | 181 static const NO_DEFAULT_CLASS = const MessageKind( |
| 179 "no default class on enclosing interface '#{1}'"); | 182 "no default class on enclosing interface '#{1}'"); |
| 180 | 183 |
| 181 static const CYCLIC_TYPE_VARIABLE = const MessageKind( | 184 static const CYCLIC_TYPE_VARIABLE = const MessageKind( |
| 182 "cyclic reference to type variable #{1}"); | 185 "cyclic reference to type variable #{1}"); |
| 183 static const TYPE_NAME_EXPECTED = const MessageKind( | 186 static const TYPE_NAME_EXPECTED = const MessageKind( |
| 184 "class or interface name expected"); | 187 "class or interface name expected"); |
| 185 | 188 |
| 186 static const CANNOT_EXTEND = const MessageKind( | 189 static const CANNOT_EXTEND = const MessageKind( |
| 187 "#{1} cannot be extended"); | 190 "#{1} cannot be extended"); |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 "Optional parameter count of patch method (#{3}) doesn't match parameter " | 295 "Optional parameter count of patch method (#{3}) doesn't match parameter " |
| 293 "count on origin method '#{1}' (#{2})."); | 296 "count on origin method '#{1}' (#{2})."); |
| 294 | 297 |
| 295 static const PATCH_OPTIONAL_PARAMETER_NAMED_MISMATCH = const MessageKind( | 298 static const PATCH_OPTIONAL_PARAMETER_NAMED_MISMATCH = const MessageKind( |
| 296 "Optional parameters of origin and patch method '#{1}' must " | 299 "Optional parameters of origin and patch method '#{1}' must " |
| 297 "both be either named or positional."); | 300 "both be either named or positional."); |
| 298 | 301 |
| 299 static const PATCH_PARAMETER_MISMATCH = const MessageKind( | 302 static const PATCH_PARAMETER_MISMATCH = const MessageKind( |
| 300 "Patch method parameter '#{3}' doesn't match '#{2}' on origin method " | 303 "Patch method parameter '#{3}' doesn't match '#{2}' on origin method " |
| 301 "#{1}."); | 304 "#{1}."); |
| 302 | 305 |
| 303 static const TOP_LEVEL_VARIABLE_DECLARED_STATIC = const MessageKind( | 306 static const TOP_LEVEL_VARIABLE_DECLARED_STATIC = const MessageKind( |
| 304 "Top-level variable cannot be declared static."); | 307 "Top-level variable cannot be declared static."); |
| 305 | 308 |
| 306 static const WRONG_NUMBER_OF_ARGUMENTS_FOR_ASSERT = const MessageKind( | 309 static const WRONG_NUMBER_OF_ARGUMENTS_FOR_ASSERT = const MessageKind( |
| 307 "Wrong number of arguments to assert. Should be 1, but given #{1}."); | 310 "Wrong number of arguments to assert. Should be 1, but given #{1}."); |
| 308 | 311 |
| 309 static const ASSERT_IS_GIVEN_NAMED_ARGUMENTS = const MessageKind( | 312 static const ASSERT_IS_GIVEN_NAMED_ARGUMENTS = const MessageKind( |
| 310 "assert takes no named arguments, but given #{1}."); | 313 "assert takes no named arguments, but given #{1}."); |
| 311 | 314 |
| 312 | 315 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 | 404 |
| 402 class CompileTimeConstantError extends Diagnostic { | 405 class CompileTimeConstantError extends Diagnostic { |
| 403 CompileTimeConstantError(MessageKind kind, List arguments) | 406 CompileTimeConstantError(MessageKind kind, List arguments) |
| 404 : super(kind, arguments); | 407 : super(kind, arguments); |
| 405 } | 408 } |
| 406 | 409 |
| 407 class CompilationError extends Diagnostic { | 410 class CompilationError extends Diagnostic { |
| 408 CompilationError(MessageKind kind, List arguments) | 411 CompilationError(MessageKind kind, List arguments) |
| 409 : super(kind, arguments); | 412 : super(kind, arguments); |
| 410 } | 413 } |
| OLD | NEW |