| 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 final GENERIC = const MessageKind('#{1}'); | 9 static final GENERIC = const MessageKind('#{1}'); |
| 10 | 10 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 static final EXISTING_LABEL = const MessageKind( | 109 static final EXISTING_LABEL = const MessageKind( |
| 110 'original declaration of duplicate label #{1}'); | 110 'original declaration of duplicate label #{1}'); |
| 111 static final DUPLICATE_LABEL = const MessageKind( | 111 static final DUPLICATE_LABEL = const MessageKind( |
| 112 'duplicate declaration of label #{1}'); | 112 'duplicate declaration of label #{1}'); |
| 113 static final UNUSED_LABEL = const MessageKind( | 113 static final UNUSED_LABEL = const MessageKind( |
| 114 'unused label #{1}'); | 114 'unused label #{1}'); |
| 115 static final INVALID_CONTINUE = const MessageKind( | 115 static final INVALID_CONTINUE = const MessageKind( |
| 116 'target of continue is not a loop or switch case'); | 116 'target of continue is not a loop or switch case'); |
| 117 | 117 |
| 118 static final NOT_A_COMPILE_TIME_CONSTANT = const MessageKind( | 118 static final NOT_A_COMPILE_TIME_CONSTANT = const MessageKind( |
| 119 '#{1} cannot be used as compile-time constant'); | 119 'not a compile-time constant'); |
| 120 | 120 |
| 121 static final NO_SUCH_LIBRARY_MEMBER = const MessageKind( | 121 static final NO_SUCH_LIBRARY_MEMBER = const MessageKind( |
| 122 '#{1} has no member named #{2}'); | 122 '#{1} has no member named #{2}'); |
| 123 | 123 |
| 124 static final CANNOT_INSTANTIATE_INTERFACE = const MessageKind( | 124 static final CANNOT_INSTANTIATE_INTERFACE = const MessageKind( |
| 125 "cannot instantiate interface '#{1}'"); | 125 "cannot instantiate interface '#{1}'"); |
| 126 | 126 |
| 127 static final NO_DEFAULT_CLASS = const MessageKind( | 127 static final NO_DEFAULT_CLASS = const MessageKind( |
| 128 "no default class on enclosing interface '#{1}'"); | 128 "no default class on enclosing interface '#{1}'"); |
| 129 | 129 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 String toString() => message.toString(); | 178 String toString() => message.toString(); |
| 179 } | 179 } |
| 180 | 180 |
| 181 class CompileTimeConstantError { | 181 class CompileTimeConstantError { |
| 182 final Message message; | 182 final Message message; |
| 183 CompileTimeConstantError.message(this.message); | 183 CompileTimeConstantError.message(this.message); |
| 184 CompileTimeConstantError(MessageKind kind, List<Type> arguments) | 184 CompileTimeConstantError(MessageKind kind, List<Type> arguments) |
| 185 : message = new Message(kind, arguments); | 185 : message = new Message(kind, arguments); |
| 186 String toString() => message.toString(); | 186 String toString() => message.toString(); |
| 187 } | 187 } |
| OLD | NEW |