Chromium Code Reviews| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 61 static final ALREADY_INITIALIZED = const MessageKind( | 61 static final ALREADY_INITIALIZED = const MessageKind( |
| 62 '#{1} was already initialized here'); | 62 '#{1} was already initialized here'); |
| 63 static final INIT_STATIC_FIELD = const MessageKind( | 63 static final INIT_STATIC_FIELD = const MessageKind( |
| 64 'cannot initialize static field #{1}'); | 64 'cannot initialize static field #{1}'); |
| 65 static final NOT_A_FIELD = const MessageKind( | 65 static final NOT_A_FIELD = const MessageKind( |
| 66 '#{1} is not a field'); | 66 '#{1} is not a field'); |
| 67 static final CONSTRUCTOR_CALL_EXPECTED = const MessageKind( | 67 static final CONSTRUCTOR_CALL_EXPECTED = const MessageKind( |
| 68 "only call to 'this' or 'super' constructor allowed"); | 68 "only call to 'this' or 'super' constructor allowed"); |
| 69 static final INVALID_FOR_IN = const MessageKind( | 69 static final INVALID_FOR_IN = const MessageKind( |
| 70 'Invalid for-in variable declaration.'); | 70 'Invalid for-in variable declaration.'); |
| 71 static final REDIRECTING_CONSTRUCTOR_CYCLE = const MessageKind( | |
|
kasperl
2012/02/14 14:24:47
It would be nice if we used either CTOR or CONSTRU
karlklose
2012/02/14 15:44:42
Done.
| |
| 72 'cyclic constructor redirection'); | |
| 73 static final REDIRECTING_CTOR_HAS_BODY = const MessageKind( | |
| 74 'redirecting constructor cannot have a body'); | |
| 71 static final REDIRECTING_CTOR_HAS_INITIALIZER = const MessageKind( | 75 static final REDIRECTING_CTOR_HAS_INITIALIZER = const MessageKind( |
| 72 'redirecting constructor cannot have other initializers'); | 76 'redirecting constructor cannot have other initializers'); |
| 73 static final SUPER_INITIALIZER_IN_OBJECT = const MessageKind( | 77 static final SUPER_INITIALIZER_IN_OBJECT = const MessageKind( |
| 74 "'Object' cannot have a super initializer"); | 78 "'Object' cannot have a super initializer"); |
| 75 static final DUPLICATE_SUPER_INITIALIZER = const MessageKind( | 79 static final DUPLICATE_SUPER_INITIALIZER = const MessageKind( |
| 76 'cannot have more than one super initializer'); | 80 'cannot have more than one super initializer'); |
| 77 static final NO_MATCHING_CONSTRUCTOR = const MessageKind( | 81 static final NO_MATCHING_CONSTRUCTOR = const MessageKind( |
| 78 'no matching constructor found'); | 82 'no matching constructor found'); |
| 79 static final NO_CONSTRUCTOR = const MessageKind( | 83 static final NO_CONSTRUCTOR = const MessageKind( |
| 80 '#{1} is a #{2}, not a constructor'); | 84 '#{1} is a #{2}, not a constructor'); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 148 String toString() => message.toString(); | 152 String toString() => message.toString(); |
| 149 } | 153 } |
| 150 | 154 |
| 151 class CompileTimeConstantError { | 155 class CompileTimeConstantError { |
| 152 final Message message; | 156 final Message message; |
| 153 CompileTimeConstantError.message(this.message); | 157 CompileTimeConstantError.message(this.message); |
| 154 CompileTimeConstantError(MessageKind kind, List<Type> arguments) | 158 CompileTimeConstantError(MessageKind kind, List<Type> arguments) |
| 155 : message = new Message(kind, arguments); | 159 : message = new Message(kind, arguments); |
| 156 String toString() => message.toString(); | 160 String toString() => message.toString(); |
| 157 } | 161 } |
| OLD | NEW |