| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 static const SUPER_INITIALIZER_IN_OBJECT = const MessageKind( | 113 static const SUPER_INITIALIZER_IN_OBJECT = const MessageKind( |
| 114 "'Object' cannot have a super initializer"); | 114 "'Object' cannot have a super initializer"); |
| 115 static const DUPLICATE_SUPER_INITIALIZER = const MessageKind( | 115 static const DUPLICATE_SUPER_INITIALIZER = const MessageKind( |
| 116 'cannot have more than one super initializer'); | 116 'cannot have more than one super initializer'); |
| 117 static const INVALID_ARGUMENTS = const MessageKind( | 117 static const INVALID_ARGUMENTS = const MessageKind( |
| 118 "arguments do not match the expected parameters of #{methodName}"); | 118 "arguments do not match the expected parameters of #{methodName}"); |
| 119 static const NO_MATCHING_CONSTRUCTOR = const MessageKind( | 119 static const NO_MATCHING_CONSTRUCTOR = const MessageKind( |
| 120 "super call arguments and constructor parameters don't match"); | 120 "super call arguments and constructor parameters don't match"); |
| 121 static const NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT = const MessageKind( | 121 static const NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT = const MessageKind( |
| 122 "implicit super call arguments and constructor parameters don't match"); | 122 "implicit super call arguments and constructor parameters don't match"); |
| 123 static const FIELD_PARAMETER_NOT_ALLOWED = const MessageKind( | 123 static const INITIALIZING_FORMAL_NOT_ALLOWED = const MessageKind( |
| 124 'a field parameter is only allowed in generative constructors'); | 124 'an initializing formal parameter is only allowed in ' |
| 125 'non-redirecting generative constructors'); |
| 125 static const INVALID_PARAMETER = const MessageKind( | 126 static const INVALID_PARAMETER = const MessageKind( |
| 126 "cannot resolve parameter"); | 127 "cannot resolve parameter"); |
| 127 static const NOT_INSTANCE_FIELD = const MessageKind( | 128 static const NOT_INSTANCE_FIELD = const MessageKind( |
| 128 '#{fieldName} is not an instance field'); | 129 '#{fieldName} is not an instance field'); |
| 129 static const NO_CATCH_NOR_FINALLY = const MessageKind( | 130 static const NO_CATCH_NOR_FINALLY = const MessageKind( |
| 130 "expected 'catch' or 'finally'"); | 131 "expected 'catch' or 'finally'"); |
| 131 static const EMPTY_CATCH_DECLARATION = const MessageKind( | 132 static const EMPTY_CATCH_DECLARATION = const MessageKind( |
| 132 'expected an identifier in catch declaration'); | 133 'expected an identifier in catch declaration'); |
| 133 static const EXTRA_CATCH_DECLARATION = const MessageKind( | 134 static const EXTRA_CATCH_DECLARATION = const MessageKind( |
| 134 'extra parameter in catch declaration'); | 135 'extra parameter in catch declaration'); |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 | 636 |
| 636 class CompileTimeConstantError extends Diagnostic { | 637 class CompileTimeConstantError extends Diagnostic { |
| 637 CompileTimeConstantError(MessageKind kind, [Map arguments = const {}]) | 638 CompileTimeConstantError(MessageKind kind, [Map arguments = const {}]) |
| 638 : super(kind, arguments); | 639 : super(kind, arguments); |
| 639 } | 640 } |
| 640 | 641 |
| 641 class CompilationError extends Diagnostic { | 642 class CompilationError extends Diagnostic { |
| 642 CompilationError(MessageKind kind, [Map arguments = const {}]) | 643 CompilationError(MessageKind kind, [Map arguments = const {}]) |
| 643 : super(kind, arguments); | 644 : super(kind, arguments); |
| 644 } | 645 } |
| OLD | NEW |