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 package com.google.dart.compiler.resolver; | 4 package com.google.dart.compiler.resolver; |
5 | 5 |
6 import com.google.dart.compiler.ErrorCode; | 6 import com.google.dart.compiler.ErrorCode; |
7 import com.google.dart.compiler.ErrorSeverity; | 7 import com.google.dart.compiler.ErrorSeverity; |
8 import com.google.dart.compiler.SubSystem; | 8 import com.google.dart.compiler.SubSystem; |
9 | 9 |
10 /** | 10 /** |
(...skipping 13 matching lines...) Expand all Loading... |
24 CANNOT_INIT_STATIC_FIELD_IN_INITIALIZER("Cannot initialize a static field in a
n initializer list"), | 24 CANNOT_INIT_STATIC_FIELD_IN_INITIALIZER("Cannot initialize a static field in a
n initializer list"), |
25 CANNOT_OVERRIDE_INSTANCE_MEMBER("static member cannot override instance member
%s of %s"), | 25 CANNOT_OVERRIDE_INSTANCE_MEMBER("static member cannot override instance member
%s of %s"), |
26 CANNOT_OVERRIDE_STATIC_MEMBER("cannot override static member %s of %s"), | 26 CANNOT_OVERRIDE_STATIC_MEMBER("cannot override static member %s of %s"), |
27 CANNOT_RESOLVE_CONSTRUCTOR("cannot resolve constructor %s"), | 27 CANNOT_RESOLVE_CONSTRUCTOR("cannot resolve constructor %s"), |
28 CANNOT_RESOLVE_FIELD("cannot resolve field %s"), | 28 CANNOT_RESOLVE_FIELD("cannot resolve field %s"), |
29 CANNOT_RESOLVE_LABEL("cannot resolve label %s"), | 29 CANNOT_RESOLVE_LABEL("cannot resolve label %s"), |
30 CANNOT_RESOLVE_METHOD("cannot resolve method %s"), | 30 CANNOT_RESOLVE_METHOD("cannot resolve method %s"), |
31 CANNOT_RESOLVE_SUPER_CONSTRUCTOR("cannot resolve method %s"), | 31 CANNOT_RESOLVE_SUPER_CONSTRUCTOR("cannot resolve method %s"), |
32 CANNOT_RESOLVE_IMPLICIT_CALL_TO_SUPER_CONSTRUCTOR( | 32 CANNOT_RESOLVE_IMPLICIT_CALL_TO_SUPER_CONSTRUCTOR( |
33 "super type %s does not have a default constructor"), | 33 "super type %s does not have a default constructor"), |
| 34 CIRCULAR_REFERENCE( |
| 35 "Circular reference detected: compile-time constants cannot reference the
mselves."), |
34 CONSTRUCTOR_CANNOT_BE_ABSTRACT("A constructor cannot be asbstract"), | 36 CONSTRUCTOR_CANNOT_BE_ABSTRACT("A constructor cannot be asbstract"), |
35 CONSTRUCTOR_CANNOT_BE_STATIC("A constructor cannot be static"), | 37 CONSTRUCTOR_CANNOT_BE_STATIC("A constructor cannot be static"), |
36 CONSTRUCTOR_CANNOT_HAVE_RETURN_TYPE("Generative constructors cannot have retur
n type"), | 38 CONSTRUCTOR_CANNOT_HAVE_RETURN_TYPE("Generative constructors cannot have retur
n type"), |
37 CONST_CONSTRUCTOR_CANNOT_HAVE_BODY("A const constructor cannot have a body"), | 39 CONST_CONSTRUCTOR_CANNOT_HAVE_BODY("A const constructor cannot have a body"), |
38 CONST_CONSTRUCTOR_MUST_CALL_CONST_SUPER("const constructor must call const sup
er constructor"), | 40 CONST_CONSTRUCTOR_MUST_CALL_CONST_SUPER("const constructor must call const sup
er constructor"), |
39 CONSTANTS_MUST_BE_INITIALIZED("constants must be initialized"), | 41 CONSTANTS_MUST_BE_INITIALIZED("constants must be initialized"), |
40 CYCLIC_CLASS("%s causes a cycle in the supertype graph"), | 42 CYCLIC_CLASS("%s causes a cycle in the supertype graph"), |
41 DID_YOU_MEAN_NEW("%1$s is a %2$s. Did you mean (new %1$s)?"), | 43 DID_YOU_MEAN_NEW("%1$s is a %2$s. Did you mean (new %1$s)?"), |
42 DUPLICATE_DEFINITION("duplicate definition of %s"), | 44 DUPLICATE_DEFINITION("duplicate definition of %s"), |
43 DUPLICATED_INTERFACE("%s and %s are duplicated in the supertype graph"), | 45 DUPLICATED_INTERFACE("%s and %s are duplicated in the supertype graph"), |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 } | 116 } |
115 | 117 |
116 /** | 118 /** |
117 * Initialize a newly created error code to have the given severity and messag
e. | 119 * Initialize a newly created error code to have the given severity and messag
e. |
118 */ | 120 */ |
119 private ResolverErrorCode(ErrorSeverity severity, String message) { | 121 private ResolverErrorCode(ErrorSeverity severity, String message) { |
120 this.severity = severity; | 122 this.severity = severity; |
121 this.message = message; | 123 this.message = message; |
122 } | 124 } |
123 | 125 |
| 126 @Override |
124 public String getMessage() { | 127 public String getMessage() { |
125 return message; | 128 return message; |
126 } | 129 } |
127 | 130 |
| 131 @Override |
128 public ErrorSeverity getErrorSeverity() { | 132 public ErrorSeverity getErrorSeverity() { |
129 return severity; | 133 return severity; |
130 } | 134 } |
131 | 135 |
| 136 @Override |
132 public SubSystem getSubSystem() { | 137 public SubSystem getSubSystem() { |
133 return SubSystem.RESOLVER; | 138 return SubSystem.RESOLVER; |
134 } | 139 } |
135 } | 140 } |
OLD | NEW |