| 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 |
| 11 static const GENERIC = const MessageKind('#{text}'); | 11 static const GENERIC = const MessageKind('#{text}'); |
| 12 | 12 |
| 13 static const NOT_ASSIGNABLE = const MessageKind( | 13 static const NOT_ASSIGNABLE = const MessageKind( |
| 14 '#{fromType} is not assignable to #{toType}'); | 14 '#{fromType} is not assignable to #{toType}'); |
| 15 static const VOID_EXPRESSION = const MessageKind( | 15 static const VOID_EXPRESSION = const MessageKind( |
| 16 'expression does not yield a value'); | 16 'expression does not yield a value'); |
| 17 static const VOID_VARIABLE = const MessageKind( | 17 static const VOID_VARIABLE = const MessageKind( |
| 18 'variable cannot be of type void'); | 18 'variable cannot be of type void'); |
| 19 static const RETURN_VALUE_IN_VOID = const MessageKind( | 19 static const RETURN_VALUE_IN_VOID = const MessageKind( |
| 20 'cannot return value from void function'); | 20 'cannot return value from void function'); |
| 21 static const RETURN_NOTHING = const MessageKind( | 21 static const RETURN_NOTHING = const MessageKind( |
| 22 'value of type #{returnType} expected'); | 22 'value of type #{returnType} expected'); |
| 23 static const MISSING_ARGUMENT = const MessageKind( | 23 static const MISSING_ARGUMENT = const MessageKind( |
| 24 'missing argument of type #{argumentType}'); | 24 'missing argument of type #{argumentType}'); |
| 25 static const ADDITIONAL_ARGUMENT = const MessageKind( | 25 static const ADDITIONAL_ARGUMENT = const MessageKind( |
| 26 'additional argument'); | 26 'additional argument'); |
| 27 static const NAMED_ARGUMENT_NOT_FOUND = const MessageKind( |
| 28 "no named argument '#{argumentName}' found on method"); |
| 27 static const METHOD_NOT_FOUND = const MessageKind( | 29 static const METHOD_NOT_FOUND = const MessageKind( |
| 28 'no method named #{methodName} in class #{className}'); | 30 'no method named #{methodName} in class #{className}'); |
| 29 static const MEMBER_NOT_STATIC = const MessageKind( | 31 static const MEMBER_NOT_STATIC = const MessageKind( |
| 30 '#{className}.#{memberName} is not static'); | 32 '#{className}.#{memberName} is not static'); |
| 31 static const NO_INSTANCE_AVAILABLE = const MessageKind( | 33 static const NO_INSTANCE_AVAILABLE = const MessageKind( |
| 32 '#{name} is only available in instance methods'); | 34 '#{name} is only available in instance methods'); |
| 33 | 35 |
| 34 static const UNREACHABLE_CODE = const MessageKind( | 36 static const UNREACHABLE_CODE = const MessageKind( |
| 35 'unreachable code'); | 37 'unreachable code'); |
| 36 static const MISSING_RETURN = const MessageKind( | 38 static const MISSING_RETURN = const MessageKind( |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 | 559 |
| 558 class CompileTimeConstantError extends Diagnostic { | 560 class CompileTimeConstantError extends Diagnostic { |
| 559 CompileTimeConstantError(MessageKind kind, [Map arguments = const {}]) | 561 CompileTimeConstantError(MessageKind kind, [Map arguments = const {}]) |
| 560 : super(kind, arguments); | 562 : super(kind, arguments); |
| 561 } | 563 } |
| 562 | 564 |
| 563 class CompilationError extends Diagnostic { | 565 class CompilationError extends Diagnostic { |
| 564 CompilationError(MessageKind kind, [Map arguments = const {}]) | 566 CompilationError(MessageKind kind, [Map arguments = const {}]) |
| 565 : super(kind, arguments); | 567 : super(kind, arguments); |
| 566 } | 568 } |
| OLD | NEW |