OLD | NEW |
1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
3 | 3 |
4 library engine.error; | 4 library engine.error; |
5 | 5 |
6 import 'java_core.dart'; | 6 import 'java_core.dart'; |
7 import 'source.dart'; | 7 import 'source.dart'; |
8 import 'ast.dart' show ASTNode; | 8 import 'ast.dart' show ASTNode; |
9 import 'scanner.dart' show Token; | 9 import 'scanner.dart' show Token; |
10 | 10 |
| 11 |
11 /** | 12 /** |
12 * Instances of the enumeration {@code ErrorSeverity} represent the severity of
an {@link ErrorCode}. | 13 * Instances of the enumeration {@code ErrorSeverity} represent the severity of
an {@link ErrorCode}. |
13 * @coverage dart.engine.error | 14 * @coverage dart.engine.error |
14 */ | 15 */ |
15 class ErrorSeverity implements Comparable<ErrorSeverity> { | 16 class ErrorSeverity implements Comparable<ErrorSeverity> { |
| 17 |
16 /** | 18 /** |
17 * The severity representing a non-error. This is never used for any error cod
e, but is useful for | 19 * The severity representing a non-error. This is never used for any error cod
e, but is useful for |
18 * clients. | 20 * clients. |
19 */ | 21 */ |
20 static final ErrorSeverity NONE = new ErrorSeverity('NONE', 0, " ", "none"); | 22 static final ErrorSeverity NONE = new ErrorSeverity('NONE', 0, " ", "none"); |
| 23 |
21 /** | 24 /** |
22 * The severity representing a warning. Warnings can become errors if the {@co
de -Werror} command | 25 * The severity representing a warning. Warnings can become errors if the {@co
de -Werror} command |
23 * line flag is specified. | 26 * line flag is specified. |
24 */ | 27 */ |
25 static final ErrorSeverity WARNING = new ErrorSeverity('WARNING', 1, "W", "war
ning"); | 28 static final ErrorSeverity WARNING = new ErrorSeverity('WARNING', 1, "W", "war
ning"); |
| 29 |
26 /** | 30 /** |
27 * The severity representing an error. | 31 * The severity representing an error. |
28 */ | 32 */ |
29 static final ErrorSeverity ERROR = new ErrorSeverity('ERROR', 2, "E", "error")
; | 33 static final ErrorSeverity ERROR = new ErrorSeverity('ERROR', 2, "E", "error")
; |
30 static final List<ErrorSeverity> values = [NONE, WARNING, ERROR]; | 34 static final List<ErrorSeverity> values = [NONE, WARNING, ERROR]; |
31 final String __name; | 35 |
32 final int __ordinal; | 36 /// The name of this enum constant, as declared in the enum declaration. |
33 int get ordinal => __ordinal; | 37 final String name; |
| 38 |
| 39 /// The position in the enum declaration. |
| 40 final int ordinal; |
| 41 |
34 /** | 42 /** |
35 * The name of the severity used when producing machine output. | 43 * The name of the severity used when producing machine output. |
36 */ | 44 */ |
37 String _machineCode; | 45 String _machineCode; |
| 46 |
38 /** | 47 /** |
39 * The name of the severity used when producing readable output. | 48 * The name of the severity used when producing readable output. |
40 */ | 49 */ |
41 String _displayName; | 50 String _displayName; |
| 51 |
42 /** | 52 /** |
43 * Initialize a newly created severity with the given names. | 53 * Initialize a newly created severity with the given names. |
44 * @param machineCode the name of the severity used when producing machine out
put | 54 * @param machineCode the name of the severity used when producing machine out
put |
45 * @param displayName the name of the severity used when producing readable ou
tput | 55 * @param displayName the name of the severity used when producing readable ou
tput |
46 */ | 56 */ |
47 ErrorSeverity(this.__name, this.__ordinal, String machineCode, String displayN
ame) { | 57 ErrorSeverity(this.name, this.ordinal, String machineCode, String displayName)
{ |
48 this._machineCode = machineCode; | 58 this._machineCode = machineCode; |
49 this._displayName = displayName; | 59 this._displayName = displayName; |
50 } | 60 } |
| 61 |
51 /** | 62 /** |
52 * Return the name of the severity used when producing readable output. | 63 * Return the name of the severity used when producing readable output. |
53 * @return the name of the severity used when producing readable output | 64 * @return the name of the severity used when producing readable output |
54 */ | 65 */ |
55 String get displayName => _displayName; | 66 String get displayName => _displayName; |
| 67 |
56 /** | 68 /** |
57 * Return the name of the severity used when producing machine output. | 69 * Return the name of the severity used when producing machine output. |
58 * @return the name of the severity used when producing machine output | 70 * @return the name of the severity used when producing machine output |
59 */ | 71 */ |
60 String get machineCode => _machineCode; | 72 String get machineCode => _machineCode; |
| 73 |
61 /** | 74 /** |
62 * Return the severity constant that represents the greatest severity. | 75 * Return the severity constant that represents the greatest severity. |
63 * @param severity the severity being compared against | 76 * @param severity the severity being compared against |
64 * @return the most sever of this or the given severity | 77 * @return the most sever of this or the given severity |
65 */ | 78 */ |
66 ErrorSeverity max(ErrorSeverity severity) => this.ordinal >= severity.ordinal
? this : severity; | 79 ErrorSeverity max(ErrorSeverity severity) => this.ordinal >= severity.ordinal
? this : severity; |
67 int compareTo(ErrorSeverity other) => __ordinal - other.__ordinal; | 80 int compareTo(ErrorSeverity other) => ordinal - other.ordinal; |
68 String toString() => __name; | 81 String toString() => name; |
69 } | 82 } |
| 83 |
| 84 /** |
| 85 * Instances of the class {@code AnalysisErrorWithProperties} |
| 86 */ |
| 87 class AnalysisErrorWithProperties extends AnalysisError { |
| 88 |
| 89 /** |
| 90 * The properties associated with this error. |
| 91 */ |
| 92 Map<ErrorProperty, Object> _propertyMap = new Map<ErrorProperty, Object>(); |
| 93 |
| 94 /** |
| 95 * Initialize a newly created analysis error for the specified source. The err
or has no location |
| 96 * information. |
| 97 * @param source the source for which the exception occurred |
| 98 * @param errorCode the error code to be associated with this error |
| 99 * @param arguments the arguments used to build the error message |
| 100 */ |
| 101 AnalysisErrorWithProperties.con1(Source source, ErrorCode errorCode, List<Obje
ct> arguments) : super.con1(source, errorCode, arguments) { |
| 102 _jtd_constructor_133_impl(source, errorCode, arguments); |
| 103 } |
| 104 _jtd_constructor_133_impl(Source source, ErrorCode errorCode, List<Object> arg
uments) { |
| 105 } |
| 106 |
| 107 /** |
| 108 * Initialize a newly created analysis error for the specified source at the g
iven location. |
| 109 * @param source the source for which the exception occurred |
| 110 * @param offset the offset of the location of the error |
| 111 * @param length the length of the location of the error |
| 112 * @param errorCode the error code to be associated with this error |
| 113 * @param arguments the arguments used to build the error message |
| 114 */ |
| 115 AnalysisErrorWithProperties.con2(Source source, int offset, int length, ErrorC
ode errorCode, List<Object> arguments) : super.con2(source, offset, length, erro
rCode, arguments) { |
| 116 _jtd_constructor_134_impl(source, offset, length, errorCode, arguments); |
| 117 } |
| 118 _jtd_constructor_134_impl(Source source, int offset, int length, ErrorCode err
orCode, List<Object> arguments) { |
| 119 } |
| 120 Object getProperty(ErrorProperty property) => _propertyMap[property]; |
| 121 |
| 122 /** |
| 123 * Set the value of the given property to the given value. Using a value of {@
code null} will |
| 124 * effectively remove the property from this error. |
| 125 * @param property the property whose value is to be returned |
| 126 * @param value the new value of the given property |
| 127 */ |
| 128 void setProperty(ErrorProperty property, Object value) { |
| 129 _propertyMap[property] = value; |
| 130 } |
| 131 } |
| 132 |
70 /** | 133 /** |
71 * Instances of the class {@code ErrorReporter} wrap an error listener with util
ity methods used to | 134 * Instances of the class {@code ErrorReporter} wrap an error listener with util
ity methods used to |
72 * create the errors being reported. | 135 * create the errors being reported. |
73 * @coverage dart.engine.error | 136 * @coverage dart.engine.error |
74 */ | 137 */ |
75 class ErrorReporter { | 138 class ErrorReporter { |
| 139 |
76 /** | 140 /** |
77 * The error listener to which errors will be reported. | 141 * The error listener to which errors will be reported. |
78 */ | 142 */ |
79 AnalysisErrorListener _errorListener; | 143 AnalysisErrorListener _errorListener; |
| 144 |
80 /** | 145 /** |
81 * The default source to be used when reporting errors. | 146 * The default source to be used when reporting errors. |
82 */ | 147 */ |
83 Source _defaultSource; | 148 Source _defaultSource; |
| 149 |
84 /** | 150 /** |
85 * The source to be used when reporting errors. | 151 * The source to be used when reporting errors. |
86 */ | 152 */ |
87 Source _source; | 153 Source _source; |
| 154 |
88 /** | 155 /** |
89 * Initialize a newly created error reporter that will report errors to the gi
ven listener. | 156 * Initialize a newly created error reporter that will report errors to the gi
ven listener. |
90 * @param errorListener the error listener to which errors will be reported | 157 * @param errorListener the error listener to which errors will be reported |
91 * @param defaultSource the default source to be used when reporting errors | 158 * @param defaultSource the default source to be used when reporting errors |
92 */ | 159 */ |
93 ErrorReporter(AnalysisErrorListener errorListener, Source defaultSource) { | 160 ErrorReporter(AnalysisErrorListener errorListener, Source defaultSource) { |
94 if (errorListener == null) { | 161 if (errorListener == null) { |
95 throw new IllegalArgumentException("An error listener must be provided"); | 162 throw new IllegalArgumentException("An error listener must be provided"); |
96 } else if (defaultSource == null) { | 163 } else if (defaultSource == null) { |
97 throw new IllegalArgumentException("A default source must be provided"); | 164 throw new IllegalArgumentException("A default source must be provided"); |
98 } | 165 } |
99 this._errorListener = errorListener; | 166 this._errorListener = errorListener; |
100 this._defaultSource = defaultSource; | 167 this._defaultSource = defaultSource; |
101 this._source = defaultSource; | 168 this._source = defaultSource; |
102 } | 169 } |
| 170 |
| 171 /** |
| 172 * Report a passed error. |
| 173 * @param error the error to report |
| 174 */ |
| 175 void reportError(AnalysisError error) { |
| 176 _errorListener.onError(error); |
| 177 } |
| 178 |
103 /** | 179 /** |
104 * Report an error with the given error code and arguments. | 180 * Report an error with the given error code and arguments. |
105 * @param errorCode the error code of the error to be reported | 181 * @param errorCode the error code of the error to be reported |
106 * @param node the node specifying the location of the error | 182 * @param node the node specifying the location of the error |
107 * @param arguments the arguments to the error, used to compose the error mess
age | 183 * @param arguments the arguments to the error, used to compose the error mess
age |
108 */ | 184 */ |
109 void reportError(ErrorCode errorCode, ASTNode node, List<Object> arguments) { | 185 void reportError2(ErrorCode errorCode, ASTNode node, List<Object> arguments) { |
110 _errorListener.onError(new AnalysisError.con2(_source, node.offset, node.len
gth, errorCode, arguments)); | 186 _errorListener.onError(new AnalysisError.con2(_source, node.offset, node.len
gth, errorCode, arguments)); |
111 } | 187 } |
| 188 |
| 189 /** |
| 190 * Report an error with the given error code and arguments. |
| 191 * @param errorCode the error code of the error to be reported |
| 192 * @param offset the offset of the location of the error |
| 193 * @param length the length of the location of the error |
| 194 * @param arguments the arguments to the error, used to compose the error mess
age |
| 195 */ |
| 196 void reportError3(ErrorCode errorCode, int offset, int length, List<Object> ar
guments) { |
| 197 _errorListener.onError(new AnalysisError.con2(_source, offset, length, error
Code, arguments)); |
| 198 } |
| 199 |
112 /** | 200 /** |
113 * Report an error with the given error code and arguments. | 201 * Report an error with the given error code and arguments. |
114 * @param errorCode the error code of the error to be reported | 202 * @param errorCode the error code of the error to be reported |
115 * @param token the token specifying the location of the error | 203 * @param token the token specifying the location of the error |
116 * @param arguments the arguments to the error, used to compose the error mess
age | 204 * @param arguments the arguments to the error, used to compose the error mess
age |
117 */ | 205 */ |
118 void reportError2(ErrorCode errorCode, Token token, List<Object> arguments) { | 206 void reportError4(ErrorCode errorCode, Token token, List<Object> arguments) { |
119 _errorListener.onError(new AnalysisError.con2(_source, token.offset, token.l
ength, errorCode, arguments)); | 207 _errorListener.onError(new AnalysisError.con2(_source, token.offset, token.l
ength, errorCode, arguments)); |
120 } | 208 } |
| 209 |
121 /** | 210 /** |
122 * Set the source to be used when reporting errors. Setting the source to {@co
de null} will cause | 211 * Set the source to be used when reporting errors. Setting the source to {@co
de null} will cause |
123 * the default source to be used. | 212 * the default source to be used. |
124 * @param source the source to be used when reporting errors | 213 * @param source the source to be used when reporting errors |
125 */ | 214 */ |
126 void set source(Source source2) { | 215 void set source(Source source2) { |
127 this._source = source2 == null ? _defaultSource : source2; | 216 this._source = source2 == null ? _defaultSource : source2; |
128 } | 217 } |
129 } | 218 } |
| 219 |
130 /** | 220 /** |
131 * Instances of the class {@code AnalysisError} represent an error discovered du
ring the analysis of | 221 * Instances of the class {@code AnalysisError} represent an error discovered du
ring the analysis of |
132 * some Dart code. | 222 * some Dart code. |
133 * @see AnalysisErrorListener | 223 * @see AnalysisErrorListener |
134 * @coverage dart.engine.error | 224 * @coverage dart.engine.error |
135 */ | 225 */ |
136 class AnalysisError { | 226 class AnalysisError { |
| 227 |
137 /** | 228 /** |
138 * An empty array of errors used when no errors are expected. | 229 * An empty array of errors used when no errors are expected. |
139 */ | 230 */ |
140 static List<AnalysisError> NO_ERRORS = new List<AnalysisError>(0); | 231 static List<AnalysisError> NO_ERRORS = new List<AnalysisError>(0); |
| 232 |
141 /** | 233 /** |
142 * A {@link Comparator} that sorts by the name of the file that the {@link Ana
lysisError} was | 234 * A {@link Comparator} that sorts by the name of the file that the {@link Ana
lysisError} was |
143 * found. | 235 * found. |
144 */ | 236 */ |
145 static Comparator<AnalysisError> FILE_COMPARATOR = (AnalysisError o1, Analysis
Error o2) => o1.source.shortName.compareTo(o2.source.shortName); | 237 static Comparator<AnalysisError> FILE_COMPARATOR = (AnalysisError o1, Analysis
Error o2) => o1.source.shortName.compareTo(o2.source.shortName); |
| 238 |
146 /** | 239 /** |
147 * A {@link Comparator} that sorts error codes first by their severity (errors
first, warnings | 240 * A {@link Comparator} that sorts error codes first by their severity (errors
first, warnings |
148 * second), and then by the the error code type. | 241 * second), and then by the the error code type. |
149 */ | 242 */ |
150 static Comparator<AnalysisError> ERROR_CODE_COMPARATOR = (AnalysisError o1, An
alysisError o2) { | 243 static Comparator<AnalysisError> ERROR_CODE_COMPARATOR = (AnalysisError o1, An
alysisError o2) { |
151 ErrorCode errorCode1 = o1.errorCode; | 244 ErrorCode errorCode1 = o1.errorCode; |
152 ErrorCode errorCode2 = o2.errorCode; | 245 ErrorCode errorCode2 = o2.errorCode; |
153 ErrorSeverity errorSeverity1 = errorCode1.errorSeverity; | 246 ErrorSeverity errorSeverity1 = errorCode1.errorSeverity; |
154 ErrorSeverity errorSeverity2 = errorCode2.errorSeverity; | 247 ErrorSeverity errorSeverity2 = errorCode2.errorSeverity; |
155 ErrorType errorType1 = errorCode1.type; | 248 ErrorType errorType1 = errorCode1.type; |
156 ErrorType errorType2 = errorCode2.type; | 249 ErrorType errorType2 = errorCode2.type; |
157 if (errorSeverity1 == errorSeverity2) { | 250 if (errorSeverity1 == errorSeverity2) { |
158 return errorType1.compareTo(errorType2); | 251 return errorType1.compareTo(errorType2); |
159 } else { | 252 } else { |
160 return errorSeverity2.compareTo(errorSeverity1); | 253 return errorSeverity2.compareTo(errorSeverity1); |
161 } | 254 } |
162 }; | 255 }; |
| 256 |
163 /** | 257 /** |
164 * The error code associated with the error. | 258 * The error code associated with the error. |
165 */ | 259 */ |
166 ErrorCode _errorCode; | 260 ErrorCode _errorCode; |
| 261 |
167 /** | 262 /** |
168 * The localized error message. | 263 * The localized error message. |
169 */ | 264 */ |
170 String _message; | 265 String _message; |
| 266 |
171 /** | 267 /** |
172 * The source in which the error occurred, or {@code null} if unknown. | 268 * The source in which the error occurred, or {@code null} if unknown. |
173 */ | 269 */ |
174 Source _source; | 270 Source _source; |
| 271 |
175 /** | 272 /** |
176 * The character offset from the beginning of the source (zero based) where th
e error occurred. | 273 * The character offset from the beginning of the source (zero based) where th
e error occurred. |
177 */ | 274 */ |
178 int _offset = 0; | 275 int _offset = 0; |
| 276 |
179 /** | 277 /** |
180 * The number of characters from the offset to the end of the source which enc
ompasses the | 278 * The number of characters from the offset to the end of the source which enc
ompasses the |
181 * compilation error. | 279 * compilation error. |
182 */ | 280 */ |
183 int _length = 0; | 281 int _length = 0; |
| 282 |
184 /** | 283 /** |
185 * Initialize a newly created analysis error for the specified source. The err
or has no location | 284 * Initialize a newly created analysis error for the specified source. The err
or has no location |
186 * information. | 285 * information. |
187 * @param source the source for which the exception occurred | 286 * @param source the source for which the exception occurred |
188 * @param errorCode the error code to be associated with this error | 287 * @param errorCode the error code to be associated with this error |
189 * @param arguments the arguments used to build the error message | 288 * @param arguments the arguments used to build the error message |
190 */ | 289 */ |
191 AnalysisError.con1(Source source2, ErrorCode errorCode2, List<Object> argument
s) { | 290 AnalysisError.con1(Source source2, ErrorCode errorCode2, List<Object> argument
s) { |
192 _jtd_constructor_131_impl(source2, errorCode2, arguments); | 291 _jtd_constructor_131_impl(source2, errorCode2, arguments); |
193 } | 292 } |
194 _jtd_constructor_131_impl(Source source2, ErrorCode errorCode2, List<Object> a
rguments) { | 293 _jtd_constructor_131_impl(Source source2, ErrorCode errorCode2, List<Object> a
rguments) { |
195 this._source = source2; | 294 this._source = source2; |
196 this._errorCode = errorCode2; | 295 this._errorCode = errorCode2; |
197 this._message = JavaString.format(errorCode2.message, arguments); | 296 this._message = JavaString.format(errorCode2.message, arguments); |
198 } | 297 } |
| 298 |
199 /** | 299 /** |
200 * Initialize a newly created analysis error for the specified source at the g
iven location. | 300 * Initialize a newly created analysis error for the specified source at the g
iven location. |
201 * @param source the source for which the exception occurred | 301 * @param source the source for which the exception occurred |
202 * @param offset the offset of the location of the error | 302 * @param offset the offset of the location of the error |
203 * @param length the length of the location of the error | 303 * @param length the length of the location of the error |
204 * @param errorCode the error code to be associated with this error | 304 * @param errorCode the error code to be associated with this error |
205 * @param arguments the arguments used to build the error message | 305 * @param arguments the arguments used to build the error message |
206 */ | 306 */ |
207 AnalysisError.con2(Source source2, int offset2, int length2, ErrorCode errorCo
de2, List<Object> arguments) { | 307 AnalysisError.con2(Source source2, int offset2, int length2, ErrorCode errorCo
de2, List<Object> arguments) { |
208 _jtd_constructor_132_impl(source2, offset2, length2, errorCode2, arguments); | 308 _jtd_constructor_132_impl(source2, offset2, length2, errorCode2, arguments); |
209 } | 309 } |
210 _jtd_constructor_132_impl(Source source2, int offset2, int length2, ErrorCode
errorCode2, List<Object> arguments) { | 310 _jtd_constructor_132_impl(Source source2, int offset2, int length2, ErrorCode
errorCode2, List<Object> arguments) { |
211 this._source = source2; | 311 this._source = source2; |
212 this._offset = offset2; | 312 this._offset = offset2; |
213 this._length = length2; | 313 this._length = length2; |
214 this._errorCode = errorCode2; | 314 this._errorCode = errorCode2; |
215 this._message = JavaString.format(errorCode2.message, arguments); | 315 this._message = JavaString.format(errorCode2.message, arguments); |
216 } | 316 } |
| 317 |
217 /** | 318 /** |
218 * Return the error code associated with the error. | 319 * Return the error code associated with the error. |
219 * @return the error code associated with the error | 320 * @return the error code associated with the error |
220 */ | 321 */ |
221 ErrorCode get errorCode => _errorCode; | 322 ErrorCode get errorCode => _errorCode; |
| 323 |
222 /** | 324 /** |
223 * Return the number of characters from the offset to the end of the source wh
ich encompasses the | 325 * Return the number of characters from the offset to the end of the source wh
ich encompasses the |
224 * compilation error. | 326 * compilation error. |
225 * @return the length of the error location | 327 * @return the length of the error location |
226 */ | 328 */ |
227 int get length => _length; | 329 int get length => _length; |
| 330 |
228 /** | 331 /** |
229 * Return the localized error message. | 332 * Return the localized error message. |
230 * @return the localized error message | 333 * @return the localized error message |
231 */ | 334 */ |
232 String get message => _message; | 335 String get message => _message; |
| 336 |
233 /** | 337 /** |
234 * Return the character offset from the beginning of the source (zero based) w
here the error | 338 * Return the character offset from the beginning of the source (zero based) w
here the error |
235 * occurred. | 339 * occurred. |
236 * @return the offset to the start of the error location | 340 * @return the offset to the start of the error location |
237 */ | 341 */ |
238 int get offset => _offset; | 342 int get offset => _offset; |
| 343 |
| 344 /** |
| 345 * Return the value of the given property, or {@code null} if the given proper
ty is not defined |
| 346 * for this error. |
| 347 * @param property the property whose value is to be returned |
| 348 * @return the value of the given property |
| 349 */ |
| 350 Object getProperty(ErrorProperty property) => null; |
| 351 |
239 /** | 352 /** |
240 * Return the source in which the error occurred, or {@code null} if unknown. | 353 * Return the source in which the error occurred, or {@code null} if unknown. |
241 * @return the source in which the error occurred | 354 * @return the source in which the error occurred |
242 */ | 355 */ |
243 Source get source => _source; | 356 Source get source => _source; |
244 int get hashCode { | 357 int get hashCode { |
245 int hashCode = _offset; | 358 int hashCode = _offset; |
246 hashCode ^= (_message != null) ? _message.hashCode : 0; | 359 hashCode ^= (_message != null) ? _message.hashCode : 0; |
247 hashCode ^= (_source != null) ? _source.hashCode : 0; | 360 hashCode ^= (_source != null) ? _source.hashCode : 0; |
248 return hashCode; | 361 return hashCode; |
249 } | 362 } |
| 363 |
250 /** | 364 /** |
251 * Set the source in which the error occurred to the given source. | 365 * Set the source in which the error occurred to the given source. |
252 * @param source the source in which the error occurred | 366 * @param source the source in which the error occurred |
253 */ | 367 */ |
254 void set source(Source source2) { | 368 void set source(Source source2) { |
255 this._source = source2; | 369 this._source = source2; |
256 } | 370 } |
257 String toString() { | 371 String toString() { |
258 JavaStringBuilder builder = new JavaStringBuilder(); | 372 JavaStringBuilder builder = new JavaStringBuilder(); |
259 builder.append((_source != null) ? _source.fullName : "<unknown source>"); | 373 builder.append((_source != null) ? _source.fullName : "<unknown source>"); |
260 builder.append("("); | 374 builder.append("("); |
261 builder.append(_offset); | 375 builder.append(_offset); |
262 builder.append(".."); | 376 builder.append(".."); |
263 builder.append(_offset + _length - 1); | 377 builder.append(_offset + _length - 1); |
264 builder.append("): "); | 378 builder.append("): "); |
265 builder.append(_message); | 379 builder.append(_message); |
266 return builder.toString(); | 380 return builder.toString(); |
267 } | 381 } |
268 } | 382 } |
| 383 |
| 384 /** |
| 385 * The enumeration {@code ErrorProperty} defines the properties that can be asso
ciated with an{@link AnalysisError}. |
| 386 */ |
| 387 class ErrorProperty implements Comparable<ErrorProperty> { |
| 388 |
| 389 /** |
| 390 * A property whose value is an array of {@link ExecutableElement executable e
lements} that should |
| 391 * be but are not implemented by a concrete class. |
| 392 */ |
| 393 static final ErrorProperty UNIMPLEMENTED_METHODS = new ErrorProperty('UNIMPLEM
ENTED_METHODS', 0); |
| 394 static final List<ErrorProperty> values = [UNIMPLEMENTED_METHODS]; |
| 395 |
| 396 /// The name of this enum constant, as declared in the enum declaration. |
| 397 final String name; |
| 398 |
| 399 /// The position in the enum declaration. |
| 400 final int ordinal; |
| 401 ErrorProperty(this.name, this.ordinal) { |
| 402 } |
| 403 int compareTo(ErrorProperty other) => ordinal - other.ordinal; |
| 404 String toString() => name; |
| 405 } |
| 406 |
269 /** | 407 /** |
270 * The interface {@code ErrorCode} defines the behavior common to objects repres
enting error codes | 408 * The interface {@code ErrorCode} defines the behavior common to objects repres
enting error codes |
271 * associated with {@link AnalysisError analysis errors}. | 409 * associated with {@link AnalysisError analysis errors}. |
272 * @coverage dart.engine.error | 410 * @coverage dart.engine.error |
273 */ | 411 */ |
274 abstract class ErrorCode { | 412 abstract class ErrorCode { |
| 413 |
275 /** | 414 /** |
276 * Return the severity of this error. | 415 * Return the severity of this error. |
277 * @return the severity of this error | 416 * @return the severity of this error |
278 */ | 417 */ |
279 ErrorSeverity get errorSeverity; | 418 ErrorSeverity get errorSeverity; |
| 419 |
280 /** | 420 /** |
281 * Return the message template used to create the message to be displayed for
this error. | 421 * Return the message template used to create the message to be displayed for
this error. |
282 * @return the message template used to create the message to be displayed for
this error | 422 * @return the message template used to create the message to be displayed for
this error |
283 */ | 423 */ |
284 String get message; | 424 String get message; |
| 425 |
285 /** | 426 /** |
286 * Return the type of the error. | 427 * Return the type of the error. |
287 * @return the type of the error | 428 * @return the type of the error |
288 */ | 429 */ |
289 ErrorType get type; | 430 ErrorType get type; |
290 /** | |
291 * Return {@code true} if this error should cause recompilation of the source
during the next | |
292 * incremental compilation. | |
293 * @return {@code true} if this error should cause recompilation of the source
during the next | |
294 * incremental compilation | |
295 */ | |
296 bool needsRecompilation(); | |
297 } | 431 } |
| 432 |
298 /** | 433 /** |
299 * Instances of the enumeration {@code ErrorType} represent the type of an {@lin
k ErrorCode}. | 434 * Instances of the enumeration {@code ErrorType} represent the type of an {@lin
k ErrorCode}. |
300 * @coverage dart.engine.error | 435 * @coverage dart.engine.error |
301 */ | 436 */ |
302 class ErrorType implements Comparable<ErrorType> { | 437 class ErrorType implements Comparable<ErrorType> { |
| 438 |
303 /** | 439 /** |
304 * Compile-time errors are errors that preclude execution. A compile time erro
r must be reported | 440 * Compile-time errors are errors that preclude execution. A compile time erro
r must be reported |
305 * by a Dart compiler before the erroneous code is executed. | 441 * by a Dart compiler before the erroneous code is executed. |
306 */ | 442 */ |
307 static final ErrorType COMPILE_TIME_ERROR = new ErrorType('COMPILE_TIME_ERROR'
, 0, ErrorSeverity.ERROR); | 443 static final ErrorType COMPILE_TIME_ERROR = new ErrorType('COMPILE_TIME_ERROR'
, 0, ErrorSeverity.ERROR); |
| 444 |
308 /** | 445 /** |
309 * Static warnings are those warnings reported by the static checker. They hav
e no effect on | 446 * Static warnings are those warnings reported by the static checker. They hav
e no effect on |
310 * execution. Static warnings must be provided by Dart compilers used during d
evelopment. | 447 * execution. Static warnings must be provided by Dart compilers used during d
evelopment. |
311 */ | 448 */ |
312 static final ErrorType STATIC_WARNING = new ErrorType('STATIC_WARNING', 1, Err
orSeverity.WARNING); | 449 static final ErrorType STATIC_WARNING = new ErrorType('STATIC_WARNING', 1, Err
orSeverity.WARNING); |
| 450 |
313 /** | 451 /** |
314 * Many, but not all, static warnings relate to types, in which case they are
known as static type | 452 * Many, but not all, static warnings relate to types, in which case they are
known as static type |
315 * warnings. | 453 * warnings. |
316 */ | 454 */ |
317 static final ErrorType STATIC_TYPE_WARNING = new ErrorType('STATIC_TYPE_WARNIN
G', 2, ErrorSeverity.WARNING); | 455 static final ErrorType STATIC_TYPE_WARNING = new ErrorType('STATIC_TYPE_WARNIN
G', 2, ErrorSeverity.WARNING); |
| 456 |
318 /** | 457 /** |
319 * Syntactic errors are errors produced as a result of input that does not con
form to the grammar. | 458 * Syntactic errors are errors produced as a result of input that does not con
form to the grammar. |
320 */ | 459 */ |
321 static final ErrorType SYNTACTIC_ERROR = new ErrorType('SYNTACTIC_ERROR', 3, E
rrorSeverity.ERROR); | 460 static final ErrorType SYNTACTIC_ERROR = new ErrorType('SYNTACTIC_ERROR', 3, E
rrorSeverity.ERROR); |
322 static final List<ErrorType> values = [COMPILE_TIME_ERROR, STATIC_WARNING, STA
TIC_TYPE_WARNING, SYNTACTIC_ERROR]; | 461 static final List<ErrorType> values = [COMPILE_TIME_ERROR, STATIC_WARNING, STA
TIC_TYPE_WARNING, SYNTACTIC_ERROR]; |
323 final String __name; | 462 |
324 final int __ordinal; | 463 /// The name of this enum constant, as declared in the enum declaration. |
325 int get ordinal => __ordinal; | 464 final String name; |
| 465 |
| 466 /// The position in the enum declaration. |
| 467 final int ordinal; |
| 468 |
326 /** | 469 /** |
327 * The severity of this type of error. | 470 * The severity of this type of error. |
328 */ | 471 */ |
329 ErrorSeverity _severity; | 472 ErrorSeverity _severity; |
| 473 |
330 /** | 474 /** |
331 * Initialize a newly created error type to have the given severity. | 475 * Initialize a newly created error type to have the given severity. |
332 * @param severity the severity of this type of error | 476 * @param severity the severity of this type of error |
333 */ | 477 */ |
334 ErrorType(this.__name, this.__ordinal, ErrorSeverity severity) { | 478 ErrorType(this.name, this.ordinal, ErrorSeverity severity) { |
335 this._severity = severity; | 479 this._severity = severity; |
336 } | 480 } |
| 481 |
337 /** | 482 /** |
338 * Return the severity of this type of error. | 483 * Return the severity of this type of error. |
339 * @return the severity of this type of error | 484 * @return the severity of this type of error |
340 */ | 485 */ |
341 ErrorSeverity get severity => _severity; | 486 ErrorSeverity get severity => _severity; |
342 int compareTo(ErrorType other) => __ordinal - other.__ordinal; | 487 int compareTo(ErrorType other) => ordinal - other.ordinal; |
343 String toString() => __name; | 488 String toString() => name; |
344 } | 489 } |
| 490 |
345 /** | 491 /** |
346 * The enumeration {@code CompileTimeErrorCode} defines the error codes used for
compile time | 492 * The enumeration {@code CompileTimeErrorCode} defines the error codes used for
compile time |
347 * errors. The convention for this class is for the name of the error code to in
dicate the problem | 493 * errors. The convention for this class is for the name of the error code to in
dicate the problem |
348 * that caused the error to be generated and for the error message to explain wh
at is wrong and, | 494 * that caused the error to be generated and for the error message to explain wh
at is wrong and, |
349 * when appropriate, how the problem can be corrected. | 495 * when appropriate, how the problem can be corrected. |
350 * @coverage dart.engine.error | 496 * @coverage dart.engine.error |
351 */ | 497 */ |
352 class CompileTimeErrorCode implements Comparable<CompileTimeErrorCode>, ErrorCod
e { | 498 class CompileTimeErrorCode implements Comparable<CompileTimeErrorCode>, ErrorCod
e { |
| 499 |
353 /** | 500 /** |
354 * 14.2 Exports: It is a compile-time error if a name <i>N</i> is re-exported
by a library | 501 * 14.2 Exports: It is a compile-time error if a name <i>N</i> is re-exported
by a library |
355 * <i>L</i> and <i>N</i> is introduced into the export namespace of <i>L</i> b
y more than one | 502 * <i>L</i> and <i>N</i> is introduced into the export namespace of <i>L</i> b
y more than one |
356 * export. | 503 * export. |
| 504 * @param ambiguousElementName the name of the ambiguous element |
| 505 * @param firstLibraryName the name of the first library that the type is foun
d |
| 506 * @param secondLibraryName the name of the second library that the type is fo
und |
357 */ | 507 */ |
358 static final CompileTimeErrorCode AMBIGUOUS_EXPORT = new CompileTimeErrorCode(
'AMBIGUOUS_EXPORT', 0, ""); | 508 static final CompileTimeErrorCode AMBIGUOUS_EXPORT = new CompileTimeErrorCode(
'AMBIGUOUS_EXPORT', 0, "The element '%s' is defined in the libraries '%s' and '%
s'"); |
| 509 |
359 /** | 510 /** |
360 * 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i
>N</i> is introduced | 511 * 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i
>N</i> is introduced |
361 * into the top level scope <i>L</i> by more than one import then: | 512 * into the top level scope <i>L</i> by more than one import then: |
362 * <ol> | 513 * <ol> |
363 * <li>It is a static warning if <i>N</i> is used as a type annotation. | 514 * <li>It is a static warning if <i>N</i> is used as a type annotation. |
364 * <li>In checked mode, it is a dynamic error if <i>N</i> is used as a type an
notation and | 515 * <li>In checked mode, it is a dynamic error if <i>N</i> is used as a type an
notation and |
365 * referenced during a subtype test. | 516 * referenced during a subtype test. |
366 * <li>Otherwise, it is a compile-time error. | 517 * <li>Otherwise, it is a compile-time error. |
367 * </ol> | 518 * </ol> |
| 519 * @param ambiguousElementName the name of the ambiguous element |
| 520 * @param firstLibraryName the name of the first library that the type is foun
d |
| 521 * @param secondLibraryName the name of the second library that the type is fo
und |
368 */ | 522 */ |
369 static final CompileTimeErrorCode AMBIGUOUS_IMPORT = new CompileTimeErrorCode(
'AMBIGUOUS_IMPORT', 1, ""); | 523 static final CompileTimeErrorCode AMBIGUOUS_IMPORT = new CompileTimeErrorCode(
'AMBIGUOUS_IMPORT', 1, "The element '%s' is defined in the libraries '%s' and '%
s'"); |
| 524 |
370 /** | 525 /** |
371 * 12.33 Argument Definition Test: It is a compile time error if <i>v</i> does
not denote a formal | 526 * 12.33 Argument Definition Test: It is a compile time error if <i>v</i> does
not denote a formal |
372 * parameter. | 527 * parameter. |
373 * @param the name of the identifier in the argument definition test that is n
ot a parameter | 528 * @param the name of the identifier in the argument definition test that is n
ot a parameter |
374 */ | 529 */ |
375 static final CompileTimeErrorCode ARGUMENT_DEFINITION_TEST_NON_PARAMETER = new
CompileTimeErrorCode('ARGUMENT_DEFINITION_TEST_NON_PARAMETER', 2, "'%s' is not
a parameter"); | 530 static final CompileTimeErrorCode ARGUMENT_DEFINITION_TEST_NON_PARAMETER = new
CompileTimeErrorCode('ARGUMENT_DEFINITION_TEST_NON_PARAMETER', 2, "'%s' is not
a parameter"); |
| 531 |
376 /** | 532 /** |
377 * 12.30 Identifier Reference: It is a compile-time error to use a built-in id
entifier other than | 533 * 12.30 Identifier Reference: It is a compile-time error to use a built-in id
entifier other than |
378 * dynamic as a type annotation. | 534 * dynamic as a type annotation. |
379 */ | 535 */ |
380 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE = new CompileTim
eErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE', 3, "The built-in identifier '%s' canno
t be as a type"); | 536 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE = new CompileTim
eErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE', 3, "The built-in identifier '%s' canno
t be as a type"); |
| 537 |
381 /** | 538 /** |
382 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the | 539 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the |
383 * declared name of a class, type parameter or type alias. | 540 * declared name of a class, type parameter or type alias. |
384 */ | 541 */ |
385 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_NAME = new Compi
leTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE_NAME', 4, "The built-in identifier
'%s' cannot be used as a type name"); | 542 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_NAME = new Compi
leTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE_NAME', 4, "The built-in identifier
'%s' cannot be used as a type name"); |
| 543 |
386 /** | 544 /** |
387 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the | 545 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the |
388 * declared name of a class, type parameter or type alias. | 546 * declared name of a class, type parameter or type alias. |
389 */ | 547 */ |
390 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME = new Co
mpileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME', 5, "The built-in ident
ifier '%s' cannot be used as a type alias name"); | 548 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME = new Co
mpileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME', 5, "The built-in ident
ifier '%s' cannot be used as a type alias name"); |
| 549 |
391 /** | 550 /** |
392 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the | 551 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the |
393 * declared name of a class, type parameter or type alias. | 552 * declared name of a class, type parameter or type alias. |
394 */ | 553 */ |
395 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME =
new CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME', 6, "The bu
ilt-in identifier '%s' cannot be used as a type variable name"); | 554 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME =
new CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME', 6, "The bu
ilt-in identifier '%s' cannot be used as a type variable name"); |
| 555 |
396 /** | 556 /** |
397 * 13.9 Switch: It is a compile-time error if the class <i>C</i> implements th
e operator | 557 * 13.9 Switch: It is a compile-time error if the class <i>C</i> implements th
e operator |
398 * <i>==</i>. | 558 * <i>==</i>. |
399 */ | 559 */ |
400 static final CompileTimeErrorCode CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS = new
CompileTimeErrorCode('CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS', 7, "The switch c
ase expression type '%s' cannot override the == operator"); | 560 static final CompileTimeErrorCode CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS = new
CompileTimeErrorCode('CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS', 7, "The switch c
ase expression type '%s' cannot override the == operator"); |
| 561 |
401 /** | 562 /** |
402 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time
constant would raise | 563 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time
constant would raise |
403 * an exception. | 564 * an exception. |
404 */ | 565 */ |
405 static final CompileTimeErrorCode COMPILE_TIME_CONSTANT_RAISES_EXCEPTION = new
CompileTimeErrorCode('COMPILE_TIME_CONSTANT_RAISES_EXCEPTION', 8, ""); | 566 static final CompileTimeErrorCode COMPILE_TIME_CONSTANT_RAISES_EXCEPTION = new
CompileTimeErrorCode('COMPILE_TIME_CONSTANT_RAISES_EXCEPTION', 8, ""); |
| 567 |
406 /** | 568 /** |
407 * 7.6 Constructors: A constructor name always begins with the name of its imm
ediately enclosing | 569 * 7.6 Constructors: A constructor name always begins with the name of its imm
ediately enclosing |
408 * class, and may optionally be followed by a dot and an identifier <i>id</i>.
It is a | 570 * class, and may optionally be followed by a dot and an identifier <i>id</i>.
It is a |
409 * compile-time error if <i>id</i> is the name of a member declared in the imm
ediately enclosing | 571 * compile-time error if <i>id</i> is the name of a member declared in the imm
ediately enclosing |
410 * class. | 572 * class. |
411 */ | 573 */ |
412 static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD = new
CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD', 9, "'%s' cannot
be used to name a constructor and a method in this class"); | 574 static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD = new
CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD', 9, "'%s' cannot
be used to name a constructor and a field in this class"); |
| 575 |
413 /** | 576 /** |
414 * 7.6 Constructors: A constructor name always begins with the name of its imm
ediately enclosing | 577 * 7.6 Constructors: A constructor name always begins with the name of its imm
ediately enclosing |
415 * class, and may optionally be followed by a dot and an identifier <i>id</i>.
It is a | 578 * class, and may optionally be followed by a dot and an identifier <i>id</i>.
It is a |
416 * compile-time error if <i>id</i> is the name of a member declared in the imm
ediately enclosing | 579 * compile-time error if <i>id</i> is the name of a member declared in the imm
ediately enclosing |
417 * class. | 580 * class. |
418 */ | 581 */ |
419 static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD = ne
w CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD', 10, "'%s' cann
ot be used to name a constructor and a field in this class"); | 582 static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD = ne
w CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD', 10, "'%s' cann
ot be used to name a constructor and a method in this class"); |
| 583 |
| 584 /** |
| 585 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 586 * uncaught exception being thrown. |
| 587 */ |
| 588 static final CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION = new Com
pileTimeErrorCode('CONST_CONSTRUCTOR_THROWS_EXCEPTION', 11, "'const' constructor
s cannot throw exceptions"); |
| 589 |
420 /** | 590 /** |
421 * 7.6.3 Constant Constructors: It is a compile-time error if a constant const
ructor is declared | 591 * 7.6.3 Constant Constructors: It is a compile-time error if a constant const
ructor is declared |
422 * by a class that has a non-final instance variable. | 592 * by a class that has a non-final instance variable. |
| 593 * <p> |
| 594 * The above refers to both locally declared and inherited instance variables. |
423 */ | 595 */ |
424 static final CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD = new
CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD', 11, "Classes wit
h non-final fields cannot define 'const' constructors"); | 596 static final CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD = new
CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD', 12, "Cannot defi
ne the 'const' constructor for a class with non-final fields"); |
| 597 |
| 598 /** |
| 599 * 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error
if o is not |
| 600 * <b>null</b> and the interface of the class of <i>o</i> is not a subtype of
the static type of |
| 601 * the field <i>v</i>. |
| 602 * <p> |
| 603 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 604 * uncaught exception being thrown. |
| 605 * @param initializerType the name of the type of the initializer expression |
| 606 * @param fieldType the name of the type of the field |
| 607 */ |
| 608 static final CompileTimeErrorCode CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE = new
CompileTimeErrorCode('CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE', 13, "The initial
izer type '%s' cannot be assigned to the field type '%s'"); |
| 609 |
425 /** | 610 /** |
426 * 6.2 Formal Parameters: It is a compile-time error if a formal parameter is
declared as a | 611 * 6.2 Formal Parameters: It is a compile-time error if a formal parameter is
declared as a |
427 * constant variable. | 612 * constant variable. |
428 */ | 613 */ |
429 static final CompileTimeErrorCode CONST_FORMAL_PARAMETER = new CompileTimeErro
rCode('CONST_FORMAL_PARAMETER', 12, "Parameters cannot be 'const'"); | 614 static final CompileTimeErrorCode CONST_FORMAL_PARAMETER = new CompileTimeErro
rCode('CONST_FORMAL_PARAMETER', 14, "Parameters cannot be 'const'"); |
| 615 |
430 /** | 616 /** |
431 * 5 Variables: A constant variable must be initialized to a compile-time cons
tant or a | 617 * 5 Variables: A constant variable must be initialized to a compile-time cons
tant or a |
432 * compile-time error occurs. | 618 * compile-time error occurs. |
433 */ | 619 */ |
434 static final CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE =
new CompileTimeErrorCode('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', 13, "'cons
t' variables must be constant value"); | 620 static final CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE =
new CompileTimeErrorCode('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', 15, "'cons
t' variables must be constant value"); |
| 621 |
| 622 /** |
| 623 * 12.11.2 Const: An expression of one of the forms !e, e1 && e2 or e1 || e2,
where e, e1 and e2 |
| 624 * are constant expressions that evaluate to a boolean value. |
| 625 */ |
| 626 static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = new CompileTimeErrorC
ode('CONST_EVAL_TYPE_BOOL', 16, "An expression of type 'bool' was expected"); |
| 627 |
| 628 /** |
| 629 * 12.11.2 Const: An expression of one of the forms e1 == e2 or e1 != e2 where
e1 and e2 are |
| 630 * constant expressions that evaluate to a numeric, string or boolean value or
to null. |
| 631 */ |
| 632 static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_NUM_STRING = new Compil
eTimeErrorCode('CONST_EVAL_TYPE_BOOL_NUM_STRING', 17, "An expression of type 'bo
ol', 'num', 'String' or 'null' was expected"); |
| 633 |
| 634 /** |
| 635 * 12.11.2 Const: An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 |
e2, e1 >> e2 or e1 |
| 636 * << e2, where e, e1 and e2 are constant expressions that evaluate to an inte
ger value or to |
| 637 * null. |
| 638 */ |
| 639 static final CompileTimeErrorCode CONST_EVAL_TYPE_INT = new CompileTimeErrorCo
de('CONST_EVAL_TYPE_INT', 18, "An expression of type 'int' was expected"); |
| 640 |
| 641 /** |
| 642 * 12.11.2 Const: An expression of one of the forms e, e1 + e2, e1 - e2, e1 *
e2, e1 / e2, e1 ~/ |
| 643 * e2, e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are
constant |
| 644 * expressions that evaluate to a numeric value or to null.. |
| 645 */ |
| 646 static final CompileTimeErrorCode CONST_EVAL_TYPE_NUM = new CompileTimeErrorCo
de('CONST_EVAL_TYPE_NUM', 19, "An expression of type 'num' was expected"); |
| 647 |
435 /** | 648 /** |
436 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 649 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
437 * uncaught exception being thrown. | 650 * uncaught exception being thrown. |
438 */ | 651 */ |
439 static final CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = new CompileTim
eErrorCode('CONST_EVAL_THROWS_EXCEPTION', 14, "'const' constructors cannot throw
exceptions"); | 652 static final CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = new CompileTim
eErrorCode('CONST_EVAL_THROWS_EXCEPTION', 20, "Evaluation of this constant expre
ssion causes exception"); |
| 653 |
440 /** | 654 /** |
441 * 12.11.2 Const: If <i>T</i> is a parameterized type <i>S<U<sub>1</sub>, &
hellip;, | 655 * 12.11.2 Const: If <i>T</i> is a parameterized type <i>S<U<sub>1</sub>, &
hellip;, |
442 * U<sub>m</sub>></i>, let <i>R = S</i>; It is a compile time error if <i>S
</i> is not a | 656 * U<sub>m</sub>></i>, let <i>R = S</i>; It is a compile time error if <i>S
</i> is not a |
443 * generic type with <i>m</i> type parameters. | 657 * generic type with <i>m</i> type parameters. |
444 * @param typeName the name of the type being referenced (<i>S</i>) | 658 * @param typeName the name of the type being referenced (<i>S</i>) |
445 * @param parameterCount the number of type parameters that were declared | 659 * @param parameterCount the number of type parameters that were declared |
446 * @param argumentCount the number of type arguments provided | 660 * @param argumentCount the number of type arguments provided |
447 */ | 661 */ |
448 static final CompileTimeErrorCode CONST_WITH_INVALID_TYPE_PARAMETERS = new Com
pileTimeErrorCode('CONST_WITH_INVALID_TYPE_PARAMETERS', 15, "The type '%s' is de
clared with %d type parameters, but %d type arguments were given"); | 662 static final CompileTimeErrorCode CONST_WITH_INVALID_TYPE_PARAMETERS = new Com
pileTimeErrorCode('CONST_WITH_INVALID_TYPE_PARAMETERS', 21, "The type '%s' is de
clared with %d type parameters, but %d type arguments were given"); |
| 663 |
449 /** | 664 /** |
450 * 12.11.2 Const: If <i>e</i> is of the form <i>const T(a<sub>1</sub>, &hellip
;, a<sub>n</sub>, | 665 * 12.11.2 Const: If <i>e</i> is of the form <i>const T(a<sub>1</sub>, &hellip
;, a<sub>n</sub>, |
451 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a | 666 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a |
452 * compile-time error if the type <i>T</i> does not declare a constant constru
ctor with the same | 667 * compile-time error if the type <i>T</i> does not declare a constant constru
ctor with the same |
453 * name as the declaration of <i>T</i>. | 668 * name as the declaration of <i>T</i>. |
454 */ | 669 */ |
455 static final CompileTimeErrorCode CONST_WITH_NON_CONST = new CompileTimeErrorC
ode('CONST_WITH_NON_CONST', 16, "The constructor being called is not a 'const' c
onstructor"); | 670 static final CompileTimeErrorCode CONST_WITH_NON_CONST = new CompileTimeErrorC
ode('CONST_WITH_NON_CONST', 22, "The constructor being called is not a 'const' c
onstructor"); |
| 671 |
456 /** | 672 /** |
457 * 12.11.2 Const: In all of the above cases, it is a compile-time error if <i>
a<sub>i</sub>, 1 | 673 * 12.11.2 Const: In all of the above cases, it is a compile-time error if <i>
a<sub>i</sub>, 1 |
458 * <= i <= n + k</i>, is not a compile-time constant expression. | 674 * <= i <= n + k</i>, is not a compile-time constant expression. |
459 */ | 675 */ |
460 static final CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = new Compi
leTimeErrorCode('CONST_WITH_NON_CONSTANT_ARGUMENT', 17, ""); | 676 static final CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = new Compi
leTimeErrorCode('CONST_WITH_NON_CONSTANT_ARGUMENT', 23, "Arguments of a constant
creation must be constant expressions"); |
| 677 |
461 /** | 678 /** |
462 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current | 679 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current |
463 * scope, optionally followed by type arguments. | 680 * scope, optionally followed by type arguments. |
464 * <p> | 681 * <p> |
465 * 12.11.2 Const: If <i>e</i> is of the form <i>const T.id(a<sub>1</sub>, &hel
lip;, a<sub>n</sub>, | 682 * 12.11.2 Const: If <i>e</i> is of the form <i>const T.id(a<sub>1</sub>, &hel
lip;, a<sub>n</sub>, |
466 * x<sub>n+1</sub>: a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+k</sub>
)</i> it is a | 683 * x<sub>n+1</sub>: a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+k</sub>
)</i> it is a |
467 * compile-time error if <i>T</i> is not a class accessible in the current sco
pe, optionally | 684 * compile-time error if <i>T</i> is not a class accessible in the current sco
pe, optionally |
468 * followed by type arguments. | 685 * followed by type arguments. |
| 686 * @param name the name of the non-type element |
469 */ | 687 */ |
470 static final CompileTimeErrorCode CONST_WITH_NON_TYPE = new CompileTimeErrorCo
de('CONST_WITH_NON_TYPE', 18, ""); | 688 static final CompileTimeErrorCode CONST_WITH_NON_TYPE = new CompileTimeErrorCo
de('CONST_WITH_NON_TYPE', 24, "The name '%s' is not a class"); |
| 689 |
471 /** | 690 /** |
472 * 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type par
ameters. | 691 * 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type par
ameters. |
473 */ | 692 */ |
474 static final CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = new CompileTime
ErrorCode('CONST_WITH_TYPE_PARAMETERS', 19, ""); | 693 static final CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = new CompileTime
ErrorCode('CONST_WITH_TYPE_PARAMETERS', 25, "The constant creation cannot use a
type parameter"); |
| 694 |
475 /** | 695 /** |
476 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant | 696 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant |
477 * constructor declared by the type <i>T</i>. | 697 * constructor declared by the type <i>T</i>. |
| 698 * @param typeName the name of the type |
| 699 * @param constructorName the name of the requested constant constructor |
478 */ | 700 */ |
479 static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR = new Compi
leTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR', 20, ""); | 701 static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR = new Compi
leTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR', 26, "The class '%s' does not
have a constant constructor '%s'"); |
| 702 |
| 703 /** |
| 704 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant |
| 705 * constructor declared by the type <i>T</i>. |
| 706 * @param typeName the name of the type |
| 707 */ |
| 708 static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = n
ew CompileTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 27, "The cla
ss '%s' does not have a default constant constructor"); |
| 709 |
480 /** | 710 /** |
481 * 15.3.1 Typedef: It is a compile-time error if any default values are specif
ied in the signature | 711 * 15.3.1 Typedef: It is a compile-time error if any default values are specif
ied in the signature |
482 * of a function type alias. | 712 * of a function type alias. |
483 */ | 713 */ |
484 static final CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS = new C
ompileTimeErrorCode('DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS', 21, "Default values
aren't allowed in typedefs"); | 714 static final CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS = new C
ompileTimeErrorCode('DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS', 28, "Default values
aren't allowed in typedefs"); |
| 715 |
| 716 /** |
| 717 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name |
| 718 * declared in the same scope. |
| 719 */ |
| 720 static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT = new CompileT
imeErrorCode('DUPLICATE_CONSTRUCTOR_DEFAULT', 29, "The default constructor is al
ready defined"); |
| 721 |
485 /** | 722 /** |
486 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name | 723 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name |
487 * declared in the same scope. | 724 * declared in the same scope. |
488 * @param duplicateName the name of the duplicate entity | 725 * @param duplicateName the name of the duplicate entity |
489 */ | 726 */ |
490 static final CompileTimeErrorCode DUPLICATE_DEFINITION = new CompileTimeErrorC
ode('DUPLICATE_DEFINITION', 22, "The name '%s' is already defined"); | 727 static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME = new CompileTime
ErrorCode('DUPLICATE_CONSTRUCTOR_NAME', 30, "The constructor with name '%s' is a
lready defined"); |
| 728 |
| 729 /** |
| 730 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name |
| 731 * declared in the same scope. |
| 732 * @param duplicateName the name of the duplicate entity |
| 733 */ |
| 734 static final CompileTimeErrorCode DUPLICATE_DEFINITION = new CompileTimeErrorC
ode('DUPLICATE_DEFINITION', 31, "The name '%s' is already defined"); |
| 735 |
491 /** | 736 /** |
492 * 7 Classes: It is a compile-time error if a class declares two members of th
e same name. | 737 * 7 Classes: It is a compile-time error if a class declares two members of th
e same name. |
493 */ | 738 */ |
494 static final CompileTimeErrorCode DUPLICATE_MEMBER_NAME = new CompileTimeError
Code('DUPLICATE_MEMBER_NAME', 23, ""); | 739 static final CompileTimeErrorCode DUPLICATE_MEMBER_NAME = new CompileTimeError
Code('DUPLICATE_MEMBER_NAME', 32, ""); |
| 740 |
495 /** | 741 /** |
496 * 7 Classes: It is a compile-time error if a class has an instance member and
a static member | 742 * 7 Classes: It is a compile-time error if a class has an instance member and
a static member |
497 * with the same name. | 743 * with the same name. |
498 */ | 744 */ |
499 static final CompileTimeErrorCode DUPLICATE_MEMBER_NAME_INSTANCE_STATIC = new
CompileTimeErrorCode('DUPLICATE_MEMBER_NAME_INSTANCE_STATIC', 24, ""); | 745 static final CompileTimeErrorCode DUPLICATE_MEMBER_NAME_INSTANCE_STATIC = new
CompileTimeErrorCode('DUPLICATE_MEMBER_NAME_INSTANCE_STATIC', 33, ""); |
| 746 |
500 /** | 747 /** |
501 * 12.14.2 Binding Actuals to Formals: It is a compile-time error if <i>q<sub>
i</sub> = | 748 * 12.14.2 Binding Actuals to Formals: It is a compile-time error if <i>q<sub>
i</sub> = |
502 * q<sub>j</sub></i> for any <i>i != j</i> \[where <i>q<sub>i</sub></i> is the
label for a named | 749 * q<sub>j</sub></i> for any <i>i != j</i> \[where <i>q<sub>i</sub></i> is the
label for a named |
503 * argument\]. | 750 * argument\]. |
504 */ | 751 */ |
505 static final CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = new CompileTimeEr
rorCode('DUPLICATE_NAMED_ARGUMENT', 25, ""); | 752 static final CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = new CompileTimeEr
rorCode('DUPLICATE_NAMED_ARGUMENT', 34, "The argument for the named parameter '%
s' was already specified"); |
| 753 |
| 754 /** |
| 755 * SDK implementation libraries can be exported only by other SDK libraries. |
| 756 * @param uri the uri pointing to a library |
| 757 */ |
| 758 static final CompileTimeErrorCode EXPORT_INTERNAL_LIBRARY = new CompileTimeErr
orCode('EXPORT_INTERNAL_LIBRARY', 35, "The library %s is internal and cannot be
exported"); |
| 759 |
506 /** | 760 /** |
507 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is | 761 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is |
508 * not a library declaration. | 762 * not a library declaration. |
509 * @param uri the uri pointing to a non-library declaration | 763 * @param uri the uri pointing to a non-library declaration |
510 */ | 764 */ |
511 static final CompileTimeErrorCode EXPORT_OF_NON_LIBRARY = new CompileTimeError
Code('EXPORT_OF_NON_LIBRARY', 26, "The exported library '%s' must not have a par
t-of directive"); | 765 static final CompileTimeErrorCode EXPORT_OF_NON_LIBRARY = new CompileTimeError
Code('EXPORT_OF_NON_LIBRARY', 36, "The exported library '%s' must not have a par
t-of directive"); |
| 766 |
512 /** | 767 /** |
513 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla
ss <i>C</i> includes | 768 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla
ss <i>C</i> includes |
514 * a type expression that does not denote a class available in the lexical sco
pe of <i>C</i>. | 769 * a type expression that does not denote a class available in the lexical sco
pe of <i>C</i>. |
515 * @param typeName the name of the superclass that was not found | 770 * @param typeName the name of the superclass that was not found |
516 */ | 771 */ |
517 static final CompileTimeErrorCode EXTENDS_NON_CLASS = new CompileTimeErrorCode
('EXTENDS_NON_CLASS', 27, "Classes can only extend other classes"); | 772 static final CompileTimeErrorCode EXTENDS_NON_CLASS = new CompileTimeErrorCode
('EXTENDS_NON_CLASS', 37, "Classes can only extend other classes"); |
| 773 |
518 /** | 774 /** |
519 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. | 775 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. |
520 * <p> | 776 * <p> |
521 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. | 777 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. |
522 * <p> | 778 * <p> |
523 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. | 779 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. |
524 * <p> | 780 * <p> |
525 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to | 781 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to |
526 * attempt to extend or implement num. | 782 * attempt to extend or implement num. |
527 * <p> | 783 * <p> |
528 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. | 784 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. |
529 * <p> | 785 * <p> |
530 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. | 786 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. |
531 * @param typeName the name of the type that cannot be extended | 787 * @param typeName the name of the type that cannot be extended |
532 * @see #IMPLEMENTS_DISALLOWED_CLASS | 788 * @see #IMPLEMENTS_DISALLOWED_CLASS |
533 */ | 789 */ |
534 static final CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = new CompileTimeEr
rorCode('EXTENDS_DISALLOWED_CLASS', 28, "Classes cannot extend '%s'"); | 790 static final CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = new CompileTimeEr
rorCode('EXTENDS_DISALLOWED_CLASS', 38, "Classes cannot extend '%s'"); |
| 791 |
| 792 /** |
| 793 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i>
or if <i>m > n</i>. |
| 794 * <p> |
| 795 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 796 * uncaught exception being thrown. |
| 797 * @param requiredCount the maximum number of positional arguments |
| 798 * @param argumentCount the actual number of positional arguments given |
| 799 */ |
| 800 static final CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS = new CompileTime
ErrorCode('EXTRA_POSITIONAL_ARGUMENTS', 39, "%d positional arguments expected, b
ut %d found"); |
| 801 |
535 /** | 802 /** |
536 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. | 803 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. |
537 * <p> | 804 * <p> |
538 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. | 805 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. |
539 * <p> | 806 * <p> |
540 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. | 807 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. |
541 * <p> | 808 * <p> |
542 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to | 809 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to |
543 * attempt to extend or implement num. | 810 * attempt to extend or implement num. |
544 * <p> | 811 * <p> |
545 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. | 812 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. |
546 * <p> | 813 * <p> |
547 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. | 814 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. |
548 * @param typeName the name of the type that cannot be implemented | 815 * @param typeName the name of the type that cannot be implemented |
549 * @see #EXTENDS_DISALLOWED_CLASS | 816 * @see #EXTENDS_DISALLOWED_CLASS |
550 */ | 817 */ |
551 static final CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = new CompileTim
eErrorCode('IMPLEMENTS_DISALLOWED_CLASS', 29, "Classes cannot implement '%s'"); | 818 static final CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = new CompileTim
eErrorCode('IMPLEMENTS_DISALLOWED_CLASS', 40, "Classes cannot implement '%s'"); |
| 819 |
552 /** | 820 /** |
553 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time | 821 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time |
554 * error if more than one initializer corresponding to a given instance variab
le appears in | 822 * error if more than one initializer corresponding to a given instance variab
le appears in |
555 * <i>k</i>'s list. | 823 * <i>k</i>'s list. |
556 */ | 824 */ |
557 static final CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS =
new CompileTimeErrorCode('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 30, "The
field '%s' cannot be initialized twice in the same constructor"); | 825 static final CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS =
new CompileTimeErrorCode('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 41, "The
field '%s' cannot be initialized twice in the same constructor"); |
| 826 |
558 /** | 827 /** |
559 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time | 828 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time |
560 * error if <i>k</i>'s initializer list contains an initializer for a final va
riable <i>f</i> | 829 * error if <i>k</i>'s initializer list contains an initializer for a final va
riable <i>f</i> |
561 * whose declaration includes an initialization expression. | 830 * whose declaration includes an initialization expression. |
562 */ | 831 */ |
563 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARA
TION = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATIO
N', 31, "Values cannot be set in the constructor if they are final, and have alr
eady been set"); | 832 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARA
TION = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATIO
N', 42, "Values cannot be set in the constructor if they are final, and have alr
eady been set"); |
| 833 |
564 /** | 834 /** |
565 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time | 835 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time |
566 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is initialized | 836 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is initialized |
567 * by means of an initializing formal of <i>k</i>. | 837 * by means of an initializing formal of <i>k</i>. |
568 */ | 838 */ |
569 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ
ER = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER',
32, "Fields cannot be initialized in both the parameter list and the initializer
s"); | 839 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ
ER = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER',
43, "Fields cannot be initialized in both the parameter list and the initializer
s"); |
570 /** | 840 |
571 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by | |
572 * a function other than a non-redirecting generative constructor. | |
573 */ | |
574 static final CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new
CompileTimeErrorCode('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 33, "Initializing
formal fields can only be used in constructors"); | |
575 /** | 841 /** |
576 * 5 Variables: It is a compile-time error if a final instance variable that h
as been initialized | 842 * 5 Variables: It is a compile-time error if a final instance variable that h
as been initialized |
577 * at its point of declaration is also initialized in a constructor. | 843 * at its point of declaration is also initialized in a constructor. |
578 * @param name the name of the field in question | 844 * @param name the name of the field in question |
579 */ | 845 */ |
580 static final CompileTimeErrorCode FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRU
CTOR = new CompileTimeErrorCode('FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTO
R', 34, "'%s' is final and was given a value when it was declared, so it cannot
be set to a new value"); | 846 static final CompileTimeErrorCode FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRU
CTOR = new CompileTimeErrorCode('FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTO
R', 44, "'%s' is final and was given a value when it was declared, so it cannot
be set to a new value"); |
| 847 |
581 /** | 848 /** |
582 * 5 Variables: It is a compile-time error if a final instance variable that h
as is initialized by | 849 * 5 Variables: It is a compile-time error if a final instance variable that h
as is initialized by |
583 * means of an initializing formal of a constructor is also initialized elsewh
ere in the same | 850 * means of an initializing formal of a constructor is also initialized elsewh
ere in the same |
584 * constructor. | 851 * constructor. |
585 * @param name the name of the field in question | 852 * @param name the name of the field in question |
586 */ | 853 */ |
587 static final CompileTimeErrorCode FINAL_INITIALIZED_MULTIPLE_TIMES = new Compi
leTimeErrorCode('FINAL_INITIALIZED_MULTIPLE_TIMES', 35, "'%s' is a final field a
nd so can only be set once"); | 854 static final CompileTimeErrorCode FINAL_INITIALIZED_MULTIPLE_TIMES = new Compi
leTimeErrorCode('FINAL_INITIALIZED_MULTIPLE_TIMES', 45, "'%s' is a final field a
nd so can only be set once"); |
| 855 |
| 856 /** |
| 857 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by |
| 858 * a function other than a non-redirecting generative constructor. |
| 859 */ |
| 860 static final CompileTimeErrorCode FIELD_INITIALIZER_FACTORY_CONSTRUCTOR = new
CompileTimeErrorCode('FIELD_INITIALIZER_FACTORY_CONSTRUCTOR', 46, "Initializing
formal fields cannot be used in factory constructors"); |
| 861 |
| 862 /** |
| 863 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by |
| 864 * a function other than a non-redirecting generative constructor. |
| 865 */ |
| 866 static final CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new
CompileTimeErrorCode('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 47, "Initializing
formal fields can only be used in constructors"); |
| 867 |
| 868 /** |
| 869 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
| 870 * only action is to invoke another generative constructor. |
| 871 * <p> |
| 872 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by |
| 873 * a function other than a non-redirecting generative constructor. |
| 874 */ |
| 875 static final CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR =
new CompileTimeErrorCode('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', 48, "The r
edirecting constructor cannot have a field initializer"); |
| 876 |
588 /** | 877 /** |
589 * 5 Variables: It is a compile-time error if a library, static or local varia
ble <i>v</i> is | 878 * 5 Variables: It is a compile-time error if a library, static or local varia
ble <i>v</i> is |
590 * final and <i>v</i> is not initialized at its point of declaration. | 879 * final and <i>v</i> is not initialized at its point of declaration. |
591 * @param name the name of the variable in question | 880 * @param name the name of the variable in question |
592 */ | 881 */ |
593 static final CompileTimeErrorCode FINAL_NOT_INITIALIZED = new CompileTimeError
Code('FINAL_NOT_INITIALIZED', 36, "The final variable '%s' must be initialized")
; | 882 static final CompileTimeErrorCode FINAL_NOT_INITIALIZED = new CompileTimeError
Code('FINAL_NOT_INITIALIZED', 49, "The final variable '%s' must be initialized")
; |
| 883 |
594 /** | 884 /** |
595 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same | 885 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same |
596 * name. | 886 * name. |
| 887 * @param name the conflicting name of the getter and method |
597 */ | 888 */ |
598 static final CompileTimeErrorCode GETTER_AND_METHOD_WITH_SAME_NAME = new Compi
leTimeErrorCode('GETTER_AND_METHOD_WITH_SAME_NAME', 37, ""); | 889 static final CompileTimeErrorCode GETTER_AND_METHOD_WITH_SAME_NAME = new Compi
leTimeErrorCode('GETTER_AND_METHOD_WITH_SAME_NAME', 50, "'%s' cannot be used to
name a getter, there is already a method with the same name"); |
| 890 |
599 /** | 891 /** |
600 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class includes | 892 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class includes |
601 * type dynamic. | 893 * type dynamic. |
602 */ | 894 */ |
603 static final CompileTimeErrorCode IMPLEMENTS_DYNAMIC = new CompileTimeErrorCod
e('IMPLEMENTS_DYNAMIC', 38, "Classes cannot implement 'dynamic'"); | 895 static final CompileTimeErrorCode IMPLEMENTS_DYNAMIC = new CompileTimeErrorCod
e('IMPLEMENTS_DYNAMIC', 51, "Classes cannot implement 'dynamic'"); |
| 896 |
604 /** | 897 /** |
605 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class <i>C</i> | 898 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class <i>C</i> |
606 * includes a type expression that does not denote a class available in the le
xical scope of | 899 * includes a type expression that does not denote a class available in the le
xical scope of |
607 * <i>C</i>. | 900 * <i>C</i>. |
608 * @param typeName the name of the interface that was not found | 901 * @param typeName the name of the interface that was not found |
609 */ | 902 */ |
610 static final CompileTimeErrorCode IMPLEMENTS_NON_CLASS = new CompileTimeErrorC
ode('IMPLEMENTS_NON_CLASS', 39, "Classes can only implement other classes"); | 903 static final CompileTimeErrorCode IMPLEMENTS_NON_CLASS = new CompileTimeErrorC
ode('IMPLEMENTS_NON_CLASS', 52, "Classes can only implement other classes"); |
| 904 |
611 /** | 905 /** |
612 * 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears
more than once in | 906 * 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears
more than once in |
613 * the implements clause of a class. | 907 * the implements clause of a class. |
| 908 * @param className the name of the class that is implemented more than once |
| 909 */ |
| 910 static final CompileTimeErrorCode IMPLEMENTS_REPEATED = new CompileTimeErrorCo
de('IMPLEMENTS_REPEATED', 53, "'%s' can only be implemented once"); |
| 911 |
| 912 /** |
| 913 * 7.6.1 Generative Constructors: Note that this is not in scope on the right
hand side of an |
| 914 * initializer. |
| 915 * <p> |
| 916 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable |
| 917 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the |
| 918 * initializer of an instance variable. |
614 * @param name the name of the type in question | 919 * @param name the name of the type in question |
615 */ | 920 */ |
616 static final CompileTimeErrorCode IMPLEMENTS_REPEATED = new CompileTimeErrorCo
de('IMPLEMENTS_REPEATED', 40, "'%s' can only be implemented once"); | 921 static final CompileTimeErrorCode IMPLICIT_THIS_REFERENCE_IN_INITIALIZER = new
CompileTimeErrorCode('IMPLICIT_THIS_REFERENCE_IN_INITIALIZER', 54, "The 'this'
expression cannot be implicitly used in initializers"); |
| 922 |
617 /** | 923 /** |
618 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a | 924 * SDK implementation libraries can be imported only by other SDK libraries. |
619 * superinterface of itself. | 925 * @param uri the uri pointing to a library |
620 * @param name the name of the type in question | |
621 */ | 926 */ |
622 static final CompileTimeErrorCode IMPLEMENTS_SELF = new CompileTimeErrorCode('
IMPLEMENTS_SELF', 41, "'%s' cannot implement itself"); | 927 static final CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY = new CompileTimeErr
orCode('IMPORT_INTERNAL_LIBRARY', 55, "The library %s is internal and cannot be
imported"); |
623 /** | 928 |
624 * 14.1 Imports: It is a compile-time error to import two different libraries
with the same name. | |
625 */ | |
626 static final CompileTimeErrorCode IMPORT_DUPLICATED_LIBRARY_NAME = new Compile
TimeErrorCode('IMPORT_DUPLICATED_LIBRARY_NAME', 42, ""); | |
627 /** | 929 /** |
628 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is | 930 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is |
629 * not a library declaration. | 931 * not a library declaration. |
630 * @param uri the uri pointing to a non-library declaration | 932 * @param uri the uri pointing to a non-library declaration |
631 */ | 933 */ |
632 static final CompileTimeErrorCode IMPORT_OF_NON_LIBRARY = new CompileTimeError
Code('IMPORT_OF_NON_LIBRARY', 43, "The imported library '%s' must not have a par
t-of directive"); | 934 static final CompileTimeErrorCode IMPORT_OF_NON_LIBRARY = new CompileTimeError
Code('IMPORT_OF_NON_LIBRARY', 56, "The imported library '%s' must not have a par
t-of directive"); |
| 935 |
633 /** | 936 /** |
634 * 13.9 Switch: It is a compile-time error if values of the expressions <i>e<s
ub>k</sub></i> are | 937 * 13.9 Switch: It is a compile-time error if values of the expressions <i>e<s
ub>k</sub></i> are |
635 * not instances of the same class <i>C</i>, for all <i>1 <= k <= n</i>. | 938 * not instances of the same class <i>C</i>, for all <i>1 <= k <= n</i>. |
636 * @param expressionSource the expression source code that is the unexpected t
ype | 939 * @param expressionSource the expression source code that is the unexpected t
ype |
637 * @param expectedType the name of the expected type | 940 * @param expectedType the name of the expected type |
638 */ | 941 */ |
639 static final CompileTimeErrorCode INCONSISTENT_CASE_EXPRESSION_TYPES = new Com
pileTimeErrorCode('INCONSISTENT_CASE_EXPRESSION_TYPES', 44, "Case expressions mu
st have the same types, '%s' is not a %s'"); | 942 static final CompileTimeErrorCode INCONSISTENT_CASE_EXPRESSION_TYPES = new Com
pileTimeErrorCode('INCONSISTENT_CASE_EXPRESSION_TYPES', 57, "Case expressions mu
st have the same types, '%s' is not a %s'"); |
| 943 |
640 /** | 944 /** |
641 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time | 945 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time |
642 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an | 946 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an |
643 * instance variable declared in the immediately surrounding class. | 947 * instance variable declared in the immediately surrounding class. |
644 * @param id the name of the initializing formal that is not an instance varia
ble in the | 948 * @param id the name of the initializing formal that is not an instance varia
ble in the |
645 * immediately enclosing class | 949 * immediately enclosing class |
646 * @see #INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD | 950 * @see #INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD |
647 */ | 951 */ |
648 static final CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTANT_FIELD = new Com
pileTimeErrorCode('INITIALIZER_FOR_NON_EXISTANT_FIELD', 45, "'%s' is not a varia
ble in the enclosing class"); | 952 static final CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTANT_FIELD = new Com
pileTimeErrorCode('INITIALIZER_FOR_NON_EXISTANT_FIELD', 58, "'%s' is not a varia
ble in the enclosing class"); |
| 953 |
649 /** | 954 /** |
650 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time | 955 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time |
651 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an | 956 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an |
652 * instance variable declared in the immediately surrounding class. | 957 * instance variable declared in the immediately surrounding class. |
653 * @param id the name of the initializing formal that is a static variable in
the immediately | 958 * @param id the name of the initializing formal that is a static variable in
the immediately |
654 * enclosing class | 959 * enclosing class |
655 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD | 960 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD |
656 */ | 961 */ |
657 static final CompileTimeErrorCode INITIALIZER_FOR_STATIC_FIELD = new CompileTi
meErrorCode('INITIALIZER_FOR_STATIC_FIELD', 46, "'%s' is a static variable in th
e enclosing class, variables initialized in a constructor cannot be static"); | 962 static final CompileTimeErrorCode INITIALIZER_FOR_STATIC_FIELD = new CompileTi
meErrorCode('INITIALIZER_FOR_STATIC_FIELD', 59, "'%s' is a static variable in th
e enclosing class, variables initialized in a constructor cannot be static"); |
| 963 |
658 /** | 964 /** |
659 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a | 965 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a |
660 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately | 966 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately |
661 * enclosing class. | 967 * enclosing class. |
662 * @param id the name of the initializing formal that is not an instance varia
ble in the | 968 * @param id the name of the initializing formal that is not an instance varia
ble in the |
663 * immediately enclosing class | 969 * immediately enclosing class |
664 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD | 970 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD |
665 * @see #INITIALIZER_FOR_NON_EXISTANT_FIELD | 971 * @see #INITIALIZER_FOR_NON_EXISTANT_FIELD |
666 */ | 972 */ |
667 static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD =
new CompileTimeErrorCode('INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD', 47, "'%s
' is not a variable in the enclosing class"); | 973 static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD =
new CompileTimeErrorCode('INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD', 60, "'%s
' is not a variable in the enclosing class"); |
| 974 |
668 /** | 975 /** |
669 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a | 976 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a |
670 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately | 977 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately |
671 * enclosing class. | 978 * enclosing class. |
672 * @param id the name of the initializing formal that is a static variable in
the immediately | 979 * @param id the name of the initializing formal that is a static variable in
the immediately |
673 * enclosing class | 980 * enclosing class |
674 * @see #INITIALIZER_FOR_STATIC_FIELD | 981 * @see #INITIALIZER_FOR_STATIC_FIELD |
675 */ | 982 */ |
676 static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_STATIC_FIELD = new C
ompileTimeErrorCode('INITIALIZING_FORMAL_FOR_STATIC_FIELD', 48, "'%s' is a stati
c variable in the enclosing class, variables initialized in a constructor cannot
be static"); | 983 static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_STATIC_FIELD = new C
ompileTimeErrorCode('INITIALIZING_FORMAL_FOR_STATIC_FIELD', 61, "'%s' is a stati
c variable in the enclosing class, variables initialized in a constructor cannot
be static"); |
| 984 |
677 /** | 985 /** |
678 * TODO(brianwilkerson) Remove this when we have decided on how to report erro
rs in compile-time | 986 * TODO(brianwilkerson) Remove this when we have decided on how to report erro
rs in compile-time |
679 * constants. Until then, this acts as a placeholder for more informative erro
rs. | 987 * constants. Until then, this acts as a placeholder for more informative erro
rs. |
680 */ | 988 */ |
681 static final CompileTimeErrorCode INVALID_CONSTANT = new CompileTimeErrorCode(
'INVALID_CONSTANT', 49, ""); | 989 static final CompileTimeErrorCode INVALID_CONSTANT = new CompileTimeErrorCode(
'INVALID_CONSTANT', 62, ""); |
| 990 |
682 /** | 991 /** |
683 * 7.6 Constructors: It is a compile-time error if the name of a constructor i
s not a constructor | 992 * 7.6 Constructors: It is a compile-time error if the name of a constructor i
s not a constructor |
684 * name. | 993 * name. |
685 */ | 994 */ |
686 static final CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = new CompileTimeEr
rorCode('INVALID_CONSTRUCTOR_NAME', 50, ""); | 995 static final CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = new CompileTimeEr
rorCode('INVALID_CONSTRUCTOR_NAME', 63, "Invalid constructor name"); |
| 996 |
687 /** | 997 /** |
688 * 7.6.2 Factories: It is a compile-time error if <i>M</i> is not the name of
the immediately | 998 * 7.6.2 Factories: It is a compile-time error if <i>M</i> is not the name of
the immediately |
689 * enclosing class. | 999 * enclosing class. |
690 */ | 1000 */ |
691 static final CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS = new Compi
leTimeErrorCode('INVALID_FACTORY_NAME_NOT_A_CLASS', 51, ""); | 1001 static final CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS = new Compi
leTimeErrorCode('INVALID_FACTORY_NAME_NOT_A_CLASS', 64, "The name of the immedia
tely enclosing class expected"); |
| 1002 |
692 /** | 1003 /** |
693 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 1004 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
694 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies
a default value for | 1005 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies
a default value for |
695 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff
erent default value | 1006 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff
erent default value |
696 * for <i>p</i>. | 1007 * for <i>p</i>. |
697 */ | 1008 */ |
698 static final CompileTimeErrorCode INVALID_OVERRIDE_DEFAULT_VALUE = new Compile
TimeErrorCode('INVALID_OVERRIDE_DEFAULT_VALUE', 52, ""); | 1009 static final CompileTimeErrorCode INVALID_OVERRIDE_DEFAULT_VALUE = new Compile
TimeErrorCode('INVALID_OVERRIDE_DEFAULT_VALUE', 65, ""); |
| 1010 |
699 /** | 1011 /** |
700 * 7.1: It is a compile-time error if an instance method <i>m1</i> overrides a
n instance member | 1012 * 7.1 Instance Methods: It is a compile-time error if an instance method <i>m
1</i> overrides an |
701 * <i>m2</i> and <i>m1</i> does not declare all the named parameters declared
by <i>m2</i>. | 1013 * instance member <i>m2</i> and <i>m1</i> does not declare all the named para
meters declared by |
| 1014 * <i>m2</i>. |
| 1015 * @param paramCount the number of named parameters in the overridden member |
| 1016 * @param className the name of the class from the overridden method |
702 */ | 1017 */ |
703 static final CompileTimeErrorCode INVALID_OVERRIDE_NAMED = new CompileTimeErro
rCode('INVALID_OVERRIDE_NAMED', 53, ""); | 1018 static final CompileTimeErrorCode INVALID_OVERRIDE_NAMED = new CompileTimeErro
rCode('INVALID_OVERRIDE_NAMED', 66, "Missing the named parameter '%s' to match t
he overridden method from '%s'"); |
| 1019 |
704 /** | 1020 /** |
705 * 7.1 Instance Methods: It is a compile-time error if an instance method <i>m
1</i> overrides an | 1021 * 7.1 Instance Methods: It is a compile-time error if an instance method <i>m
1</i> overrides an |
706 * instance member <i>m2</i> and <i>m1</i> has fewer optional positional param
eters than | 1022 * instance member <i>m2</i> and <i>m1</i> has fewer optional positional param
eters than |
707 * <i>m2</i>. | 1023 * <i>m2</i>. |
| 1024 * @param paramCount the number of positional parameters in the overridden mem
ber |
| 1025 * @param className the name of the class from the overridden method |
708 */ | 1026 */ |
709 static final CompileTimeErrorCode INVALID_OVERRIDE_POSITIONAL = new CompileTim
eErrorCode('INVALID_OVERRIDE_POSITIONAL', 54, ""); | 1027 static final CompileTimeErrorCode INVALID_OVERRIDE_POSITIONAL = new CompileTim
eErrorCode('INVALID_OVERRIDE_POSITIONAL', 67, "Must have at least %d optional pa
rameters to match the overridden method from '%s'"); |
| 1028 |
710 /** | 1029 /** |
711 * 7.1 Instance Methods: It is a compile-time error if an instance method <i>m
1</i> overrides an | 1030 * 7.1 Instance Methods: It is a compile-time error if an instance method <i>m
1</i> overrides an |
712 * instance member <i>m2</i> and <i>m1</i> has a different number of required
parameters than | 1031 * instance member <i>m2</i> and <i>m1</i> has a different number of required
parameters than |
713 * <i>m2</i>. | 1032 * <i>m2</i>. |
| 1033 * @param paramCount the number of required parameters in the overridden membe
r |
| 1034 * @param className the name of the class from the overridden method |
714 */ | 1035 */ |
715 static final CompileTimeErrorCode INVALID_OVERRIDE_REQUIRED = new CompileTimeE
rrorCode('INVALID_OVERRIDE_REQUIRED', 55, ""); | 1036 static final CompileTimeErrorCode INVALID_OVERRIDE_REQUIRED = new CompileTimeE
rrorCode('INVALID_OVERRIDE_REQUIRED', 68, "Must have at exactly %d required para
meters to match the overridden method from '%s'"); |
| 1037 |
716 /** | 1038 /** |
717 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable | 1039 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable |
718 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the | 1040 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the |
719 * initializer of an instance variable. | 1041 * initializer of an instance variable. |
720 */ | 1042 */ |
721 static final CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = new CompileTimeE
rrorCode('INVALID_REFERENCE_TO_THIS', 56, ""); | 1043 static final CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = new CompileTimeE
rrorCode('INVALID_REFERENCE_TO_THIS', 69, "Invalid reference to 'this' expressio
n"); |
| 1044 |
722 /** | 1045 /** |
723 * 12.7 Maps: It is a compile-time error if the first type argument to a map l
iteral is not | 1046 * 12.7 Maps: It is a compile-time error if the first type argument to a map l
iteral is not |
724 * String. | 1047 * String. |
725 */ | 1048 */ |
726 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_FOR_KEY = new CompileT
imeErrorCode('INVALID_TYPE_ARGUMENT_FOR_KEY', 57, "The first type argument to a
map literal must be 'String'"); | 1049 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_FOR_KEY = new CompileT
imeErrorCode('INVALID_TYPE_ARGUMENT_FOR_KEY', 70, "The first type argument to a
map literal must be 'String'"); |
| 1050 |
727 /** | 1051 /** |
728 * 12.6 Lists: It is a compile time error if the type argument of a constant l
ist literal includes | 1052 * 12.6 Lists: It is a compile time error if the type argument of a constant l
ist literal includes |
729 * a type parameter. | 1053 * a type parameter. |
730 * @name the name of the type parameter | 1054 * @name the name of the type parameter |
731 */ | 1055 */ |
732 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST = new Co
mpileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_LIST', 58, "Constant list lit
erals cannot include a type parameter as a type argument, such as '%s'"); | 1056 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST = new Co
mpileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_LIST', 71, "Constant list lit
erals cannot include a type parameter as a type argument, such as '%s'"); |
| 1057 |
733 /** | 1058 /** |
734 * 12.7 Maps: It is a compile time error if the type arguments of a constant m
ap literal include a | 1059 * 12.7 Maps: It is a compile time error if the type arguments of a constant m
ap literal include a |
735 * type parameter. | 1060 * type parameter. |
736 * @name the name of the type parameter | 1061 * @name the name of the type parameter |
737 */ | 1062 */ |
738 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = new Com
pileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 59, "Constant map litera
ls cannot include a type parameter as a type argument, such as '%s'"); | 1063 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = new Com
pileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 72, "Constant map litera
ls cannot include a type parameter as a type argument, such as '%s'"); |
| 1064 |
739 /** | 1065 /** |
740 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1066 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is |
741 * not a library declaration. | 1067 * not a library declaration. |
742 * <p> | 1068 * <p> |
743 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1069 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is |
744 * not a library declaration. | 1070 * not a library declaration. |
745 * <p> | 1071 * <p> |
746 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part | 1072 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part |
747 * declaration. | 1073 * declaration. |
748 * @param uri the uri pointing to a non-library declaration | 1074 * @param uri the URI that is invalid |
| 1075 * @see #URI_DOES_NOT_EXIST |
749 */ | 1076 */ |
750 static final CompileTimeErrorCode INVALID_URI = new CompileTimeErrorCode('INVA
LID_URI', 60, "'%s' is not a valid uri"); | 1077 static final CompileTimeErrorCode INVALID_URI = new CompileTimeErrorCode('INVA
LID_URI', 73, "Invalid URI syntax: '%s'"); |
| 1078 |
751 /** | 1079 /** |
752 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within | 1080 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within |
753 * the innermost function in which <i>s<sub>b</sub></i> occurs. | 1081 * the innermost function in which <i>s<sub>b</sub></i> occurs. |
754 * <p> | 1082 * <p> |
755 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use | 1083 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use |
756 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. | 1084 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. |
757 * @param labelName the name of the unresolvable label | 1085 * @param labelName the name of the unresolvable label |
758 */ | 1086 */ |
759 static final CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = new CompileTimeErrorC
ode('LABEL_IN_OUTER_SCOPE', 61, "Cannot reference label '%s' declared in an oute
r method"); | 1087 static final CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = new CompileTimeErrorC
ode('LABEL_IN_OUTER_SCOPE', 74, "Cannot reference label '%s' declared in an oute
r method"); |
| 1088 |
760 /** | 1089 /** |
761 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within | 1090 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within |
762 * the innermost function in which <i>s<sub>b</sub></i> occurs. | 1091 * the innermost function in which <i>s<sub>b</sub></i> occurs. |
763 * <p> | 1092 * <p> |
764 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use | 1093 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use |
765 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. | 1094 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. |
766 * @param labelName the name of the unresolvable label | 1095 * @param labelName the name of the unresolvable label |
767 */ | 1096 */ |
768 static final CompileTimeErrorCode LABEL_UNDEFINED = new CompileTimeErrorCode('
LABEL_UNDEFINED', 62, "Cannot reference undefined label '%s'"); | 1097 static final CompileTimeErrorCode LABEL_UNDEFINED = new CompileTimeErrorCode('
LABEL_UNDEFINED', 75, "Cannot reference undefined label '%s'"); |
| 1098 |
769 /** | 1099 /** |
770 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member
with the same name | 1100 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member
with the same name |
771 * as <i>C</i>. | 1101 * as <i>C</i>. |
772 */ | 1102 */ |
773 static final CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = new CompileTimeErro
rCode('MEMBER_WITH_CLASS_NAME', 63, ""); | 1103 static final CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = new CompileTimeErro
rCode('MEMBER_WITH_CLASS_NAME', 76, "Class members cannot have the same name as
the enclosing class"); |
| 1104 |
| 1105 /** |
| 1106 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same |
| 1107 * name. |
| 1108 * @param name the conflicting name of the getter and method |
| 1109 */ |
| 1110 static final CompileTimeErrorCode METHOD_AND_GETTER_WITH_SAME_NAME = new Compi
leTimeErrorCode('METHOD_AND_GETTER_WITH_SAME_NAME', 77, "'%s' cannot be used to
name a method, there is already a getter with the same name"); |
| 1111 |
774 /** | 1112 /** |
775 * 9 Mixins: It is a compile-time error if a declared or derived mixin explici
tly declares a | 1113 * 9 Mixins: It is a compile-time error if a declared or derived mixin explici
tly declares a |
776 * constructor. | 1114 * constructor. |
| 1115 * @param typeName the name of the mixin that is invalid |
777 */ | 1116 */ |
778 static final CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = new CompileTime
ErrorCode('MIXIN_DECLARES_CONSTRUCTOR', 64, ""); | 1117 static final CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = new CompileTime
ErrorCode('MIXIN_DECLARES_CONSTRUCTOR', 78, "The class '%s' cannot be used as a
mixin because it declares a constructor"); |
| 1118 |
779 /** | 1119 /** |
780 * 9 Mixins: It is a compile-time error if a mixin is derived from a class who
se superclass is not | 1120 * 9 Mixins: It is a compile-time error if a mixin is derived from a class who
se superclass is not |
781 * Object. | 1121 * Object. |
| 1122 * @param typeName the name of the mixin that is invalid |
782 */ | 1123 */ |
783 static final CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = new Compile
TimeErrorCode('MIXIN_INHERITS_FROM_NOT_OBJECT', 65, ""); | 1124 static final CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = new Compile
TimeErrorCode('MIXIN_INHERITS_FROM_NOT_OBJECT', 79, "The class '%s' cannot be us
ed as a mixin because it extends a class other than Object"); |
| 1125 |
784 /** | 1126 /** |
785 * 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not deno
te a class or mixin | 1127 * 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not deno
te a class or mixin |
786 * available in the immediately enclosing scope. | 1128 * available in the immediately enclosing scope. |
787 * @param typeName the name of the mixin that was not found | |
788 */ | 1129 */ |
789 static final CompileTimeErrorCode MIXIN_OF_NON_CLASS = new CompileTimeErrorCod
e('MIXIN_OF_NON_CLASS', 66, "Classes can only mixin other classes"); | 1130 static final CompileTimeErrorCode MIXIN_OF_NON_CLASS = new CompileTimeErrorCod
e('MIXIN_OF_NON_CLASS', 80, "Classes can only mixin other classes"); |
790 /** | 1131 |
791 * 9.1 Mixin Application: If <i>M</i> is a class, it is a compile time error i
f a well formed | |
792 * mixin cannot be derived from <i>M</i>. | |
793 */ | |
794 static final CompileTimeErrorCode MIXIN_OF_NON_MIXIN = new CompileTimeErrorCod
e('MIXIN_OF_NON_MIXIN', 67, ""); | |
795 /** | 1132 /** |
796 * 9 Mixins: It is a compile-time error if a declared or derived mixin refers
to super. | 1133 * 9 Mixins: It is a compile-time error if a declared or derived mixin refers
to super. |
797 */ | 1134 */ |
798 static final CompileTimeErrorCode MIXIN_REFERENCES_SUPER = new CompileTimeErro
rCode('MIXIN_REFERENCES_SUPER', 68, ""); | 1135 static final CompileTimeErrorCode MIXIN_REFERENCES_SUPER = new CompileTimeErro
rCode('MIXIN_REFERENCES_SUPER', 81, "The class '%s' cannot be used as a mixin be
cause it references 'super'"); |
| 1136 |
799 /** | 1137 /** |
800 * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not deno
te a class available | 1138 * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not deno
te a class available |
801 * in the immediately enclosing scope. | 1139 * in the immediately enclosing scope. |
802 */ | 1140 */ |
803 static final CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = new Compil
eTimeErrorCode('MIXIN_WITH_NON_CLASS_SUPERCLASS', 69, ""); | 1141 static final CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = new Compil
eTimeErrorCode('MIXIN_WITH_NON_CLASS_SUPERCLASS', 82, "Mixin can only be applied
to class"); |
| 1142 |
| 1143 /** |
| 1144 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
| 1145 * only action is to invoke another generative constructor. |
| 1146 */ |
| 1147 static final CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS
= new CompileTimeErrorCode('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS', 83,
"Constructor may have at most one 'this' redirection"); |
| 1148 |
804 /** | 1149 /** |
805 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Th
en <i>k</i> may | 1150 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Th
en <i>k</i> may |
806 * include at most one superinitializer in its initializer list or a compile t
ime error occurs. | 1151 * include at most one superinitializer in its initializer list or a compile t
ime error occurs. |
807 */ | 1152 */ |
808 static final CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = new CompileTim
eErrorCode('MULTIPLE_SUPER_INITIALIZERS', 70, ""); | 1153 static final CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = new CompileTim
eErrorCode('MULTIPLE_SUPER_INITIALIZERS', 84, "Constructor may have at most one
'super' initializer"); |
| 1154 |
809 /** | 1155 /** |
810 * 12.11.1 New: It is a compile time error if <i>S</i> is not a generic type w
ith <i>m</i> type | 1156 * 12.11.1 New: It is a compile time error if <i>S</i> is not a generic type w
ith <i>m</i> type |
811 * parameters. | 1157 * parameters. |
812 * @param typeName the name of the type being referenced (<i>S</i>) | 1158 * @param typeName the name of the type being referenced (<i>S</i>) |
813 * @param parameterCount the number of type parameters that were declared | 1159 * @param parameterCount the number of type parameters that were declared |
814 * @param argumentCount the number of type arguments provided | 1160 * @param argumentCount the number of type arguments provided |
815 */ | 1161 */ |
816 static final CompileTimeErrorCode NEW_WITH_INVALID_TYPE_PARAMETERS = new Compi
leTimeErrorCode('NEW_WITH_INVALID_TYPE_PARAMETERS', 71, "The type '%s' is declar
ed with %d type parameters, but %d type arguments were given"); | 1162 static final CompileTimeErrorCode NEW_WITH_INVALID_TYPE_PARAMETERS = new Compi
leTimeErrorCode('NEW_WITH_INVALID_TYPE_PARAMETERS', 85, "The type '%s' is declar
ed with %d type parameters, but %d type arguments were given"); |
| 1163 |
817 /** | 1164 /** |
818 * 13.2 Expression Statements: It is a compile-time error if a non-constant ma
p literal that has | 1165 * 13.2 Expression Statements: It is a compile-time error if a non-constant ma
p literal that has |
819 * no explicit type arguments appears in a place where a statement is expected
. | 1166 * no explicit type arguments appears in a place where a statement is expected
. |
820 */ | 1167 */ |
821 static final CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = new
CompileTimeErrorCode('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 72, ""); | 1168 static final CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = new
CompileTimeErrorCode('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 86, "A non-constan
t map literal without type arguments cannot be used as an expression statement")
; |
| 1169 |
822 /** | 1170 /** |
823 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub
>11</sub> … | 1171 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub
>11</sub> … |
824 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> … label<sub>n1
</sub> … | 1172 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> … label<sub>n1
</sub> … |
825 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s
ub>}</i> or the form | 1173 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s
ub>}</i> or the form |
826 * <i>switch (e) { label<sub>11</sub> … label<sub>1j1</sub> case e<sub>
1</sub>: | 1174 * <i>switch (e) { label<sub>11</sub> … label<sub>1j1</sub> case e<sub>
1</sub>: |
827 * s<sub>1</sub> … label<sub>n1</sub> … label<sub>njn</sub> case
e<sub>n</sub>: | 1175 * s<sub>1</sub> … label<sub>n1</sub> … label<sub>njn</sub> case
e<sub>n</sub>: |
828 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub>
k</sub></i> are not | 1176 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub>
k</sub></i> are not |
829 * compile-time constants, for all <i>1 <= k <= n</i>. | 1177 * compile-time constants, for all <i>1 <= k <= n</i>. |
830 */ | 1178 */ |
831 static final CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = new CompileTi
meErrorCode('NON_CONSTANT_CASE_EXPRESSION', 73, "Case expressions must be consta
nt"); | 1179 static final CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = new CompileTi
meErrorCode('NON_CONSTANT_CASE_EXPRESSION', 87, "Case expressions must be consta
nt"); |
| 1180 |
832 /** | 1181 /** |
833 * 6.2.2 Optional Formals: It is a compile-time error if the default value of
an optional | 1182 * 6.2.2 Optional Formals: It is a compile-time error if the default value of
an optional |
834 * parameter is not a compile-time constant. | 1183 * parameter is not a compile-time constant. |
835 */ | 1184 */ |
836 static final CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = new CompileTime
ErrorCode('NON_CONSTANT_DEFAULT_VALUE', 74, "Default values of an optional param
eter must be constant"); | 1185 static final CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = new CompileTime
ErrorCode('NON_CONSTANT_DEFAULT_VALUE', 88, "Default values of an optional param
eter must be constant"); |
| 1186 |
837 /** | 1187 /** |
838 * 12.6 Lists: It is a compile time error if an element of a constant list lit
eral is not a | 1188 * 12.6 Lists: It is a compile time error if an element of a constant list lit
eral is not a |
839 * compile-time constant. | 1189 * compile-time constant. |
840 */ | 1190 */ |
841 static final CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = new CompileTimeE
rrorCode('NON_CONSTANT_LIST_ELEMENT', 75, "'const' lists must have all constant
values"); | 1191 static final CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = new CompileTimeE
rrorCode('NON_CONSTANT_LIST_ELEMENT', 89, "'const' lists must have all constant
values"); |
| 1192 |
842 /** | 1193 /** |
843 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map | 1194 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map |
844 * literal is not a compile-time constant. | 1195 * literal is not a compile-time constant. |
845 */ | 1196 */ |
846 static final CompileTimeErrorCode NON_CONSTANT_MAP_KEY = new CompileTimeErrorC
ode('NON_CONSTANT_MAP_KEY', 76, "The keys in a map must be constant"); | 1197 static final CompileTimeErrorCode NON_CONSTANT_MAP_KEY = new CompileTimeErrorC
ode('NON_CONSTANT_MAP_KEY', 90, "The keys in a map must be constant"); |
| 1198 |
847 /** | 1199 /** |
848 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map | 1200 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map |
849 * literal is not a compile-time constant. | 1201 * literal is not a compile-time constant. |
850 */ | 1202 */ |
851 static final CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = new CompileTimeErro
rCode('NON_CONSTANT_MAP_VALUE', 77, "The values in a 'const' map must be constan
t"); | 1203 static final CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = new CompileTimeErro
rCode('NON_CONSTANT_MAP_VALUE', 91, "The values in a 'const' map must be constan
t"); |
| 1204 |
852 /** | 1205 /** |
853 * 7.6.3 Constant Constructors: Any expression that appears within the initial
izer list of a | 1206 * 7.6.3 Constant Constructors: Any expression that appears within the initial
izer list of a |
854 * constant constructor must be a potentially constant expression, or a compil
e-time error occurs. | 1207 * constant constructor must be a potentially constant expression, or a compil
e-time error occurs. |
855 */ | 1208 */ |
856 static final CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = new Comp
ileTimeErrorCode('NON_CONSTANT_VALUE_IN_INITIALIZER', 78, ""); | 1209 static final CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = new Comp
ileTimeErrorCode('NON_CONSTANT_VALUE_IN_INITIALIZER', 92, "Initializer expressio
ns in constant constructors must be constants"); |
| 1210 |
| 1211 /** |
| 1212 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i>
or if <i>m > n</i>. |
| 1213 * <p> |
| 1214 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 1215 * uncaught exception being thrown. |
| 1216 * @param requiredCount the expected number of required arguments |
| 1217 * @param argumentCount the actual number of positional arguments given |
| 1218 */ |
| 1219 static final CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new CompileT
imeErrorCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', 93, "%d required argument(s) expec
ted, but %d found"); |
| 1220 |
| 1221 /** |
| 1222 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears |
| 1223 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is |
| 1224 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> |
| 1225 * (respectively <i>S.id</i>) |
| 1226 */ |
| 1227 static final CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR = new CompileTime
ErrorCode('NON_GENERATIVE_CONSTRUCTOR', 94, "The generative constructor '%s' exp
ected, but factory found"); |
| 1228 |
857 /** | 1229 /** |
858 * 7.9 Superclasses: It is a compile-time error to specify an extends clause f
or class Object. | 1230 * 7.9 Superclasses: It is a compile-time error to specify an extends clause f
or class Object. |
859 */ | 1231 */ |
860 static final CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = new Com
pileTimeErrorCode('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 79, ""); | 1232 static final CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = new Com
pileTimeErrorCode('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 95, ""); |
| 1233 |
861 /** | 1234 /** |
862 * 7.1.1 Operators: It is a compile-time error to declare an optional paramete
r in an operator. | 1235 * 7.1.1 Operators: It is a compile-time error to declare an optional paramete
r in an operator. |
863 */ | 1236 */ |
864 static final CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = new Compile
TimeErrorCode('OPTIONAL_PARAMETER_IN_OPERATOR', 80, "Optional parameters are not
allowed when defining an operator"); | 1237 static final CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = new Compile
TimeErrorCode('OPTIONAL_PARAMETER_IN_OPERATOR', 96, "Optional parameters are not
allowed when defining an operator"); |
865 /** | 1238 |
866 * 8 Interfaces: It is a compile-time error if an interface member <i>m1</i> o
verrides an | |
867 * interface member <i>m2</i> and <i>m1</i> does not declare all the named par
ameters declared by | |
868 * <i>m2</i> in the same order. | |
869 */ | |
870 static final CompileTimeErrorCode OVERRIDE_MISSING_NAMED_PARAMETERS = new Comp
ileTimeErrorCode('OVERRIDE_MISSING_NAMED_PARAMETERS', 81, ""); | |
871 /** | |
872 * 8 Interfaces: It is a compile-time error if an interface member <i>m1</i> o
verrides an | |
873 * interface member <i>m2</i> and <i>m1</i> has a different number of required
parameters than | |
874 * <i>m2</i>. | |
875 */ | |
876 static final CompileTimeErrorCode OVERRIDE_MISSING_REQUIRED_PARAMETERS = new C
ompileTimeErrorCode('OVERRIDE_MISSING_REQUIRED_PARAMETERS', 82, ""); | |
877 /** | 1239 /** |
878 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part | 1240 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part |
879 * declaration. | 1241 * declaration. |
880 * @param uri the uri pointing to a non-library declaration | 1242 * @param uri the uri pointing to a non-library declaration |
881 */ | 1243 */ |
882 static final CompileTimeErrorCode PART_OF_NON_PART = new CompileTimeErrorCode(
'PART_OF_NON_PART', 83, "The included part '%s' must have a part-of directive"); | 1244 static final CompileTimeErrorCode PART_OF_NON_PART = new CompileTimeErrorCode(
'PART_OF_NON_PART', 97, "The included part '%s' must have a part-of directive"); |
| 1245 |
883 /** | 1246 /** |
884 * 14.1 Imports: It is a compile-time error if the current library declares a
top-level member | 1247 * 14.1 Imports: It is a compile-time error if the current library declares a
top-level member |
885 * named <i>p</i>. | 1248 * named <i>p</i>. |
886 */ | 1249 */ |
887 static final CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = new
CompileTimeErrorCode('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 84, ""); | 1250 static final CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = new
CompileTimeErrorCode('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 98, "The name '%s'
is already used as an import prefix and cannot be used to name a top-level elem
ent"); |
| 1251 |
888 /** | 1252 /** |
889 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named o
ptional parameter | 1253 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named o
ptional parameter |
890 * begins with an '_' character. | 1254 * begins with an '_' character. |
891 */ | 1255 */ |
892 static final CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = new CompileTime
ErrorCode('PRIVATE_OPTIONAL_PARAMETER', 85, "Named optional parameters cannot st
art with an underscore"); | 1256 static final CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = new CompileTime
ErrorCode('PRIVATE_OPTIONAL_PARAMETER', 99, "Named optional parameters cannot st
art with an underscore"); |
| 1257 |
893 /** | 1258 /** |
894 * 12.1 Constants: It is a compile-time error if the value of a compile-time c
onstant expression | 1259 * 12.1 Constants: It is a compile-time error if the value of a compile-time c
onstant expression |
895 * depends on itself. | 1260 * depends on itself. |
896 */ | 1261 */ |
897 static final CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = new Compil
eTimeErrorCode('RECURSIVE_COMPILE_TIME_CONSTANT', 86, ""); | 1262 static final CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = new Compil
eTimeErrorCode('RECURSIVE_COMPILE_TIME_CONSTANT', 100, ""); |
| 1263 |
| 1264 /** |
| 1265 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
| 1266 * only action is to invoke another generative constructor. |
| 1267 * <p> |
| 1268 * TODO(scheglov) review this later, there are no explicit "it is a compile-ti
me error" in |
| 1269 * specification. But it was added to the co19 and there is same error for fac
tories. |
| 1270 * <p> |
| 1271 * https://code.google.com/p/dart/issues/detail?id=954 |
| 1272 */ |
| 1273 static final CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = new Compile
TimeErrorCode('RECURSIVE_CONSTRUCTOR_REDIRECT', 101, "Cycle in redirecting gener
ative constructors"); |
| 1274 |
898 /** | 1275 /** |
899 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr
uctor redirects to | 1276 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr
uctor redirects to |
900 * itself, either directly or indirectly via a sequence of redirections. | 1277 * itself, either directly or indirectly via a sequence of redirections. |
901 */ | 1278 */ |
902 static final CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = new CompileTime
ErrorCode('RECURSIVE_FACTORY_REDIRECT', 87, ""); | 1279 static final CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = new CompileTime
ErrorCode('RECURSIVE_FACTORY_REDIRECT', 102, "Cycle in redirecting factory const
ructors"); |
| 1280 |
903 /** | 1281 /** |
904 * 15.3.1 Typedef: It is a compile-time error if a typedef refers to itself vi
a a chain of | 1282 * 15.3.1 Typedef: It is a compile-time error if a typedef refers to itself vi
a a chain of |
905 * references that does not include a class type. | 1283 * references that does not include a class type. |
906 */ | 1284 */ |
907 static final CompileTimeErrorCode RECURSIVE_FUNCTION_TYPE_ALIAS = new CompileT
imeErrorCode('RECURSIVE_FUNCTION_TYPE_ALIAS', 88, ""); | 1285 static final CompileTimeErrorCode RECURSIVE_FUNCTION_TYPE_ALIAS = new CompileT
imeErrorCode('RECURSIVE_FUNCTION_TYPE_ALIAS', 103, ""); |
| 1286 |
908 /** | 1287 /** |
| 1288 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a |
| 1289 * superinterface of itself. |
| 1290 * <p> |
909 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. | 1291 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. |
| 1292 * <p> |
| 1293 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. |
| 1294 * @param className the name of the class that implements itself recursively |
| 1295 * @param strImplementsPath a string representation of the implements loop |
910 */ | 1296 */ |
911 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = new Compil
eTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE', 89, ""); | 1297 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = new Compil
eTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE', 104, "'%s' cannot be a superin
terface of itself: %s"); |
| 1298 |
| 1299 /** |
| 1300 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a |
| 1301 * superinterface of itself. |
| 1302 * <p> |
| 1303 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. |
| 1304 * <p> |
| 1305 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. |
| 1306 * @param className the name of the class that implements itself recursively |
| 1307 */ |
| 1308 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EX
TENDS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTE
NDS', 105, "'%s' cannot extend itself"); |
| 1309 |
| 1310 /** |
| 1311 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a |
| 1312 * superinterface of itself. |
| 1313 * <p> |
| 1314 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. |
| 1315 * <p> |
| 1316 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. |
| 1317 * @param className the name of the class that implements itself recursively |
| 1318 */ |
| 1319 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IM
PLEMENTS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_I
MPLEMENTS', 106, "'%s' cannot implement itself"); |
| 1320 |
912 /** | 1321 /** |
913 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th
e const modifier but | 1322 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th
e const modifier but |
914 * <i>k'</i> is not a constant constructor. | 1323 * <i>k'</i> is not a constant constructor. |
915 */ | 1324 */ |
916 static final CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = new Comp
ileTimeErrorCode('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 90, ""); | 1325 static final CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = new Comp
ileTimeErrorCode('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 107, "Constant factory con
structor cannot delegate to a non-constant constructor"); |
| 1326 |
917 /** | 1327 /** |
918 * 13.3 Local Variable Declaration: It is a compile-time error if <i>e</i> ref
ers to the name | 1328 * 13.3 Local Variable Declaration: It is a compile-time error if <i>e</i> ref
ers to the name |
919 * <i>v</i> or the name <i>v=</i>. | 1329 * <i>v</i> or the name <i>v=</i>. |
920 */ | 1330 */ |
921 static final CompileTimeErrorCode REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZE
R = new CompileTimeErrorCode('REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER', 91
, ""); | 1331 static final CompileTimeErrorCode REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZE
R = new CompileTimeErrorCode('REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER', 10
8, "The name '%s' cannot be referenced in the initializer of a variable with the
same name"); |
| 1332 |
922 /** | 1333 /** |
923 * 16.1.1 Reserved Words: A reserved word may not be used as an identifier; it
is a compile-time | 1334 * 16.1.1 Reserved Words: A reserved word may not be used as an identifier; it
is a compile-time |
924 * error if a reserved word is used where an identifier is expected. | 1335 * error if a reserved word is used where an identifier is expected. |
925 */ | 1336 */ |
926 static final CompileTimeErrorCode RESERVED_WORD_AS_IDENTIFIER = new CompileTim
eErrorCode('RESERVED_WORD_AS_IDENTIFIER', 92, ""); | 1337 static final CompileTimeErrorCode RESERVED_WORD_AS_IDENTIFIER = new CompileTim
eErrorCode('RESERVED_WORD_AS_IDENTIFIER', 109, ""); |
| 1338 |
927 /** | 1339 /** |
928 * 12.8.1 Rethrow: It is a compile-time error if an expression of the form <i>
rethrow;</i> is not | 1340 * 12.8.1 Rethrow: It is a compile-time error if an expression of the form <i>
rethrow;</i> is not |
929 * enclosed within a on-catch clause. | 1341 * enclosed within a on-catch clause. |
930 */ | 1342 */ |
931 static final CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = new CompileTimeError
Code('RETHROW_OUTSIDE_CATCH', 93, "rethrow must be inside of a catch clause"); | 1343 static final CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = new CompileTimeError
Code('RETHROW_OUTSIDE_CATCH', 110, "rethrow must be inside of a catch clause"); |
| 1344 |
932 /** | 1345 /** |
933 * 13.11 Return: It is a compile-time error if a return statement of the form
<i>return e;</i> | 1346 * 13.11 Return: It is a compile-time error if a return statement of the form
<i>return e;</i> |
934 * appears in a generative constructor. | 1347 * appears in a generative constructor. |
935 */ | 1348 */ |
936 static final CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = new Compi
leTimeErrorCode('RETURN_IN_GENERATIVE_CONSTRUCTOR', 94, "Constructors cannot ret
urn a value"); | 1349 static final CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = new Compi
leTimeErrorCode('RETURN_IN_GENERATIVE_CONSTRUCTOR', 111, "Constructors cannot re
turn a value"); |
| 1350 |
937 /** | 1351 /** |
938 * 6.1 Function Declarations: It is a compile-time error to preface a function
declaration with | 1352 * 6.1 Function Declarations: It is a compile-time error to preface a function
declaration with |
939 * the built-in identifier static. | 1353 * the built-in identifier static. |
940 */ | 1354 */ |
941 static final CompileTimeErrorCode STATIC_TOP_LEVEL_FUNCTION = new CompileTimeE
rrorCode('STATIC_TOP_LEVEL_FUNCTION', 95, ""); | 1355 static final CompileTimeErrorCode STATIC_TOP_LEVEL_FUNCTION = new CompileTimeE
rrorCode('STATIC_TOP_LEVEL_FUNCTION', 112, ""); |
| 1356 |
942 /** | 1357 /** |
943 * 5 Variables: It is a compile-time error to preface a top level variable dec
laration with the | 1358 * 5 Variables: It is a compile-time error to preface a top level variable dec
laration with the |
944 * built-in identifier static. | 1359 * built-in identifier static. |
945 */ | 1360 */ |
946 static final CompileTimeErrorCode STATIC_TOP_LEVEL_VARIABLE = new CompileTimeE
rrorCode('STATIC_TOP_LEVEL_VARIABLE', 96, ""); | 1361 static final CompileTimeErrorCode STATIC_TOP_LEVEL_VARIABLE = new CompileTimeE
rrorCode('STATIC_TOP_LEVEL_VARIABLE', 113, ""); |
| 1362 |
947 /** | 1363 /** |
948 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form | 1364 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form |
949 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … | 1365 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … |
950 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe
r method invocation | 1366 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe
r method invocation |
951 * occurs in a top-level function or variable initializer, in an instance vari
able initializer or | 1367 * occurs in a top-level function or variable initializer, in an instance vari
able initializer or |
952 * initializer list, in class Object, in a factory constructor, or in a static
method or variable | 1368 * initializer list, in class Object, in a factory constructor, or in a static
method or variable |
953 * initializer. | 1369 * initializer. |
954 */ | 1370 */ |
955 static final CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = new CompileTimeEr
rorCode('SUPER_IN_INVALID_CONTEXT', 97, ""); | 1371 static final CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = new CompileTimeEr
rorCode('SUPER_IN_INVALID_CONTEXT', 114, "Invalid context for 'super' invocation
"); |
| 1372 |
| 1373 /** |
| 1374 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
| 1375 * only action is to invoke another generative constructor. |
| 1376 */ |
| 1377 static final CompileTimeErrorCode SUPER_IN_REDIRECTING_CONSTRUCTOR = new Compi
leTimeErrorCode('SUPER_IN_REDIRECTING_CONSTRUCTOR', 115, "The redirecting constr
uctor cannot have a 'super' initializer"); |
| 1378 |
956 /** | 1379 /** |
957 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time | 1380 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time |
958 * error if a generative constructor of class Object includes a superinitializ
er. | 1381 * error if a generative constructor of class Object includes a superinitializ
er. |
959 */ | 1382 */ |
960 static final CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = new CompileTim
eErrorCode('SUPER_INITIALIZER_IN_OBJECT', 98, ""); | 1383 static final CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = new CompileTim
eErrorCode('SUPER_INITIALIZER_IN_OBJECT', 116, ""); |
| 1384 |
961 /** | 1385 /** |
962 * 12.11 Instance Creation: It is a compile-time error if a constructor of a n
on-generic type | 1386 * 12.11 Instance Creation: It is a compile-time error if a constructor of a n
on-generic type |
963 * invoked by a new expression or a constant object expression is passed any t
ype arguments. | 1387 * invoked by a new expression or a constant object expression is passed any t
ype arguments. |
964 * <p> | 1388 * <p> |
965 * 12.32 Type Cast: It is a compile-time error if <i>T</i> is a parameterized
type of the form | 1389 * 12.32 Type Cast: It is a compile-time error if <i>T</i> is a parameterized
type of the form |
966 * <i>G<T<sub>1</sub>, …, T<sub>n</sub>></i> and <i>G</i> is not
a generic type with | 1390 * <i>G<T<sub>1</sub>, …, T<sub>n</sub>></i> and <i>G</i> is not
a generic type with |
967 * <i>n</i> type parameters. | 1391 * <i>n</i> type parameters. |
968 */ | 1392 */ |
969 static final CompileTimeErrorCode TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS = new C
ompileTimeErrorCode('TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS', 99, ""); | 1393 static final CompileTimeErrorCode TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS = new C
ompileTimeErrorCode('TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS', 117, ""); |
| 1394 |
| 1395 /** |
| 1396 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current |
| 1397 * scope, optionally followed by type arguments. |
| 1398 */ |
| 1399 static final CompileTimeErrorCode UNDEFINED_CLASS = new CompileTimeErrorCode('
UNDEFINED_CLASS', 118, "Undefined class '%s'"); |
| 1400 |
970 /** | 1401 /** |
971 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears | 1402 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears |
972 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is | 1403 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is |
973 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> | 1404 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> |
974 * (respectively <i>S.id</i>) | 1405 * (respectively <i>S.id</i>) |
975 */ | 1406 */ |
976 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = new C
ompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 100, ""); | 1407 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = new C
ompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 119, "The class '%s'
does not have a generative constructor '%s'"); |
| 1408 |
| 1409 /** |
| 1410 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears |
| 1411 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is |
| 1412 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> |
| 1413 * (respectively <i>S.id</i>) |
| 1414 */ |
| 1415 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT
= new CompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT', 120,
"The class '%s' does not have a default generative constructor"); |
| 1416 |
977 /** | 1417 /** |
978 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Ea
ch final instance | 1418 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Ea
ch final instance |
979 * variable <i>f</i> declared in the immediately enclosing class must have an
initializer in | 1419 * variable <i>f</i> declared in the immediately enclosing class must have an
initializer in |
980 * <i>k</i>'s initializer list unless it has already been initialized by one o
f the following | 1420 * <i>k</i>'s initializer list unless it has already been initialized by one o
f the following |
981 * means: | 1421 * means: |
982 * <ol> | 1422 * <ol> |
983 * <li>Initialization at the declaration of <i>f</i>. | 1423 * <li>Initialization at the declaration of <i>f</i>. |
984 * <li>Initialization by means of an initializing formal of <i>k</i>. | 1424 * <li>Initialization by means of an initializing formal of <i>k</i>. |
985 * </ol> | 1425 * </ol> |
986 * or a compile-time error occurs. | 1426 * or a compile-time error occurs. |
987 */ | 1427 */ |
988 static final CompileTimeErrorCode UNINITIALIZED_FINAL_FIELD = new CompileTimeE
rrorCode('UNINITIALIZED_FINAL_FIELD', 101, ""); | 1428 static final CompileTimeErrorCode UNINITIALIZED_FINAL_FIELD = new CompileTimeE
rrorCode('UNINITIALIZED_FINAL_FIELD', 121, ""); |
| 1429 |
| 1430 /** |
| 1431 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>,
<i>1<=i<=l</i>, |
| 1432 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i
> ... |
| 1433 * <i>p<sub>n+k</sub></i>} or a static warning occurs. |
| 1434 * <p> |
| 1435 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 1436 * uncaught exception being thrown. |
| 1437 * @param name the name of the requested named parameter |
| 1438 */ |
| 1439 static final CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER = new CompileTimeE
rrorCode('UNDEFINED_NAMED_PARAMETER', 122, "The named parameter '%s' is not defi
ned"); |
| 1440 |
| 1441 /** |
| 1442 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 1443 * not a library declaration. |
| 1444 * <p> |
| 1445 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 1446 * not a library declaration. |
| 1447 * <p> |
| 1448 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part |
| 1449 * declaration. |
| 1450 * @param uri the URI pointing to a non-existent file |
| 1451 * @see #INVALID_URI |
| 1452 */ |
| 1453 static final CompileTimeErrorCode URI_DOES_NOT_EXIST = new CompileTimeErrorCod
e('URI_DOES_NOT_EXIST', 123, "Target of URI does not exist: '%s'"); |
| 1454 |
989 /** | 1455 /** |
990 * 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time
constant, or if | 1456 * 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time
constant, or if |
991 * <i>x</i> involves string interpolation. | 1457 * <i>x</i> involves string interpolation. |
992 * <p> | 1458 * <p> |
993 * 14.3 Parts: It is a compile-time error if <i>s</i> is not a compile-time co
nstant, or if | 1459 * 14.3 Parts: It is a compile-time error if <i>s</i> is not a compile-time co
nstant, or if |
994 * <i>s</i> involves string interpolation. | 1460 * <i>s</i> involves string interpolation. |
995 * <p> | 1461 * <p> |
996 * 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that d
escribes a URI is | 1462 * 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that d
escribes a URI is |
997 * not a compile-time constant, or if <i>x</i> involves string interpolation. | 1463 * not a compile-time constant, or if <i>x</i> involves string interpolation. |
998 */ | 1464 */ |
999 static final CompileTimeErrorCode URI_WITH_INTERPOLATION = new CompileTimeErro
rCode('URI_WITH_INTERPOLATION', 102, "URIs cannot use string interpolation"); | 1465 static final CompileTimeErrorCode URI_WITH_INTERPOLATION = new CompileTimeErro
rCode('URI_WITH_INTERPOLATION', 124, "URIs cannot use string interpolation"); |
| 1466 |
1000 /** | 1467 /** |
1001 * 7.1.1 Operators: It is a compile-time error if the arity of the user-declar
ed operator \[\]= is | 1468 * 7.1.1 Operators: It is a compile-time error if the arity of the user-declar
ed operator \[\]= is |
1002 * not 2. It is a compile time error if the arity of a user-declared operator
with one of the | 1469 * not 2. It is a compile time error if the arity of a user-declared operator
with one of the |
1003 * names: <, >, <=, >=, ==, +, /, ~/, *, %, |, ^, &, <<, >
;>, \[\] is not 1. | 1470 * names: <, >, <=, >=, ==, +, /, ~/, *, %, |, ^, &, <<, >
;>, \[\] is not 1. |
1004 * It is a compile time error if the arity of the user-declared operator - is
not 0 or 1. It is a | 1471 * It is a compile time error if the arity of the user-declared operator - is
not 0 or 1. It is a |
1005 * compile time error if the arity of the user-declared operator ~ is not 0. | 1472 * compile time error if the arity of the user-declared operator ~ is not 0. |
| 1473 * @param operatorName the name of the declared operator |
| 1474 * @param expectedNumberOfParameters the number of parameters expected |
| 1475 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration |
1006 */ | 1476 */ |
1007 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = ne
w CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 103, ""); | 1477 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = ne
w CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 125, "Operator
'%s' should declare exactly %d parameter(s), but %d found"); |
| 1478 |
| 1479 /** |
| 1480 * 7.1.1 Operators: It is a compile time error if the arity of the user-declar
ed operator - is not |
| 1481 * 0 or 1. |
| 1482 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration |
| 1483 */ |
| 1484 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINU
S = new CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS', 12
6, "Operator '-' should declare 0 or 1 parameter, but %d found"); |
| 1485 |
1008 /** | 1486 /** |
1009 * 7.3 Setters: It is a compile-time error if a setter's formal parameter list
does not include | 1487 * 7.3 Setters: It is a compile-time error if a setter's formal parameter list
does not include |
1010 * exactly one required formal parameter <i>p</i>. | 1488 * exactly one required formal parameter <i>p</i>. |
1011 * @param numberOfParameters the number of parameters found in the setter | 1489 * @param numberOfParameters the number of parameters found in the setter |
1012 */ | 1490 */ |
1013 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = new
CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 104, "Setters shou
ld declare exactly one parameter, %d found"); | 1491 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = new
CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 127, "Setters shou
ld declare exactly one parameter, %d found"); |
| 1492 |
1014 /** | 1493 /** |
1015 * 12.11 Instance Creation: It is a compile-time error if a constructor of a g
eneric type with | 1494 * 12.11 Instance Creation: It is a compile-time error if a constructor of a g
eneric type with |
1016 * <i>n</i> type parameters invoked by a new expression or a constant object e
xpression is passed | 1495 * <i>n</i> type parameters invoked by a new expression or a constant object e
xpression is passed |
1017 * <i>m</i> type arguments where <i>m != n</i>. | 1496 * <i>m</i> type arguments where <i>m != n</i>. |
1018 * <p> | 1497 * <p> |
1019 * 12.31 Type Test: It is a compile-time error if <i>T</i> is a parameterized
type of the form | 1498 * 12.31 Type Test: It is a compile-time error if <i>T</i> is a parameterized
type of the form |
1020 * <i>G<T<sub>1</sub>, …, T<sub>n</sub>></i> and <i>G</i> is not
a generic type with | 1499 * <i>G<T<sub>1</sub>, …, T<sub>n</sub>></i> and <i>G</i> is not
a generic type with |
1021 * <i>n</i> type parameters. | 1500 * <i>n</i> type parameters. |
1022 */ | 1501 */ |
1023 static final CompileTimeErrorCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = new Compile
TimeErrorCode('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 105, ""); | 1502 static final CompileTimeErrorCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = new Compile
TimeErrorCode('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 128, ""); |
1024 static final List<CompileTimeErrorCode> values = [AMBIGUOUS_EXPORT, AMBIGUOUS_
IMPORT, ARGUMENT_DEFINITION_TEST_NON_PARAMETER, BUILT_IN_IDENTIFIER_AS_TYPE, BUI
LT_IN_IDENTIFIER_AS_TYPE_NAME, BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, BUILT_IN_IDE
NTIFIER_AS_TYPE_VARIABLE_NAME, CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, COMPILE_T
IME_CONSTANT_RAISES_EXCEPTION, CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, CONFLICTI
NG_CONSTRUCTOR_NAME_AND_METHOD, CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, CONST_FO
RMAL_PARAMETER, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, CONST_EVAL_THROWS_EXC
EPTION, CONST_WITH_INVALID_TYPE_PARAMETERS, CONST_WITH_NON_CONST, CONST_WITH_NON
_CONSTANT_ARGUMENT, CONST_WITH_NON_TYPE, CONST_WITH_TYPE_PARAMETERS, CONST_WITH_
UNDEFINED_CONSTRUCTOR, DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS, DUPLICATE_DEFINITIO
N, DUPLICATE_MEMBER_NAME, DUPLICATE_MEMBER_NAME_INSTANCE_STATIC, DUPLICATE_NAMED
_ARGUMENT, EXPORT_OF_NON_LIBRARY, EXTENDS_NON_CLASS, EXTENDS_DISALLOWED_CLASS, I
MPLEMENTS_DISALLOWED_CLASS, FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS, FIELD_IN
ITIALIZED_IN_INITIALIZER_AND_DECLARATION, FIELD_INITIALIZED_IN_PARAMETER_AND_INI
TIALIZER, FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR, FINAL_INITIALIZED_IN_DECLARATIO
N_AND_CONSTRUCTOR, FINAL_INITIALIZED_MULTIPLE_TIMES, FINAL_NOT_INITIALIZED, GETT
ER_AND_METHOD_WITH_SAME_NAME, IMPLEMENTS_DYNAMIC, IMPLEMENTS_NON_CLASS, IMPLEMEN
TS_REPEATED, IMPLEMENTS_SELF, IMPORT_DUPLICATED_LIBRARY_NAME, IMPORT_OF_NON_LIBR
ARY, INCONSISTENT_CASE_EXPRESSION_TYPES, INITIALIZER_FOR_NON_EXISTANT_FIELD, INI
TIALIZER_FOR_STATIC_FIELD, INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD, INITIALIZ
ING_FORMAL_FOR_STATIC_FIELD, INVALID_CONSTANT, INVALID_CONSTRUCTOR_NAME, INVALID
_FACTORY_NAME_NOT_A_CLASS, INVALID_OVERRIDE_DEFAULT_VALUE, INVALID_OVERRIDE_NAME
D, INVALID_OVERRIDE_POSITIONAL, INVALID_OVERRIDE_REQUIRED, INVALID_REFERENCE_TO_
THIS, INVALID_TYPE_ARGUMENT_FOR_KEY, INVALID_TYPE_ARGUMENT_IN_CONST_LIST, INVALI
D_TYPE_ARGUMENT_IN_CONST_MAP, INVALID_URI, LABEL_IN_OUTER_SCOPE, LABEL_UNDEFINED
, MEMBER_WITH_CLASS_NAME, MIXIN_DECLARES_CONSTRUCTOR, MIXIN_INHERITS_FROM_NOT_OB
JECT, MIXIN_OF_NON_CLASS, MIXIN_OF_NON_MIXIN, MIXIN_REFERENCES_SUPER, MIXIN_WITH
_NON_CLASS_SUPERCLASS, MULTIPLE_SUPER_INITIALIZERS, NEW_WITH_INVALID_TYPE_PARAME
TERS, NON_CONST_MAP_AS_EXPRESSION_STATEMENT, NON_CONSTANT_CASE_EXPRESSION, NON_C
ONSTANT_DEFAULT_VALUE, NON_CONSTANT_LIST_ELEMENT, NON_CONSTANT_MAP_KEY, NON_CONS
TANT_MAP_VALUE, NON_CONSTANT_VALUE_IN_INITIALIZER, OBJECT_CANNOT_EXTEND_ANOTHER_
CLASS, OPTIONAL_PARAMETER_IN_OPERATOR, OVERRIDE_MISSING_NAMED_PARAMETERS, OVERRI
DE_MISSING_REQUIRED_PARAMETERS, PART_OF_NON_PART, PREFIX_COLLIDES_WITH_TOP_LEVEL
_MEMBER, PRIVATE_OPTIONAL_PARAMETER, RECURSIVE_COMPILE_TIME_CONSTANT, RECURSIVE_
FACTORY_REDIRECT, RECURSIVE_FUNCTION_TYPE_ALIAS, RECURSIVE_INTERFACE_INHERITANCE
, REDIRECT_TO_NON_CONST_CONSTRUCTOR, REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZ
ER, RESERVED_WORD_AS_IDENTIFIER, RETHROW_OUTSIDE_CATCH, RETURN_IN_GENERATIVE_CON
STRUCTOR, STATIC_TOP_LEVEL_FUNCTION, STATIC_TOP_LEVEL_VARIABLE, SUPER_IN_INVALID
_CONTEXT, SUPER_INITIALIZER_IN_OBJECT, TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS, UND
EFINED_CONSTRUCTOR_IN_INITIALIZER, UNINITIALIZED_FINAL_FIELD, URI_WITH_INTERPOLA
TION, WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR, WRONG_NUMBER_OF_PARAMETERS_FOR_SE
TTER, WRONG_NUMBER_OF_TYPE_ARGUMENTS]; | 1503 static final List<CompileTimeErrorCode> values = [AMBIGUOUS_EXPORT, AMBIGUOUS_
IMPORT, ARGUMENT_DEFINITION_TEST_NON_PARAMETER, BUILT_IN_IDENTIFIER_AS_TYPE, BUI
LT_IN_IDENTIFIER_AS_TYPE_NAME, BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, BUILT_IN_IDE
NTIFIER_AS_TYPE_VARIABLE_NAME, CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, COMPILE_T
IME_CONSTANT_RAISES_EXCEPTION, CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, CONFLICTI
NG_CONSTRUCTOR_NAME_AND_METHOD, CONST_CONSTRUCTOR_THROWS_EXCEPTION, CONST_CONSTR
UCTOR_WITH_NON_FINAL_FIELD, CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE, CONST_FORMAL
_PARAMETER, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, CONST_EVAL_TYPE_BOOL, CON
ST_EVAL_TYPE_BOOL_NUM_STRING, CONST_EVAL_TYPE_INT, CONST_EVAL_TYPE_NUM, CONST_EV
AL_THROWS_EXCEPTION, CONST_WITH_INVALID_TYPE_PARAMETERS, CONST_WITH_NON_CONST, C
ONST_WITH_NON_CONSTANT_ARGUMENT, CONST_WITH_NON_TYPE, CONST_WITH_TYPE_PARAMETERS
, CONST_WITH_UNDEFINED_CONSTRUCTOR, CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT, DE
FAULT_VALUE_IN_FUNCTION_TYPE_ALIAS, DUPLICATE_CONSTRUCTOR_DEFAULT, DUPLICATE_CON
STRUCTOR_NAME, DUPLICATE_DEFINITION, DUPLICATE_MEMBER_NAME, DUPLICATE_MEMBER_NAM
E_INSTANCE_STATIC, DUPLICATE_NAMED_ARGUMENT, EXPORT_INTERNAL_LIBRARY, EXPORT_OF_
NON_LIBRARY, EXTENDS_NON_CLASS, EXTENDS_DISALLOWED_CLASS, EXTRA_POSITIONAL_ARGUM
ENTS, IMPLEMENTS_DISALLOWED_CLASS, FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS, F
IELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION, FIELD_INITIALIZED_IN_PARAMETER_
AND_INITIALIZER, FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR, FINAL_INITIAL
IZED_MULTIPLE_TIMES, FIELD_INITIALIZER_FACTORY_CONSTRUCTOR, FIELD_INITIALIZER_OU
TSIDE_CONSTRUCTOR, FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR, FINAL_NOT_INITIALI
ZED, GETTER_AND_METHOD_WITH_SAME_NAME, IMPLEMENTS_DYNAMIC, IMPLEMENTS_NON_CLASS,
IMPLEMENTS_REPEATED, IMPLICIT_THIS_REFERENCE_IN_INITIALIZER, IMPORT_INTERNAL_LI
BRARY, IMPORT_OF_NON_LIBRARY, INCONSISTENT_CASE_EXPRESSION_TYPES, INITIALIZER_FO
R_NON_EXISTANT_FIELD, INITIALIZER_FOR_STATIC_FIELD, INITIALIZING_FORMAL_FOR_NON_
EXISTANT_FIELD, INITIALIZING_FORMAL_FOR_STATIC_FIELD, INVALID_CONSTANT, INVALID_
CONSTRUCTOR_NAME, INVALID_FACTORY_NAME_NOT_A_CLASS, INVALID_OVERRIDE_DEFAULT_VAL
UE, INVALID_OVERRIDE_NAMED, INVALID_OVERRIDE_POSITIONAL, INVALID_OVERRIDE_REQUIR
ED, INVALID_REFERENCE_TO_THIS, INVALID_TYPE_ARGUMENT_FOR_KEY, INVALID_TYPE_ARGUM
ENT_IN_CONST_LIST, INVALID_TYPE_ARGUMENT_IN_CONST_MAP, INVALID_URI, LABEL_IN_OUT
ER_SCOPE, LABEL_UNDEFINED, MEMBER_WITH_CLASS_NAME, METHOD_AND_GETTER_WITH_SAME_N
AME, MIXIN_DECLARES_CONSTRUCTOR, MIXIN_INHERITS_FROM_NOT_OBJECT, MIXIN_OF_NON_CL
ASS, MIXIN_REFERENCES_SUPER, MIXIN_WITH_NON_CLASS_SUPERCLASS, MULTIPLE_REDIRECTI
NG_CONSTRUCTOR_INVOCATIONS, MULTIPLE_SUPER_INITIALIZERS, NEW_WITH_INVALID_TYPE_P
ARAMETERS, NON_CONST_MAP_AS_EXPRESSION_STATEMENT, NON_CONSTANT_CASE_EXPRESSION,
NON_CONSTANT_DEFAULT_VALUE, NON_CONSTANT_LIST_ELEMENT, NON_CONSTANT_MAP_KEY, NON
_CONSTANT_MAP_VALUE, NON_CONSTANT_VALUE_IN_INITIALIZER, NOT_ENOUGH_REQUIRED_ARGU
MENTS, NON_GENERATIVE_CONSTRUCTOR, OBJECT_CANNOT_EXTEND_ANOTHER_CLASS, OPTIONAL_
PARAMETER_IN_OPERATOR, PART_OF_NON_PART, PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER,
PRIVATE_OPTIONAL_PARAMETER, RECURSIVE_COMPILE_TIME_CONSTANT, RECURSIVE_CONSTRUCT
OR_REDIRECT, RECURSIVE_FACTORY_REDIRECT, RECURSIVE_FUNCTION_TYPE_ALIAS, RECURSIV
E_INTERFACE_INHERITANCE, RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS, RECU
RSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS, REDIRECT_TO_NON_CONST_CONSTRUC
TOR, REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER, RESERVED_WORD_AS_IDENTIFIER,
RETHROW_OUTSIDE_CATCH, RETURN_IN_GENERATIVE_CONSTRUCTOR, STATIC_TOP_LEVEL_FUNCT
ION, STATIC_TOP_LEVEL_VARIABLE, SUPER_IN_INVALID_CONTEXT, SUPER_IN_REDIRECTING_C
ONSTRUCTOR, SUPER_INITIALIZER_IN_OBJECT, TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS, U
NDEFINED_CLASS, UNDEFINED_CONSTRUCTOR_IN_INITIALIZER, UNDEFINED_CONSTRUCTOR_IN_I
NITIALIZER_DEFAULT, UNINITIALIZED_FINAL_FIELD, UNDEFINED_NAMED_PARAMETER, URI_DO
ES_NOT_EXIST, URI_WITH_INTERPOLATION, WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR, W
RONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS, WRONG_NUMBER_OF_PARAMETERS_FOR_SET
TER, WRONG_NUMBER_OF_TYPE_ARGUMENTS]; |
1025 final String __name; | 1504 |
1026 final int __ordinal; | 1505 /// The name of this enum constant, as declared in the enum declaration. |
1027 int get ordinal => __ordinal; | 1506 final String name; |
| 1507 |
| 1508 /// The position in the enum declaration. |
| 1509 final int ordinal; |
| 1510 |
1028 /** | 1511 /** |
1029 * The message template used to create the message to be displayed for this er
ror. | 1512 * The message template used to create the message to be displayed for this er
ror. |
1030 */ | 1513 */ |
1031 String _message; | 1514 String _message; |
| 1515 |
1032 /** | 1516 /** |
1033 * Initialize a newly created error code to have the given message. | 1517 * Initialize a newly created error code to have the given message. |
1034 * @param message the message template used to create the message to be displa
yed for the error | 1518 * @param message the message template used to create the message to be displa
yed for the error |
1035 */ | 1519 */ |
1036 CompileTimeErrorCode(this.__name, this.__ordinal, String message) { | 1520 CompileTimeErrorCode(this.name, this.ordinal, String message) { |
1037 this._message = message; | 1521 this._message = message; |
1038 } | 1522 } |
1039 ErrorSeverity get errorSeverity => ErrorType.COMPILE_TIME_ERROR.severity; | 1523 ErrorSeverity get errorSeverity => ErrorType.COMPILE_TIME_ERROR.severity; |
1040 String get message => _message; | 1524 String get message => _message; |
1041 ErrorType get type => ErrorType.COMPILE_TIME_ERROR; | 1525 ErrorType get type => ErrorType.COMPILE_TIME_ERROR; |
1042 bool needsRecompilation() => true; | 1526 int compareTo(CompileTimeErrorCode other) => ordinal - other.ordinal; |
1043 int compareTo(CompileTimeErrorCode other) => __ordinal - other.__ordinal; | 1527 String toString() => name; |
1044 String toString() => __name; | |
1045 } | 1528 } |
| 1529 |
1046 /** | 1530 /** |
1047 * The enumeration {@code StaticWarningCode} defines the error codes used for st
atic warnings. The | 1531 * The enumeration {@code StaticWarningCode} defines the error codes used for st
atic warnings. The |
1048 * convention for this class is for the name of the error code to indicate the p
roblem that caused | 1532 * convention for this class is for the name of the error code to indicate the p
roblem that caused |
1049 * the error to be generated and for the error message to explain what is wrong
and, when | 1533 * the error to be generated and for the error message to explain what is wrong
and, when |
1050 * appropriate, how the problem can be corrected. | 1534 * appropriate, how the problem can be corrected. |
1051 * @coverage dart.engine.error | 1535 * @coverage dart.engine.error |
1052 */ | 1536 */ |
1053 class StaticWarningCode implements Comparable<StaticWarningCode>, ErrorCode { | 1537 class StaticWarningCode implements Comparable<StaticWarningCode>, ErrorCode { |
| 1538 |
| 1539 /** |
| 1540 * 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i
>N</i> is introduced |
| 1541 * into the top level scope <i>L</i> by more than one import then: |
| 1542 * <ol> |
| 1543 * <li>It is a static warning if <i>N</i> is used as a type annotation. |
| 1544 * <li>In checked mode, it is a dynamic error if <i>N</i> is used as a type an
notation and |
| 1545 * referenced during a subtype test. |
| 1546 * <li>Otherwise, it is a compile-time error. |
| 1547 * </ol> |
| 1548 * @param ambiguousTypeName the name of the ambiguous type |
| 1549 * @param firstLibraryName the name of the first library that the type is foun
d |
| 1550 * @param secondLibraryName the name of the second library that the type is fo
und |
| 1551 */ |
| 1552 static final StaticWarningCode AMBIGUOUS_IMPORT = new StaticWarningCode('AMBIG
UOUS_IMPORT', 0, "The type '%s' is defined in the libraries '%s' and '%s'"); |
| 1553 |
1054 /** | 1554 /** |
1055 * 12.11.1 New: It is a static warning if the static type of <i>a<sub>i</sub>,
1 <= i <= n+ | 1555 * 12.11.1 New: It is a static warning if the static type of <i>a<sub>i</sub>,
1 <= i <= n+ |
1056 * k</i> may not be assigned to the type of the corresponding formal parameter
of the constructor | 1556 * k</i> may not be assigned to the type of the corresponding formal parameter
of the constructor |
1057 * <i>T.id</i> (respectively <i>T</i>). | 1557 * <i>T.id</i> (respectively <i>T</i>). |
1058 * <p> | 1558 * <p> |
1059 * 12.11.2 Const: It is a static warning if the static type of <i>a<sub>i</sub
>, 1 <= i <= | 1559 * 12.11.2 Const: It is a static warning if the static type of <i>a<sub>i</sub
>, 1 <= i <= |
1060 * n+ k</i> may not be assigned to the type of the corresponding formal parame
ter of the | 1560 * n+ k</i> may not be assigned to the type of the corresponding formal parame
ter of the |
1061 * constructor <i>T.id</i> (respectively <i>T</i>). | 1561 * constructor <i>T.id</i> (respectively <i>T</i>). |
1062 * <p> | 1562 * <p> |
1063 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 1563 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
1064 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s
ub>, 1 <= i <= | 1564 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s
ub>, 1 <= i <= |
1065 * n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i>
q</i> of <i>f</i>. | 1565 * n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i>
q</i> of <i>f</i>. |
1066 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 1566 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
1067 * j <= m</i>. | 1567 * j <= m</i>. |
1068 * <p> | 1568 * <p> |
1069 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub>, 1 &
lt;= i <= l</i>, | 1569 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub>, 1 &
lt;= i <= l</i>, |
1070 * must have a corresponding named parameter in the set <i>{p<sub>n+1</sub>, &
hellip; | 1570 * must have a corresponding named parameter in the set <i>{p<sub>n+1</sub>, &
hellip; |
1071 * p<sub>n+k</sub>}</i> or a static warning occurs. It is a static warning if | 1571 * p<sub>n+k</sub>}</i> or a static warning occurs. It is a static warning if |
1072 * <i>T<sub>m+j</sub></i> may not be assigned to <i>S<sub>r</sub></i>, where <
i>r = q<sub>j</sub>, | 1572 * <i>T<sub>m+j</sub></i> may not be assigned to <i>S<sub>r</sub></i>, where <
i>r = q<sub>j</sub>, |
1073 * 1 <= j <= l</i>. | 1573 * 1 <= j <= l</i>. |
1074 */ | 1574 */ |
1075 static final StaticWarningCode ARGUMENT_TYPE_NOT_ASSIGNABLE = new StaticWarnin
gCode('ARGUMENT_TYPE_NOT_ASSIGNABLE', 0, ""); | 1575 static final StaticWarningCode ARGUMENT_TYPE_NOT_ASSIGNABLE = new StaticWarnin
gCode('ARGUMENT_TYPE_NOT_ASSIGNABLE', 1, "The argument type '%s' cannot be assig
ned to the parameter type '%s'"); |
| 1576 |
1076 /** | 1577 /** |
1077 * 5 Variables: Attempting to assign to a final variable elsewhere will cause
a NoSuchMethodError | 1578 * 5 Variables: Attempting to assign to a final variable elsewhere will cause
a NoSuchMethodError |
1078 * to be thrown, because no setter is defined for it. The assignment will also
give rise to a | 1579 * to be thrown, because no setter is defined for it. The assignment will also
give rise to a |
1079 * static warning for the same reason. | 1580 * static warning for the same reason. |
1080 */ | 1581 */ |
1081 static final StaticWarningCode ASSIGNMENT_TO_FINAL = new StaticWarningCode('AS
SIGNMENT_TO_FINAL', 1, ""); | 1582 static final StaticWarningCode ASSIGNMENT_TO_FINAL = new StaticWarningCode('AS
SIGNMENT_TO_FINAL', 2, "Final variables cannot be assigned a value"); |
| 1583 |
1082 /** | 1584 /** |
1083 * 13.9 Switch: It is a static warning if the last statement of the statement
sequence | 1585 * 13.9 Switch: It is a static warning if the last statement of the statement
sequence |
1084 * <i>s<sub>k</sub></i> is not a break, continue, return or throw statement. | 1586 * <i>s<sub>k</sub></i> is not a break, continue, return or throw statement. |
1085 */ | 1587 */ |
1086 static final StaticWarningCode CASE_BLOCK_NOT_TERMINATED = new StaticWarningCo
de('CASE_BLOCK_NOT_TERMINATED', 2, ""); | 1588 static final StaticWarningCode CASE_BLOCK_NOT_TERMINATED = new StaticWarningCo
de('CASE_BLOCK_NOT_TERMINATED', 3, "The last statement of the 'case' should be '
break', 'continue', 'return' or 'throw'"); |
| 1589 |
1087 /** | 1590 /** |
1088 * 12.32 Type Cast: It is a static warning if <i>T</i> does not denote a type
available in the | 1591 * 12.32 Type Cast: It is a static warning if <i>T</i> does not denote a type
available in the |
1089 * current lexical scope. | 1592 * current lexical scope. |
1090 */ | 1593 */ |
1091 static final StaticWarningCode CAST_TO_NON_TYPE = new StaticWarningCode('CAST_
TO_NON_TYPE', 3, ""); | 1594 static final StaticWarningCode CAST_TO_NON_TYPE = new StaticWarningCode('CAST_
TO_NON_TYPE', 4, ""); |
| 1595 |
1092 /** | 1596 /** |
1093 * 16.1.2 Comments: A token of the form <i>\[new c\](uri)</i> will be replaced
by a link in the | 1597 * 16.1.2 Comments: A token of the form <i>\[new c\](uri)</i> will be replaced
by a link in the |
1094 * formatted output. The link will point at the constructor named <i>c</i> in
<i>L</i>. The title | 1598 * formatted output. The link will point at the constructor named <i>c</i> in
<i>L</i>. The title |
1095 * of the link will be <i>c</i>. It is a static warning if uri is not the URI
of a dart library | 1599 * of the link will be <i>c</i>. It is a static warning if uri is not the URI
of a dart library |
1096 * <i>L</i>, or if <i>c</i> is not the name of a constructor of a class declar
ed in the exported | 1600 * <i>L</i>, or if <i>c</i> is not the name of a constructor of a class declar
ed in the exported |
1097 * namespace of <i>L</i>. | 1601 * namespace of <i>L</i>. |
1098 */ | 1602 */ |
1099 static final StaticWarningCode COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE = new
StaticWarningCode('COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE', 4, ""); | 1603 static final StaticWarningCode COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE = new
StaticWarningCode('COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE', 5, ""); |
| 1604 |
1100 /** | 1605 /** |
1101 * 16.1.2 Comments: A token of the form <i>\[id\](uri)</i> will be replaced by
a link in the | 1606 * 16.1.2 Comments: A token of the form <i>\[id\](uri)</i> will be replaced by
a link in the |
1102 * formatted output. The link will point at the declaration named <i>id</i> in
<i>L</i>. The title | 1607 * formatted output. The link will point at the declaration named <i>id</i> in
<i>L</i>. The title |
1103 * of the link will be <i>id</i>. It is a static warning if uri is not the URI
of a dart library | 1608 * of the link will be <i>id</i>. It is a static warning if uri is not the URI
of a dart library |
1104 * <i>L</i>, or if <i>id</i> is not a name declared in the exported namespace
of <i>L</i>. | 1609 * <i>L</i>, or if <i>id</i> is not a name declared in the exported namespace
of <i>L</i>. |
1105 */ | 1610 */ |
1106 static final StaticWarningCode COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE = new
StaticWarningCode('COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE', 5, ""); | 1611 static final StaticWarningCode COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE = new
StaticWarningCode('COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE', 6, ""); |
| 1612 |
1107 /** | 1613 /** |
1108 * 16.1.2 Comments: It is a static warning if <i>c</i> does not denote a const
ructor that | 1614 * 16.1.2 Comments: It is a static warning if <i>c</i> does not denote a const
ructor that |
1109 * available in the scope of the documentation comment. | 1615 * available in the scope of the documentation comment. |
1110 */ | 1616 */ |
1111 static final StaticWarningCode COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR = new
StaticWarningCode('COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR', 6, ""); | 1617 static final StaticWarningCode COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR = new
StaticWarningCode('COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR', 7, ""); |
| 1618 |
1112 /** | 1619 /** |
1113 * 16.1.2 Comments: It is a static warning if <i>id</i> does not denote a decl
aration that | 1620 * 16.1.2 Comments: It is a static warning if <i>id</i> does not denote a decl
aration that |
1114 * available in the scope of the documentation comment. | 1621 * available in the scope of the documentation comment. |
1115 */ | 1622 */ |
1116 static final StaticWarningCode COMMENT_REFERENCE_UNDECLARED_IDENTIFIER = new S
taticWarningCode('COMMENT_REFERENCE_UNDECLARED_IDENTIFIER', 7, ""); | 1623 static final StaticWarningCode COMMENT_REFERENCE_UNDECLARED_IDENTIFIER = new S
taticWarningCode('COMMENT_REFERENCE_UNDECLARED_IDENTIFIER', 8, ""); |
| 1624 |
1117 /** | 1625 /** |
1118 * 16.1.2 Comments: A token of the form <i>\[id\](uri)</i> will be replaced by
a link in the | 1626 * 16.1.2 Comments: A token of the form <i>\[id\](uri)</i> will be replaced by
a link in the |
1119 * formatted output. The link will point at the declaration named <i>id</i> in
<i>L</i>. The title | 1627 * formatted output. The link will point at the declaration named <i>id</i> in
<i>L</i>. The title |
1120 * of the link will be <i>id</i>. It is a static warning if uri is not the URI
of a dart library | 1628 * of the link will be <i>id</i>. It is a static warning if uri is not the URI
of a dart library |
1121 * <i>L</i>, or if <i>id</i> is not a name declared in the exported namespace
of <i>L</i>. | 1629 * <i>L</i>, or if <i>id</i> is not a name declared in the exported namespace
of <i>L</i>. |
1122 */ | 1630 */ |
1123 static final StaticWarningCode COMMENT_REFERENCE_URI_NOT_LIBRARY = new StaticW
arningCode('COMMENT_REFERENCE_URI_NOT_LIBRARY', 8, ""); | 1631 static final StaticWarningCode COMMENT_REFERENCE_URI_NOT_LIBRARY = new StaticW
arningCode('COMMENT_REFERENCE_URI_NOT_LIBRARY', 9, ""); |
| 1632 |
1124 /** | 1633 /** |
1125 * 7.4 Abstract Instance Members: It is a static warning if an abstract member
is declared or | 1634 * 7.4 Abstract Instance Members: It is a static warning if an abstract member
is declared or |
1126 * inherited in a concrete class. | 1635 * inherited in a concrete class. |
1127 */ | 1636 */ |
1128 static final StaticWarningCode CONCRETE_CLASS_WITH_ABSTRACT_MEMBER = new Stati
cWarningCode('CONCRETE_CLASS_WITH_ABSTRACT_MEMBER', 9, "'%s' must have a method
body because '%s' is not abstract"); | 1637 static final StaticWarningCode CONCRETE_CLASS_WITH_ABSTRACT_MEMBER = new Stati
cWarningCode('CONCRETE_CLASS_WITH_ABSTRACT_MEMBER', 10, "'%s' must have a method
body because '%s' is not abstract"); |
| 1638 |
1129 /** | 1639 /** |
1130 * 7.2 Getters: It is a static warning if a class <i>C</i> declares an instanc
e getter named | 1640 * 7.2 Getters: It is a static warning if a class <i>C</i> declares an instanc
e getter named |
1131 * <i>v</i> and an accessible static member named <i>v</i> or <i>v=</i> is dec
lared in a | 1641 * <i>v</i> and an accessible static member named <i>v</i> or <i>v=</i> is dec
lared in a |
1132 * superclass of <i>C</i>. | 1642 * superclass of <i>C</i>. |
1133 */ | 1643 * @param superName the name of the super class declaring a static member |
1134 static final StaticWarningCode CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMB
ER = new StaticWarningCode('CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER',
10, ""); | 1644 */ |
| 1645 static final StaticWarningCode CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMB
ER = new StaticWarningCode('CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER',
11, "Superclass '%s' declares static member with the same name"); |
| 1646 |
1135 /** | 1647 /** |
1136 * 7.3 Setters: It is a static warning if a class <i>C</i> declares an instanc
e setter named | 1648 * 7.3 Setters: It is a static warning if a class <i>C</i> declares an instanc
e setter named |
1137 * <i>v=</i> and an accessible static member named <i>v=</i> or <i>v</i> is de
clared in a | 1649 * <i>v=</i> and an accessible static member named <i>v=</i> or <i>v</i> is de
clared in a |
1138 * superclass of <i>C</i>. | 1650 * superclass of <i>C</i>. |
1139 */ | 1651 * @param superName the name of the super class declaring a static member |
1140 static final StaticWarningCode CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMB
ER = new StaticWarningCode('CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER',
11, ""); | 1652 */ |
| 1653 static final StaticWarningCode CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMB
ER = new StaticWarningCode('CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER',
12, "Superclass '%s' declares static member with the same name"); |
| 1654 |
1141 /** | 1655 /** |
1142 * 7.2 Getters: It is a static warning if a class declares a static getter nam
ed <i>v</i> and also | 1656 * 7.2 Getters: It is a static warning if a class declares a static getter nam
ed <i>v</i> and also |
1143 * has a non-static setter named <i>v=</i>. | 1657 * has a non-static setter named <i>v=</i>. |
1144 */ | 1658 */ |
1145 static final StaticWarningCode CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER =
new StaticWarningCode('CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER', 12, ""); | 1659 static final StaticWarningCode CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER =
new StaticWarningCode('CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER', 13, "Cla
ss '%s' declares non-static setter with the same name"); |
| 1660 |
1146 /** | 1661 /** |
1147 * 7.3 Setters: It is a static warning if a class declares a static setter nam
ed <i>v=</i> and | 1662 * 7.3 Setters: It is a static warning if a class declares a static setter nam
ed <i>v=</i> and |
1148 * also has a non-static member named <i>v</i>. | 1663 * also has a non-static member named <i>v</i>. |
1149 */ | 1664 */ |
1150 static final StaticWarningCode CONFLICTING_STATIC_SETTER_AND_INSTANCE_GETTER =
new StaticWarningCode('CONFLICTING_STATIC_SETTER_AND_INSTANCE_GETTER', 13, ""); | 1665 static final StaticWarningCode CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER =
new StaticWarningCode('CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER', 14, "Cla
ss '%s' declares non-static member with the same name"); |
| 1666 |
1151 /** | 1667 /** |
1152 * 12.11.2 Const: Given an instance creation expression of the form <i>const q
(a<sub>1</sub>, | 1668 * 12.11.2 Const: Given an instance creation expression of the form <i>const q
(a<sub>1</sub>, |
1153 * … a<sub>n</sub>)</i> it is a static warning if <i>q</i> is the const
ructor of an | 1669 * … a<sub>n</sub>)</i> it is a static warning if <i>q</i> is the const
ructor of an |
1154 * abstract class but <i>q</i> is not a factory constructor. | 1670 * abstract class but <i>q</i> is not a factory constructor. |
1155 */ | 1671 */ |
1156 static final StaticWarningCode CONST_WITH_ABSTRACT_CLASS = new StaticWarningCo
de('CONST_WITH_ABSTRACT_CLASS', 14, "Abstract classes cannot be created with a '
const' expression"); | 1672 static final StaticWarningCode CONST_WITH_ABSTRACT_CLASS = new StaticWarningCo
de('CONST_WITH_ABSTRACT_CLASS', 15, "Abstract classes cannot be created with a '
const' expression"); |
| 1673 |
1157 /** | 1674 /** |
1158 * 12.7 Maps: It is a static warning if the values of any two keys in a map li
teral are equal. | 1675 * 12.7 Maps: It is a static warning if the values of any two keys in a map li
teral are equal. |
1159 */ | 1676 */ |
1160 static final StaticWarningCode EQUAL_KEYS_IN_MAP = new StaticWarningCode('EQUA
L_KEYS_IN_MAP', 15, "Keys in a map cannot be equal"); | 1677 static final StaticWarningCode EQUAL_KEYS_IN_MAP = new StaticWarningCode('EQUA
L_KEYS_IN_MAP', 16, "Keys in a map cannot be equal"); |
| 1678 |
| 1679 /** |
| 1680 * 14.2 Exports: It is a static warning to export two different libraries with
the same name. |
| 1681 * @param uri1 the uri pointing to a first library |
| 1682 * @param uri2 the uri pointing to a second library |
| 1683 * @param name the shared name of the exported libraries |
| 1684 */ |
| 1685 static final StaticWarningCode EXPORT_DUPLICATED_LIBRARY_NAME = new StaticWarn
ingCode('EXPORT_DUPLICATED_LIBRARY_NAME', 17, "The exported libraries '%s' and '
%s' should not have the same name '%s'"); |
| 1686 |
| 1687 /** |
| 1688 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i>
or if <i>m > n</i>. |
| 1689 * @param requiredCount the maximum number of positional arguments |
| 1690 * @param argumentCount the actual number of positional arguments given |
| 1691 */ |
| 1692 static final StaticWarningCode EXTRA_POSITIONAL_ARGUMENTS = new StaticWarningC
ode('EXTRA_POSITIONAL_ARGUMENTS', 18, "%d positional arguments expected, but %d
found"); |
| 1693 |
| 1694 /** |
| 1695 * 7.6.1 Generative Constructors: Execution of an initializer of the form <b>t
his</b>.<i>v</i> = |
| 1696 * <i>e</i> proceeds as follows: First, the expression <i>e</i> is evaluated t
o an object |
| 1697 * <i>o</i>. Then, the instance variable <i>v</i> of the object denoted by thi
s is bound to |
| 1698 * <i>o</i>. |
| 1699 * <p> |
| 1700 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
| 1701 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s
ub>, 1 <= i <= |
| 1702 * n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i>
q</i> of <i>f</i>. |
| 1703 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
| 1704 * j <= m</i>. |
| 1705 * @param initializerType the name of the type of the initializer expression |
| 1706 * @param fieldType the name of the type of the field |
| 1707 */ |
| 1708 static final StaticWarningCode FIELD_INITIALIZER_NOT_ASSIGNABLE = new StaticWa
rningCode('FIELD_INITIALIZER_NOT_ASSIGNABLE', 19, "The initializer type '%s' can
not be assigned to the field type '%s'"); |
| 1709 |
1161 /** | 1710 /** |
1162 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a | 1711 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a |
1163 * static warning if the static type of <i>id</i> is not assignable to <i>T<su
b>id</sub></i>. | 1712 * static warning if the static type of <i>id</i> is not assignable to <i>T<su
b>id</sub></i>. |
1164 * @param parameterType the name of the type of the field formal parameter | 1713 * @param parameterType the name of the type of the field formal parameter |
1165 * @param fieldType the name of the type of the field | 1714 * @param fieldType the name of the type of the field |
1166 */ | 1715 */ |
1167 static final StaticWarningCode FIELD_INITIALIZER_WITH_INVALID_TYPE = new Stati
cWarningCode('FIELD_INITIALIZER_WITH_INVALID_TYPE', 16, "The parameter type '%s'
is incompatable with the field type '%s'"); | 1716 static final StaticWarningCode FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE = new
StaticWarningCode('FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE', 20, "The parameter
type '%s' is incompatable with the field type '%s'"); |
| 1717 |
| 1718 /** |
| 1719 * 14.1 Imports: It is a static warning to import two different libraries with
the same name. |
| 1720 * @param uri1 the uri pointing to a first library |
| 1721 * @param uri2 the uri pointing to a second library |
| 1722 * @param name the shared name of the imported libraries |
| 1723 */ |
| 1724 static final StaticWarningCode IMPORT_DUPLICATED_LIBRARY_NAME = new StaticWarn
ingCode('IMPORT_DUPLICATED_LIBRARY_NAME', 21, "The imported libraries '%s' and '
%s' should not have the same name '%s'"); |
| 1725 |
| 1726 /** |
| 1727 * 8.1.1 Inheritance and Overriding: However, if there are multiple members <i
>m<sub>1</sub>, |
| 1728 * … m<sub>k</sub></i> with the same name <i>n</i> that would be inheri
ted (because |
| 1729 * identically named members existed in several superinterfaces) then at most
one member is |
| 1730 * inherited. |
| 1731 * <p> |
| 1732 * If some but not all of the <i>m<sub>i</sub>, 1 <= i <= k</i>, are get
ters, or if some but |
| 1733 * not all of the <i>m<sub>i</sub></i> are setters, none of the <i>m<sub>i</su
b></i> are |
| 1734 * inherited, and a static warning is issued. |
| 1735 */ |
| 1736 static final StaticWarningCode INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METH
OD = new StaticWarningCode('INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD',
22, "'%s' is inherited as a getter and also a method"); |
| 1737 |
1168 /** | 1738 /** |
1169 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > | 1739 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > |
1170 * n</i>. | 1740 * n</i>. |
1171 */ | 1741 */ |
1172 static final StaticWarningCode INCORRECT_NUMBER_OF_ARGUMENTS = new StaticWarni
ngCode('INCORRECT_NUMBER_OF_ARGUMENTS', 17, ""); | 1742 static final StaticWarningCode INCORRECT_NUMBER_OF_ARGUMENTS = new StaticWarni
ngCode('INCORRECT_NUMBER_OF_ARGUMENTS', 23, ""); |
| 1743 |
1173 /** | 1744 /** |
1174 * 7.1 Instance Methods: It is a static warning if a class <i>C</i> declares a
n instance method | 1745 * 7.1 Instance Methods: It is a static warning if a class <i>C</i> declares a
n instance method |
1175 * named <i>n</i> and an accessible static member named <i>n</i> is declared i
n a superclass of | 1746 * named <i>n</i> and an accessible static member named <i>n</i> is declared i
n a superclass of |
1176 * <i>C</i>. | 1747 * <i>C</i>. |
1177 */ | 1748 * @param memberName the name of the member with the name conflict |
1178 static final StaticWarningCode INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_S
TATIC = new StaticWarningCode('INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STA
TIC', 18, ""); | 1749 * @param superclassName the name of the enclosing class that has the static m
ember |
| 1750 */ |
| 1751 static final StaticWarningCode INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_S
TATIC = new StaticWarningCode('INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STA
TIC', 24, "'%s' collides with a static member in the superclass '%s'"); |
| 1752 |
1179 /** | 1753 /** |
1180 * 7.6.2 Factories: It is a static warning if <i>M.id</i> is not a constructor
name. | 1754 * 7.6.2 Factories: It is a static warning if <i>M.id</i> is not a constructor
name. |
1181 */ | 1755 */ |
1182 static final StaticWarningCode INVALID_FACTORY_NAME = new StaticWarningCode('I
NVALID_FACTORY_NAME', 19, ""); | 1756 static final StaticWarningCode INVALID_FACTORY_NAME = new StaticWarningCode('I
NVALID_FACTORY_NAME', 25, ""); |
| 1757 |
1183 /** | 1758 /** |
1184 * 7.2 Getters: It is a static warning if a getter <i>m1</i> overrides a gette
r <i>m2</i> and the | 1759 * 7.2 Getters: It is a static warning if a getter <i>m1</i> overrides a gette
r <i>m2</i> and the |
1185 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>. | 1760 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>. |
1186 */ | 1761 * @param actualReturnTypeName the name of the expected return type |
1187 static final StaticWarningCode INVALID_OVERRIDE_GETTER_TYPE = new StaticWarnin
gCode('INVALID_OVERRIDE_GETTER_TYPE', 20, ""); | 1762 * @param expectedReturnType the name of the actual return type, not assignabl
e to the |
1188 /** | 1763 * actualReturnTypeName |
1189 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 1764 * @param className the name of the class where the overridden getter is decla
red |
1190 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. | 1765 * @see #INVALID_METHOD_OVERRIDE_RETURN_TYPE |
1191 */ | 1766 */ |
1192 static final StaticWarningCode INVALID_OVERRIDE_RETURN_TYPE = new StaticWarnin
gCode('INVALID_OVERRIDE_RETURN_TYPE', 21, ""); | 1767 static final StaticWarningCode INVALID_GETTER_OVERRIDE_RETURN_TYPE = new Stati
cWarningCode('INVALID_GETTER_OVERRIDE_RETURN_TYPE', 26, "The return type '%s' is
not assignable to '%s' as required from getter it is overriding from '%s'"); |
| 1768 |
| 1769 /** |
| 1770 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
| 1771 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. |
| 1772 * @param actualParamTypeName the name of the expected parameter type |
| 1773 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the |
| 1774 * actualParamTypeName |
| 1775 * @param className the name of the class where the overridden method is decla
red |
| 1776 */ |
| 1777 static final StaticWarningCode INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE = new
StaticWarningCode('INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE', 27, "The parameter
type '%s' is not assignable to '%s' as required from method it is overriding fr
om '%s'"); |
| 1778 |
| 1779 /** |
| 1780 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
| 1781 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. |
| 1782 * @param actualParamTypeName the name of the expected parameter type |
| 1783 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the |
| 1784 * actualParamTypeName |
| 1785 * @param className the name of the class where the overridden method is decla
red |
| 1786 * @see #INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE |
| 1787 */ |
| 1788 static final StaticWarningCode INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE = new
StaticWarningCode('INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE', 28, "The paramet
er type '%s' is not assignable to '%s' as required by the method it is overridin
g from '%s'"); |
| 1789 |
| 1790 /** |
| 1791 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
| 1792 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. |
| 1793 * @param actualParamTypeName the name of the expected parameter type |
| 1794 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the |
| 1795 * actualParamTypeName |
| 1796 * @param className the name of the class where the overridden method is decla
red |
| 1797 */ |
| 1798 static final StaticWarningCode INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE = n
ew StaticWarningCode('INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE', 29, "The par
ameter type '%s' is not assignable to '%s' as required from method it is overrid
ing from '%s'"); |
| 1799 |
| 1800 /** |
| 1801 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
| 1802 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. |
| 1803 * @param actualReturnTypeName the name of the expected return type |
| 1804 * @param expectedReturnType the name of the actual return type, not assignabl
e to the |
| 1805 * actualReturnTypeName |
| 1806 * @param className the name of the class where the overridden method is decla
red |
| 1807 * @see #INVALID_GETTER_OVERRIDE_RETURN_TYPE |
| 1808 */ |
| 1809 static final StaticWarningCode INVALID_METHOD_OVERRIDE_RETURN_TYPE = new Stati
cWarningCode('INVALID_METHOD_OVERRIDE_RETURN_TYPE', 30, "The return type '%s' is
not assignable to '%s' as required from method it is overriding from '%s'"); |
| 1810 |
| 1811 /** |
| 1812 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
| 1813 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies
a default value for |
| 1814 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff
erent default value |
| 1815 * for <i>p</i>. |
| 1816 */ |
| 1817 static final StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES = new
StaticWarningCode('INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES', 31, ""); |
| 1818 |
1193 /** | 1819 /** |
1194 * 7.3 Setters: It is a static warning if a setter <i>m1</i> overrides a sette
r <i>m2</i> and the | 1820 * 7.3 Setters: It is a static warning if a setter <i>m1</i> overrides a sette
r <i>m2</i> and the |
1195 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>. | 1821 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>. |
1196 */ | 1822 * @param actualParamTypeName the name of the expected parameter type |
1197 static final StaticWarningCode INVALID_OVERRIDE_SETTER_RETURN_TYPE = new Stati
cWarningCode('INVALID_OVERRIDE_SETTER_RETURN_TYPE', 22, ""); | 1823 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the |
| 1824 * actualParamTypeName |
| 1825 * @param className the name of the class where the overridden setter is decla
red |
| 1826 * @see #INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE |
| 1827 */ |
| 1828 static final StaticWarningCode INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE = new
StaticWarningCode('INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE', 32, "The paramet
er type '%s' is not assignable to '%s' as required by the setter it is overridin
g from '%s'"); |
| 1829 |
1198 /** | 1830 /** |
1199 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form | 1831 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form |
1200 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … | 1832 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … |
1201 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. If <i>S.m</i> exists, it is a static
warning if the type | 1833 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. If <i>S.m</i> exists, it is a static
warning if the type |
1202 * <i>F</i> of <i>S.m</i> may not be assigned to a function type. | 1834 * <i>F</i> of <i>S.m</i> may not be assigned to a function type. |
1203 */ | 1835 */ |
1204 static final StaticWarningCode INVOCATION_OF_NON_FUNCTION = new StaticWarningC
ode('INVOCATION_OF_NON_FUNCTION', 23, ""); | 1836 static final StaticWarningCode INVOCATION_OF_NON_FUNCTION = new StaticWarningC
ode('INVOCATION_OF_NON_FUNCTION', 33, ""); |
| 1837 |
| 1838 /** |
| 1839 * 15.1 Static Types: A type <i>T</i> is malformed iff: <li><i>T</i> has the f
orm <i>id</i> or the |
| 1840 * form <i>prefix.id</i>, and in the enclosing lexical scope, the name <i>id</
i> (respectively |
| 1841 * <i>prefix.id</i>) does not denote a type.</li> <li><i>T</i> denotes a type
variable in the |
| 1842 * enclosing lexical scope, but occurs in the signature or body of a static me
mber.</li> <li> |
| 1843 * <i>T</i> is a parameterized type of the form <i>G<S<sub>1</sub>, .., S<s
ub>n</sub>></i>, |
| 1844 * and <i>G</i> is malformed.</li></ul> |
| 1845 * <p> |
| 1846 * Any use of a malformed type gives rise to a static warning. |
| 1847 */ |
| 1848 static final StaticWarningCode MALFORMED_TYPE = new StaticWarningCode('MALFORM
ED_TYPE', 34, ""); |
| 1849 |
1205 /** | 1850 /** |
1206 * 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i>
with argument type | 1851 * 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i>
with argument type |
1207 * <i>T</i> and a getter named <i>v</i> with return type <i>S</i>, and <i>T</i
> may not be | 1852 * <i>T</i> and a getter named <i>v</i> with return type <i>S</i>, and <i>T</i
> may not be |
1208 * assigned to <i>S</i>. | 1853 * assigned to <i>S</i>. |
1209 */ | 1854 */ |
1210 static final StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES = new Static
WarningCode('MISMATCHED_GETTER_AND_SETTER_TYPES', 24, ""); | 1855 static final StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES = new Static
WarningCode('MISMATCHED_GETTER_AND_SETTER_TYPES', 35, "The parameter type for se
tter '%s' is %s which is not assignable to its getter (of type %s)"); |
| 1856 |
1211 /** | 1857 /** |
1212 * 12.11.1 New: It is a static warning if <i>q</i> is a constructor of an abst
ract class and | 1858 * 12.11.1 New: It is a static warning if <i>q</i> is a constructor of an abst
ract class and |
1213 * <i>q</i> is not a factory constructor. | 1859 * <i>q</i> is not a factory constructor. |
1214 */ | 1860 */ |
1215 static final StaticWarningCode NEW_WITH_ABSTRACT_CLASS = new StaticWarningCode
('NEW_WITH_ABSTRACT_CLASS', 25, "Abstract classes cannot be created with a 'new'
expression"); | 1861 static final StaticWarningCode NEW_WITH_ABSTRACT_CLASS = new StaticWarningCode
('NEW_WITH_ABSTRACT_CLASS', 36, "Abstract classes cannot be created with a 'new'
expression"); |
| 1862 |
1216 /** | 1863 /** |
1217 * 12.11.1 New: It is a static warning if <i>T</i> is not a class accessible i
n the current scope, | 1864 * 12.11.1 New: It is a static warning if <i>T</i> is not a class accessible i
n the current scope, |
1218 * optionally followed by type arguments. | 1865 * optionally followed by type arguments. |
1219 */ | 1866 * @param name the name of the non-type element |
1220 static final StaticWarningCode NEW_WITH_NON_TYPE = new StaticWarningCode('NEW_
WITH_NON_TYPE', 26, ""); | 1867 */ |
| 1868 static final StaticWarningCode NEW_WITH_NON_TYPE = new StaticWarningCode('NEW_
WITH_NON_TYPE', 37, "The name '%s' is not a class"); |
| 1869 |
1221 /** | 1870 /** |
1222 * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the
current scope then: | 1871 * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the
current scope then: |
1223 * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, …, a<sub>n<
/sub>, | 1872 * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, …, a<sub>n<
/sub>, |
1224 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a | 1873 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a |
1225 * static warning if <i>T.id</i> is not the name of a constructor declared by
the type <i>T</i>. | 1874 * static warning if <i>T.id</i> is not the name of a constructor declared by
the type <i>T</i>. |
1226 * If <i>e</i> of the form <i>new T(a<sub>1</sub>, …, a<sub>n</sub>, x<
sub>n+1</sub>: | 1875 * If <i>e</i> of the form <i>new T(a<sub>1</sub>, …, a<sub>n</sub>, x<
sub>n+1</sub>: |
1227 * a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a sta
tic warning if the | 1876 * a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a sta
tic warning if the |
1228 * type <i>T</i> does not declare a constructor with the same name as the decl
aration of <i>T</i>. | 1877 * type <i>T</i> does not declare a constructor with the same name as the decl
aration of <i>T</i>. |
1229 */ | 1878 */ |
1230 static final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR = new StaticWarn
ingCode('NEW_WITH_UNDEFINED_CONSTRUCTOR', 27, ""); | 1879 static final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR = new StaticWarn
ingCode('NEW_WITH_UNDEFINED_CONSTRUCTOR', 38, "The class '%s' does not have a co
nstructor '%s'"); |
| 1880 |
1231 /** | 1881 /** |
| 1882 * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the
current scope then: |
| 1883 * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, …, a<sub>n<
/sub>, |
| 1884 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a |
| 1885 * static warning if <i>T.id</i> is not the name of a constructor declared by
the type <i>T</i>. |
| 1886 * If <i>e</i> of the form <i>new T(a<sub>1</sub>, …, a<sub>n</sub>, x<
sub>n+1</sub>: |
| 1887 * a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a sta
tic warning if the |
| 1888 * type <i>T</i> does not declare a constructor with the same name as the decl
aration of <i>T</i>. |
| 1889 */ |
| 1890 static final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = new St
aticWarningCode('NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 39, "The class '%s' do
es not have a default constructor"); |
| 1891 |
| 1892 /** |
| 1893 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an |
| 1894 * abstract method. |
| 1895 * <p> |
1232 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class | 1896 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class |
1233 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a | 1897 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a |
1234 * corresponding instance member <i>m</i>. | 1898 * corresponding instance member <i>m</i>. |
| 1899 * @param enclosingClass enclosing class of the first missing member |
| 1900 * @param name first member name |
| 1901 * @param enclosingClass enclosing class of the second missing member |
| 1902 * @param name second member name |
| 1903 * @param enclosingClass enclosing class of the third missing member |
| 1904 * @param name third member name |
| 1905 * @param enclosingClass enclosing class of the fourth missing member |
| 1906 * @param name fourth member name |
| 1907 * @param additionalCount the number of additional missing members that aren't
listed |
1235 */ | 1908 */ |
1236 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER = n
ew StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER', 28, ""); | 1909 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIV
E_PLUS = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE
_PLUS', 40, "Missing inherited members '%s.%s', '%s.%s', '%s.%s', '%s.%s' and %d
more"); |
| 1910 |
1237 /** | 1911 /** |
1238 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an | 1912 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an |
1239 * abstract method. | 1913 * abstract method. |
| 1914 * <p> |
| 1915 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class |
| 1916 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a |
| 1917 * corresponding instance member <i>m</i>. |
| 1918 * @param enclosingClass enclosing class of the first missing member |
| 1919 * @param name first member name |
| 1920 * @param enclosingClass enclosing class of the second missing member |
| 1921 * @param name second member name |
| 1922 * @param enclosingClass enclosing class of the third missing member |
| 1923 * @param name third member name |
| 1924 * @param enclosingClass enclosing class of the fourth missing member |
| 1925 * @param name fourth member name |
1240 */ | 1926 */ |
1241 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_METHOD = n
ew StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_METHOD', 29, ""); | 1927 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOU
R = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR', 41
, "Missing inherited members '%s.%s', '%s.%s', '%s.%s' and '%s.%s'"); |
| 1928 |
| 1929 /** |
| 1930 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an |
| 1931 * abstract method. |
| 1932 * <p> |
| 1933 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class |
| 1934 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a |
| 1935 * corresponding instance member <i>m</i>. |
| 1936 * @param enclosingClass enclosing class of the missing member |
| 1937 * @param name member name |
| 1938 */ |
| 1939 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE
= new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE', 42,
"Missing inherited member '%s.%s'"); |
| 1940 |
| 1941 /** |
| 1942 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an |
| 1943 * abstract method. |
| 1944 * <p> |
| 1945 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class |
| 1946 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a |
| 1947 * corresponding instance member <i>m</i>. |
| 1948 * @param enclosingClass enclosing class of the first missing member |
| 1949 * @param name first member name |
| 1950 * @param enclosingClass enclosing class of the second missing member |
| 1951 * @param name second member name |
| 1952 * @param enclosingClass enclosing class of the third missing member |
| 1953 * @param name third member name |
| 1954 */ |
| 1955 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THR
EE = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE',
43, "Missing inherited members '%s.%s', '%s.%s' and '%s.%s'"); |
| 1956 |
| 1957 /** |
| 1958 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an |
| 1959 * abstract method. |
| 1960 * <p> |
| 1961 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class |
| 1962 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a |
| 1963 * corresponding instance member <i>m</i>. |
| 1964 * @param enclosingClass enclosing class of the first missing member |
| 1965 * @param name first member name |
| 1966 * @param enclosingClass enclosing class of the second missing member |
| 1967 * @param name second member name |
| 1968 */ |
| 1969 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO
= new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO', 44,
"Missing inherited members '%s.%s' and '%s.%s'"); |
| 1970 |
1242 /** | 1971 /** |
1243 * 12.31 Type Test: It is a static warning if <i>T</i> does not denote a type
available in the | 1972 * 12.31 Type Test: It is a static warning if <i>T</i> does not denote a type
available in the |
1244 * current lexical scope. | 1973 * current lexical scope. |
1245 */ | 1974 */ |
1246 static final StaticWarningCode NON_TYPE = new StaticWarningCode('NON_TYPE', 30
, ""); | 1975 static final StaticWarningCode NON_TYPE = new StaticWarningCode('NON_TYPE', 45
, ""); |
| 1976 |
1247 /** | 1977 /** |
1248 * 13.10 Try: An on-catch clause of the form <i>on T catch (p<sub>1</sub>, p<s
ub>2</sub>) s</i> or | 1978 * 13.11 Try: An on-catch clause of the form <i>on T catch (p<sub>1</sub>, p<s
ub>2</sub>) s</i> or |
1249 * <i>on T s</i> matches an object <i>o</i> if the type of <i>o</i> is a subty
pe of <i>T</i>. It | 1979 * <i>on T s</i> matches an object <i>o</i> if the type of <i>o</i> is a subty
pe of <i>T</i>. It |
1250 * is a static warning if <i>T</i> does not denote a type available in the lex
ical scope of the | 1980 * is a static warning if <i>T</i> does not denote a type available in the lex
ical scope of the |
1251 * catch clause. | 1981 * catch clause. |
| 1982 * @param name the name of the non-type element |
1252 */ | 1983 */ |
1253 static final StaticWarningCode NON_TYPE_IN_CATCH_CLAUSE = new StaticWarningCod
e('NON_TYPE_IN_CATCH_CLAUSE', 31, ""); | 1984 static final StaticWarningCode NON_TYPE_IN_CATCH_CLAUSE = new StaticWarningCod
e('NON_TYPE_IN_CATCH_CLAUSE', 46, "The name '%s' is not a type and cannot be use
d in an on-catch clause"); |
| 1985 |
1254 /** | 1986 /** |
1255 * 7.1.1 Operators: It is a static warning if the return type of the user-decl
ared operator \[\]= is | 1987 * 7.1.1 Operators: It is a static warning if the return type of the user-decl
ared operator \[\]= is |
1256 * explicitly declared and not void. | 1988 * explicitly declared and not void. |
1257 */ | 1989 */ |
1258 static final StaticWarningCode NON_VOID_RETURN_FOR_OPERATOR = new StaticWarnin
gCode('NON_VOID_RETURN_FOR_OPERATOR', 32, ""); | 1990 static final StaticWarningCode NON_VOID_RETURN_FOR_OPERATOR = new StaticWarnin
gCode('NON_VOID_RETURN_FOR_OPERATOR', 47, "The return type of the operator []= m
ust be 'void'"); |
| 1991 |
1259 /** | 1992 /** |
1260 * 7.3 Setters: It is a static warning if a setter declares a return type othe
r than void. | 1993 * 7.3 Setters: It is a static warning if a setter declares a return type othe
r than void. |
1261 */ | 1994 */ |
1262 static final StaticWarningCode NON_VOID_RETURN_FOR_SETTER = new StaticWarningC
ode('NON_VOID_RETURN_FOR_SETTER', 33, ""); | 1995 static final StaticWarningCode NON_VOID_RETURN_FOR_SETTER = new StaticWarningC
ode('NON_VOID_RETURN_FOR_SETTER', 48, "The return type of the setter must be 'vo
id'"); |
| 1996 |
1263 /** | 1997 /** |
1264 * 8 Interfaces: It is a static warning if an interface member <i>m1</i> overr
ides an interface | 1998 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i>
or if <i>m > n</i>. |
1265 * member <i>m2</i> and the type of <i>m1</i> is not a subtype of the type of
<i>m2</i>. | 1999 * @param requiredCount the expected number of required arguments |
| 2000 * @param argumentCount the actual number of positional arguments given |
1266 */ | 2001 */ |
1267 static final StaticWarningCode OVERRIDE_NOT_SUBTYPE = new StaticWarningCode('O
VERRIDE_NOT_SUBTYPE', 34, ""); | 2002 static final StaticWarningCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new StaticWarni
ngCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', 49, "%d required argument(s) expected, b
ut %d found"); |
1268 /** | 2003 |
1269 * 8 Interfaces: It is a static warning if an interface method <i>m1</i> overr
ides an interface | |
1270 * method <i>m2</i>, the signature of <i>m2</i> explicitly specifies a default
value for a formal | |
1271 * parameter <i>p</i> and the signature of <i>m1</i> specifies a different def
ault value for | |
1272 * <i>p</i>. | |
1273 */ | |
1274 static final StaticWarningCode OVERRIDE_WITH_DIFFERENT_DEFAULT = new StaticWar
ningCode('OVERRIDE_WITH_DIFFERENT_DEFAULT', 35, ""); | |
1275 /** | 2004 /** |
1276 * 14.3 Parts: It is a static warning if the referenced part declaration <i>p<
/i> names a library | 2005 * 14.3 Parts: It is a static warning if the referenced part declaration <i>p<
/i> names a library |
1277 * other than the current library as the library to which <i>p</i> belongs. | 2006 * other than the current library as the library to which <i>p</i> belongs. |
1278 * @param expectedLibraryName the name of expected library name | 2007 * @param expectedLibraryName the name of expected library name |
1279 * @param actualLibraryName the non-matching actual library name from the "par
t of" declaration | 2008 * @param actualLibraryName the non-matching actual library name from the "par
t of" declaration |
1280 */ | 2009 */ |
1281 static final StaticWarningCode PART_OF_DIFFERENT_LIBRARY = new StaticWarningCo
de('PART_OF_DIFFERENT_LIBRARY', 36, "Expected this library to be part of '%s', n
ot '%s'"); | 2010 static final StaticWarningCode PART_OF_DIFFERENT_LIBRARY = new StaticWarningCo
de('PART_OF_DIFFERENT_LIBRARY', 50, "Expected this library to be part of '%s', n
ot '%s'"); |
| 2011 |
1282 /** | 2012 /** |
1283 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> i
s not a subtype of | 2013 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> i
s not a subtype of |
1284 * the type of <i>k</i>. | 2014 * the type of <i>k</i>. |
| 2015 * @param redirectedName the name of the redirected constructor |
| 2016 * @param redirectingName the name of the redirecting constructor |
1285 */ | 2017 */ |
1286 static final StaticWarningCode REDIRECT_TO_INVALID_RETURN_TYPE = new StaticWar
ningCode('REDIRECT_TO_INVALID_RETURN_TYPE', 37, ""); | 2018 static final StaticWarningCode REDIRECT_TO_INVALID_FUNCTION_TYPE = new StaticW
arningCode('REDIRECT_TO_INVALID_FUNCTION_TYPE', 51, "The redirected constructor
'%s' has incompatible parameters with '%s'"); |
| 2019 |
| 2020 /** |
| 2021 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> i
s not a subtype of |
| 2022 * the type of <i>k</i>. |
| 2023 * @param redirectedName the name of the redirected constructor return type |
| 2024 * @param redirectingName the name of the redirecting constructor return type |
| 2025 */ |
| 2026 static final StaticWarningCode REDIRECT_TO_INVALID_RETURN_TYPE = new StaticWar
ningCode('REDIRECT_TO_INVALID_RETURN_TYPE', 52, "The return type '%s' of the red
irected constructor is not a subclass of '%s'"); |
| 2027 |
1287 /** | 2028 /** |
1288 * 7.6.2 Factories: It is a static warning if type does not denote a class acc
essible in the | 2029 * 7.6.2 Factories: It is a static warning if type does not denote a class acc
essible in the |
1289 * current scope; if type does denote such a class <i>C</i> it is a static war
ning if the | 2030 * current scope; if type does denote such a class <i>C</i> it is a static war
ning if the |
1290 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const
ructor of <i>C</i>. | 2031 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const
ructor of <i>C</i>. |
1291 */ | 2032 */ |
1292 static final StaticWarningCode REDIRECT_TO_MISSING_CONSTRUCTOR = new StaticWar
ningCode('REDIRECT_TO_MISSING_CONSTRUCTOR', 38, ""); | 2033 static final StaticWarningCode REDIRECT_TO_MISSING_CONSTRUCTOR = new StaticWar
ningCode('REDIRECT_TO_MISSING_CONSTRUCTOR', 53, ""); |
| 2034 |
1293 /** | 2035 /** |
1294 * 7.6.2 Factories: It is a static warning if type does not denote a class acc
essible in the | 2036 * 7.6.2 Factories: It is a static warning if type does not denote a class acc
essible in the |
1295 * current scope; if type does denote such a class <i>C</i> it is a static war
ning if the | 2037 * current scope; if type does denote such a class <i>C</i> it is a static war
ning if the |
1296 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const
ructor of <i>C</i>. | 2038 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const
ructor of <i>C</i>. |
1297 */ | 2039 */ |
1298 static final StaticWarningCode REDIRECT_TO_NON_CLASS = new StaticWarningCode('
REDIRECT_TO_NON_CLASS', 39, ""); | 2040 static final StaticWarningCode REDIRECT_TO_NON_CLASS = new StaticWarningCode('
REDIRECT_TO_NON_CLASS', 54, ""); |
| 2041 |
1299 /** | 2042 /** |
1300 * 13.11 Return: Let <i>f</i> be the function immediately enclosing a return s
tatement of the form | 2043 * 13.11 Return: Let <i>f</i> be the function immediately enclosing a return s
tatement of the form |
1301 * <i>return;</i> It is a static warning if both of the following conditions h
old: | 2044 * <i>return;</i> It is a static warning if both of the following conditions h
old: |
1302 * <ol> | 2045 * <ol> |
1303 * <li><i>f</i> is not a generative constructor. | 2046 * <li><i>f</i> is not a generative constructor. |
1304 * <li>The return type of <i>f</i> may not be assigned to void. | 2047 * <li>The return type of <i>f</i> may not be assigned to void. |
1305 * </ol> | 2048 * </ol> |
1306 */ | 2049 */ |
1307 static final StaticWarningCode RETURN_WITHOUT_VALUE = new StaticWarningCode('R
ETURN_WITHOUT_VALUE', 40, "Missing return value after 'return'"); | 2050 static final StaticWarningCode RETURN_WITHOUT_VALUE = new StaticWarningCode('R
ETURN_WITHOUT_VALUE', 55, "Missing return value after 'return'"); |
| 2051 |
| 2052 /** |
| 2053 * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not decl
are a static method |
| 2054 * or getter <i>m</i>. |
| 2055 * @param memberName the name of the instance member |
| 2056 */ |
| 2057 static final StaticWarningCode STATIC_ACCESS_TO_INSTANCE_MEMBER = new StaticWa
rningCode('STATIC_ACCESS_TO_INSTANCE_MEMBER', 56, "Instance member '%s' cannot b
e accessed using static access"); |
| 2058 |
1308 /** | 2059 /** |
1309 * 13.9 Switch: It is a static warning if the type of <i>e</i> may not be assi
gned to the type of | 2060 * 13.9 Switch: It is a static warning if the type of <i>e</i> may not be assi
gned to the type of |
1310 * <i>e<sub>k</sub></i>. | 2061 * <i>e<sub>k</sub></i>. |
1311 */ | 2062 */ |
1312 static final StaticWarningCode SWITCH_EXPRESSION_NOT_ASSIGNABLE = new StaticWa
rningCode('SWITCH_EXPRESSION_NOT_ASSIGNABLE', 41, ""); | 2063 static final StaticWarningCode SWITCH_EXPRESSION_NOT_ASSIGNABLE = new StaticWa
rningCode('SWITCH_EXPRESSION_NOT_ASSIGNABLE', 57, "Type '%s' of the switch expre
ssion is not assignable to the type '%s' of case expressions"); |
| 2064 |
1313 /** | 2065 /** |
1314 * 12.15.3 Static Invocation: A static method invocation <i>i</i> has the form | 2066 * 12.15.3 Static Invocation: A static method invocation <i>i</i> has the form |
1315 * <i>C.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</
sub>, … | 2067 * <i>C.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</
sub>, … |
1316 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a static warning if <i>C</i> d
oes not denote a | 2068 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a static warning if <i>C</i> d
oes not denote a |
1317 * class in the current scope. | 2069 * class in the current scope. |
1318 */ | 2070 */ |
1319 static final StaticWarningCode UNDEFINED_CLASS = new StaticWarningCode('UNDEFI
NED_CLASS', 42, "Undefined class '%s'"); | 2071 static final StaticWarningCode UNDEFINED_CLASS = new StaticWarningCode('UNDEFI
NED_CLASS', 58, "Undefined class '%s'"); |
| 2072 |
1320 /** | 2073 /** |
1321 * Same as {@link #UNDEFINED_CLASS}, but to catch using "boolean" instead of "
bool". | 2074 * Same as {@link #UNDEFINED_CLASS}, but to catch using "boolean" instead of "
bool". |
1322 */ | 2075 */ |
1323 static final StaticWarningCode UNDEFINED_CLASS_BOOLEAN = new StaticWarningCode
('UNDEFINED_CLASS_BOOLEAN', 43, "Undefined class 'boolean'; did you mean 'bool'?
"); | 2076 static final StaticWarningCode UNDEFINED_CLASS_BOOLEAN = new StaticWarningCode
('UNDEFINED_CLASS_BOOLEAN', 59, "Undefined class 'boolean'; did you mean 'bool'?
"); |
| 2077 |
1324 /** | 2078 /** |
1325 * 12.17 Getter Invocation: It is a static warning if there is no class <i>C</
i> in the enclosing | 2079 * 12.17 Getter Invocation: It is a static warning if there is no class <i>C</
i> in the enclosing |
1326 * lexical scope of <i>i</i>, or if <i>C</i> does not declare, implicitly or e
xplicitly, a getter | 2080 * lexical scope of <i>i</i>, or if <i>C</i> does not declare, implicitly or e
xplicitly, a getter |
1327 * named <i>m</i>. | 2081 * named <i>m</i>. |
1328 * @param getterName the name of the getter | 2082 * @param getterName the name of the getter |
1329 * @param enclosingType the name of the enclosing type where the getter is bei
ng looked for | 2083 * @param enclosingType the name of the enclosing type where the getter is bei
ng looked for |
1330 */ | 2084 */ |
1331 static final StaticWarningCode UNDEFINED_GETTER = new StaticWarningCode('UNDEF
INED_GETTER', 44, "There is no such getter '%s' in '%s'"); | 2085 static final StaticWarningCode UNDEFINED_GETTER = new StaticWarningCode('UNDEF
INED_GETTER', 60, "There is no such getter '%s' in '%s'"); |
| 2086 |
1332 /** | 2087 /** |
1333 * 12.30 Identifier Reference: It is as static warning if an identifier expres
sion of the form | 2088 * 12.30 Identifier Reference: It is as static warning if an identifier expres
sion of the form |
1334 * <i>id</i> occurs inside a top level or static function (be it function, met
hod, getter, or | 2089 * <i>id</i> occurs inside a top level or static function (be it function, met
hod, getter, or |
1335 * setter) or variable initializer and there is no declaration <i>d</i> with n
ame <i>id</i> in the | 2090 * setter) or variable initializer and there is no declaration <i>d</i> with n
ame <i>id</i> in the |
1336 * lexical scope enclosing the expression. | 2091 * lexical scope enclosing the expression. |
1337 */ | 2092 */ |
1338 static final StaticWarningCode UNDEFINED_IDENTIFIER = new StaticWarningCode('U
NDEFINED_IDENTIFIER', 45, "Undefined name '%s'"); | 2093 static final StaticWarningCode UNDEFINED_IDENTIFIER = new StaticWarningCode('U
NDEFINED_IDENTIFIER', 61, "Undefined name '%s'"); |
| 2094 |
1339 /** | 2095 /** |
1340 * 12.30 Identifier Reference: It is as static warning if an identifier expres
sion of the form | 2096 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>,
<i>1<=i<=l</i>, |
1341 * <i>id</i> occurs inside a top level or static function (be it function, met
hod, getter, or | 2097 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i
> ... |
1342 * setter) or variable initializer and there is no declaration <i>d</i> with n
ame <i>id</i> in the | 2098 * <i>p<sub>n+k</sub></i>} or a static warning occurs. |
1343 * lexical scope enclosing the expression. | 2099 * @param name the name of the requested named parameter |
1344 * @param operator the name of the operator | |
1345 * @param enclosingType the name of the enclosing type where the operator is b
eing looked for | |
1346 */ | 2100 */ |
1347 static final StaticWarningCode UNDEFINED_OPERATOR = new StaticWarningCode('UND
EFINED_OPERATOR', 46, "There is no such operator '%s' in '%s'"); | 2101 static final StaticWarningCode UNDEFINED_NAMED_PARAMETER = new StaticWarningCo
de('UNDEFINED_NAMED_PARAMETER', 62, "The named parameter '%s' is not defined"); |
| 2102 |
1348 /** | 2103 /** |
1349 * 12.18 Assignment: It is as static warning if an assignment of the form <i>v
= e</i> occurs | 2104 * 12.18 Assignment: It is as static warning if an assignment of the form <i>v
= e</i> occurs |
1350 * inside a top level or static function (be it function, method, getter, or s
etter) or variable | 2105 * inside a top level or static function (be it function, method, getter, or s
etter) or variable |
1351 * initializer and there is no declaration <i>d</i> with name <i>v=</i> in the
lexical scope | 2106 * initializer and there is no declaration <i>d</i> with name <i>v=</i> in the
lexical scope |
1352 * enclosing the assignment. | 2107 * enclosing the assignment. |
1353 * <p> | 2108 * <p> |
1354 * 12.18 Assignment: It is a static warning if there is no class <i>C</i> in t
he enclosing lexical | 2109 * 12.18 Assignment: It is a static warning if there is no class <i>C</i> in t
he enclosing lexical |
1355 * scope of the assignment, or if <i>C</i> does not declare, implicitly or exp
licitly, a setter | 2110 * scope of the assignment, or if <i>C</i> does not declare, implicitly or exp
licitly, a setter |
1356 * <i>v=</i>. | 2111 * <i>v=</i>. |
1357 * @param setterName the name of the getter | 2112 * @param setterName the name of the getter |
1358 * @param enclosingType the name of the enclosing type where the setter is bei
ng looked for | 2113 * @param enclosingType the name of the enclosing type where the setter is bei
ng looked for |
1359 */ | 2114 */ |
1360 static final StaticWarningCode UNDEFINED_SETTER = new StaticWarningCode('UNDEF
INED_SETTER', 47, "There is no such setter '%s' in '%s'"); | 2115 static final StaticWarningCode UNDEFINED_SETTER = new StaticWarningCode('UNDEF
INED_SETTER', 63, "There is no such setter '%s' in '%s'"); |
| 2116 |
1361 /** | 2117 /** |
1362 * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not decl
are a static method | 2118 * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not decl
are a static method |
1363 * or getter <i>m</i>. | 2119 * or getter <i>m</i>. |
1364 * @param methodName the name of the method | 2120 * @param methodName the name of the method |
1365 * @param enclosingType the name of the enclosing type where the method is bei
ng looked for | 2121 * @param enclosingType the name of the enclosing type where the method is bei
ng looked for |
1366 */ | 2122 */ |
1367 static final StaticWarningCode UNDEFINED_STATIC_METHOD_OR_GETTER = new StaticW
arningCode('UNDEFINED_STATIC_METHOD_OR_GETTER', 48, "There is no such static met
hod '%s' in '%s'"); | 2123 static final StaticWarningCode UNDEFINED_STATIC_METHOD_OR_GETTER = new StaticW
arningCode('UNDEFINED_STATIC_METHOD_OR_GETTER', 64, "There is no such static met
hod '%s' in '%s'"); |
1368 static final List<StaticWarningCode> values = [ARGUMENT_TYPE_NOT_ASSIGNABLE, A
SSIGNMENT_TO_FINAL, CASE_BLOCK_NOT_TERMINATED, CAST_TO_NON_TYPE, COMMENT_REFEREN
CE_CONSTRUCTOR_NOT_VISIBLE, COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE, COMMENT_RE
FERENCE_UNDECLARED_CONSTRUCTOR, COMMENT_REFERENCE_UNDECLARED_IDENTIFIER, COMMENT
_REFERENCE_URI_NOT_LIBRARY, CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, CONFLICTING_INS
TANCE_GETTER_AND_SUPERCLASS_MEMBER, CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_M
EMBER, CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER, CONFLICTING_STATIC_SETTER_
AND_INSTANCE_GETTER, CONST_WITH_ABSTRACT_CLASS, EQUAL_KEYS_IN_MAP, FIELD_INITIAL
IZER_WITH_INVALID_TYPE, INCORRECT_NUMBER_OF_ARGUMENTS, INSTANCE_METHOD_NAME_COLL
IDES_WITH_SUPERCLASS_STATIC, INVALID_FACTORY_NAME, INVALID_OVERRIDE_GETTER_TYPE,
INVALID_OVERRIDE_RETURN_TYPE, INVALID_OVERRIDE_SETTER_RETURN_TYPE, INVOCATION_O
F_NON_FUNCTION, MISMATCHED_GETTER_AND_SETTER_TYPES, NEW_WITH_ABSTRACT_CLASS, NEW
_WITH_NON_TYPE, NEW_WITH_UNDEFINED_CONSTRUCTOR, NON_ABSTRACT_CLASS_INHERITS_ABST
RACT_MEMBER, NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_METHOD, NON_TYPE, NON_TYPE_IN_
CATCH_CLAUSE, NON_VOID_RETURN_FOR_OPERATOR, NON_VOID_RETURN_FOR_SETTER, OVERRIDE
_NOT_SUBTYPE, OVERRIDE_WITH_DIFFERENT_DEFAULT, PART_OF_DIFFERENT_LIBRARY, REDIRE
CT_TO_INVALID_RETURN_TYPE, REDIRECT_TO_MISSING_CONSTRUCTOR, REDIRECT_TO_NON_CLAS
S, RETURN_WITHOUT_VALUE, SWITCH_EXPRESSION_NOT_ASSIGNABLE, UNDEFINED_CLASS, UNDE
FINED_CLASS_BOOLEAN, UNDEFINED_GETTER, UNDEFINED_IDENTIFIER, UNDEFINED_OPERATOR,
UNDEFINED_SETTER, UNDEFINED_STATIC_METHOD_OR_GETTER]; | 2124 static final List<StaticWarningCode> values = [AMBIGUOUS_IMPORT, ARGUMENT_TYPE
_NOT_ASSIGNABLE, ASSIGNMENT_TO_FINAL, CASE_BLOCK_NOT_TERMINATED, CAST_TO_NON_TYP
E, COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE, COMMENT_REFERENCE_IDENTIFIER_NOT_V
ISIBLE, COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR, COMMENT_REFERENCE_UNDECLARED_I
DENTIFIER, COMMENT_REFERENCE_URI_NOT_LIBRARY, CONCRETE_CLASS_WITH_ABSTRACT_MEMBE
R, CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER, CONFLICTING_INSTANCE_SETTE
R_AND_SUPERCLASS_MEMBER, CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER, CONFLICT
ING_STATIC_SETTER_AND_INSTANCE_MEMBER, CONST_WITH_ABSTRACT_CLASS, EQUAL_KEYS_IN_
MAP, EXPORT_DUPLICATED_LIBRARY_NAME, EXTRA_POSITIONAL_ARGUMENTS, FIELD_INITIALIZ
ER_NOT_ASSIGNABLE, FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE, IMPORT_DUPLICATED_L
IBRARY_NAME, INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD, INCORRECT_NUMBER
_OF_ARGUMENTS, INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC, INVALID_FAC
TORY_NAME, INVALID_GETTER_OVERRIDE_RETURN_TYPE, INVALID_METHOD_OVERRIDE_NAMED_PA
RAM_TYPE, INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE, INVALID_METHOD_OVERRIDE_OPT
IONAL_PARAM_TYPE, INVALID_METHOD_OVERRIDE_RETURN_TYPE, INVALID_OVERRIDE_DIFFEREN
T_DEFAULT_VALUES, INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE, INVOCATION_OF_NON_F
UNCTION, MALFORMED_TYPE, MISMATCHED_GETTER_AND_SETTER_TYPES, NEW_WITH_ABSTRACT_C
LASS, NEW_WITH_NON_TYPE, NEW_WITH_UNDEFINED_CONSTRUCTOR, NEW_WITH_UNDEFINED_CONS
TRUCTOR_DEFAULT, NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS, NON_ABST
RACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR, NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_M
EMBER_ONE, NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE, NON_ABSTRACT_CLASS
_INHERITS_ABSTRACT_MEMBER_TWO, NON_TYPE, NON_TYPE_IN_CATCH_CLAUSE, NON_VOID_RETU
RN_FOR_OPERATOR, NON_VOID_RETURN_FOR_SETTER, NOT_ENOUGH_REQUIRED_ARGUMENTS, PART
_OF_DIFFERENT_LIBRARY, REDIRECT_TO_INVALID_FUNCTION_TYPE, REDIRECT_TO_INVALID_RE
TURN_TYPE, REDIRECT_TO_MISSING_CONSTRUCTOR, REDIRECT_TO_NON_CLASS, RETURN_WITHOU
T_VALUE, STATIC_ACCESS_TO_INSTANCE_MEMBER, SWITCH_EXPRESSION_NOT_ASSIGNABLE, UND
EFINED_CLASS, UNDEFINED_CLASS_BOOLEAN, UNDEFINED_GETTER, UNDEFINED_IDENTIFIER, U
NDEFINED_NAMED_PARAMETER, UNDEFINED_SETTER, UNDEFINED_STATIC_METHOD_OR_GETTER]; |
1369 final String __name; | 2125 |
1370 final int __ordinal; | 2126 /// The name of this enum constant, as declared in the enum declaration. |
1371 int get ordinal => __ordinal; | 2127 final String name; |
| 2128 |
| 2129 /// The position in the enum declaration. |
| 2130 final int ordinal; |
| 2131 |
1372 /** | 2132 /** |
1373 * The message template used to create the message to be displayed for this er
ror. | 2133 * The message template used to create the message to be displayed for this er
ror. |
1374 */ | 2134 */ |
1375 String _message; | 2135 String _message; |
| 2136 |
1376 /** | 2137 /** |
1377 * Initialize a newly created error code to have the given type and message. | 2138 * Initialize a newly created error code to have the given type and message. |
1378 * @param message the message template used to create the message to be displa
yed for the error | 2139 * @param message the message template used to create the message to be displa
yed for the error |
1379 */ | 2140 */ |
1380 StaticWarningCode(this.__name, this.__ordinal, String message) { | 2141 StaticWarningCode(this.name, this.ordinal, String message) { |
1381 this._message = message; | 2142 this._message = message; |
1382 } | 2143 } |
1383 ErrorSeverity get errorSeverity => ErrorType.STATIC_WARNING.severity; | 2144 ErrorSeverity get errorSeverity => ErrorType.STATIC_WARNING.severity; |
1384 String get message => _message; | 2145 String get message => _message; |
1385 ErrorType get type => ErrorType.STATIC_WARNING; | 2146 ErrorType get type => ErrorType.STATIC_WARNING; |
1386 bool needsRecompilation() => true; | 2147 int compareTo(StaticWarningCode other) => ordinal - other.ordinal; |
1387 int compareTo(StaticWarningCode other) => __ordinal - other.__ordinal; | 2148 String toString() => name; |
1388 String toString() => __name; | |
1389 } | 2149 } |
| 2150 |
1390 /** | 2151 /** |
1391 * The interface {@code AnalysisErrorListener} defines the behavior of objects t
hat listen for{@link AnalysisError analysis errors} being produced by the analys
is engine. | 2152 * The interface {@code AnalysisErrorListener} defines the behavior of objects t
hat listen for{@link AnalysisError analysis errors} being produced by the analys
is engine. |
1392 * @coverage dart.engine.error | 2153 * @coverage dart.engine.error |
1393 */ | 2154 */ |
1394 abstract class AnalysisErrorListener { | 2155 abstract class AnalysisErrorListener { |
| 2156 |
1395 /** | 2157 /** |
1396 * An error listener that ignores errors that are reported to it. | 2158 * An error listener that ignores errors that are reported to it. |
1397 */ | 2159 */ |
1398 static AnalysisErrorListener _NULL_LISTENER = new AnalysisErrorListener_4(); | 2160 static AnalysisErrorListener _NULL_LISTENER = new AnalysisErrorListener_5(); |
| 2161 |
1399 /** | 2162 /** |
1400 * This method is invoked when an error has been found by the analysis engine. | 2163 * This method is invoked when an error has been found by the analysis engine. |
1401 * @param error the error that was just found (not {@code null}) | 2164 * @param error the error that was just found (not {@code null}) |
1402 */ | 2165 */ |
1403 void onError(AnalysisError error); | 2166 void onError(AnalysisError error); |
1404 } | 2167 } |
1405 class AnalysisErrorListener_4 implements AnalysisErrorListener { | 2168 class AnalysisErrorListener_5 implements AnalysisErrorListener { |
1406 void onError(AnalysisError event) { | 2169 void onError(AnalysisError event) { |
1407 } | 2170 } |
1408 } | 2171 } |
| 2172 |
1409 /** | 2173 /** |
1410 * The enumeration {@code HtmlWarningCode} defines the error codes used for warn
ings in HTML files. | 2174 * The enumeration {@code HtmlWarningCode} defines the error codes used for warn
ings in HTML files. |
1411 * The convention for this class is for the name of the error code to indicate t
he problem that | 2175 * The convention for this class is for the name of the error code to indicate t
he problem that |
1412 * caused the error to be generated and for the error message to explain what is
wrong and, when | 2176 * caused the error to be generated and for the error message to explain what is
wrong and, when |
1413 * appropriate, how the problem can be corrected. | 2177 * appropriate, how the problem can be corrected. |
1414 * @coverage dart.engine.error | 2178 * @coverage dart.engine.error |
1415 */ | 2179 */ |
1416 class HtmlWarningCode implements Comparable<HtmlWarningCode>, ErrorCode { | 2180 class HtmlWarningCode implements Comparable<HtmlWarningCode>, ErrorCode { |
| 2181 |
1417 /** | 2182 /** |
1418 * An error code indicating that the value of the 'src' attribute of a Dart sc
ript tag is not a | 2183 * An error code indicating that the value of the 'src' attribute of a Dart sc
ript tag is not a |
1419 * valid URI. | 2184 * valid URI. |
| 2185 * @param uri the URI that is invalid |
1420 */ | 2186 */ |
1421 static final HtmlWarningCode INVALID_URI = new HtmlWarningCode('INVALID_URI',
0, ""); | 2187 static final HtmlWarningCode INVALID_URI = new HtmlWarningCode('INVALID_URI',
0, "Invalid URI syntax: '%s'"); |
| 2188 |
1422 /** | 2189 /** |
1423 * An error code indicating that the value of the 'src' attribute of a Dart sc
ript tag references | 2190 * An error code indicating that the value of the 'src' attribute of a Dart sc
ript tag references |
1424 * a file that does not exist. | 2191 * a file that does not exist. |
| 2192 * @param uri the URI pointing to a non-existent file |
1425 */ | 2193 */ |
1426 static final HtmlWarningCode URI_DOES_NOT_EXIST = new HtmlWarningCode('URI_DOE
S_NOT_EXIST', 1, ""); | 2194 static final HtmlWarningCode URI_DOES_NOT_EXIST = new HtmlWarningCode('URI_DOE
S_NOT_EXIST', 1, "Target of URI does not exist: '%s'"); |
1427 static final List<HtmlWarningCode> values = [INVALID_URI, URI_DOES_NOT_EXIST]; | 2195 static final List<HtmlWarningCode> values = [INVALID_URI, URI_DOES_NOT_EXIST]; |
1428 final String __name; | 2196 |
1429 final int __ordinal; | 2197 /// The name of this enum constant, as declared in the enum declaration. |
1430 int get ordinal => __ordinal; | 2198 final String name; |
| 2199 |
| 2200 /// The position in the enum declaration. |
| 2201 final int ordinal; |
| 2202 |
1431 /** | 2203 /** |
1432 * The message template used to create the message to be displayed for this er
ror. | 2204 * The message template used to create the message to be displayed for this er
ror. |
1433 */ | 2205 */ |
1434 String _message; | 2206 String _message; |
| 2207 |
1435 /** | 2208 /** |
1436 * Initialize a newly created error code to have the given type and message. | 2209 * Initialize a newly created error code to have the given type and message. |
1437 * @param message the message template used to create the message to be displa
yed for the error | 2210 * @param message the message template used to create the message to be displa
yed for the error |
1438 */ | 2211 */ |
1439 HtmlWarningCode(this.__name, this.__ordinal, String message) { | 2212 HtmlWarningCode(this.name, this.ordinal, String message) { |
1440 this._message = message; | 2213 this._message = message; |
1441 } | 2214 } |
1442 ErrorSeverity get errorSeverity => ErrorSeverity.WARNING; | 2215 ErrorSeverity get errorSeverity => ErrorSeverity.WARNING; |
1443 String get message => _message; | 2216 String get message => _message; |
1444 ErrorType get type => ErrorType.STATIC_WARNING; | 2217 ErrorType get type => ErrorType.STATIC_WARNING; |
1445 bool needsRecompilation() => false; | 2218 int compareTo(HtmlWarningCode other) => ordinal - other.ordinal; |
1446 int compareTo(HtmlWarningCode other) => __ordinal - other.__ordinal; | 2219 String toString() => name; |
1447 String toString() => __name; | |
1448 } | 2220 } |
| 2221 |
1449 /** | 2222 /** |
1450 * The enumeration {@code StaticTypeWarningCode} defines the error codes used fo
r static type | 2223 * The enumeration {@code StaticTypeWarningCode} defines the error codes used fo
r static type |
1451 * warnings. The convention for this class is for the name of the error code to
indicate the problem | 2224 * warnings. The convention for this class is for the name of the error code to
indicate the problem |
1452 * that caused the error to be generated and for the error message to explain wh
at is wrong and, | 2225 * that caused the error to be generated and for the error message to explain wh
at is wrong and, |
1453 * when appropriate, how the problem can be corrected. | 2226 * when appropriate, how the problem can be corrected. |
1454 * @coverage dart.engine.error | 2227 * @coverage dart.engine.error |
1455 */ | 2228 */ |
1456 class StaticTypeWarningCode implements Comparable<StaticTypeWarningCode>, ErrorC
ode { | 2229 class StaticTypeWarningCode implements Comparable<StaticTypeWarningCode>, ErrorC
ode { |
| 2230 |
1457 /** | 2231 /** |
1458 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
It is a static type | 2232 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
It is a static type |
1459 * warning if <i>T</i> does not have an accessible instance setter named <i>v=
</i>. | 2233 * warning if <i>T</i> does not have an accessible instance setter named <i>v=
</i>. |
1460 * @see #UNDEFINED_SETTER | 2234 * @see #UNDEFINED_SETTER |
1461 */ | 2235 */ |
1462 static final StaticTypeWarningCode INACCESSIBLE_SETTER = new StaticTypeWarning
Code('INACCESSIBLE_SETTER', 0, ""); | 2236 static final StaticTypeWarningCode INACCESSIBLE_SETTER = new StaticTypeWarning
Code('INACCESSIBLE_SETTER', 0, ""); |
| 2237 |
1463 /** | 2238 /** |
1464 * 8.1.1 Inheritance and Overriding: However, if there are multiple members <i
>m<sub>1</sub>, | 2239 * 8.1.1 Inheritance and Overriding: However, if there are multiple members <i
>m<sub>1</sub>, |
1465 * … m<sub>k</sub></i> with the same name <i>n</i> that would be inheri
ted (because | 2240 * … m<sub>k</sub></i> with the same name <i>n</i> that would be inheri
ted (because |
1466 * identically named members existed in several superinterfaces) then at most
one member is | 2241 * identically named members existed in several superinterfaces) then at most
one member is |
1467 * inherited. If the static types <i>T<sub>1</sub>, …, T<sub>k</sub></i
> of the members | 2242 * inherited. |
| 2243 * <p> |
| 2244 * If the static types <i>T<sub>1</sub>, …, T<sub>k</sub></i> of the me
mbers |
1468 * <i>m<sub>1</sub>, …, m<sub>k</sub></i> are not identical, then there
must be a member | 2245 * <i>m<sub>1</sub>, …, m<sub>k</sub></i> are not identical, then there
must be a member |
1469 * <i>m<sub>x</sub></i> such that <i>T<sub>x</sub> < T<sub>i</sub>, 1 <=
x <= k</i> for | 2246 * <i>m<sub>x</sub></i> such that <i>T<sub>x</sub> < T<sub>i</sub>, 1 <=
x <= k</i> for |
1470 * all <i>i, 1 <= i < k</i>, or a static type warning occurs. The member
that is inherited | 2247 * all <i>i, 1 <= i < k</i>, or a static type warning occurs. The member
that is inherited |
1471 * is <i>m<sub>x</sub></i>, if it exists; otherwise: | 2248 * is <i>m<sub>x</sub></i>, if it exists; otherwise: |
1472 * <ol> | 2249 * <ol> |
1473 * <li>If all of <i>m<sub>1</sub>, … m<sub>k</sub></i> have the same nu
mber <i>r</i> of | 2250 * <li>If all of <i>m<sub>1</sub>, … m<sub>k</sub></i> have the same nu
mber <i>r</i> of |
1474 * required parameters and the same set of named parameters <i>s</i>, then let
<i>h = max( | 2251 * required parameters and the same set of named parameters <i>s</i>, then let
<i>h = max( |
1475 * numberOfOptionalPositionals( m<sub>i</sub> ) ), 1 <= i <= k</i>. <i>I
</i> has a method | 2252 * numberOfOptionalPositionals( m<sub>i</sub> ) ), 1 <= i <= k</i>. <i>I
</i> has a method |
1476 * named <i>n</i>, with <i>r</i> required parameters of type dynamic, <i>h</i>
optional positional | 2253 * named <i>n</i>, with <i>r</i> required parameters of type dynamic, <i>h</i>
optional positional |
1477 * parameters of type dynamic, named parameters <i>s</i> of type dynamic and r
eturn type dynamic. | 2254 * parameters of type dynamic, named parameters <i>s</i> of type dynamic and r
eturn type dynamic. |
1478 * <li>Otherwise none of the members <i>m<sub>1</sub>, …, m<sub>k</sub>
</i> is inherited. | 2255 * <li>Otherwise none of the members <i>m<sub>1</sub>, …, m<sub>k</sub>
</i> is inherited. |
1479 * </ol> | 2256 * </ol> |
1480 */ | 2257 */ |
1481 static final StaticTypeWarningCode INCONSISTENT_METHOD_INHERITANCE = new Stati
cTypeWarningCode('INCONSISTENT_METHOD_INHERITANCE', 1, ""); | 2258 static final StaticTypeWarningCode INCONSISTENT_METHOD_INHERITANCE = new Stati
cTypeWarningCode('INCONSISTENT_METHOD_INHERITANCE', 1, "'%s' is inherited by at
least two interfaces inconsistently"); |
| 2259 |
1482 /** | 2260 /** |
1483 * 12.18 Assignment: It is a static type warning if the static type of <i>e</i
> may not be | 2261 * 12.18 Assignment: It is a static type warning if the static type of <i>e</i
> may not be |
1484 * assigned to the static type of <i>v</i>. The static type of the expression
<i>v = e</i> is the | 2262 * assigned to the static type of <i>v</i>. The static type of the expression
<i>v = e</i> is the |
1485 * static type of <i>e</i>. | 2263 * static type of <i>e</i>. |
1486 * <p> | 2264 * <p> |
1487 * 12.18 Assignment: It is a static type warning if the static type of <i>e</i
> may not be | 2265 * 12.18 Assignment: It is a static type warning if the static type of <i>e</i
> may not be |
1488 * assigned to the static type of <i>C.v</i>. The static type of the expressio
n <i>C.v = e</i> is | 2266 * assigned to the static type of <i>C.v</i>. The static type of the expressio
n <i>C.v = e</i> is |
1489 * the static type of <i>e</i>. | 2267 * the static type of <i>e</i>. |
1490 * <p> | 2268 * <p> |
1491 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
It is a static type | 2269 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
It is a static type |
1492 * warning if the static type of <i>e<sub>2</sub></i> may not be assigned to <
i>T</i>. | 2270 * warning if the static type of <i>e<sub>2</sub></i> may not be assigned to <
i>T</i>. |
1493 * @param rhsTypeName the name of the right hand side type | 2271 * @param rhsTypeName the name of the right hand side type |
1494 * @param lhsTypeName the name of the left hand side type | 2272 * @param lhsTypeName the name of the left hand side type |
1495 */ | 2273 */ |
1496 static final StaticTypeWarningCode INVALID_ASSIGNMENT = new StaticTypeWarningC
ode('INVALID_ASSIGNMENT', 2, "A value of type '%s' cannot be assigned to a varia
ble of type '%s'"); | 2274 static final StaticTypeWarningCode INVALID_ASSIGNMENT = new StaticTypeWarningC
ode('INVALID_ASSIGNMENT', 2, "A value of type '%s' cannot be assigned to a varia
ble of type '%s'"); |
| 2275 |
1497 /** | 2276 /** |
1498 * 12.14.4 Function Expression Invocation: A function expression invocation <i
>i</i> has the form | 2277 * 12.14.4 Function Expression Invocation: A function expression invocation <i
>i</i> has the form |
1499 * <i>e<sub>f</sub>(a<sub>1</sub>, … a<sub>n</sub>, x<sub>n+1</sub>: a<
sub>n+1</sub>, | 2278 * <i>e<sub>f</sub>(a<sub>1</sub>, … a<sub>n</sub>, x<sub>n+1</sub>: a<
sub>n+1</sub>, |
1500 * …, x<sub>n+k</sub>: a<sub>n+k</sub>)</i>, where <i>e<sub>f</sub></i>
is an expression. | 2279 * …, x<sub>n+k</sub>: a<sub>n+k</sub>)</i>, where <i>e<sub>f</sub></i>
is an expression. |
1501 * <p> | 2280 * <p> |
1502 * It is a static type warning if the static type <i>F</i> of <i>e<sub>f</sub>
</i> may not be | 2281 * It is a static type warning if the static type <i>F</i> of <i>e<sub>f</sub>
</i> may not be |
1503 * assigned to a function type. | 2282 * assigned to a function type. |
1504 * <p> | 2283 * <p> |
1505 * 12.15.1 Ordinary Invocation: An ordinary method invocation <i>i</i> has the
form | 2284 * 12.15.1 Ordinary Invocation: An ordinary method invocation <i>i</i> has the
form |
1506 * <i>o.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</
sub>, … | 2285 * <i>o.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</
sub>, … |
1507 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. | 2286 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. |
1508 * <p> | 2287 * <p> |
1509 * Let <i>T</i> be the static type of <i>o</i>. It is a static type warning if
<i>T</i> does not | 2288 * Let <i>T</i> be the static type of <i>o</i>. It is a static type warning if
<i>T</i> does not |
1510 * have an accessible instance member named <i>m</i>. If <i>T.m</i> exists, it
is a static warning | 2289 * have an accessible instance member named <i>m</i>. If <i>T.m</i> exists, it
is a static warning |
1511 * if the type <i>F</i> of <i>T.m</i> may not be assigned to a function type.
If <i>T.m</i> does | 2290 * if the type <i>F</i> of <i>T.m</i> may not be assigned to a function type.
If <i>T.m</i> does |
1512 * not exist, or if <i>F</i> is not a function type, the static type of <i>i</
i> is dynamic. | 2291 * not exist, or if <i>F</i> is not a function type, the static type of <i>i</
i> is dynamic. |
1513 * <p> | 2292 * <p> |
1514 * 12.15.3 Static Invocation: It is a static type warning if the type <i>F</i>
of <i>C.m</i> may | 2293 * 12.15.3 Static Invocation: It is a static type warning if the type <i>F</i>
of <i>C.m</i> may |
1515 * not be assigned to a function type. | 2294 * not be assigned to a function type. |
1516 * @param nonFunctionIdentifier the name of the identifier that is not a funct
ion type | 2295 * @param nonFunctionIdentifier the name of the identifier that is not a funct
ion type |
1517 */ | 2296 */ |
1518 static final StaticTypeWarningCode INVOCATION_OF_NON_FUNCTION = new StaticType
WarningCode('INVOCATION_OF_NON_FUNCTION', 3, "'%s' is not a method"); | 2297 static final StaticTypeWarningCode INVOCATION_OF_NON_FUNCTION = new StaticType
WarningCode('INVOCATION_OF_NON_FUNCTION', 3, "'%s' is not a method"); |
| 2298 |
1519 /** | 2299 /** |
1520 * 12.19 Conditional: It is a static type warning if the type of <i>e<sub>1</s
ub></i> may not be | 2300 * 12.19 Conditional: It is a static type warning if the type of <i>e<sub>1</s
ub></i> may not be |
1521 * assigned to bool. | 2301 * assigned to bool. |
1522 * <p> | 2302 * <p> |
1523 * 13.5 If: It is a static type warning if the type of the expression <i>b</i>
may not be assigned | 2303 * 13.5 If: It is a static type warning if the type of the expression <i>b</i>
may not be assigned |
1524 * to bool. | 2304 * to bool. |
1525 * <p> | 2305 * <p> |
1526 * 13.7 While: It is a static type warning if the type of <i>e</i> may not be
assigned to bool. | 2306 * 13.7 While: It is a static type warning if the type of <i>e</i> may not be
assigned to bool. |
1527 * <p> | 2307 * <p> |
1528 * 13.8 Do: It is a static type warning if the type of <i>e</i> cannot be assi
gned to bool. | 2308 * 13.8 Do: It is a static type warning if the type of <i>e</i> cannot be assi
gned to bool. |
1529 */ | 2309 */ |
1530 static final StaticTypeWarningCode NON_BOOL_CONDITION = new StaticTypeWarningC
ode('NON_BOOL_CONDITION', 4, "Conditions must have a static type of 'bool'"); | 2310 static final StaticTypeWarningCode NON_BOOL_CONDITION = new StaticTypeWarningC
ode('NON_BOOL_CONDITION', 4, "Conditions must have a static type of 'bool'"); |
| 2311 |
1531 /** | 2312 /** |
1532 * 13.15 Assert: It is a static type warning if the type of <i>e</i> may not b
e assigned to either | 2313 * 13.15 Assert: It is a static type warning if the type of <i>e</i> may not b
e assigned to either |
1533 * bool or () → bool | 2314 * bool or () → bool |
1534 */ | 2315 */ |
1535 static final StaticTypeWarningCode NON_BOOL_EXPRESSION = new StaticTypeWarning
Code('NON_BOOL_EXPRESSION', 5, "Assertions must be on either a 'bool' or '() ->
bool'"); | 2316 static final StaticTypeWarningCode NON_BOOL_EXPRESSION = new StaticTypeWarning
Code('NON_BOOL_EXPRESSION', 5, "Assertions must be on either a 'bool' or '() ->
bool'"); |
| 2317 |
1536 /** | 2318 /** |
1537 * 15.8 Parameterized Types: It is a static type warning if <i>A<sub>i</sub>,
1 <= i <= | 2319 * 15.8 Parameterized Types: It is a static type warning if <i>A<sub>i</sub>,
1 <= i <= |
1538 * n</i> does not denote a type in the enclosing lexical scope. | 2320 * n</i> does not denote a type in the enclosing lexical scope. |
1539 */ | 2321 */ |
1540 static final StaticTypeWarningCode NON_TYPE_AS_TYPE_ARGUMENT = new StaticTypeW
arningCode('NON_TYPE_AS_TYPE_ARGUMENT', 6, ""); | 2322 static final StaticTypeWarningCode NON_TYPE_AS_TYPE_ARGUMENT = new StaticTypeW
arningCode('NON_TYPE_AS_TYPE_ARGUMENT', 6, ""); |
| 2323 |
1541 /** | 2324 /** |
1542 * 7.6.2 Factories: It is a static type warning if any of the type arguments t
o <i>k'</i> are not | 2325 * 7.6.2 Factories: It is a static type warning if any of the type arguments t
o <i>k'</i> are not |
1543 * subtypes of the bounds of the corresponding formal type parameters of type. | 2326 * subtypes of the bounds of the corresponding formal type parameters of type. |
1544 */ | 2327 */ |
1545 static final StaticTypeWarningCode REDIRECT_WITH_INVALID_TYPE_PARAMETERS = new
StaticTypeWarningCode('REDIRECT_WITH_INVALID_TYPE_PARAMETERS', 7, ""); | 2328 static final StaticTypeWarningCode REDIRECT_WITH_INVALID_TYPE_PARAMETERS = new
StaticTypeWarningCode('REDIRECT_WITH_INVALID_TYPE_PARAMETERS', 7, ""); |
| 2329 |
1546 /** | 2330 /** |
1547 * 13.11 Return: It is a static type warning if the type of <i>e</i> may not b
e assigned to the | 2331 * 13.11 Return: It is a static type warning if the type of <i>e</i> may not b
e assigned to the |
1548 * declared return type of the immediately enclosing function. | 2332 * declared return type of the immediately enclosing function. |
1549 * @param actualReturnType the return type as declared in the return statement | 2333 * @param actualReturnType the return type as declared in the return statement |
1550 * @param expectedReturnType the expected return type as defined by the method | 2334 * @param expectedReturnType the expected return type as defined by the method |
1551 * @param methodName the name of the method | 2335 * @param methodName the name of the method |
1552 */ | 2336 */ |
1553 static final StaticTypeWarningCode RETURN_OF_INVALID_TYPE = new StaticTypeWarn
ingCode('RETURN_OF_INVALID_TYPE', 8, "The return type '%s' is not a '%s', as def
ined by the method '%s'"); | 2337 static final StaticTypeWarningCode RETURN_OF_INVALID_TYPE = new StaticTypeWarn
ingCode('RETURN_OF_INVALID_TYPE', 8, "The return type '%s' is not a '%s', as def
ined by the method '%s'"); |
| 2338 |
1554 /** | 2339 /** |
1555 * 12.11 Instance Creation: It is a static type warning if any of the type arg
uments to a | 2340 * 12.11 Instance Creation: It is a static type warning if any of the type arg
uments to a |
1556 * constructor of a generic type <i>G</i> invoked by a new expression or a con
stant object | 2341 * constructor of a generic type <i>G</i> invoked by a new expression or a con
stant object |
1557 * expression are not subtypes of the bounds of the corresponding formal type
parameters of | 2342 * expression are not subtypes of the bounds of the corresponding formal type
parameters of |
1558 * <i>G</i>. | 2343 * <i>G</i>. |
1559 * @param boundedTypeName the name of the type used in the instance creation t
hat should be | 2344 * @param boundedTypeName the name of the type used in the instance creation t
hat should be |
1560 * limited by the bound as specified in the class declaration | 2345 * limited by the bound as specified in the class declaration |
1561 * @param boundingTypeName the name of the bounding type | 2346 * @param boundingTypeName the name of the bounding type |
1562 */ | 2347 */ |
1563 static final StaticTypeWarningCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = new Sta
ticTypeWarningCode('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 9, "'%s' does not extend
'%s'"); | 2348 static final StaticTypeWarningCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = new Sta
ticTypeWarningCode('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 9, "'%s' does not extend
'%s'"); |
| 2349 |
1564 /** | 2350 /** |
1565 * 10 Generics: It is a static type warning if a type parameter is a supertype
of its upper bound. | 2351 * 10 Generics: It is a static type warning if a type parameter is a supertype
of its upper bound. |
1566 * <p> | 2352 * <p> |
1567 * 15.8 Parameterized Types: If <i>S</i> is the static type of a member <i>m</
i> of <i>G</i>, then | 2353 * 15.8 Parameterized Types: If <i>S</i> is the static type of a member <i>m</
i> of <i>G</i>, then |
1568 * the static type of the member <i>m</i> of <i>G<A<sub>1</sub>, … A
<sub>n</sub>></i> | 2354 * the static type of the member <i>m</i> of <i>G<A<sub>1</sub>, … A
<sub>n</sub>></i> |
1569 * is <i>\[A<sub>1</sub>, …, A<sub>n</sub>/T<sub>1</sub>, …, T<s
ub>n</sub>\]S</i> | 2355 * is <i>\[A<sub>1</sub>, …, A<sub>n</sub>/T<sub>1</sub>, …, T<s
ub>n</sub>\]S</i> |
1570 * where <i>T<sub>1</sub>, … T<sub>n</sub></i> are the formal type para
meters of <i>G</i>. | 2356 * where <i>T<sub>1</sub>, … T<sub>n</sub></i> are the formal type para
meters of <i>G</i>. |
1571 * Let <i>B<sub>i</sub></i> be the bounds of <i>T<sub>i</sub>, 1 <= i <=
n</i>. It is a | 2357 * Let <i>B<sub>i</sub></i> be the bounds of <i>T<sub>i</sub>, 1 <= i <=
n</i>. It is a |
1572 * static type warning if <i>A<sub>i</sub></i> is not a subtype of <i>\[A<sub>
1</sub>, …, | 2358 * static type warning if <i>A<sub>i</sub></i> is not a subtype of <i>\[A<sub>
1</sub>, …, |
1573 * A<sub>n</sub>/T<sub>1</sub>, …, T<sub>n</sub>\]B<sub>i</sub>, 1 <
= i <= n</i>. | 2359 * A<sub>n</sub>/T<sub>1</sub>, …, T<sub>n</sub>\]B<sub>i</sub>, 1 <
= i <= n</i>. |
1574 */ | 2360 */ |
1575 static final StaticTypeWarningCode TYPE_ARGUMENT_VIOLATES_BOUNDS = new StaticT
ypeWarningCode('TYPE_ARGUMENT_VIOLATES_BOUNDS', 10, ""); | 2361 static final StaticTypeWarningCode TYPE_ARGUMENT_VIOLATES_BOUNDS = new StaticT
ypeWarningCode('TYPE_ARGUMENT_VIOLATES_BOUNDS', 10, ""); |
| 2362 |
1576 /** | 2363 /** |
1577 * Specification reference needed. This is equivalent to {@link #UNDEFINED_MET
HOD}, but for | 2364 * Specification reference needed. This is equivalent to {@link #UNDEFINED_MET
HOD}, but for |
1578 * top-level functions. | 2365 * top-level functions. |
1579 * @param methodName the name of the method that is undefined | 2366 * @param methodName the name of the method that is undefined |
1580 */ | 2367 */ |
1581 static final StaticTypeWarningCode UNDEFINED_FUNCTION = new StaticTypeWarningC
ode('UNDEFINED_FUNCTION', 11, "The FUNCTION '%s' is not defined"); | 2368 static final StaticTypeWarningCode UNDEFINED_FUNCTION = new StaticTypeWarningC
ode('UNDEFINED_FUNCTION', 11, "The function '%s' is not defined"); |
| 2369 |
1582 /** | 2370 /** |
1583 * 12.17 Getter Invocation: Let <i>T</i> be the static type of <i>e</i>. It is
a static type | 2371 * 12.17 Getter Invocation: Let <i>T</i> be the static type of <i>e</i>. It is
a static type |
1584 * warning if <i>T</i> does not have a getter named <i>m</i>. | 2372 * warning if <i>T</i> does not have a getter named <i>m</i>. |
1585 * @param getterName the name of the getter | 2373 * @param getterName the name of the getter |
1586 * @param enclosingType the name of the enclosing type where the getter is bei
ng looked for | 2374 * @param enclosingType the name of the enclosing type where the getter is bei
ng looked for |
1587 */ | 2375 */ |
1588 static final StaticTypeWarningCode UNDEFINED_GETTER = new StaticTypeWarningCod
e('UNDEFINED_GETTER', 12, "There is no such getter '%s' in '%s'"); | 2376 static final StaticTypeWarningCode UNDEFINED_GETTER = new StaticTypeWarningCod
e('UNDEFINED_GETTER', 12, "There is no such getter '%s' in '%s'"); |
| 2377 |
1589 /** | 2378 /** |
1590 * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>. I
t is a static type | 2379 * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>. I
t is a static type |
1591 * warning if <i>T</i> does not have an accessible instance member named <i>m<
/i>. | 2380 * warning if <i>T</i> does not have an accessible instance member named <i>m<
/i>. |
1592 * @param methodName the name of the method that is undefined | 2381 * @param methodName the name of the method that is undefined |
1593 * @param typeName the resolved type name that the method lookup is happening
on | 2382 * @param typeName the resolved type name that the method lookup is happening
on |
1594 */ | 2383 */ |
1595 static final StaticTypeWarningCode UNDEFINED_METHOD = new StaticTypeWarningCod
e('UNDEFINED_METHOD', 13, "The method '%s' is not defined for the class '%s'"); | 2384 static final StaticTypeWarningCode UNDEFINED_METHOD = new StaticTypeWarningCod
e('UNDEFINED_METHOD', 13, "The method '%s' is not defined for the class '%s'"); |
| 2385 |
| 2386 /** |
| 2387 * 12.18 Assignment: Evaluation of an assignment of the form |
| 2388 * <i>e<sub>1</sub></i>\[<i>e<sub>2</sub></i>\] = <i>e<sub>3</sub></i> is equi
valent to the |
| 2389 * evaluation of the expression (a, i, e){a.\[\]=(i, e); return e;} (<i>e<sub>
1</sub></i>, |
| 2390 * <i>e<sub>2</sub></i>, <i>e<sub>2</sub></i>). |
| 2391 * <p> |
| 2392 * 12.29 Assignable Expressions: An assignable expression of the form |
| 2393 * <i>e<sub>1</sub></i>\[<i>e<sub>2</sub></i>\] is evaluated as a method invoc
ation of the operator |
| 2394 * method \[\] on <i>e<sub>1</sub></i> with argument <i>e<sub>2</sub></i>. |
| 2395 * <p> |
| 2396 * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>. I
t is a static type |
| 2397 * warning if <i>T</i> does not have an accessible instance member named <i>m<
/i>. |
| 2398 * @param operator the name of the operator |
| 2399 * @param enclosingType the name of the enclosing type where the operator is b
eing looked for |
| 2400 */ |
| 2401 static final StaticTypeWarningCode UNDEFINED_OPERATOR = new StaticTypeWarningC
ode('UNDEFINED_OPERATOR', 14, "There is no such operator '%s' in '%s'"); |
| 2402 |
1596 /** | 2403 /** |
1597 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
It is a static type | 2404 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
It is a static type |
1598 * warning if <i>T</i> does not have an accessible instance setter named <i>v=
</i>. | 2405 * warning if <i>T</i> does not have an accessible instance setter named <i>v=
</i>. |
1599 * @param setterName the name of the setter | 2406 * @param setterName the name of the setter |
1600 * @param enclosingType the name of the enclosing type where the setter is bei
ng looked for | 2407 * @param enclosingType the name of the enclosing type where the setter is bei
ng looked for |
1601 * @see #INACCESSIBLE_SETTER | 2408 * @see #INACCESSIBLE_SETTER |
1602 */ | 2409 */ |
1603 static final StaticTypeWarningCode UNDEFINED_SETTER = new StaticTypeWarningCod
e('UNDEFINED_SETTER', 14, "There is no such setter '%s' in '%s'"); | 2410 static final StaticTypeWarningCode UNDEFINED_SETTER = new StaticTypeWarningCod
e('UNDEFINED_SETTER', 15, "There is no such setter '%s' in '%s'"); |
| 2411 |
1604 /** | 2412 /** |
1605 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form | 2413 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form |
1606 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … | 2414 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … |
1607 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a static type warning if <i>S<
/i> does not have an | 2415 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a static type warning if <i>S<
/i> does not have an |
1608 * accessible instance member named <i>m</i>. | 2416 * accessible instance member named <i>m</i>. |
1609 * @param methodName the name of the method that is undefined | 2417 * @param methodName the name of the method that is undefined |
1610 * @param typeName the resolved type name that the method lookup is happening
on | 2418 * @param typeName the resolved type name that the method lookup is happening
on |
1611 */ | 2419 */ |
1612 static final StaticTypeWarningCode UNDEFINED_SUPER_METHOD = new StaticTypeWarn
ingCode('UNDEFINED_SUPER_METHOD', 15, "There is no such method '%s' in '%s'"); | 2420 static final StaticTypeWarningCode UNDEFINED_SUPER_METHOD = new StaticTypeWarn
ingCode('UNDEFINED_SUPER_METHOD', 16, "There is no such method '%s' in '%s'"); |
| 2421 |
1613 /** | 2422 /** |
1614 * 15.8 Parameterized Types: It is a static type warning if <i>G</i> is not an
accessible generic | 2423 * 15.8 Parameterized Types: It is a static type warning if <i>G</i> is not an
accessible generic |
1615 * type declaration with <i>n</i> type parameters. | 2424 * type declaration with <i>n</i> type parameters. |
1616 * @param typeName the name of the type being referenced (<i>G</i>) | 2425 * @param typeName the name of the type being referenced (<i>G</i>) |
1617 * @param parameterCount the number of type parameters that were declared | 2426 * @param parameterCount the number of type parameters that were declared |
1618 * @param argumentCount the number of type arguments provided | 2427 * @param argumentCount the number of type arguments provided |
1619 */ | 2428 */ |
1620 static final StaticTypeWarningCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = new Static
TypeWarningCode('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 16, "The type '%s' is declared
with %d type parameters, but %d type arguments were given"); | 2429 static final StaticTypeWarningCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = new Static
TypeWarningCode('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 17, "The type '%s' is declared
with %d type parameters, but %d type arguments were given"); |
1621 static final List<StaticTypeWarningCode> values = [INACCESSIBLE_SETTER, INCONS
ISTENT_METHOD_INHERITANCE, INVALID_ASSIGNMENT, INVOCATION_OF_NON_FUNCTION, NON_B
OOL_CONDITION, NON_BOOL_EXPRESSION, NON_TYPE_AS_TYPE_ARGUMENT, REDIRECT_WITH_INV
ALID_TYPE_PARAMETERS, RETURN_OF_INVALID_TYPE, TYPE_ARGUMENT_NOT_MATCHING_BOUNDS,
TYPE_ARGUMENT_VIOLATES_BOUNDS, UNDEFINED_FUNCTION, UNDEFINED_GETTER, UNDEFINED_
METHOD, UNDEFINED_SETTER, UNDEFINED_SUPER_METHOD, WRONG_NUMBER_OF_TYPE_ARGUMENTS
]; | 2430 static final List<StaticTypeWarningCode> values = [INACCESSIBLE_SETTER, INCONS
ISTENT_METHOD_INHERITANCE, INVALID_ASSIGNMENT, INVOCATION_OF_NON_FUNCTION, NON_B
OOL_CONDITION, NON_BOOL_EXPRESSION, NON_TYPE_AS_TYPE_ARGUMENT, REDIRECT_WITH_INV
ALID_TYPE_PARAMETERS, RETURN_OF_INVALID_TYPE, TYPE_ARGUMENT_NOT_MATCHING_BOUNDS,
TYPE_ARGUMENT_VIOLATES_BOUNDS, UNDEFINED_FUNCTION, UNDEFINED_GETTER, UNDEFINED_
METHOD, UNDEFINED_OPERATOR, UNDEFINED_SETTER, UNDEFINED_SUPER_METHOD, WRONG_NUMB
ER_OF_TYPE_ARGUMENTS]; |
1622 final String __name; | 2431 |
1623 final int __ordinal; | 2432 /// The name of this enum constant, as declared in the enum declaration. |
1624 int get ordinal => __ordinal; | 2433 final String name; |
| 2434 |
| 2435 /// The position in the enum declaration. |
| 2436 final int ordinal; |
| 2437 |
1625 /** | 2438 /** |
1626 * The message template used to create the message to be displayed for this er
ror. | 2439 * The message template used to create the message to be displayed for this er
ror. |
1627 */ | 2440 */ |
1628 String _message; | 2441 String _message; |
| 2442 |
1629 /** | 2443 /** |
1630 * Initialize a newly created error code to have the given type and message. | 2444 * Initialize a newly created error code to have the given type and message. |
1631 * @param message the message template used to create the message to be displa
yed for the error | 2445 * @param message the message template used to create the message to be displa
yed for the error |
1632 */ | 2446 */ |
1633 StaticTypeWarningCode(this.__name, this.__ordinal, String message) { | 2447 StaticTypeWarningCode(this.name, this.ordinal, String message) { |
1634 this._message = message; | 2448 this._message = message; |
1635 } | 2449 } |
1636 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; | 2450 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; |
1637 String get message => _message; | 2451 String get message => _message; |
1638 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; | 2452 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; |
1639 bool needsRecompilation() => true; | 2453 int compareTo(StaticTypeWarningCode other) => ordinal - other.ordinal; |
1640 int compareTo(StaticTypeWarningCode other) => __ordinal - other.__ordinal; | 2454 String toString() => name; |
1641 String toString() => __name; | |
1642 } | 2455 } |
OLD | NEW |