| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 "cyclic reference to type variable #{1}"); | 151 "cyclic reference to type variable #{1}"); |
| 152 static final TYPE_NAME_EXPECTED = const MessageKind( | 152 static final TYPE_NAME_EXPECTED = const MessageKind( |
| 153 "class or interface name exptected"); | 153 "class or interface name exptected"); |
| 154 | 154 |
| 155 static final CANNOT_EXTEND = const MessageKind( | 155 static final CANNOT_EXTEND = const MessageKind( |
| 156 "#{1} cannot be extended"); | 156 "#{1} cannot be extended"); |
| 157 | 157 |
| 158 static final CANNOT_IMPLEMENT = const MessageKind( | 158 static final CANNOT_IMPLEMENT = const MessageKind( |
| 159 "#{1} cannot be implemented"); | 159 "#{1} cannot be implemented"); |
| 160 | 160 |
| 161 static final ILLEGAL_SUPER_SEND = const MessageKind( |
| 162 "#{1} cannot be called on super"); |
| 163 |
| 161 toString() => template; | 164 toString() => template; |
| 162 } | 165 } |
| 163 | 166 |
| 164 class Message { | 167 class Message { |
| 165 final kind; | 168 final kind; |
| 166 final List arguments; | 169 final List arguments; |
| 167 String message; | 170 String message; |
| 168 | 171 |
| 169 Message(this.kind, this.arguments); | 172 Message(this.kind, this.arguments); |
| 170 | 173 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 String toString() => message.toString(); | 221 String toString() => message.toString(); |
| 219 } | 222 } |
| 220 | 223 |
| 221 class CompileTimeConstantError { | 224 class CompileTimeConstantError { |
| 222 final Message message; | 225 final Message message; |
| 223 CompileTimeConstantError.message(this.message); | 226 CompileTimeConstantError.message(this.message); |
| 224 CompileTimeConstantError(MessageKind kind, List<Type> arguments) | 227 CompileTimeConstantError(MessageKind kind, List<Type> arguments) |
| 225 : message = new Message(kind, arguments); | 228 : message = new Message(kind, arguments); |
| 226 String toString() => message.toString(); | 229 String toString() => message.toString(); |
| 227 } | 230 } |
| OLD | NEW |