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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 147 'map-literal key not a string literal'); | 147 'map-literal key not a string literal'); |
| 148 | 148 |
| 149 static final NO_SUCH_LIBRARY_MEMBER = const MessageKind( | 149 static final NO_SUCH_LIBRARY_MEMBER = const MessageKind( |
| 150 '#{1} has no member named #{2}'); | 150 '#{1} has no member named #{2}'); |
| 151 | 151 |
| 152 static final CANNOT_INSTANTIATE_INTERFACE = const MessageKind( | 152 static final CANNOT_INSTANTIATE_INTERFACE = const MessageKind( |
| 153 "cannot instantiate interface '#{1}'"); | 153 "cannot instantiate interface '#{1}'"); |
| 154 | 154 |
| 155 static final CANNOT_INSTANTIATE_TYPEDEF = const MessageKind( | 155 static final CANNOT_INSTANTIATE_TYPEDEF = const MessageKind( |
| 156 "cannot instantiate typedef '#{1}'"); | 156 "cannot instantiate typedef '#{1}'"); |
| 157 static final CYCLIC_TYPEDEF = const MessageKind( | |
| 158 "a typedef may not refer to the type it is defining"); | |
|
ahe
2012/07/30 10:30:05
I think this message should include the name of th
Johnni Winther
2012/08/01 10:12:29
Done.
| |
| 157 | 159 |
| 158 static final NO_DEFAULT_CLASS = const MessageKind( | 160 static final NO_DEFAULT_CLASS = const MessageKind( |
| 159 "no default class on enclosing interface '#{1}'"); | 161 "no default class on enclosing interface '#{1}'"); |
| 160 | 162 |
| 161 static final CYCLIC_TYPE_VARIABLE = const MessageKind( | 163 static final CYCLIC_TYPE_VARIABLE = const MessageKind( |
| 162 "cyclic reference to type variable #{1}"); | 164 "cyclic reference to type variable #{1}"); |
| 163 static final TYPE_NAME_EXPECTED = const MessageKind( | 165 static final TYPE_NAME_EXPECTED = const MessageKind( |
| 164 "class or interface name expected"); | 166 "class or interface name expected"); |
| 165 | 167 |
| 166 static final CANNOT_EXTEND = const MessageKind( | 168 static final CANNOT_EXTEND = const MessageKind( |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 303 | 305 |
| 304 class CompileTimeConstantError extends Diagnostic { | 306 class CompileTimeConstantError extends Diagnostic { |
| 305 CompileTimeConstantError(MessageKind kind, List<Type> arguments) | 307 CompileTimeConstantError(MessageKind kind, List<Type> arguments) |
| 306 : super(kind, arguments); | 308 : super(kind, arguments); |
| 307 } | 309 } |
| 308 | 310 |
| 309 class CompilationError extends Diagnostic { | 311 class CompilationError extends Diagnostic { |
| 310 CompilationError(MessageKind kind, List<Type> arguments) | 312 CompilationError(MessageKind kind, List<Type> arguments) |
| 311 : super(kind, arguments); | 313 : super(kind, arguments); |
| 312 } | 314 } |
| OLD | NEW |