| 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 158 |
| 159 static final CANNOT_EXTEND = const MessageKind( | 159 static final CANNOT_EXTEND = const MessageKind( |
| 160 "#{1} cannot be extended"); | 160 "#{1} cannot be extended"); |
| 161 | 161 |
| 162 static final CANNOT_IMPLEMENT = const MessageKind( | 162 static final CANNOT_IMPLEMENT = const MessageKind( |
| 163 "#{1} cannot be implemented"); | 163 "#{1} cannot be implemented"); |
| 164 | 164 |
| 165 static final ILLEGAL_SUPER_SEND = const MessageKind( | 165 static final ILLEGAL_SUPER_SEND = const MessageKind( |
| 166 "#{1} cannot be called on super"); | 166 "#{1} cannot be called on super"); |
| 167 | 167 |
| 168 static final ADDITIONAL_TYPE_ARGUMENT = const MessageKind( |
| 169 "additional type argument"); |
| 170 |
| 171 static final MISSING_TYPE_ARGUMENT = const MessageKind( |
| 172 "missing type argument"); |
| 173 |
| 168 toString() => template; | 174 toString() => template; |
| 169 } | 175 } |
| 170 | 176 |
| 171 class Message { | 177 class Message { |
| 172 final kind; | 178 final kind; |
| 173 final List arguments; | 179 final List arguments; |
| 174 String message; | 180 String message; |
| 175 | 181 |
| 176 Message(this.kind, this.arguments); | 182 Message(this.kind, this.arguments); |
| 177 | 183 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 String toString() => message.toString(); | 231 String toString() => message.toString(); |
| 226 } | 232 } |
| 227 | 233 |
| 228 class CompileTimeConstantError { | 234 class CompileTimeConstantError { |
| 229 final Message message; | 235 final Message message; |
| 230 CompileTimeConstantError.message(this.message); | 236 CompileTimeConstantError.message(this.message); |
| 231 CompileTimeConstantError(MessageKind kind, List<Type> arguments) | 237 CompileTimeConstantError(MessageKind kind, List<Type> arguments) |
| 232 : message = new Message(kind, arguments); | 238 : message = new Message(kind, arguments); |
| 233 String toString() => message.toString(); | 239 String toString() => message.toString(); |
| 234 } | 240 } |
| OLD | NEW |