| 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 13 matching lines...) Expand all Loading... |
| 24 'additional argument'); | 24 'additional argument'); |
| 25 | 25 |
| 26 static final CANNOT_RESOLVE = const MessageKind( | 26 static final CANNOT_RESOLVE = const MessageKind( |
| 27 'cannot resolve #{1}'); | 27 'cannot resolve #{1}'); |
| 28 static final CANNOT_RESOLVE_TYPE = const MessageKind( | 28 static final CANNOT_RESOLVE_TYPE = const MessageKind( |
| 29 'cannot resolve type #{1}'); | 29 'cannot resolve type #{1}'); |
| 30 static final DUPLICATE_DEFINITION = const MessageKind( | 30 static final DUPLICATE_DEFINITION = const MessageKind( |
| 31 'duplicate definition of #{1}'); | 31 'duplicate definition of #{1}'); |
| 32 static final NOT_A_TYPE = const MessageKind( | 32 static final NOT_A_TYPE = const MessageKind( |
| 33 '#{1} is not a type'); | 33 '#{1} is not a type'); |
| 34 static final CANNOT_FIND_CONSTRUCTOR = const MessageKind( |
| 35 'cannot find constructor #{1}'); |
| 34 | 36 |
| 35 toString() => template; | 37 toString() => template; |
| 36 } | 38 } |
| 37 | 39 |
| 38 class Message { | 40 class Message { |
| 39 final kind; | 41 final kind; |
| 40 final List arguments; | 42 final List arguments; |
| 41 String message; | 43 String message; |
| 42 | 44 |
| 43 Message(this.kind, this.arguments); | 45 Message(this.kind, this.arguments); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 String toString() => message.toString(); | 78 String toString() => message.toString(); |
| 77 } | 79 } |
| 78 | 80 |
| 79 class ResolutionWarning { | 81 class ResolutionWarning { |
| 80 final Message message; | 82 final Message message; |
| 81 ResolutionWarning.message(this.message); | 83 ResolutionWarning.message(this.message); |
| 82 ResolutionWarning(MessageKind kind, List<Type> arguments) | 84 ResolutionWarning(MessageKind kind, List<Type> arguments) |
| 83 : message = new Message(kind, arguments); | 85 : message = new Message(kind, arguments); |
| 84 String toString() => message.toString(); | 86 String toString() => message.toString(); |
| 85 } | 87 } |
| OLD | NEW |