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 CONST_CALLS_NON_CONST = const MessageKind( |
| 124 "const constructor cannot call a non-const constructor"); |
123 static const INITIALIZING_FORMAL_NOT_ALLOWED = const MessageKind( | 125 static const INITIALIZING_FORMAL_NOT_ALLOWED = const MessageKind( |
124 'an initializing formal parameter is only allowed in ' | 126 'an initializing formal parameter is only allowed in ' |
125 'non-redirecting generative constructors'); | 127 'non-redirecting generative constructors'); |
126 static const INVALID_PARAMETER = const MessageKind( | 128 static const INVALID_PARAMETER = const MessageKind( |
127 "cannot resolve parameter"); | 129 "cannot resolve parameter"); |
128 static const NOT_INSTANCE_FIELD = const MessageKind( | 130 static const NOT_INSTANCE_FIELD = const MessageKind( |
129 '#{fieldName} is not an instance field'); | 131 '#{fieldName} is not an instance field'); |
130 static const NO_CATCH_NOR_FINALLY = const MessageKind( | 132 static const NO_CATCH_NOR_FINALLY = const MessageKind( |
131 "expected 'catch' or 'finally'"); | 133 "expected 'catch' or 'finally'"); |
132 static const EMPTY_CATCH_DECLARATION = const MessageKind( | 134 static const EMPTY_CATCH_DECLARATION = const MessageKind( |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
639 | 641 |
640 class CompileTimeConstantError extends Diagnostic { | 642 class CompileTimeConstantError extends Diagnostic { |
641 CompileTimeConstantError(MessageKind kind, [Map arguments = const {}]) | 643 CompileTimeConstantError(MessageKind kind, [Map arguments = const {}]) |
642 : super(kind, arguments); | 644 : super(kind, arguments); |
643 } | 645 } |
644 | 646 |
645 class CompilationError extends Diagnostic { | 647 class CompilationError extends Diagnostic { |
646 CompilationError(MessageKind kind, [Map arguments = const {}]) | 648 CompilationError(MessageKind kind, [Map arguments = const {}]) |
647 : super(kind, arguments); | 649 : super(kind, arguments); |
648 } | 650 } |
OLD | NEW |