| 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 10 matching lines...) Expand all Loading... |
| 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( | 27 static const NAMED_ARGUMENT_NOT_FOUND = const MessageKind( |
| 28 "no named argument '#{argumentName}' found on method"); | 28 "no named argument '#{argumentName}' found on method"); |
| 29 static const METHOD_NOT_FOUND = const MessageKind( | 29 static const METHOD_NOT_FOUND = const MessageKind( |
| 30 'no method named #{memberName} in class #{className}'); | 30 'no method named #{memberName} in class #{className}'); |
| 31 static const OPERATOR_NOT_FOUND = const MessageKind( |
| 32 'no operator #{memberName} in class #{className}'); |
| 33 static const PROPERTY_NOT_FOUND = const MessageKind( |
| 34 'no property named #{memberName} in class #{className}'); |
| 31 static const NOT_CALLABLE = const MessageKind( | 35 static const NOT_CALLABLE = const MessageKind( |
| 32 "'#{elementName}' is not callable"); | 36 "'#{elementName}' is not callable"); |
| 33 static const MEMBER_NOT_STATIC = const MessageKind( | 37 static const MEMBER_NOT_STATIC = const MessageKind( |
| 34 '#{className}.#{memberName} is not static'); | 38 '#{className}.#{memberName} is not static'); |
| 35 static const NO_INSTANCE_AVAILABLE = const MessageKind( | 39 static const NO_INSTANCE_AVAILABLE = const MessageKind( |
| 36 '#{name} is only available in instance methods'); | 40 '#{name} is only available in instance methods'); |
| 37 | 41 |
| 42 static const THIS_IS_THE_METHOD = const MessageKind( |
| 43 "This is the method declaration."); |
| 44 |
| 38 static const UNREACHABLE_CODE = const MessageKind( | 45 static const UNREACHABLE_CODE = const MessageKind( |
| 39 'unreachable code'); | 46 'unreachable code'); |
| 40 static const MISSING_RETURN = const MessageKind( | 47 static const MISSING_RETURN = const MessageKind( |
| 41 'missing return'); | 48 'missing return'); |
| 42 static const MAYBE_MISSING_RETURN = const MessageKind( | 49 static const MAYBE_MISSING_RETURN = const MessageKind( |
| 43 'not all paths lead to a return or throw statement'); | 50 'not all paths lead to a return or throw statement'); |
| 44 | 51 |
| 45 static const CANNOT_RESOLVE = const MessageKind( | 52 static const CANNOT_RESOLVE = const MessageKind( |
| 46 'cannot resolve #{name}'); | 53 'cannot resolve #{name}'); |
| 47 static const CANNOT_RESOLVE_CONSTRUCTOR = const MessageKind( | 54 static const CANNOT_RESOLVE_CONSTRUCTOR = const MessageKind( |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 | 610 |
| 604 class CompileTimeConstantError extends Diagnostic { | 611 class CompileTimeConstantError extends Diagnostic { |
| 605 CompileTimeConstantError(MessageKind kind, [Map arguments = const {}]) | 612 CompileTimeConstantError(MessageKind kind, [Map arguments = const {}]) |
| 606 : super(kind, arguments); | 613 : super(kind, arguments); |
| 607 } | 614 } |
| 608 | 615 |
| 609 class CompilationError extends Diagnostic { | 616 class CompilationError extends Diagnostic { |
| 610 CompilationError(MessageKind kind, [Map arguments = const {}]) | 617 CompilationError(MessageKind kind, [Map arguments = const {}]) |
| 611 : super(kind, arguments); | 618 : super(kind, arguments); |
| 612 } | 619 } |
| OLD | NEW |