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 |
11 static final NOT_ASSIGNABLE = const MessageKind( | 11 static final NOT_ASSIGNABLE = const MessageKind( |
12 '#{2} is not assignable to #{1}'); | 12 '#{2} is not assignable to #{1}'); |
13 static final VOID_EXPRESSION = const MessageKind( | 13 static final VOID_EXPRESSION = const MessageKind( |
14 'expression does not yield a value'); | 14 'expression does not yield a value'); |
15 static final VOID_VARIABLE = const MessageKind( | 15 static final VOID_VARIABLE = const MessageKind( |
16 'variable cannot be of type void'); | 16 'variable cannot be of type void'); |
17 static final RETURN_VALUE_IN_VOID = const MessageKind( | 17 static final RETURN_VALUE_IN_VOID = const MessageKind( |
18 'cannot return value from void function'); | 18 'cannot return value from void function'); |
19 static final RETURN_NOTHING = const MessageKind( | 19 static final RETURN_NOTHING = const MessageKind( |
20 'value of type #{1} expected'); | 20 'value of type #{1} expected'); |
21 static final MISSING_ARGUMENT = const MessageKind( | 21 static final MISSING_ARGUMENT = const MessageKind( |
22 'missing argument of type #{1}'); | 22 'missing argument of type #{1}'); |
23 static final ADDITIONAL_ARGUMENT = const MessageKind( | 23 static final ADDITIONAL_ARGUMENT = const MessageKind( |
24 'additional argument'); | 24 'additional argument'); |
| 25 static final PROPERTY_NOT_FOUND = const MessageKind( |
| 26 'no property named #{2} in class #{1}'); |
25 static final METHOD_NOT_FOUND = const MessageKind( | 27 static final METHOD_NOT_FOUND = const MessageKind( |
26 'no method named #{2} in class #{1}'); | 28 'no method named #{2} in class #{1}'); |
27 static final MEMBER_NOT_STATIC = const MessageKind( | 29 static final MEMBER_NOT_STATIC = const MessageKind( |
28 '#{1}.#{2} is not static'); | 30 '#{1}.#{2} is not static'); |
29 static final NO_INSTANCE_AVAILABLE = const MessageKind( | 31 static final NO_INSTANCE_AVAILABLE = const MessageKind( |
30 '#{1} is only available in instance methods'); | 32 '#{1} is only available in instance methods'); |
31 | 33 |
32 static final UNREACHABLE_CODE = const MessageKind( | 34 static final UNREACHABLE_CODE = const MessageKind( |
33 'unreachable code'); | 35 'unreachable code'); |
34 static final MISSING_RETURN = const MessageKind( | 36 static final MISSING_RETURN = const MessageKind( |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 | 303 |
302 class CompileTimeConstantError extends Diagnostic { | 304 class CompileTimeConstantError extends Diagnostic { |
303 CompileTimeConstantError(MessageKind kind, List<Type> arguments) | 305 CompileTimeConstantError(MessageKind kind, List<Type> arguments) |
304 : super(kind, arguments); | 306 : super(kind, arguments); |
305 } | 307 } |
306 | 308 |
307 class CompilationError extends Diagnostic { | 309 class CompilationError extends Diagnostic { |
308 CompilationError(MessageKind kind, List<Type> arguments) | 310 CompilationError(MessageKind kind, List<Type> arguments) |
309 : super(kind, arguments); | 311 : super(kind, arguments); |
310 } | 312 } |
OLD | NEW |