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 library engine.error; | 3 library engine.error; |
4 import 'java_core.dart'; | 4 import 'java_core.dart'; |
5 import 'source.dart'; | 5 import 'source.dart'; |
6 import 'ast.dart' show ASTNode; | 6 import 'ast.dart' show ASTNode; |
7 import 'scanner.dart' show Token; | 7 import 'scanner.dart' show Token; |
8 /** | 8 /** |
9 * Instances of the enumeration `ErrorSeverity` represent the severity of an [Er
rorCode]. | 9 * Instances of the enumeration `ErrorSeverity` represent the severity of an [Er
rorCode] |
| 10 * . |
| 11 * |
10 * @coverage dart.engine.error | 12 * @coverage dart.engine.error |
11 */ | 13 */ |
12 class ErrorSeverity implements Comparable<ErrorSeverity> { | 14 class ErrorSeverity implements Comparable<ErrorSeverity> { |
13 | 15 |
14 /** | 16 /** |
15 * The severity representing a non-error. This is never used for any error cod
e, but is useful for | 17 * The severity representing a non-error. This is never used for any error cod
e, but is useful for |
16 * clients. | 18 * clients. |
17 */ | 19 */ |
18 static final ErrorSeverity NONE = new ErrorSeverity('NONE', 0, " ", "none"); | 20 static final ErrorSeverity NONE = new ErrorSeverity('NONE', 0, " ", "none"); |
19 | 21 |
(...skipping 26 matching lines...) Expand all Loading... |
46 */ | 48 */ |
47 String _machineCode; | 49 String _machineCode; |
48 | 50 |
49 /** | 51 /** |
50 * The name of the severity used when producing readable output. | 52 * The name of the severity used when producing readable output. |
51 */ | 53 */ |
52 String _displayName; | 54 String _displayName; |
53 | 55 |
54 /** | 56 /** |
55 * Initialize a newly created severity with the given names. | 57 * Initialize a newly created severity with the given names. |
| 58 * |
56 * @param machineCode the name of the severity used when producing machine out
put | 59 * @param machineCode the name of the severity used when producing machine out
put |
57 * @param displayName the name of the severity used when producing readable ou
tput | 60 * @param displayName the name of the severity used when producing readable ou
tput |
58 */ | 61 */ |
59 ErrorSeverity(this.name, this.ordinal, String machineCode, String displayName)
{ | 62 ErrorSeverity(this.name, this.ordinal, String machineCode, String displayName)
{ |
60 this._machineCode = machineCode; | 63 this._machineCode = machineCode; |
61 this._displayName = displayName; | 64 this._displayName = displayName; |
62 } | 65 } |
63 | 66 |
64 /** | 67 /** |
65 * Return the name of the severity used when producing readable output. | 68 * Return the name of the severity used when producing readable output. |
| 69 * |
66 * @return the name of the severity used when producing readable output | 70 * @return the name of the severity used when producing readable output |
67 */ | 71 */ |
68 String get displayName => _displayName; | 72 String get displayName => _displayName; |
69 | 73 |
70 /** | 74 /** |
71 * Return the name of the severity used when producing machine output. | 75 * Return the name of the severity used when producing machine output. |
| 76 * |
72 * @return the name of the severity used when producing machine output | 77 * @return the name of the severity used when producing machine output |
73 */ | 78 */ |
74 String get machineCode => _machineCode; | 79 String get machineCode => _machineCode; |
75 | 80 |
76 /** | 81 /** |
77 * Return the severity constant that represents the greatest severity. | 82 * Return the severity constant that represents the greatest severity. |
| 83 * |
78 * @param severity the severity being compared against | 84 * @param severity the severity being compared against |
79 * @return the most sever of this or the given severity | 85 * @return the most sever of this or the given severity |
80 */ | 86 */ |
81 ErrorSeverity max(ErrorSeverity severity) => this.ordinal >= severity.ordinal
? this : severity; | 87 ErrorSeverity max(ErrorSeverity severity) => this.ordinal >= severity.ordinal
? this : severity; |
82 int compareTo(ErrorSeverity other) => ordinal - other.ordinal; | 88 int compareTo(ErrorSeverity other) => ordinal - other.ordinal; |
83 int get hashCode => ordinal; | 89 int get hashCode => ordinal; |
84 String toString() => name; | 90 String toString() => name; |
85 } | 91 } |
86 /** | 92 /** |
87 * Instances of the class `AnalysisErrorWithProperties` | 93 * Instances of the class `AnalysisErrorWithProperties` |
88 */ | 94 */ |
89 class AnalysisErrorWithProperties extends AnalysisError { | 95 class AnalysisErrorWithProperties extends AnalysisError { |
90 | 96 |
91 /** | 97 /** |
92 * The properties associated with this error. | 98 * The properties associated with this error. |
93 */ | 99 */ |
94 Map<ErrorProperty, Object> _propertyMap = new Map<ErrorProperty, Object>(); | 100 Map<ErrorProperty, Object> _propertyMap = new Map<ErrorProperty, Object>(); |
95 | 101 |
96 /** | 102 /** |
97 * Initialize a newly created analysis error for the specified source. The err
or has no location | 103 * Initialize a newly created analysis error for the specified source. The err
or has no location |
98 * information. | 104 * information. |
| 105 * |
99 * @param source the source for which the exception occurred | 106 * @param source the source for which the exception occurred |
100 * @param errorCode the error code to be associated with this error | 107 * @param errorCode the error code to be associated with this error |
101 * @param arguments the arguments used to build the error message | 108 * @param arguments the arguments used to build the error message |
102 */ | 109 */ |
103 AnalysisErrorWithProperties.con1(Source source, ErrorCode errorCode, List<Obje
ct> arguments) : super.con1(source, errorCode, arguments) { | 110 AnalysisErrorWithProperties.con1(Source source, ErrorCode errorCode, List<Obje
ct> arguments) : super.con1(source, errorCode, arguments) { |
104 _jtd_constructor_133_impl(source, errorCode, arguments); | 111 _jtd_constructor_133_impl(source, errorCode, arguments); |
105 } | 112 } |
106 _jtd_constructor_133_impl(Source source, ErrorCode errorCode, List<Object> arg
uments) { | 113 _jtd_constructor_133_impl(Source source, ErrorCode errorCode, List<Object> arg
uments) { |
107 } | 114 } |
108 | 115 |
109 /** | 116 /** |
110 * Initialize a newly created analysis error for the specified source at the g
iven location. | 117 * Initialize a newly created analysis error for the specified source at the g
iven location. |
| 118 * |
111 * @param source the source for which the exception occurred | 119 * @param source the source for which the exception occurred |
112 * @param offset the offset of the location of the error | 120 * @param offset the offset of the location of the error |
113 * @param length the length of the location of the error | 121 * @param length the length of the location of the error |
114 * @param errorCode the error code to be associated with this error | 122 * @param errorCode the error code to be associated with this error |
115 * @param arguments the arguments used to build the error message | 123 * @param arguments the arguments used to build the error message |
116 */ | 124 */ |
117 AnalysisErrorWithProperties.con2(Source source, int offset, int length, ErrorC
ode errorCode, List<Object> arguments) : super.con2(source, offset, length, erro
rCode, arguments) { | 125 AnalysisErrorWithProperties.con2(Source source, int offset, int length, ErrorC
ode errorCode, List<Object> arguments) : super.con2(source, offset, length, erro
rCode, arguments) { |
118 _jtd_constructor_134_impl(source, offset, length, errorCode, arguments); | 126 _jtd_constructor_134_impl(source, offset, length, errorCode, arguments); |
119 } | 127 } |
120 _jtd_constructor_134_impl(Source source, int offset, int length, ErrorCode err
orCode, List<Object> arguments) { | 128 _jtd_constructor_134_impl(Source source, int offset, int length, ErrorCode err
orCode, List<Object> arguments) { |
121 } | 129 } |
122 Object getProperty(ErrorProperty property) => _propertyMap[property]; | 130 Object getProperty(ErrorProperty property) => _propertyMap[property]; |
123 | 131 |
124 /** | 132 /** |
125 * Set the value of the given property to the given value. Using a value of `n
ull` will | 133 * Set the value of the given property to the given value. Using a value of `n
ull` will |
126 * effectively remove the property from this error. | 134 * effectively remove the property from this error. |
| 135 * |
127 * @param property the property whose value is to be returned | 136 * @param property the property whose value is to be returned |
128 * @param value the new value of the given property | 137 * @param value the new value of the given property |
129 */ | 138 */ |
130 void setProperty(ErrorProperty property, Object value) { | 139 void setProperty(ErrorProperty property, Object value) { |
131 _propertyMap[property] = value; | 140 _propertyMap[property] = value; |
132 } | 141 } |
133 } | 142 } |
134 /** | 143 /** |
135 * Instances of the class `ErrorReporter` wrap an error listener with utility me
thods used to | 144 * Instances of the class `ErrorReporter` wrap an error listener with utility me
thods used to |
136 * create the errors being reported. | 145 * create the errors being reported. |
| 146 * |
137 * @coverage dart.engine.error | 147 * @coverage dart.engine.error |
138 */ | 148 */ |
139 class ErrorReporter { | 149 class ErrorReporter { |
140 | 150 |
141 /** | 151 /** |
142 * The error listener to which errors will be reported. | 152 * The error listener to which errors will be reported. |
143 */ | 153 */ |
144 AnalysisErrorListener _errorListener; | 154 AnalysisErrorListener _errorListener; |
145 | 155 |
146 /** | 156 /** |
147 * The default source to be used when reporting errors. | 157 * The default source to be used when reporting errors. |
148 */ | 158 */ |
149 Source _defaultSource; | 159 Source _defaultSource; |
150 | 160 |
151 /** | 161 /** |
152 * The source to be used when reporting errors. | 162 * The source to be used when reporting errors. |
153 */ | 163 */ |
154 Source _source; | 164 Source _source; |
155 | 165 |
156 /** | 166 /** |
157 * Initialize a newly created error reporter that will report errors to the gi
ven listener. | 167 * Initialize a newly created error reporter that will report errors to the gi
ven listener. |
| 168 * |
158 * @param errorListener the error listener to which errors will be reported | 169 * @param errorListener the error listener to which errors will be reported |
159 * @param defaultSource the default source to be used when reporting errors | 170 * @param defaultSource the default source to be used when reporting errors |
160 */ | 171 */ |
161 ErrorReporter(AnalysisErrorListener errorListener, Source defaultSource) { | 172 ErrorReporter(AnalysisErrorListener errorListener, Source defaultSource) { |
162 if (errorListener == null) { | 173 if (errorListener == null) { |
163 throw new IllegalArgumentException("An error listener must be provided"); | 174 throw new IllegalArgumentException("An error listener must be provided"); |
164 } else if (defaultSource == null) { | 175 } else if (defaultSource == null) { |
165 throw new IllegalArgumentException("A default source must be provided"); | 176 throw new IllegalArgumentException("A default source must be provided"); |
166 } | 177 } |
167 this._errorListener = errorListener; | 178 this._errorListener = errorListener; |
168 this._defaultSource = defaultSource; | 179 this._defaultSource = defaultSource; |
169 this._source = defaultSource; | 180 this._source = defaultSource; |
170 } | 181 } |
171 | 182 |
172 /** | 183 /** |
173 * Creates an error with properties with the given error code and arguments. | 184 * Creates an error with properties with the given error code and arguments. |
| 185 * |
174 * @param errorCode the error code of the error to be reported | 186 * @param errorCode the error code of the error to be reported |
175 * @param node the node specifying the location of the error | 187 * @param node the node specifying the location of the error |
176 * @param arguments the arguments to the error, used to compose the error mess
age | 188 * @param arguments the arguments to the error, used to compose the error mess
age |
177 */ | 189 */ |
178 AnalysisErrorWithProperties newErrorWithProperties(ErrorCode errorCode, ASTNod
e node, List<Object> arguments) => new AnalysisErrorWithProperties.con2(_source,
node.offset, node.length, errorCode, arguments); | 190 AnalysisErrorWithProperties newErrorWithProperties(ErrorCode errorCode, ASTNod
e node, List<Object> arguments) => new AnalysisErrorWithProperties.con2(_source,
node.offset, node.length, errorCode, arguments); |
179 | 191 |
180 /** | 192 /** |
181 * Report a passed error. | 193 * Report a passed error. |
| 194 * |
182 * @param error the error to report | 195 * @param error the error to report |
183 */ | 196 */ |
184 void reportError(AnalysisError error) { | 197 void reportError(AnalysisError error) { |
185 _errorListener.onError(error); | 198 _errorListener.onError(error); |
186 } | 199 } |
187 | 200 |
188 /** | 201 /** |
189 * Report an error with the given error code and arguments. | 202 * Report an error with the given error code and arguments. |
| 203 * |
190 * @param errorCode the error code of the error to be reported | 204 * @param errorCode the error code of the error to be reported |
191 * @param node the node specifying the location of the error | 205 * @param node the node specifying the location of the error |
192 * @param arguments the arguments to the error, used to compose the error mess
age | 206 * @param arguments the arguments to the error, used to compose the error mess
age |
193 */ | 207 */ |
194 void reportError2(ErrorCode errorCode, ASTNode node, List<Object> arguments) { | 208 void reportError2(ErrorCode errorCode, ASTNode node, List<Object> arguments) { |
195 _errorListener.onError(new AnalysisError.con2(_source, node.offset, node.len
gth, errorCode, arguments)); | 209 _errorListener.onError(new AnalysisError.con2(_source, node.offset, node.len
gth, errorCode, arguments)); |
196 } | 210 } |
197 | 211 |
198 /** | 212 /** |
199 * Report an error with the given error code and arguments. | 213 * Report an error with the given error code and arguments. |
| 214 * |
200 * @param errorCode the error code of the error to be reported | 215 * @param errorCode the error code of the error to be reported |
201 * @param offset the offset of the location of the error | 216 * @param offset the offset of the location of the error |
202 * @param length the length of the location of the error | 217 * @param length the length of the location of the error |
203 * @param arguments the arguments to the error, used to compose the error mess
age | 218 * @param arguments the arguments to the error, used to compose the error mess
age |
204 */ | 219 */ |
205 void reportError3(ErrorCode errorCode, int offset, int length, List<Object> ar
guments) { | 220 void reportError3(ErrorCode errorCode, int offset, int length, List<Object> ar
guments) { |
206 _errorListener.onError(new AnalysisError.con2(_source, offset, length, error
Code, arguments)); | 221 _errorListener.onError(new AnalysisError.con2(_source, offset, length, error
Code, arguments)); |
207 } | 222 } |
208 | 223 |
209 /** | 224 /** |
210 * Report an error with the given error code and arguments. | 225 * Report an error with the given error code and arguments. |
| 226 * |
211 * @param errorCode the error code of the error to be reported | 227 * @param errorCode the error code of the error to be reported |
212 * @param token the token specifying the location of the error | 228 * @param token the token specifying the location of the error |
213 * @param arguments the arguments to the error, used to compose the error mess
age | 229 * @param arguments the arguments to the error, used to compose the error mess
age |
214 */ | 230 */ |
215 void reportError4(ErrorCode errorCode, Token token, List<Object> arguments) { | 231 void reportError4(ErrorCode errorCode, Token token, List<Object> arguments) { |
216 _errorListener.onError(new AnalysisError.con2(_source, token.offset, token.l
ength, errorCode, arguments)); | 232 _errorListener.onError(new AnalysisError.con2(_source, token.offset, token.l
ength, errorCode, arguments)); |
217 } | 233 } |
218 | 234 |
219 /** | 235 /** |
220 * Set the source to be used when reporting errors. Setting the source to `nul
l` will cause | 236 * Set the source to be used when reporting errors. Setting the source to `nul
l` will cause |
221 * the default source to be used. | 237 * the default source to be used. |
| 238 * |
222 * @param source the source to be used when reporting errors | 239 * @param source the source to be used when reporting errors |
223 */ | 240 */ |
224 void set source(Source source2) { | 241 void set source(Source source2) { |
225 this._source = source2 == null ? _defaultSource : source2; | 242 this._source = source2 == null ? _defaultSource : source2; |
226 } | 243 } |
227 } | 244 } |
228 /** | 245 /** |
229 * Instances of the class `AnalysisError` represent an error discovered during t
he analysis of | 246 * Instances of the class `AnalysisError` represent an error discovered during t
he analysis of |
230 * some Dart code. | 247 * some Dart code. |
| 248 * |
231 * @see AnalysisErrorListener | 249 * @see AnalysisErrorListener |
232 * @coverage dart.engine.error | 250 * @coverage dart.engine.error |
233 */ | 251 */ |
234 class AnalysisError { | 252 class AnalysisError { |
235 | 253 |
236 /** | 254 /** |
237 * An empty array of errors used when no errors are expected. | 255 * An empty array of errors used when no errors are expected. |
238 */ | 256 */ |
239 static List<AnalysisError> NO_ERRORS = new List<AnalysisError>(0); | 257 static List<AnalysisError> NO_ERRORS = new List<AnalysisError>(0); |
240 | 258 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 | 302 |
285 /** | 303 /** |
286 * The number of characters from the offset to the end of the source which enc
ompasses the | 304 * The number of characters from the offset to the end of the source which enc
ompasses the |
287 * compilation error. | 305 * compilation error. |
288 */ | 306 */ |
289 int _length = 0; | 307 int _length = 0; |
290 | 308 |
291 /** | 309 /** |
292 * Initialize a newly created analysis error for the specified source. The err
or has no location | 310 * Initialize a newly created analysis error for the specified source. The err
or has no location |
293 * information. | 311 * information. |
| 312 * |
294 * @param source the source for which the exception occurred | 313 * @param source the source for which the exception occurred |
295 * @param errorCode the error code to be associated with this error | 314 * @param errorCode the error code to be associated with this error |
296 * @param arguments the arguments used to build the error message | 315 * @param arguments the arguments used to build the error message |
297 */ | 316 */ |
298 AnalysisError.con1(Source source2, ErrorCode errorCode2, List<Object> argument
s) { | 317 AnalysisError.con1(Source source2, ErrorCode errorCode2, List<Object> argument
s) { |
299 _jtd_constructor_131_impl(source2, errorCode2, arguments); | 318 _jtd_constructor_131_impl(source2, errorCode2, arguments); |
300 } | 319 } |
301 _jtd_constructor_131_impl(Source source2, ErrorCode errorCode2, List<Object> a
rguments) { | 320 _jtd_constructor_131_impl(Source source2, ErrorCode errorCode2, List<Object> a
rguments) { |
302 this._source = source2; | 321 this._source = source2; |
303 this._errorCode = errorCode2; | 322 this._errorCode = errorCode2; |
304 this._message = JavaString.format(errorCode2.message, arguments); | 323 this._message = JavaString.format(errorCode2.message, arguments); |
305 } | 324 } |
306 | 325 |
307 /** | 326 /** |
308 * Initialize a newly created analysis error for the specified source at the g
iven location. | 327 * Initialize a newly created analysis error for the specified source at the g
iven location. |
| 328 * |
309 * @param source the source for which the exception occurred | 329 * @param source the source for which the exception occurred |
310 * @param offset the offset of the location of the error | 330 * @param offset the offset of the location of the error |
311 * @param length the length of the location of the error | 331 * @param length the length of the location of the error |
312 * @param errorCode the error code to be associated with this error | 332 * @param errorCode the error code to be associated with this error |
313 * @param arguments the arguments used to build the error message | 333 * @param arguments the arguments used to build the error message |
314 */ | 334 */ |
315 AnalysisError.con2(Source source2, int offset2, int length2, ErrorCode errorCo
de2, List<Object> arguments) { | 335 AnalysisError.con2(Source source2, int offset2, int length2, ErrorCode errorCo
de2, List<Object> arguments) { |
316 _jtd_constructor_132_impl(source2, offset2, length2, errorCode2, arguments); | 336 _jtd_constructor_132_impl(source2, offset2, length2, errorCode2, arguments); |
317 } | 337 } |
318 _jtd_constructor_132_impl(Source source2, int offset2, int length2, ErrorCode
errorCode2, List<Object> arguments) { | 338 _jtd_constructor_132_impl(Source source2, int offset2, int length2, ErrorCode
errorCode2, List<Object> arguments) { |
319 this._source = source2; | 339 this._source = source2; |
320 this._offset = offset2; | 340 this._offset = offset2; |
321 this._length = length2; | 341 this._length = length2; |
322 this._errorCode = errorCode2; | 342 this._errorCode = errorCode2; |
323 this._message = JavaString.format(errorCode2.message, arguments); | 343 this._message = JavaString.format(errorCode2.message, arguments); |
324 } | 344 } |
325 | 345 |
326 /** | 346 /** |
327 * Return the error code associated with the error. | 347 * Return the error code associated with the error. |
| 348 * |
328 * @return the error code associated with the error | 349 * @return the error code associated with the error |
329 */ | 350 */ |
330 ErrorCode get errorCode => _errorCode; | 351 ErrorCode get errorCode => _errorCode; |
331 | 352 |
332 /** | 353 /** |
333 * Return the number of characters from the offset to the end of the source wh
ich encompasses the | 354 * Return the number of characters from the offset to the end of the source wh
ich encompasses the |
334 * compilation error. | 355 * compilation error. |
| 356 * |
335 * @return the length of the error location | 357 * @return the length of the error location |
336 */ | 358 */ |
337 int get length => _length; | 359 int get length => _length; |
338 | 360 |
339 /** | 361 /** |
340 * Return the localized error message. | 362 * Return the localized error message. |
| 363 * |
341 * @return the localized error message | 364 * @return the localized error message |
342 */ | 365 */ |
343 String get message => _message; | 366 String get message => _message; |
344 | 367 |
345 /** | 368 /** |
346 * Return the character offset from the beginning of the source (zero based) w
here the error | 369 * Return the character offset from the beginning of the source (zero based) w
here the error |
347 * occurred. | 370 * occurred. |
| 371 * |
348 * @return the offset to the start of the error location | 372 * @return the offset to the start of the error location |
349 */ | 373 */ |
350 int get offset => _offset; | 374 int get offset => _offset; |
351 | 375 |
352 /** | 376 /** |
353 * Return the value of the given property, or `null` if the given property is
not defined | 377 * Return the value of the given property, or `null` if the given property is
not defined |
354 * for this error. | 378 * for this error. |
| 379 * |
355 * @param property the property whose value is to be returned | 380 * @param property the property whose value is to be returned |
356 * @return the value of the given property | 381 * @return the value of the given property |
357 */ | 382 */ |
358 Object getProperty(ErrorProperty property) => null; | 383 Object getProperty(ErrorProperty property) => null; |
359 | 384 |
360 /** | 385 /** |
361 * Return the source in which the error occurred, or `null` if unknown. | 386 * Return the source in which the error occurred, or `null` if unknown. |
| 387 * |
362 * @return the source in which the error occurred | 388 * @return the source in which the error occurred |
363 */ | 389 */ |
364 Source get source => _source; | 390 Source get source => _source; |
365 int get hashCode { | 391 int get hashCode { |
366 int hashCode = _offset; | 392 int hashCode = _offset; |
367 hashCode ^= (_message != null) ? _message.hashCode : 0; | 393 hashCode ^= (_message != null) ? _message.hashCode : 0; |
368 hashCode ^= (_source != null) ? _source.hashCode : 0; | 394 hashCode ^= (_source != null) ? _source.hashCode : 0; |
369 return hashCode; | 395 return hashCode; |
370 } | 396 } |
371 | 397 |
372 /** | 398 /** |
373 * Set the source in which the error occurred to the given source. | 399 * Set the source in which the error occurred to the given source. |
| 400 * |
374 * @param source the source in which the error occurred | 401 * @param source the source in which the error occurred |
375 */ | 402 */ |
376 void set source(Source source2) { | 403 void set source(Source source2) { |
377 this._source = source2; | 404 this._source = source2; |
378 } | 405 } |
379 String toString() { | 406 String toString() { |
380 JavaStringBuilder builder = new JavaStringBuilder(); | 407 JavaStringBuilder builder = new JavaStringBuilder(); |
381 builder.append((_source != null) ? _source.fullName : "<unknown source>"); | 408 builder.append((_source != null) ? _source.fullName : "<unknown source>"); |
382 builder.append("("); | 409 builder.append("("); |
383 builder.append(_offset); | 410 builder.append(_offset); |
384 builder.append(".."); | 411 builder.append(".."); |
385 builder.append(_offset + _length - 1); | 412 builder.append(_offset + _length - 1); |
386 builder.append("): "); | 413 builder.append("): "); |
387 builder.append(_message); | 414 builder.append(_message); |
388 return builder.toString(); | 415 return builder.toString(); |
389 } | 416 } |
390 } | 417 } |
391 /** | 418 /** |
392 * The enumeration `ErrorProperty` defines the properties that can be associated
with an[AnalysisError]. | 419 * The enumeration `ErrorProperty` defines the properties that can be associated
with an |
| 420 * [AnalysisError]. |
393 */ | 421 */ |
394 class ErrorProperty implements Comparable<ErrorProperty> { | 422 class ErrorProperty implements Comparable<ErrorProperty> { |
395 | 423 |
396 /** | 424 /** |
397 * A property whose value is an array of [ExecutableElement executable element
s] that should | 425 * A property whose value is an array of [ExecutableElement] that should |
398 * be but are not implemented by a concrete class. | 426 * be but are not implemented by a concrete class. |
399 */ | 427 */ |
400 static final ErrorProperty UNIMPLEMENTED_METHODS = new ErrorProperty('UNIMPLEM
ENTED_METHODS', 0); | 428 static final ErrorProperty UNIMPLEMENTED_METHODS = new ErrorProperty('UNIMPLEM
ENTED_METHODS', 0); |
401 static final List<ErrorProperty> values = [UNIMPLEMENTED_METHODS]; | 429 static final List<ErrorProperty> values = [UNIMPLEMENTED_METHODS]; |
402 | 430 |
403 /// The name of this enum constant, as declared in the enum declaration. | 431 /// The name of this enum constant, as declared in the enum declaration. |
404 final String name; | 432 final String name; |
405 | 433 |
406 /// The position in the enum declaration. | 434 /// The position in the enum declaration. |
407 final int ordinal; | 435 final int ordinal; |
408 ErrorProperty(this.name, this.ordinal) { | 436 ErrorProperty(this.name, this.ordinal) { |
409 } | 437 } |
410 int compareTo(ErrorProperty other) => ordinal - other.ordinal; | 438 int compareTo(ErrorProperty other) => ordinal - other.ordinal; |
411 int get hashCode => ordinal; | 439 int get hashCode => ordinal; |
412 String toString() => name; | 440 String toString() => name; |
413 } | 441 } |
414 /** | 442 /** |
415 * The interface `ErrorCode` defines the behavior common to objects representing
error codes | 443 * The interface `ErrorCode` defines the behavior common to objects representing
error codes |
416 * associated with [AnalysisError analysis errors]. | 444 * associated with [AnalysisError]. |
| 445 * |
417 * @coverage dart.engine.error | 446 * @coverage dart.engine.error |
418 */ | 447 */ |
419 abstract class ErrorCode { | 448 abstract class ErrorCode { |
420 | 449 |
421 /** | 450 /** |
422 * Return the severity of this error. | 451 * Return the severity of this error. |
| 452 * |
423 * @return the severity of this error | 453 * @return the severity of this error |
424 */ | 454 */ |
425 ErrorSeverity get errorSeverity; | 455 ErrorSeverity get errorSeverity; |
426 | 456 |
427 /** | 457 /** |
428 * Return the message template used to create the message to be displayed for
this error. | 458 * Return the message template used to create the message to be displayed for
this error. |
| 459 * |
429 * @return the message template used to create the message to be displayed for
this error | 460 * @return the message template used to create the message to be displayed for
this error |
430 */ | 461 */ |
431 String get message; | 462 String get message; |
432 | 463 |
433 /** | 464 /** |
434 * Return the type of the error. | 465 * Return the type of the error. |
| 466 * |
435 * @return the type of the error | 467 * @return the type of the error |
436 */ | 468 */ |
437 ErrorType get type; | 469 ErrorType get type; |
438 } | 470 } |
439 /** | 471 /** |
440 * Instances of the enumeration `ErrorType` represent the type of an [ErrorCode]
. | 472 * Instances of the enumeration `ErrorType` represent the type of an [ErrorCode]
. |
| 473 * |
441 * @coverage dart.engine.error | 474 * @coverage dart.engine.error |
442 */ | 475 */ |
443 class ErrorType implements Comparable<ErrorType> { | 476 class ErrorType implements Comparable<ErrorType> { |
444 | 477 |
445 /** | 478 /** |
446 * Compile-time errors are errors that preclude execution. A compile time erro
r must be reported | 479 * Compile-time errors are errors that preclude execution. A compile time erro
r must be reported |
447 * by a Dart compiler before the erroneous code is executed. | 480 * by a Dart compiler before the erroneous code is executed. |
448 */ | 481 */ |
449 static final ErrorType COMPILE_TIME_ERROR = new ErrorType('COMPILE_TIME_ERROR'
, 0, ErrorSeverity.ERROR); | 482 static final ErrorType COMPILE_TIME_ERROR = new ErrorType('COMPILE_TIME_ERROR'
, 0, ErrorSeverity.ERROR); |
450 | 483 |
(...skipping 27 matching lines...) Expand all Loading... |
478 /// The position in the enum declaration. | 511 /// The position in the enum declaration. |
479 final int ordinal; | 512 final int ordinal; |
480 | 513 |
481 /** | 514 /** |
482 * The severity of this type of error. | 515 * The severity of this type of error. |
483 */ | 516 */ |
484 ErrorSeverity _severity; | 517 ErrorSeverity _severity; |
485 | 518 |
486 /** | 519 /** |
487 * Initialize a newly created error type to have the given severity. | 520 * Initialize a newly created error type to have the given severity. |
| 521 * |
488 * @param severity the severity of this type of error | 522 * @param severity the severity of this type of error |
489 */ | 523 */ |
490 ErrorType(this.name, this.ordinal, ErrorSeverity severity) { | 524 ErrorType(this.name, this.ordinal, ErrorSeverity severity) { |
491 this._severity = severity; | 525 this._severity = severity; |
492 } | 526 } |
493 | 527 |
494 /** | 528 /** |
495 * Return the severity of this type of error. | 529 * Return the severity of this type of error. |
| 530 * |
496 * @return the severity of this type of error | 531 * @return the severity of this type of error |
497 */ | 532 */ |
498 ErrorSeverity get severity => _severity; | 533 ErrorSeverity get severity => _severity; |
499 int compareTo(ErrorType other) => ordinal - other.ordinal; | 534 int compareTo(ErrorType other) => ordinal - other.ordinal; |
500 int get hashCode => ordinal; | 535 int get hashCode => ordinal; |
501 String toString() => name; | 536 String toString() => name; |
502 } | 537 } |
503 /** | 538 /** |
504 * The enumeration `CompileTimeErrorCode` defines the error codes used for compi
le time | 539 * The enumeration `CompileTimeErrorCode` defines the error codes used for compi
le time |
505 * errors. The convention for this class is for the name of the error code to in
dicate the problem | 540 * errors. The convention for this class is for the name of the error code to in
dicate the problem |
506 * that caused the error to be generated and for the error message to explain wh
at is wrong and, | 541 * that caused the error to be generated and for the error message to explain wh
at is wrong and, |
507 * when appropriate, how the problem can be corrected. | 542 * when appropriate, how the problem can be corrected. |
| 543 * |
508 * @coverage dart.engine.error | 544 * @coverage dart.engine.error |
509 */ | 545 */ |
510 class CompileTimeErrorCode implements Comparable<CompileTimeErrorCode>, ErrorCod
e { | 546 class CompileTimeErrorCode implements Comparable<CompileTimeErrorCode>, ErrorCod
e { |
511 | 547 |
512 /** | 548 /** |
513 * 14.2 Exports: It is a compile-time error if a name <i>N</i> is re-exported
by a library | 549 * 14.2 Exports: It is a compile-time error if a name <i>N</i> is re-exported
by a library |
514 * <i>L</i> and <i>N</i> is introduced into the export namespace of <i>L</i> b
y more than one | 550 * <i>L</i> and <i>N</i> is introduced into the export namespace of <i>L</i> b
y more than one |
515 * export. | 551 * export. |
| 552 * |
516 * @param ambiguousElementName the name of the ambiguous element | 553 * @param ambiguousElementName the name of the ambiguous element |
517 * @param firstLibraryName the name of the first library that the type is foun
d | 554 * @param firstLibraryName the name of the first library that the type is foun
d |
518 * @param secondLibraryName the name of the second library that the type is fo
und | 555 * @param secondLibraryName the name of the second library that the type is fo
und |
519 */ | 556 */ |
520 static final CompileTimeErrorCode AMBIGUOUS_EXPORT = new CompileTimeErrorCode(
'AMBIGUOUS_EXPORT', 0, "The element '%s' is defined in the libraries '%s' and '%
s'"); | 557 static final CompileTimeErrorCode AMBIGUOUS_EXPORT = new CompileTimeErrorCode(
'AMBIGUOUS_EXPORT', 0, "The element '%s' is defined in the libraries '%s' and '%
s'"); |
521 | 558 |
522 /** | 559 /** |
523 * 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i
>N</i> is introduced | 560 * 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i
>N</i> is introduced |
524 * into the top level scope <i>L</i> by more than one import then: | 561 * into the top level scope <i>L</i> by more than one import then: |
525 * <ol> | 562 * <ol> |
526 * * It is a static warning if <i>N</i> is used as a type annotation. | 563 * * It is a static warning if <i>N</i> is used as a type annotation. |
527 * * In checked mode, it is a dynamic error if <i>N</i> is used as a type anno
tation and | 564 * * In checked mode, it is a dynamic error if <i>N</i> is used as a type anno
tation and |
528 * referenced during a subtype test. | 565 * referenced during a subtype test. |
529 * * Otherwise, it is a compile-time error. | 566 * * Otherwise, it is a compile-time error. |
530 * </ol> | 567 * </ol> |
| 568 * |
531 * @param ambiguousElementName the name of the ambiguous element | 569 * @param ambiguousElementName the name of the ambiguous element |
532 * @param firstLibraryName the name of the first library that the type is foun
d | 570 * @param firstLibraryName the name of the first library that the type is foun
d |
533 * @param secondLibraryName the name of the second library that the type is fo
und | 571 * @param secondLibraryName the name of the second library that the type is fo
und |
534 */ | 572 */ |
535 static final CompileTimeErrorCode AMBIGUOUS_IMPORT = new CompileTimeErrorCode(
'AMBIGUOUS_IMPORT', 1, "The element '%s' is defined in the libraries '%s' and '%
s'"); | 573 static final CompileTimeErrorCode AMBIGUOUS_IMPORT = new CompileTimeErrorCode(
'AMBIGUOUS_IMPORT', 1, "The element '%s' is defined in the libraries '%s' and '%
s'"); |
536 | 574 |
537 /** | 575 /** |
538 * 12.33 Argument Definition Test: It is a compile time error if <i>v</i> does
not denote a formal | 576 * 12.33 Argument Definition Test: It is a compile time error if <i>v</i> does
not denote a formal |
539 * parameter. | 577 * parameter. |
| 578 * |
540 * @param the name of the identifier in the argument definition test that is n
ot a parameter | 579 * @param the name of the identifier in the argument definition test that is n
ot a parameter |
541 */ | 580 */ |
542 static final CompileTimeErrorCode ARGUMENT_DEFINITION_TEST_NON_PARAMETER = new
CompileTimeErrorCode('ARGUMENT_DEFINITION_TEST_NON_PARAMETER', 2, "'%s' is not
a parameter"); | 581 static final CompileTimeErrorCode ARGUMENT_DEFINITION_TEST_NON_PARAMETER = new
CompileTimeErrorCode('ARGUMENT_DEFINITION_TEST_NON_PARAMETER', 2, "'%s' is not
a parameter"); |
543 | 582 |
544 /** | 583 /** |
545 * 12.30 Identifier Reference: It is a compile-time error to use a built-in id
entifier other than | 584 * 12.30 Identifier Reference: It is a compile-time error to use a built-in id
entifier other than |
546 * dynamic as a type annotation. | 585 * dynamic as a type annotation. |
547 */ | 586 */ |
548 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"); | 587 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"); |
549 | 588 |
(...skipping 21 matching lines...) Expand all Loading... |
571 */ | 610 */ |
572 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"); | 611 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"); |
573 | 612 |
574 /** | 613 /** |
575 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time
constant would raise | 614 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time
constant would raise |
576 * an exception. | 615 * an exception. |
577 */ | 616 */ |
578 static final CompileTimeErrorCode COMPILE_TIME_CONSTANT_RAISES_EXCEPTION = new
CompileTimeErrorCode('COMPILE_TIME_CONSTANT_RAISES_EXCEPTION', 8, ""); | 617 static final CompileTimeErrorCode COMPILE_TIME_CONSTANT_RAISES_EXCEPTION = new
CompileTimeErrorCode('COMPILE_TIME_CONSTANT_RAISES_EXCEPTION', 8, ""); |
579 | 618 |
580 /** | 619 /** |
| 620 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same |
| 621 * name. This restriction holds regardless of whether the getter is defined ex
plicitly or |
| 622 * implicitly, or whether the getter or the method are inherited or not. |
| 623 */ |
| 624 static final CompileTimeErrorCode CONFLICTING_GETTER_AND_METHOD = new CompileT
imeErrorCode('CONFLICTING_GETTER_AND_METHOD', 9, "Class '%s' cannot have both ge
tter '%s.%s' and method with the same name"); |
| 625 |
| 626 /** |
| 627 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same |
| 628 * name. This restriction holds regardless of whether the getter is defined ex
plicitly or |
| 629 * implicitly, or whether the getter or the method are inherited or not. |
| 630 */ |
| 631 static final CompileTimeErrorCode CONFLICTING_METHOD_AND_GETTER = new CompileT
imeErrorCode('CONFLICTING_METHOD_AND_GETTER', 10, "Class '%s' cannot have both m
ethod '%s.%s' and getter with the same name"); |
| 632 |
| 633 /** |
581 * 7.6 Constructors: A constructor name always begins with the name of its imm
ediately enclosing | 634 * 7.6 Constructors: A constructor name always begins with the name of its imm
ediately enclosing |
582 * class, and may optionally be followed by a dot and an identifier <i>id</i>.
It is a | 635 * class, and may optionally be followed by a dot and an identifier <i>id</i>.
It is a |
583 * compile-time error if <i>id</i> is the name of a member declared in the imm
ediately enclosing | 636 * compile-time error if <i>id</i> is the name of a member declared in the imm
ediately enclosing |
584 * class. | 637 * class. |
585 */ | 638 */ |
586 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"); | 639 static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD = new
CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD', 11, "'%s' cannot
be used to name a constructor and a field in this class"); |
587 | 640 |
588 /** | 641 /** |
589 * 7.6 Constructors: A constructor name always begins with the name of its imm
ediately enclosing | 642 * 7.6 Constructors: A constructor name always begins with the name of its imm
ediately enclosing |
590 * class, and may optionally be followed by a dot and an identifier <i>id</i>.
It is a | 643 * class, and may optionally be followed by a dot and an identifier <i>id</i>.
It is a |
591 * compile-time error if <i>id</i> is the name of a member declared in the imm
ediately enclosing | 644 * compile-time error if <i>id</i> is the name of a member declared in the imm
ediately enclosing |
592 * class. | 645 * class. |
593 */ | 646 */ |
594 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"); | 647 static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD = ne
w CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD', 12, "'%s' cann
ot be used to name a constructor and a method in this class"); |
595 | 648 |
596 /** | 649 /** |
597 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 650 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
598 * uncaught exception being thrown. | 651 * uncaught exception being thrown. |
599 */ | 652 */ |
600 static final CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION = new Com
pileTimeErrorCode('CONST_CONSTRUCTOR_THROWS_EXCEPTION', 11, "'const' constructor
s cannot throw exceptions"); | 653 static final CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION = new Com
pileTimeErrorCode('CONST_CONSTRUCTOR_THROWS_EXCEPTION', 13, "'const' constructor
s cannot throw exceptions"); |
601 | 654 |
602 /** | 655 /** |
603 * 7.6.3 Constant Constructors: It is a compile-time error if a constant const
ructor is declared | 656 * 7.6.3 Constant Constructors: It is a compile-time error if a constant const
ructor is declared |
604 * by a class that has a non-final instance variable. | 657 * by a class that has a non-final instance variable. |
605 * | 658 * |
606 * The above refers to both locally declared and inherited instance variables. | 659 * The above refers to both locally declared and inherited instance variables. |
607 */ | 660 */ |
608 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"); | 661 static final CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD = new
CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD', 14, "Cannot defi
ne the 'const' constructor for a class with non-final fields"); |
609 | 662 |
610 /** | 663 /** |
611 * 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error
if o is not | 664 * 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error
if o is not |
612 * <b>null</b> and the interface of the class of <i>o</i> is not a subtype of
the static type of | 665 * <b>null</b> and the interface of the class of <i>o</i> is not a subtype of
the static type of |
613 * the field <i>v</i>. | 666 * the field <i>v</i>. |
614 * | 667 * |
615 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 668 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
616 * uncaught exception being thrown. | 669 * uncaught exception being thrown. |
| 670 * |
617 * @param initializerType the name of the type of the initializer expression | 671 * @param initializerType the name of the type of the initializer expression |
618 * @param fieldType the name of the type of the field | 672 * @param fieldType the name of the type of the field |
619 */ | 673 */ |
620 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'"); | 674 static final CompileTimeErrorCode CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE = new
CompileTimeErrorCode('CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE', 15, "The initial
izer type '%s' cannot be assigned to the field type '%s'"); |
621 | 675 |
622 /** | 676 /** |
623 * 6.2 Formal Parameters: It is a compile-time error if a formal parameter is
declared as a | 677 * 6.2 Formal Parameters: It is a compile-time error if a formal parameter is
declared as a |
624 * constant variable. | 678 * constant variable. |
625 */ | 679 */ |
626 static final CompileTimeErrorCode CONST_FORMAL_PARAMETER = new CompileTimeErro
rCode('CONST_FORMAL_PARAMETER', 14, "Parameters cannot be 'const'"); | 680 static final CompileTimeErrorCode CONST_FORMAL_PARAMETER = new CompileTimeErro
rCode('CONST_FORMAL_PARAMETER', 16, "Parameters cannot be 'const'"); |
627 | 681 |
628 /** | 682 /** |
629 * 5 Variables: A constant variable must be initialized to a compile-time cons
tant or a | 683 * 5 Variables: A constant variable must be initialized to a compile-time cons
tant or a |
630 * compile-time error occurs. | 684 * compile-time error occurs. |
631 */ | 685 */ |
632 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"); | 686 static final CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE =
new CompileTimeErrorCode('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', 17, "'cons
t' variables must be constant value"); |
633 | 687 |
634 /** | 688 /** |
635 * 7.5 Instance Variables: It is a compile-time error if an instance variable
is declared to be | 689 * 7.5 Instance Variables: It is a compile-time error if an instance variable
is declared to be |
636 * constant. | 690 * constant. |
637 */ | 691 */ |
638 static final CompileTimeErrorCode CONST_INSTANCE_FIELD = new CompileTimeErrorC
ode('CONST_INSTANCE_FIELD', 16, "Only static fields can be declared as 'const'")
; | 692 static final CompileTimeErrorCode CONST_INSTANCE_FIELD = new CompileTimeErrorC
ode('CONST_INSTANCE_FIELD', 18, "Only static fields can be declared as 'const'")
; |
639 | 693 |
640 /** | 694 /** |
641 * 12.11.2 Const: An expression of one of the forms !e, e1 && e2 or e1 || e2,
where e, e1 and e2 | 695 * 12.11.2 Const: An expression of one of the forms !e, e1 && e2 or e1 || e2,
where e, e1 and e2 |
642 * are constant expressions that evaluate to a boolean value. | 696 * are constant expressions that evaluate to a boolean value. |
643 */ | 697 */ |
644 static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = new CompileTimeErrorC
ode('CONST_EVAL_TYPE_BOOL', 17, "An expression of type 'bool' was expected"); | 698 static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = new CompileTimeErrorC
ode('CONST_EVAL_TYPE_BOOL', 19, "An expression of type 'bool' was expected"); |
645 | 699 |
646 /** | 700 /** |
647 * 12.11.2 Const: An expression of one of the forms e1 == e2 or e1 != e2 where
e1 and e2 are | 701 * 12.11.2 Const: An expression of one of the forms e1 == e2 or e1 != e2 where
e1 and e2 are |
648 * constant expressions that evaluate to a numeric, string or boolean value or
to null. | 702 * constant expressions that evaluate to a numeric, string or boolean value or
to null. |
649 */ | 703 */ |
650 static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_NUM_STRING = new Compil
eTimeErrorCode('CONST_EVAL_TYPE_BOOL_NUM_STRING', 18, "An expression of type 'bo
ol', 'num', 'String' or 'null' was expected"); | 704 static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_NUM_STRING = new Compil
eTimeErrorCode('CONST_EVAL_TYPE_BOOL_NUM_STRING', 20, "An expression of type 'bo
ol', 'num', 'String' or 'null' was expected"); |
651 | 705 |
652 /** | 706 /** |
653 * 12.11.2 Const: An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 |
e2, e1 >> e2 or e1 | 707 * 12.11.2 Const: An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 |
e2, e1 >> e2 or e1 |
654 * << e2, where e, e1 and e2 are constant expressions that evaluate to an inte
ger value or to | 708 * << e2, where e, e1 and e2 are constant expressions that evaluate to an inte
ger value or to |
655 * null. | 709 * null. |
656 */ | 710 */ |
657 static final CompileTimeErrorCode CONST_EVAL_TYPE_INT = new CompileTimeErrorCo
de('CONST_EVAL_TYPE_INT', 19, "An expression of type 'int' was expected"); | 711 static final CompileTimeErrorCode CONST_EVAL_TYPE_INT = new CompileTimeErrorCo
de('CONST_EVAL_TYPE_INT', 21, "An expression of type 'int' was expected"); |
658 | 712 |
659 /** | 713 /** |
660 * 12.11.2 Const: An expression of one of the forms e, e1 + e2, e1 - e2, e1 *
e2, e1 / e2, e1 ~/ | 714 * 12.11.2 Const: An expression of one of the forms e, e1 + e2, e1 - e2, e1 *
e2, e1 / e2, e1 ~/ |
661 * e2, e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are
constant | 715 * e2, e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are
constant |
662 * expressions that evaluate to a numeric value or to null.. | 716 * expressions that evaluate to a numeric value or to null.. |
663 */ | 717 */ |
664 static final CompileTimeErrorCode CONST_EVAL_TYPE_NUM = new CompileTimeErrorCo
de('CONST_EVAL_TYPE_NUM', 20, "An expression of type 'num' was expected"); | 718 static final CompileTimeErrorCode CONST_EVAL_TYPE_NUM = new CompileTimeErrorCo
de('CONST_EVAL_TYPE_NUM', 22, "An expression of type 'num' was expected"); |
665 | 719 |
666 /** | 720 /** |
667 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 721 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
668 * uncaught exception being thrown. | 722 * uncaught exception being thrown. |
669 */ | 723 */ |
670 static final CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = new CompileTim
eErrorCode('CONST_EVAL_THROWS_EXCEPTION', 21, "Evaluation of this constant expre
ssion causes exception"); | 724 static final CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = new CompileTim
eErrorCode('CONST_EVAL_THROWS_EXCEPTION', 23, "Evaluation of this constant expre
ssion causes exception"); |
| 725 |
| 726 /** |
| 727 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 728 * uncaught exception being thrown. |
| 729 */ |
| 730 static final CompileTimeErrorCode CONST_EVAL_THROWS_IDBZE = new CompileTimeErr
orCode('CONST_EVAL_THROWS_IDBZE', 24, "Evaluation of this constant expression th
rows IntegerDivisionByZeroException"); |
671 | 731 |
672 /** | 732 /** |
673 * 12.11.2 Const: If <i>T</i> is a parameterized type <i>S<U<sub>1</sub>, &
hellip;, | 733 * 12.11.2 Const: If <i>T</i> is a parameterized type <i>S<U<sub>1</sub>, &
hellip;, |
674 * U<sub>m</sub>></i>, let <i>R = S</i>; It is a compile time error if <i>S
</i> is not a | 734 * U<sub>m</sub>></i>, let <i>R = S</i>; It is a compile time error if <i>S
</i> is not a |
675 * generic type with <i>m</i> type parameters. | 735 * generic type with <i>m</i> type parameters. |
| 736 * |
676 * @param typeName the name of the type being referenced (<i>S</i>) | 737 * @param typeName the name of the type being referenced (<i>S</i>) |
677 * @param parameterCount the number of type parameters that were declared | 738 * @param parameterCount the number of type parameters that were declared |
678 * @param argumentCount the number of type arguments provided | 739 * @param argumentCount the number of type arguments provided |
| 740 * @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS |
| 741 * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS |
679 */ | 742 */ |
680 static final CompileTimeErrorCode CONST_WITH_INVALID_TYPE_PARAMETERS = new Com
pileTimeErrorCode('CONST_WITH_INVALID_TYPE_PARAMETERS', 22, "The type '%s' is de
clared with %d type parameters, but %d type arguments were given"); | 743 static final CompileTimeErrorCode CONST_WITH_INVALID_TYPE_PARAMETERS = new Com
pileTimeErrorCode('CONST_WITH_INVALID_TYPE_PARAMETERS', 25, "The type '%s' is de
clared with %d type parameters, but %d type arguments were given"); |
681 | 744 |
682 /** | 745 /** |
683 * 12.11.2 Const: If <i>e</i> is of the form <i>const T(a<sub>1</sub>, &hellip
;, a<sub>n</sub>, | 746 * 12.11.2 Const: If <i>e</i> is of the form <i>const T(a<sub>1</sub>, &hellip
;, a<sub>n</sub>, |
684 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a | 747 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a |
685 * compile-time error if the type <i>T</i> does not declare a constant constru
ctor with the same | 748 * compile-time error if the type <i>T</i> does not declare a constant constru
ctor with the same |
686 * name as the declaration of <i>T</i>. | 749 * name as the declaration of <i>T</i>. |
687 */ | 750 */ |
688 static final CompileTimeErrorCode CONST_WITH_NON_CONST = new CompileTimeErrorC
ode('CONST_WITH_NON_CONST', 23, "The constructor being called is not a 'const' c
onstructor"); | 751 static final CompileTimeErrorCode CONST_WITH_NON_CONST = new CompileTimeErrorC
ode('CONST_WITH_NON_CONST', 26, "The constructor being called is not a 'const' c
onstructor"); |
689 | 752 |
690 /** | 753 /** |
691 * 12.11.2 Const: In all of the above cases, it is a compile-time error if <i>
a<sub>i</sub>, 1 | 754 * 12.11.2 Const: In all of the above cases, it is a compile-time error if <i>
a<sub>i</sub>, 1 |
692 * <= i <= n + k</i>, is not a compile-time constant expression. | 755 * <= i <= n + k</i>, is not a compile-time constant expression. |
693 */ | 756 */ |
694 static final CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = new Compi
leTimeErrorCode('CONST_WITH_NON_CONSTANT_ARGUMENT', 24, "Arguments of a constant
creation must be constant expressions"); | 757 static final CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = new Compi
leTimeErrorCode('CONST_WITH_NON_CONSTANT_ARGUMENT', 27, "Arguments of a constant
creation must be constant expressions"); |
695 | 758 |
696 /** | 759 /** |
697 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current | 760 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current |
698 * scope, optionally followed by type arguments. | 761 * scope, optionally followed by type arguments. |
699 * | 762 * |
700 * 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>, | 763 * 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>, |
701 * x<sub>n+1</sub>: a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+k</sub>
)</i> it is a | 764 * x<sub>n+1</sub>: a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+k</sub>
)</i> it is a |
702 * compile-time error if <i>T</i> is not a class accessible in the current sco
pe, optionally | 765 * compile-time error if <i>T</i> is not a class accessible in the current sco
pe, optionally |
703 * followed by type arguments. | 766 * followed by type arguments. |
| 767 * |
704 * @param name the name of the non-type element | 768 * @param name the name of the non-type element |
705 */ | 769 */ |
706 static final CompileTimeErrorCode CONST_WITH_NON_TYPE = new CompileTimeErrorCo
de('CONST_WITH_NON_TYPE', 25, "The name '%s' is not a class"); | 770 static final CompileTimeErrorCode CONST_WITH_NON_TYPE = new CompileTimeErrorCo
de('CONST_WITH_NON_TYPE', 28, "The name '%s' is not a class"); |
707 | 771 |
708 /** | 772 /** |
709 * 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type par
ameters. | 773 * 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type par
ameters. |
710 */ | 774 */ |
711 static final CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = new CompileTime
ErrorCode('CONST_WITH_TYPE_PARAMETERS', 26, "The constant creation cannot use a
type parameter"); | 775 static final CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = new CompileTime
ErrorCode('CONST_WITH_TYPE_PARAMETERS', 29, "The constant creation cannot use a
type parameter"); |
712 | 776 |
713 /** | 777 /** |
714 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant | 778 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant |
715 * constructor declared by the type <i>T</i>. | 779 * constructor declared by the type <i>T</i>. |
| 780 * |
716 * @param typeName the name of the type | 781 * @param typeName the name of the type |
717 * @param constructorName the name of the requested constant constructor | 782 * @param constructorName the name of the requested constant constructor |
718 */ | 783 */ |
719 static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR = new Compi
leTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR', 27, "The class '%s' does not
have a constant constructor '%s'"); | 784 static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR = new Compi
leTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR', 30, "The class '%s' does not
have a constant constructor '%s'"); |
720 | 785 |
721 /** | 786 /** |
722 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant | 787 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant |
723 * constructor declared by the type <i>T</i>. | 788 * constructor declared by the type <i>T</i>. |
| 789 * |
724 * @param typeName the name of the type | 790 * @param typeName the name of the type |
725 */ | 791 */ |
726 static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = n
ew CompileTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 28, "The cla
ss '%s' does not have a default constant constructor"); | 792 static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = n
ew CompileTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 31, "The cla
ss '%s' does not have a default constant constructor"); |
727 | 793 |
728 /** | 794 /** |
729 * 15.3.1 Typedef: It is a compile-time error if any default values are specif
ied in the signature | 795 * 15.3.1 Typedef: It is a compile-time error if any default values are specif
ied in the signature |
730 * of a function type alias. | 796 * of a function type alias. |
731 */ | 797 */ |
732 static final CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS = new C
ompileTimeErrorCode('DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS', 29, "Default values
aren't allowed in typedefs"); | 798 static final CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS = new C
ompileTimeErrorCode('DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS', 32, "Default values
aren't allowed in typedefs"); |
733 | 799 |
734 /** | 800 /** |
735 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name | 801 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name |
736 * declared in the same scope. | 802 * declared in the same scope. |
737 */ | 803 */ |
738 static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT = new CompileT
imeErrorCode('DUPLICATE_CONSTRUCTOR_DEFAULT', 30, "The default constructor is al
ready defined"); | 804 static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT = new CompileT
imeErrorCode('DUPLICATE_CONSTRUCTOR_DEFAULT', 33, "The default constructor is al
ready defined"); |
739 | 805 |
740 /** | 806 /** |
741 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name | 807 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name |
742 * declared in the same scope. | 808 * declared in the same scope. |
| 809 * |
743 * @param duplicateName the name of the duplicate entity | 810 * @param duplicateName the name of the duplicate entity |
744 */ | 811 */ |
745 static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME = new CompileTime
ErrorCode('DUPLICATE_CONSTRUCTOR_NAME', 31, "The constructor with name '%s' is a
lready defined"); | 812 static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME = new CompileTime
ErrorCode('DUPLICATE_CONSTRUCTOR_NAME', 34, "The constructor with name '%s' is a
lready defined"); |
746 | 813 |
747 /** | 814 /** |
748 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name | 815 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name |
749 * declared in the same scope. | 816 * declared in the same scope. |
| 817 * |
| 818 * 7 Classes: It is a compile-time error if a class declares two members of th
e same name. |
| 819 * |
| 820 * 7 Classes: It is a compile-time error if a class has an instance member and
a static member |
| 821 * with the same name. |
| 822 * |
750 * @param duplicateName the name of the duplicate entity | 823 * @param duplicateName the name of the duplicate entity |
751 */ | 824 */ |
752 static final CompileTimeErrorCode DUPLICATE_DEFINITION = new CompileTimeErrorC
ode('DUPLICATE_DEFINITION', 32, "The name '%s' is already defined"); | 825 static final CompileTimeErrorCode DUPLICATE_DEFINITION = new CompileTimeErrorC
ode('DUPLICATE_DEFINITION', 35, "The name '%s' is already defined"); |
753 | 826 |
754 /** | 827 /** |
755 * 7 Classes: It is a compile-time error if a class declares two members of th
e same name. | 828 * 7. Classes: It is a compile-time error if a class has an instance member an
d a static member |
| 829 * with the same name. |
| 830 * |
| 831 * This covers the additional duplicate definition cases where inheritance has
to be considered. |
| 832 * |
| 833 * @param className the name of the class that has conflicting instance/static
members |
| 834 * @param name the name of the conflicting members |
| 835 * @see #DUPLICATE_DEFINITION |
756 */ | 836 */ |
757 static final CompileTimeErrorCode DUPLICATE_MEMBER_NAME = new CompileTimeError
Code('DUPLICATE_MEMBER_NAME', 33, ""); | 837 static final CompileTimeErrorCode DUPLICATE_DEFINITION_INHERITANCE = new Compi
leTimeErrorCode('DUPLICATE_DEFINITION_INHERITANCE', 36, "The name '%s' is alread
y defined in '%s'"); |
758 | |
759 /** | |
760 * 7 Classes: It is a compile-time error if a class has an instance member and
a static member | |
761 * with the same name. | |
762 */ | |
763 static final CompileTimeErrorCode DUPLICATE_MEMBER_NAME_INSTANCE_STATIC = new
CompileTimeErrorCode('DUPLICATE_MEMBER_NAME_INSTANCE_STATIC', 34, ""); | |
764 | 838 |
765 /** | 839 /** |
766 * 12.14.2 Binding Actuals to Formals: It is a compile-time error if <i>q<sub>
i</sub> = | 840 * 12.14.2 Binding Actuals to Formals: It is a compile-time error if <i>q<sub>
i</sub> = |
767 * q<sub>j</sub></i> for any <i>i != j</i> \[where <i>q<sub>i</sub></i> is the
label for a named | 841 * q<sub>j</sub></i> for any <i>i != j</i> [where <i>q<sub>i</sub></i> is the
label for a named |
768 * argument\]. | 842 * argument]. |
769 */ | 843 */ |
770 static final CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = new CompileTimeEr
rorCode('DUPLICATE_NAMED_ARGUMENT', 35, "The argument for the named parameter '%
s' was already specified"); | 844 static final CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = new CompileTimeEr
rorCode('DUPLICATE_NAMED_ARGUMENT', 37, "The argument for the named parameter '%
s' was already specified"); |
771 | 845 |
772 /** | 846 /** |
773 * SDK implementation libraries can be exported only by other SDK libraries. | 847 * SDK implementation libraries can be exported only by other SDK libraries. |
| 848 * |
774 * @param uri the uri pointing to a library | 849 * @param uri the uri pointing to a library |
775 */ | 850 */ |
776 static final CompileTimeErrorCode EXPORT_INTERNAL_LIBRARY = new CompileTimeErr
orCode('EXPORT_INTERNAL_LIBRARY', 36, "The library %s is internal and cannot be
exported"); | 851 static final CompileTimeErrorCode EXPORT_INTERNAL_LIBRARY = new CompileTimeErr
orCode('EXPORT_INTERNAL_LIBRARY', 38, "The library %s is internal and cannot be
exported"); |
777 | 852 |
778 /** | 853 /** |
779 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is | 854 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is |
780 * not a library declaration. | 855 * not a library declaration. |
| 856 * |
781 * @param uri the uri pointing to a non-library declaration | 857 * @param uri the uri pointing to a non-library declaration |
782 */ | 858 */ |
783 static final CompileTimeErrorCode EXPORT_OF_NON_LIBRARY = new CompileTimeError
Code('EXPORT_OF_NON_LIBRARY', 37, "The exported library '%s' must not have a par
t-of directive"); | 859 static final CompileTimeErrorCode EXPORT_OF_NON_LIBRARY = new CompileTimeError
Code('EXPORT_OF_NON_LIBRARY', 39, "The exported library '%s' must not have a par
t-of directive"); |
784 | 860 |
785 /** | 861 /** |
786 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla
ss <i>C</i> includes | 862 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla
ss <i>C</i> includes |
787 * a type expression that does not denote a class available in the lexical sco
pe of <i>C</i>. | 863 * a type expression that does not denote a class available in the lexical sco
pe of <i>C</i>. |
| 864 * |
788 * @param typeName the name of the superclass that was not found | 865 * @param typeName the name of the superclass that was not found |
789 */ | 866 */ |
790 static final CompileTimeErrorCode EXTENDS_NON_CLASS = new CompileTimeErrorCode
('EXTENDS_NON_CLASS', 38, "Classes can only extend other classes"); | 867 static final CompileTimeErrorCode EXTENDS_NON_CLASS = new CompileTimeErrorCode
('EXTENDS_NON_CLASS', 40, "Classes can only extend other classes"); |
791 | 868 |
792 /** | 869 /** |
793 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. | 870 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. |
794 * | 871 * |
795 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. | 872 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. |
796 * | 873 * |
797 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. | 874 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. |
798 * | 875 * |
799 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to | 876 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to |
800 * attempt to extend or implement num. | 877 * attempt to extend or implement num. |
801 * | 878 * |
802 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. | 879 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. |
803 * | 880 * |
804 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. | 881 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. |
| 882 * |
805 * @param typeName the name of the type that cannot be extended | 883 * @param typeName the name of the type that cannot be extended |
806 * @see #IMPLEMENTS_DISALLOWED_CLASS | 884 * @see #IMPLEMENTS_DISALLOWED_CLASS |
807 */ | 885 */ |
808 static final CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = new CompileTimeEr
rorCode('EXTENDS_DISALLOWED_CLASS', 39, "Classes cannot extend '%s'"); | 886 static final CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = new CompileTimeEr
rorCode('EXTENDS_DISALLOWED_CLASS', 41, "Classes cannot extend '%s'"); |
809 | 887 |
810 /** | 888 /** |
811 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i>
or if <i>m > n</i>. | 889 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i>
or if <i>m > n</i>. |
812 * | 890 * |
813 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 891 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
814 * uncaught exception being thrown. | 892 * uncaught exception being thrown. |
| 893 * |
815 * @param requiredCount the maximum number of positional arguments | 894 * @param requiredCount the maximum number of positional arguments |
816 * @param argumentCount the actual number of positional arguments given | 895 * @param argumentCount the actual number of positional arguments given |
817 */ | 896 */ |
818 static final CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS = new CompileTime
ErrorCode('EXTRA_POSITIONAL_ARGUMENTS', 40, "%d positional arguments expected, b
ut %d found"); | 897 static final CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS = new CompileTime
ErrorCode('EXTRA_POSITIONAL_ARGUMENTS', 42, "%d positional arguments expected, b
ut %d found"); |
819 | |
820 /** | |
821 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. | |
822 * | |
823 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. | |
824 * | |
825 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. | |
826 * | |
827 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to | |
828 * attempt to extend or implement num. | |
829 * | |
830 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. | |
831 * | |
832 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. | |
833 * @param typeName the name of the type that cannot be implemented | |
834 * @see #EXTENDS_DISALLOWED_CLASS | |
835 */ | |
836 static final CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = new CompileTim
eErrorCode('IMPLEMENTS_DISALLOWED_CLASS', 41, "Classes cannot implement '%s'"); | |
837 | 898 |
838 /** | 899 /** |
839 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time | 900 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time |
840 * error if more than one initializer corresponding to a given instance variab
le appears in | 901 * error if more than one initializer corresponding to a given instance variab
le appears in |
841 * <i>k</i>'s list. | 902 * <i>k</i>'s list. |
842 */ | 903 */ |
843 static final CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS =
new CompileTimeErrorCode('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 42, "The
field '%s' cannot be initialized twice in the same constructor"); | 904 static final CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS =
new CompileTimeErrorCode('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 43, "The
field '%s' cannot be initialized twice in the same constructor"); |
844 | 905 |
845 /** | 906 /** |
846 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time | 907 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time |
847 * error if <i>k</i>'s initializer list contains an initializer for a final va
riable <i>f</i> | 908 * error if <i>k</i>'s initializer list contains an initializer for a final va
riable <i>f</i> |
848 * whose declaration includes an initialization expression. | 909 * whose declaration includes an initialization expression. |
849 */ | 910 */ |
850 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARA
TION = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATIO
N', 43, "Values cannot be set in the constructor if they are final, and have alr
eady been set"); | 911 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARA
TION = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATIO
N', 44, "Values cannot be set in the constructor if they are final, and have alr
eady been set"); |
851 | 912 |
852 /** | 913 /** |
853 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time | 914 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time |
854 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is initialized | 915 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is initialized |
855 * by means of an initializing formal of <i>k</i>. | 916 * by means of an initializing formal of <i>k</i>. |
856 */ | 917 */ |
857 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ
ER = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER',
44, "Fields cannot be initialized in both the parameter list and the initializer
s"); | 918 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ
ER = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER',
45, "Fields cannot be initialized in both the parameter list and the initializer
s"); |
858 | 919 |
859 /** | 920 /** |
860 * 5 Variables: It is a compile-time error if a final instance variable that h
as been initialized | 921 * 5 Variables: It is a compile-time error if a final instance variable that h
as been initialized |
861 * at its point of declaration is also initialized in a constructor. | 922 * at its point of declaration is also initialized in a constructor. |
| 923 * |
862 * @param name the name of the field in question | 924 * @param name the name of the field in question |
863 */ | 925 */ |
864 static final CompileTimeErrorCode FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRU
CTOR = new CompileTimeErrorCode('FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTO
R', 45, "'%s' is final and was given a value when it was declared, so it cannot
be set to a new value"); | 926 static final CompileTimeErrorCode FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRU
CTOR = new CompileTimeErrorCode('FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTO
R', 46, "'%s' is final and was given a value when it was declared, so it cannot
be set to a new value"); |
865 | 927 |
866 /** | 928 /** |
867 * 5 Variables: It is a compile-time error if a final instance variable that h
as is initialized by | 929 * 5 Variables: It is a compile-time error if a final instance variable that h
as is initialized by |
868 * means of an initializing formal of a constructor is also initialized elsewh
ere in the same | 930 * means of an initializing formal of a constructor is also initialized elsewh
ere in the same |
869 * constructor. | 931 * constructor. |
| 932 * |
870 * @param name the name of the field in question | 933 * @param name the name of the field in question |
871 */ | 934 */ |
872 static final CompileTimeErrorCode FINAL_INITIALIZED_MULTIPLE_TIMES = new Compi
leTimeErrorCode('FINAL_INITIALIZED_MULTIPLE_TIMES', 46, "'%s' is a final field a
nd so can only be set once"); | 935 static final CompileTimeErrorCode FINAL_INITIALIZED_MULTIPLE_TIMES = new Compi
leTimeErrorCode('FINAL_INITIALIZED_MULTIPLE_TIMES', 47, "'%s' is a final field a
nd so can only be set once"); |
873 | 936 |
874 /** | 937 /** |
875 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by | 938 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by |
876 * a function other than a non-redirecting generative constructor. | 939 * a function other than a non-redirecting generative constructor. |
877 */ | 940 */ |
878 static final CompileTimeErrorCode FIELD_INITIALIZER_FACTORY_CONSTRUCTOR = new
CompileTimeErrorCode('FIELD_INITIALIZER_FACTORY_CONSTRUCTOR', 47, "Initializing
formal fields cannot be used in factory constructors"); | 941 static final CompileTimeErrorCode FIELD_INITIALIZER_FACTORY_CONSTRUCTOR = new
CompileTimeErrorCode('FIELD_INITIALIZER_FACTORY_CONSTRUCTOR', 48, "Initializing
formal fields cannot be used in factory constructors"); |
879 | 942 |
880 /** | 943 /** |
881 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by | 944 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by |
882 * a function other than a non-redirecting generative constructor. | 945 * a function other than a non-redirecting generative constructor. |
883 */ | 946 */ |
884 static final CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new
CompileTimeErrorCode('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 48, "Initializing
formal fields can only be used in constructors"); | 947 static final CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new
CompileTimeErrorCode('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 49, "Initializing
formal fields can only be used in constructors"); |
885 | 948 |
886 /** | 949 /** |
887 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 950 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
888 * only action is to invoke another generative constructor. | 951 * only action is to invoke another generative constructor. |
889 * | 952 * |
890 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by | 953 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by |
891 * a function other than a non-redirecting generative constructor. | 954 * a function other than a non-redirecting generative constructor. |
892 */ | 955 */ |
893 static final CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR =
new CompileTimeErrorCode('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', 49, "The r
edirecting constructor cannot have a field initializer"); | 956 static final CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR =
new CompileTimeErrorCode('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', 50, "The r
edirecting constructor cannot have a field initializer"); |
894 | 957 |
895 /** | 958 /** |
896 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same | 959 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same |
897 * name. | 960 * name. |
| 961 * |
898 * @param name the conflicting name of the getter and method | 962 * @param name the conflicting name of the getter and method |
899 */ | 963 */ |
900 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"); | 964 static final CompileTimeErrorCode GETTER_AND_METHOD_WITH_SAME_NAME = new Compi
leTimeErrorCode('GETTER_AND_METHOD_WITH_SAME_NAME', 51, "'%s' cannot be used to
name a getter, there is already a method with the same name"); |
| 965 |
| 966 /** |
| 967 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. |
| 968 * |
| 969 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. |
| 970 * |
| 971 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. |
| 972 * |
| 973 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to |
| 974 * attempt to extend or implement num. |
| 975 * |
| 976 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. |
| 977 * |
| 978 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. |
| 979 * |
| 980 * @param typeName the name of the type that cannot be implemented |
| 981 * @see #EXTENDS_DISALLOWED_CLASS |
| 982 */ |
| 983 static final CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = new CompileTim
eErrorCode('IMPLEMENTS_DISALLOWED_CLASS', 52, "Classes cannot implement '%s'"); |
901 | 984 |
902 /** | 985 /** |
903 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class includes | 986 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class includes |
904 * type dynamic. | 987 * type dynamic. |
905 */ | 988 */ |
906 static final CompileTimeErrorCode IMPLEMENTS_DYNAMIC = new CompileTimeErrorCod
e('IMPLEMENTS_DYNAMIC', 51, "Classes cannot implement 'dynamic'"); | 989 static final CompileTimeErrorCode IMPLEMENTS_DYNAMIC = new CompileTimeErrorCod
e('IMPLEMENTS_DYNAMIC', 53, "Classes cannot implement 'dynamic'"); |
907 | 990 |
908 /** | 991 /** |
909 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class <i>C</i> | 992 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class <i>C</i> |
910 * includes a type expression that does not denote a class available in the le
xical scope of | 993 * includes a type expression that does not denote a class available in the le
xical scope of |
911 * <i>C</i>. | 994 * <i>C</i>. |
| 995 * |
912 * @param typeName the name of the interface that was not found | 996 * @param typeName the name of the interface that was not found |
913 */ | 997 */ |
914 static final CompileTimeErrorCode IMPLEMENTS_NON_CLASS = new CompileTimeErrorC
ode('IMPLEMENTS_NON_CLASS', 52, "Classes can only implement other classes"); | 998 static final CompileTimeErrorCode IMPLEMENTS_NON_CLASS = new CompileTimeErrorC
ode('IMPLEMENTS_NON_CLASS', 54, "Classes can only implement other classes"); |
915 | 999 |
916 /** | 1000 /** |
917 * 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears
more than once in | 1001 * 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears
more than once in |
918 * the implements clause of a class. | 1002 * the implements clause of a class. |
| 1003 * |
919 * @param className the name of the class that is implemented more than once | 1004 * @param className the name of the class that is implemented more than once |
920 */ | 1005 */ |
921 static final CompileTimeErrorCode IMPLEMENTS_REPEATED = new CompileTimeErrorCo
de('IMPLEMENTS_REPEATED', 53, "'%s' can only be implemented once"); | 1006 static final CompileTimeErrorCode IMPLEMENTS_REPEATED = new CompileTimeErrorCo
de('IMPLEMENTS_REPEATED', 55, "'%s' can only be implemented once"); |
922 | 1007 |
923 /** | 1008 /** |
924 * 7.6.1 Generative Constructors: Note that this is not in scope on the right
hand side of an | 1009 * 7.6.1 Generative Constructors: Note that <b>this</b> is not in scope on the
right hand side of |
925 * initializer. | 1010 * an initializer. |
926 * | 1011 * |
927 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable | 1012 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable |
928 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the | 1013 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the |
929 * initializer of an instance variable. | 1014 * initializer of an instance variable. |
| 1015 * |
930 * @param name the name of the type in question | 1016 * @param name the name of the type in question |
931 */ | 1017 */ |
932 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"); | 1018 static final CompileTimeErrorCode IMPLICIT_THIS_REFERENCE_IN_INITIALIZER = new
CompileTimeErrorCode('IMPLICIT_THIS_REFERENCE_IN_INITIALIZER', 56, "The 'this'
expression cannot be implicitly used in initializers"); |
933 | 1019 |
934 /** | 1020 /** |
935 * SDK implementation libraries can be imported only by other SDK libraries. | 1021 * SDK implementation libraries can be imported only by other SDK libraries. |
| 1022 * |
936 * @param uri the uri pointing to a library | 1023 * @param uri the uri pointing to a library |
937 */ | 1024 */ |
938 static final CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY = new CompileTimeErr
orCode('IMPORT_INTERNAL_LIBRARY', 55, "The library %s is internal and cannot be
imported"); | 1025 static final CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY = new CompileTimeErr
orCode('IMPORT_INTERNAL_LIBRARY', 57, "The library %s is internal and cannot be
imported"); |
939 | 1026 |
940 /** | 1027 /** |
941 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1028 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is |
942 * not a library declaration. | 1029 * not a library declaration. |
| 1030 * |
943 * @param uri the uri pointing to a non-library declaration | 1031 * @param uri the uri pointing to a non-library declaration |
944 */ | 1032 */ |
945 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"); | 1033 static final CompileTimeErrorCode IMPORT_OF_NON_LIBRARY = new CompileTimeError
Code('IMPORT_OF_NON_LIBRARY', 58, "The imported library '%s' must not have a par
t-of directive"); |
946 | 1034 |
947 /** | 1035 /** |
948 * 13.9 Switch: It is a compile-time error if values of the expressions <i>e<s
ub>k</sub></i> are | 1036 * 13.9 Switch: It is a compile-time error if values of the expressions <i>e<s
ub>k</sub></i> are |
949 * not instances of the same class <i>C</i>, for all <i>1 <= k <= n</i>. | 1037 * not instances of the same class <i>C</i>, for all <i>1 <= k <= n</i>. |
| 1038 * |
950 * @param expressionSource the expression source code that is the unexpected t
ype | 1039 * @param expressionSource the expression source code that is the unexpected t
ype |
951 * @param expectedType the name of the expected type | 1040 * @param expectedType the name of the expected type |
952 */ | 1041 */ |
953 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'"); | 1042 static final CompileTimeErrorCode INCONSISTENT_CASE_EXPRESSION_TYPES = new Com
pileTimeErrorCode('INCONSISTENT_CASE_EXPRESSION_TYPES', 59, "Case expressions mu
st have the same types, '%s' is not a %s'"); |
954 | 1043 |
955 /** | 1044 /** |
956 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time | 1045 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time |
957 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an | 1046 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an |
958 * instance variable declared in the immediately surrounding class. | 1047 * instance variable declared in the immediately surrounding class. |
| 1048 * |
959 * @param id the name of the initializing formal that is not an instance varia
ble in the | 1049 * @param id the name of the initializing formal that is not an instance varia
ble in the |
960 * immediately enclosing class | 1050 * immediately enclosing class |
961 * @see #INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD | 1051 * @see #INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD |
962 */ | 1052 */ |
963 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"); | 1053 static final CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTANT_FIELD = new Com
pileTimeErrorCode('INITIALIZER_FOR_NON_EXISTANT_FIELD', 60, "'%s' is not a varia
ble in the enclosing class"); |
964 | 1054 |
965 /** | 1055 /** |
966 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time | 1056 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time |
967 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an | 1057 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an |
968 * instance variable declared in the immediately surrounding class. | 1058 * instance variable declared in the immediately surrounding class. |
| 1059 * |
969 * @param id the name of the initializing formal that is a static variable in
the immediately | 1060 * @param id the name of the initializing formal that is a static variable in
the immediately |
970 * enclosing class | 1061 * enclosing class |
971 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD | 1062 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD |
972 */ | 1063 */ |
973 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"); | 1064 static final CompileTimeErrorCode INITIALIZER_FOR_STATIC_FIELD = new CompileTi
meErrorCode('INITIALIZER_FOR_STATIC_FIELD', 61, "'%s' is a static variable in th
e enclosing class, variables initialized in a constructor cannot be static"); |
974 | 1065 |
975 /** | 1066 /** |
976 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a | 1067 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a |
977 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately | 1068 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately |
978 * enclosing class. | 1069 * enclosing class. |
| 1070 * |
979 * @param id the name of the initializing formal that is not an instance varia
ble in the | 1071 * @param id the name of the initializing formal that is not an instance varia
ble in the |
980 * immediately enclosing class | 1072 * immediately enclosing class |
981 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD | 1073 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD |
982 * @see #INITIALIZER_FOR_NON_EXISTANT_FIELD | 1074 * @see #INITIALIZER_FOR_NON_EXISTANT_FIELD |
983 */ | 1075 */ |
984 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"); | 1076 static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD =
new CompileTimeErrorCode('INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD', 62, "'%s
' is not a variable in the enclosing class"); |
985 | 1077 |
986 /** | 1078 /** |
987 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a | 1079 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a |
988 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately | 1080 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately |
989 * enclosing class. | 1081 * enclosing class. |
| 1082 * |
990 * @param id the name of the initializing formal that is a static variable in
the immediately | 1083 * @param id the name of the initializing formal that is a static variable in
the immediately |
991 * enclosing class | 1084 * enclosing class |
992 * @see #INITIALIZER_FOR_STATIC_FIELD | 1085 * @see #INITIALIZER_FOR_STATIC_FIELD |
993 */ | 1086 */ |
994 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"); | 1087 static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_STATIC_FIELD = new C
ompileTimeErrorCode('INITIALIZING_FORMAL_FOR_STATIC_FIELD', 63, "'%s' is a stati
c variable in the enclosing class, variables initialized in a constructor cannot
be static"); |
| 1088 |
| 1089 /** |
| 1090 * 12.30 Identifier Reference: Otherwise, e is equivalent to the property extr
action |
| 1091 * <b>this</b>.<i>id</i>. |
| 1092 */ |
| 1093 static final CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_STATIC = new Com
pileTimeErrorCode('INSTANCE_MEMBER_ACCESS_FROM_STATIC', 64, "Instance member can
not be accessed from static method"); |
995 | 1094 |
996 /** | 1095 /** |
997 * TODO(brianwilkerson) Remove this when we have decided on how to report erro
rs in compile-time | 1096 * TODO(brianwilkerson) Remove this when we have decided on how to report erro
rs in compile-time |
998 * constants. Until then, this acts as a placeholder for more informative erro
rs. | 1097 * constants. Until then, this acts as a placeholder for more informative erro
rs. |
999 */ | 1098 */ |
1000 static final CompileTimeErrorCode INVALID_CONSTANT = new CompileTimeErrorCode(
'INVALID_CONSTANT', 62, ""); | 1099 static final CompileTimeErrorCode INVALID_CONSTANT = new CompileTimeErrorCode(
'INVALID_CONSTANT', 65, ""); |
1001 | 1100 |
1002 /** | 1101 /** |
1003 * 7.6 Constructors: It is a compile-time error if the name of a constructor i
s not a constructor | 1102 * 7.6 Constructors: It is a compile-time error if the name of a constructor i
s not a constructor |
1004 * name. | 1103 * name. |
1005 */ | 1104 */ |
1006 static final CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = new CompileTimeEr
rorCode('INVALID_CONSTRUCTOR_NAME', 63, "Invalid constructor name"); | 1105 static final CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = new CompileTimeEr
rorCode('INVALID_CONSTRUCTOR_NAME', 66, "Invalid constructor name"); |
1007 | 1106 |
1008 /** | 1107 /** |
1009 * 7.6.2 Factories: It is a compile-time error if <i>M</i> is not the name of
the immediately | 1108 * 7.6.2 Factories: It is a compile-time error if <i>M</i> is not the name of
the immediately |
1010 * enclosing class. | 1109 * enclosing class. |
1011 */ | 1110 */ |
1012 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"); | 1111 static final CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS = new Compi
leTimeErrorCode('INVALID_FACTORY_NAME_NOT_A_CLASS', 67, "The name of the immedia
tely enclosing class expected"); |
1013 | |
1014 /** | |
1015 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | |
1016 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies
a default value for | |
1017 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff
erent default value | |
1018 * for <i>p</i>. | |
1019 */ | |
1020 static final CompileTimeErrorCode INVALID_OVERRIDE_DEFAULT_VALUE = new Compile
TimeErrorCode('INVALID_OVERRIDE_DEFAULT_VALUE', 65, ""); | |
1021 | 1112 |
1022 /** | 1113 /** |
1023 * 7.1 Instance Methods: It is a compile-time error if an instance method <i>m
1</i> overrides an | 1114 * 7.1 Instance Methods: It is a compile-time error if an instance method <i>m
1</i> overrides an |
1024 * instance member <i>m2</i> and <i>m1</i> does not declare all the named para
meters declared by | 1115 * instance member <i>m2</i> and <i>m1</i> does not declare all the named para
meters declared by |
1025 * <i>m2</i>. | 1116 * <i>m2</i>. |
| 1117 * |
1026 * @param paramCount the number of named parameters in the overridden member | 1118 * @param paramCount the number of named parameters in the overridden member |
1027 * @param className the name of the class from the overridden method | 1119 * @param className the name of the class from the overridden method |
1028 */ | 1120 */ |
1029 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'"); | 1121 static final CompileTimeErrorCode INVALID_OVERRIDE_NAMED = new CompileTimeErro
rCode('INVALID_OVERRIDE_NAMED', 68, "Missing the named parameter '%s' to match t
he overridden method from '%s'"); |
1030 | 1122 |
1031 /** | 1123 /** |
1032 * 7.1 Instance Methods: It is a compile-time error if an instance method <i>m
1</i> overrides an | 1124 * 7.1 Instance Methods: It is a compile-time error if an instance method <i>m
1</i> overrides an |
1033 * instance member <i>m2</i> and <i>m1</i> has fewer optional positional param
eters than | 1125 * instance member <i>m2</i> and <i>m1</i> has fewer optional positional param
eters than |
1034 * <i>m2</i>. | 1126 * <i>m2</i>. |
| 1127 * |
1035 * @param paramCount the number of positional parameters in the overridden mem
ber | 1128 * @param paramCount the number of positional parameters in the overridden mem
ber |
1036 * @param className the name of the class from the overridden method | 1129 * @param className the name of the class from the overridden method |
1037 */ | 1130 */ |
1038 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'"); | 1131 static final CompileTimeErrorCode INVALID_OVERRIDE_POSITIONAL = new CompileTim
eErrorCode('INVALID_OVERRIDE_POSITIONAL', 69, "Must have at least %d optional pa
rameters to match the overridden method from '%s'"); |
1039 | 1132 |
1040 /** | 1133 /** |
1041 * 7.1 Instance Methods: It is a compile-time error if an instance method <i>m
1</i> overrides an | 1134 * 7.1 Instance Methods: It is a compile-time error if an instance method <i>m
1</i> overrides an |
1042 * instance member <i>m2</i> and <i>m1</i> has a different number of required
parameters than | 1135 * instance member <i>m2</i> and <i>m1</i> has a different number of required
parameters than |
1043 * <i>m2</i>. | 1136 * <i>m2</i>. |
| 1137 * |
1044 * @param paramCount the number of required parameters in the overridden membe
r | 1138 * @param paramCount the number of required parameters in the overridden membe
r |
1045 * @param className the name of the class from the overridden method | 1139 * @param className the name of the class from the overridden method |
1046 */ | 1140 */ |
1047 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'"); | 1141 static final CompileTimeErrorCode INVALID_OVERRIDE_REQUIRED = new CompileTimeE
rrorCode('INVALID_OVERRIDE_REQUIRED', 70, "Must have at exactly %d required para
meters to match the overridden method from '%s'"); |
1048 | 1142 |
1049 /** | 1143 /** |
1050 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable | 1144 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable |
1051 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the | 1145 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the |
1052 * initializer of an instance variable. | 1146 * initializer of an instance variable. |
1053 */ | 1147 */ |
1054 static final CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = new CompileTimeE
rrorCode('INVALID_REFERENCE_TO_THIS', 69, "Invalid reference to 'this' expressio
n"); | 1148 static final CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = new CompileTimeE
rrorCode('INVALID_REFERENCE_TO_THIS', 71, "Invalid reference to 'this' expressio
n"); |
1055 | 1149 |
1056 /** | 1150 /** |
1057 * 12.7 Maps: It is a compile-time error if the first type argument to a map l
iteral is not | 1151 * 12.7 Maps: It is a compile-time error if the first type argument to a map l
iteral is not |
1058 * String. | 1152 * String. |
1059 */ | 1153 */ |
1060 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'"); | 1154 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_FOR_KEY = new CompileT
imeErrorCode('INVALID_TYPE_ARGUMENT_FOR_KEY', 72, "The first type argument to a
map literal must be 'String'"); |
1061 | 1155 |
1062 /** | 1156 /** |
1063 * 12.6 Lists: It is a compile time error if the type argument of a constant l
ist literal includes | 1157 * 12.6 Lists: It is a compile time error if the type argument of a constant l
ist literal includes |
1064 * a type parameter. | 1158 * a type parameter. |
| 1159 * |
1065 * @name the name of the type parameter | 1160 * @name the name of the type parameter |
1066 */ | 1161 */ |
1067 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'"); | 1162 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST = new Co
mpileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_LIST', 73, "Constant list lit
erals cannot include a type parameter as a type argument, such as '%s'"); |
1068 | 1163 |
1069 /** | 1164 /** |
1070 * 12.7 Maps: It is a compile time error if the type arguments of a constant m
ap literal include a | 1165 * 12.7 Maps: It is a compile time error if the type arguments of a constant m
ap literal include a |
1071 * type parameter. | 1166 * type parameter. |
| 1167 * |
1072 * @name the name of the type parameter | 1168 * @name the name of the type parameter |
1073 */ | 1169 */ |
1074 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'"); | 1170 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = new Com
pileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 74, "Constant map litera
ls cannot include a type parameter as a type argument, such as '%s'"); |
1075 | 1171 |
1076 /** | 1172 /** |
1077 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1173 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is |
1078 * not a library declaration. | 1174 * not a library declaration. |
1079 * | 1175 * |
1080 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1176 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is |
1081 * not a library declaration. | 1177 * not a library declaration. |
1082 * | 1178 * |
1083 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part | 1179 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part |
1084 * declaration. | 1180 * declaration. |
| 1181 * |
1085 * @param uri the URI that is invalid | 1182 * @param uri the URI that is invalid |
1086 * @see #URI_DOES_NOT_EXIST | 1183 * @see #URI_DOES_NOT_EXIST |
1087 */ | 1184 */ |
1088 static final CompileTimeErrorCode INVALID_URI = new CompileTimeErrorCode('INVA
LID_URI', 73, "Invalid URI syntax: '%s'"); | 1185 static final CompileTimeErrorCode INVALID_URI = new CompileTimeErrorCode('INVA
LID_URI', 75, "Invalid URI syntax: '%s'"); |
1089 | 1186 |
1090 /** | 1187 /** |
1091 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within | 1188 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within |
1092 * the innermost function in which <i>s<sub>b</sub></i> occurs. | 1189 * the innermost function in which <i>s<sub>b</sub></i> occurs. |
1093 * | 1190 * |
1094 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use | 1191 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use |
1095 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. | 1192 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. |
| 1193 * |
1096 * @param labelName the name of the unresolvable label | 1194 * @param labelName the name of the unresolvable label |
1097 */ | 1195 */ |
1098 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"); | 1196 static final CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = new CompileTimeErrorC
ode('LABEL_IN_OUTER_SCOPE', 76, "Cannot reference label '%s' declared in an oute
r method"); |
1099 | 1197 |
1100 /** | 1198 /** |
1101 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within | 1199 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within |
1102 * the innermost function in which <i>s<sub>b</sub></i> occurs. | 1200 * the innermost function in which <i>s<sub>b</sub></i> occurs. |
1103 * | 1201 * |
1104 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use | 1202 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use |
1105 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. | 1203 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. |
| 1204 * |
1106 * @param labelName the name of the unresolvable label | 1205 * @param labelName the name of the unresolvable label |
1107 */ | 1206 */ |
1108 static final CompileTimeErrorCode LABEL_UNDEFINED = new CompileTimeErrorCode('
LABEL_UNDEFINED', 75, "Cannot reference undefined label '%s'"); | 1207 static final CompileTimeErrorCode LABEL_UNDEFINED = new CompileTimeErrorCode('
LABEL_UNDEFINED', 77, "Cannot reference undefined label '%s'"); |
1109 | 1208 |
1110 /** | 1209 /** |
1111 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member
with the same name | 1210 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member
with the same name |
1112 * as <i>C</i>. | 1211 * as <i>C</i>. |
1113 */ | 1212 */ |
1114 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"); | 1213 static final CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = new CompileTimeErro
rCode('MEMBER_WITH_CLASS_NAME', 78, "Class members cannot have the same name as
the enclosing class"); |
1115 | 1214 |
1116 /** | 1215 /** |
1117 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same | 1216 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same |
1118 * name. | 1217 * name. |
| 1218 * |
1119 * @param name the conflicting name of the getter and method | 1219 * @param name the conflicting name of the getter and method |
1120 */ | 1220 */ |
1121 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"); | 1221 static final CompileTimeErrorCode METHOD_AND_GETTER_WITH_SAME_NAME = new Compi
leTimeErrorCode('METHOD_AND_GETTER_WITH_SAME_NAME', 79, "'%s' cannot be used to
name a method, there is already a getter with the same name"); |
1122 | 1222 |
1123 /** | 1223 /** |
1124 * 12.1 Constants: A constant expression is ... a constant list literal. | 1224 * 12.1 Constants: A constant expression is ... a constant list literal. |
1125 */ | 1225 */ |
1126 static final CompileTimeErrorCode MISSING_CONST_IN_LIST_LITERAL = new CompileT
imeErrorCode('MISSING_CONST_IN_LIST_LITERAL', 78, "List literals must be prefixe
d with 'const' when used as a constant expression"); | 1226 static final CompileTimeErrorCode MISSING_CONST_IN_LIST_LITERAL = new CompileT
imeErrorCode('MISSING_CONST_IN_LIST_LITERAL', 80, "List literals must be prefixe
d with 'const' when used as a constant expression"); |
1127 | 1227 |
1128 /** | 1228 /** |
1129 * 12.1 Constants: A constant expression is ... a constant map literal. | 1229 * 12.1 Constants: A constant expression is ... a constant map literal. |
1130 */ | 1230 */ |
1131 static final CompileTimeErrorCode MISSING_CONST_IN_MAP_LITERAL = new CompileTi
meErrorCode('MISSING_CONST_IN_MAP_LITERAL', 79, "Map literals must be prefixed w
ith 'const' when used as a constant expression"); | 1231 static final CompileTimeErrorCode MISSING_CONST_IN_MAP_LITERAL = new CompileTi
meErrorCode('MISSING_CONST_IN_MAP_LITERAL', 81, "Map literals must be prefixed w
ith 'const' when used as a constant expression"); |
1132 | 1232 |
1133 /** | 1233 /** |
1134 * 9 Mixins: It is a compile-time error if a declared or derived mixin explici
tly declares a | 1234 * 9 Mixins: It is a compile-time error if a declared or derived mixin explici
tly declares a |
1135 * constructor. | 1235 * constructor. |
| 1236 * |
1136 * @param typeName the name of the mixin that is invalid | 1237 * @param typeName the name of the mixin that is invalid |
1137 */ | 1238 */ |
1138 static final CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = new CompileTime
ErrorCode('MIXIN_DECLARES_CONSTRUCTOR', 80, "The class '%s' cannot be used as a
mixin because it declares a constructor"); | 1239 static final CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = new CompileTime
ErrorCode('MIXIN_DECLARES_CONSTRUCTOR', 82, "The class '%s' cannot be used as a
mixin because it declares a constructor"); |
1139 | 1240 |
1140 /** | 1241 /** |
1141 * 9 Mixins: It is a compile-time error if a mixin is derived from a class who
se superclass is not | 1242 * 9 Mixins: It is a compile-time error if a mixin is derived from a class who
se superclass is not |
1142 * Object. | 1243 * Object. |
| 1244 * |
1143 * @param typeName the name of the mixin that is invalid | 1245 * @param typeName the name of the mixin that is invalid |
1144 */ | 1246 */ |
1145 static final CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = new Compile
TimeErrorCode('MIXIN_INHERITS_FROM_NOT_OBJECT', 81, "The class '%s' cannot be us
ed as a mixin because it extends a class other than Object"); | 1247 static final CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = new Compile
TimeErrorCode('MIXIN_INHERITS_FROM_NOT_OBJECT', 83, "The class '%s' cannot be us
ed as a mixin because it extends a class other than Object"); |
1146 | 1248 |
1147 /** | 1249 /** |
1148 * 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not deno
te a class or mixin | 1250 * 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not deno
te a class or mixin |
1149 * available in the immediately enclosing scope. | 1251 * available in the immediately enclosing scope. |
1150 */ | 1252 */ |
1151 static final CompileTimeErrorCode MIXIN_OF_NON_CLASS = new CompileTimeErrorCod
e('MIXIN_OF_NON_CLASS', 82, "Classes can only mixin other classes"); | 1253 static final CompileTimeErrorCode MIXIN_OF_NON_CLASS = new CompileTimeErrorCod
e('MIXIN_OF_NON_CLASS', 84, "Classes can only mixin other classes"); |
1152 | 1254 |
1153 /** | 1255 /** |
1154 * 9 Mixins: It is a compile-time error if a declared or derived mixin refers
to super. | 1256 * 9 Mixins: It is a compile-time error if a declared or derived mixin refers
to super. |
1155 */ | 1257 */ |
1156 static final CompileTimeErrorCode MIXIN_REFERENCES_SUPER = new CompileTimeErro
rCode('MIXIN_REFERENCES_SUPER', 83, "The class '%s' cannot be used as a mixin be
cause it references 'super'"); | 1258 static final CompileTimeErrorCode MIXIN_REFERENCES_SUPER = new CompileTimeErro
rCode('MIXIN_REFERENCES_SUPER', 85, "The class '%s' cannot be used as a mixin be
cause it references 'super'"); |
1157 | 1259 |
1158 /** | 1260 /** |
1159 * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not deno
te a class available | 1261 * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not deno
te a class available |
1160 * in the immediately enclosing scope. | 1262 * in the immediately enclosing scope. |
1161 */ | 1263 */ |
1162 static final CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = new Compil
eTimeErrorCode('MIXIN_WITH_NON_CLASS_SUPERCLASS', 84, "Mixin can only be applied
to class"); | 1264 static final CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = new Compil
eTimeErrorCode('MIXIN_WITH_NON_CLASS_SUPERCLASS', 86, "Mixin can only be applied
to class"); |
1163 | 1265 |
1164 /** | 1266 /** |
1165 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 1267 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
1166 * only action is to invoke another generative constructor. | 1268 * only action is to invoke another generative constructor. |
1167 */ | 1269 */ |
1168 static final CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS
= new CompileTimeErrorCode('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS', 85,
"Constructor may have at most one 'this' redirection"); | 1270 static final CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS
= new CompileTimeErrorCode('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS', 87,
"Constructor may have at most one 'this' redirection"); |
1169 | 1271 |
1170 /** | 1272 /** |
1171 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Th
en <i>k</i> may | 1273 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Th
en <i>k</i> may |
1172 * include at most one superinitializer in its initializer list or a compile t
ime error occurs. | 1274 * include at most one superinitializer in its initializer list or a compile t
ime error occurs. |
1173 */ | 1275 */ |
1174 static final CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = new CompileTim
eErrorCode('MULTIPLE_SUPER_INITIALIZERS', 86, "Constructor may have at most one
'super' initializer"); | 1276 static final CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = new CompileTim
eErrorCode('MULTIPLE_SUPER_INITIALIZERS', 88, "Constructor may have at most one
'super' initializer"); |
1175 | 1277 |
1176 /** | 1278 /** |
1177 * 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 | 1279 * 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 |
1178 * parameters. | 1280 * parameters. |
| 1281 * |
1179 * @param typeName the name of the type being referenced (<i>S</i>) | 1282 * @param typeName the name of the type being referenced (<i>S</i>) |
1180 * @param parameterCount the number of type parameters that were declared | 1283 * @param parameterCount the number of type parameters that were declared |
1181 * @param argumentCount the number of type arguments provided | 1284 * @param argumentCount the number of type arguments provided |
| 1285 * @see CompileTimeErrorCode#CONST_WITH_INVALID_TYPE_PARAMETERS |
| 1286 * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS |
1182 */ | 1287 */ |
1183 static final CompileTimeErrorCode NEW_WITH_INVALID_TYPE_PARAMETERS = new Compi
leTimeErrorCode('NEW_WITH_INVALID_TYPE_PARAMETERS', 87, "The type '%s' is declar
ed with %d type parameters, but %d type arguments were given"); | 1288 static final CompileTimeErrorCode NEW_WITH_INVALID_TYPE_PARAMETERS = new Compi
leTimeErrorCode('NEW_WITH_INVALID_TYPE_PARAMETERS', 89, "The type '%s' is declar
ed with %d type parameters, but %d type arguments were given"); |
| 1289 |
| 1290 /** |
| 1291 * 7.6.1 Generative Constructors: If no superinitializer is provided, an impli
cit superinitializer |
| 1292 * of the form <b>super</b>() is added at the end of <i>k</i>'s initializer li
st, unless the |
| 1293 * enclosing class is class <i>Object</i>. |
| 1294 * |
| 1295 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i>
does not declare a |
| 1296 * generative constructor named <i>S</i> (respectively <i>S.id</i>) |
| 1297 */ |
| 1298 static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT = new
CompileTimeErrorCode('NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT', 90, "The class '%s
' does not have a default constructor"); |
| 1299 |
| 1300 /** |
| 1301 * 7.6 Constructors: Iff no constructor is specified for a class <i>C</i>, it
implicitly has a |
| 1302 * default constructor C() : <b>super<b>() {}, unless <i>C</i> is class <i>Obj
ect</i>. |
| 1303 * |
| 1304 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i>
does not declare a |
| 1305 * generative constructor named <i>S</i> (respectively <i>S.id</i>) |
| 1306 */ |
| 1307 static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT = new
CompileTimeErrorCode('NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT', 91, "The class '%s
' does not have a default constructor"); |
1184 | 1308 |
1185 /** | 1309 /** |
1186 * 13.2 Expression Statements: It is a compile-time error if a non-constant ma
p literal that has | 1310 * 13.2 Expression Statements: It is a compile-time error if a non-constant ma
p literal that has |
1187 * no explicit type arguments appears in a place where a statement is expected
. | 1311 * no explicit type arguments appears in a place where a statement is expected
. |
1188 */ | 1312 */ |
1189 static final CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = new
CompileTimeErrorCode('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 88, "A non-constan
t map literal without type arguments cannot be used as an expression statement")
; | 1313 static final CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = new
CompileTimeErrorCode('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 92, "A non-constan
t map literal without type arguments cannot be used as an expression statement")
; |
1190 | 1314 |
1191 /** | 1315 /** |
1192 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub
>11</sub> … | 1316 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub
>11</sub> … |
1193 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> … label<sub>n1
</sub> … | 1317 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> … label<sub>n1
</sub> … |
1194 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s
ub>}</i> or the form | 1318 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s
ub>}</i> or the form |
1195 * <i>switch (e) { label<sub>11</sub> … label<sub>1j1</sub> case e<sub>
1</sub>: | 1319 * <i>switch (e) { label<sub>11</sub> … label<sub>1j1</sub> case e<sub>
1</sub>: |
1196 * s<sub>1</sub> … label<sub>n1</sub> … label<sub>njn</sub> case
e<sub>n</sub>: | 1320 * s<sub>1</sub> … label<sub>n1</sub> … label<sub>njn</sub> case
e<sub>n</sub>: |
1197 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub>
k</sub></i> are not | 1321 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub>
k</sub></i> are not |
1198 * compile-time constants, for all <i>1 <= k <= n</i>. | 1322 * compile-time constants, for all <i>1 <= k <= n</i>. |
1199 */ | 1323 */ |
1200 static final CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = new CompileTi
meErrorCode('NON_CONSTANT_CASE_EXPRESSION', 89, "Case expressions must be consta
nt"); | 1324 static final CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = new CompileTi
meErrorCode('NON_CONSTANT_CASE_EXPRESSION', 93, "Case expressions must be consta
nt"); |
1201 | 1325 |
1202 /** | 1326 /** |
1203 * 6.2.2 Optional Formals: It is a compile-time error if the default value of
an optional | 1327 * 6.2.2 Optional Formals: It is a compile-time error if the default value of
an optional |
1204 * parameter is not a compile-time constant. | 1328 * parameter is not a compile-time constant. |
1205 */ | 1329 */ |
1206 static final CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = new CompileTime
ErrorCode('NON_CONSTANT_DEFAULT_VALUE', 90, "Default values of an optional param
eter must be constant"); | 1330 static final CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = new CompileTime
ErrorCode('NON_CONSTANT_DEFAULT_VALUE', 94, "Default values of an optional param
eter must be constant"); |
1207 | 1331 |
1208 /** | 1332 /** |
1209 * 12.6 Lists: It is a compile time error if an element of a constant list lit
eral is not a | 1333 * 12.6 Lists: It is a compile time error if an element of a constant list lit
eral is not a |
1210 * compile-time constant. | 1334 * compile-time constant. |
1211 */ | 1335 */ |
1212 static final CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = new CompileTimeE
rrorCode('NON_CONSTANT_LIST_ELEMENT', 91, "'const' lists must have all constant
values"); | 1336 static final CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = new CompileTimeE
rrorCode('NON_CONSTANT_LIST_ELEMENT', 95, "'const' lists must have all constant
values"); |
1213 | 1337 |
1214 /** | 1338 /** |
1215 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map | 1339 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map |
1216 * literal is not a compile-time constant. | 1340 * literal is not a compile-time constant. |
1217 */ | 1341 */ |
1218 static final CompileTimeErrorCode NON_CONSTANT_MAP_KEY = new CompileTimeErrorC
ode('NON_CONSTANT_MAP_KEY', 92, "The keys in a map must be constant"); | 1342 static final CompileTimeErrorCode NON_CONSTANT_MAP_KEY = new CompileTimeErrorC
ode('NON_CONSTANT_MAP_KEY', 96, "The keys in a map must be constant"); |
1219 | 1343 |
1220 /** | 1344 /** |
1221 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map | 1345 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map |
1222 * literal is not a compile-time constant. | 1346 * literal is not a compile-time constant. |
1223 */ | 1347 */ |
1224 static final CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = new CompileTimeErro
rCode('NON_CONSTANT_MAP_VALUE', 93, "The values in a 'const' map must be constan
t"); | 1348 static final CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = new CompileTimeErro
rCode('NON_CONSTANT_MAP_VALUE', 97, "The values in a 'const' map must be constan
t"); |
1225 | 1349 |
1226 /** | 1350 /** |
1227 * 7.6.3 Constant Constructors: Any expression that appears within the initial
izer list of a | 1351 * 7.6.3 Constant Constructors: Any expression that appears within the initial
izer list of a |
1228 * constant constructor must be a potentially constant expression, or a compil
e-time error occurs. | 1352 * constant constructor must be a potentially constant expression, or a compil
e-time error occurs. |
1229 */ | 1353 */ |
1230 static final CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = new Comp
ileTimeErrorCode('NON_CONSTANT_VALUE_IN_INITIALIZER', 94, "Initializer expressio
ns in constant constructors must be constants"); | 1354 static final CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = new Comp
ileTimeErrorCode('NON_CONSTANT_VALUE_IN_INITIALIZER', 98, "Initializer expressio
ns in constant constructors must be constants"); |
1231 | 1355 |
1232 /** | 1356 /** |
1233 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i>
or if <i>m > n</i>. | 1357 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i>
or if <i>m > n</i>. |
1234 * | 1358 * |
1235 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 1359 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
1236 * uncaught exception being thrown. | 1360 * uncaught exception being thrown. |
| 1361 * |
1237 * @param requiredCount the expected number of required arguments | 1362 * @param requiredCount the expected number of required arguments |
1238 * @param argumentCount the actual number of positional arguments given | 1363 * @param argumentCount the actual number of positional arguments given |
1239 */ | 1364 */ |
1240 static final CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new CompileT
imeErrorCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', 95, "%d required argument(s) expec
ted, but %d found"); | 1365 static final CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new CompileT
imeErrorCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', 99, "%d required argument(s) expec
ted, but %d found"); |
1241 | 1366 |
1242 /** | 1367 /** |
1243 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears | 1368 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears |
1244 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is | 1369 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is |
1245 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> | 1370 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> |
1246 * (respectively <i>S.id</i>) | 1371 * (respectively <i>S.id</i>) |
1247 */ | 1372 */ |
1248 static final CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR = new CompileTime
ErrorCode('NON_GENERATIVE_CONSTRUCTOR', 96, "The generative constructor '%s' exp
ected, but factory found"); | 1373 static final CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR = new CompileTime
ErrorCode('NON_GENERATIVE_CONSTRUCTOR', 100, "The generative constructor '%s' ex
pected, but factory found"); |
1249 | 1374 |
1250 /** | 1375 /** |
1251 * 7.9 Superclasses: It is a compile-time error to specify an extends clause f
or class Object. | 1376 * 7.9 Superclasses: It is a compile-time error to specify an extends clause f
or class Object. |
1252 */ | 1377 */ |
1253 static final CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = new Com
pileTimeErrorCode('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 97, ""); | 1378 static final CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = new Com
pileTimeErrorCode('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 101, ""); |
1254 | 1379 |
1255 /** | 1380 /** |
1256 * 7.1.1 Operators: It is a compile-time error to declare an optional paramete
r in an operator. | 1381 * 7.1.1 Operators: It is a compile-time error to declare an optional paramete
r in an operator. |
1257 */ | 1382 */ |
1258 static final CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = new Compile
TimeErrorCode('OPTIONAL_PARAMETER_IN_OPERATOR', 98, "Optional parameters are not
allowed when defining an operator"); | 1383 static final CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = new Compile
TimeErrorCode('OPTIONAL_PARAMETER_IN_OPERATOR', 102, "Optional parameters are no
t allowed when defining an operator"); |
1259 | 1384 |
1260 /** | 1385 /** |
1261 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part | 1386 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part |
1262 * declaration. | 1387 * declaration. |
| 1388 * |
1263 * @param uri the uri pointing to a non-library declaration | 1389 * @param uri the uri pointing to a non-library declaration |
1264 */ | 1390 */ |
1265 static final CompileTimeErrorCode PART_OF_NON_PART = new CompileTimeErrorCode(
'PART_OF_NON_PART', 99, "The included part '%s' must have a part-of directive"); | 1391 static final CompileTimeErrorCode PART_OF_NON_PART = new CompileTimeErrorCode(
'PART_OF_NON_PART', 103, "The included part '%s' must have a part-of directive")
; |
1266 | 1392 |
1267 /** | 1393 /** |
1268 * 14.1 Imports: It is a compile-time error if the current library declares a
top-level member | 1394 * 14.1 Imports: It is a compile-time error if the current library declares a
top-level member |
1269 * named <i>p</i>. | 1395 * named <i>p</i>. |
1270 */ | 1396 */ |
1271 static final CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = new
CompileTimeErrorCode('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 100, "The name '%s
' is already used as an import prefix and cannot be used to name a top-level ele
ment"); | 1397 static final CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = new
CompileTimeErrorCode('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 104, "The name '%s
' is already used as an import prefix and cannot be used to name a top-level ele
ment"); |
1272 | 1398 |
1273 /** | 1399 /** |
1274 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named o
ptional parameter | 1400 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named o
ptional parameter |
1275 * begins with an '_' character. | 1401 * begins with an '_' character. |
1276 */ | 1402 */ |
1277 static final CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = new CompileTime
ErrorCode('PRIVATE_OPTIONAL_PARAMETER', 101, "Named optional parameters cannot s
tart with an underscore"); | 1403 static final CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = new CompileTime
ErrorCode('PRIVATE_OPTIONAL_PARAMETER', 105, "Named optional parameters cannot s
tart with an underscore"); |
1278 | 1404 |
1279 /** | 1405 /** |
1280 * 12.1 Constants: It is a compile-time error if the value of a compile-time c
onstant expression | 1406 * 12.1 Constants: It is a compile-time error if the value of a compile-time c
onstant expression |
1281 * depends on itself. | 1407 * depends on itself. |
1282 */ | 1408 */ |
1283 static final CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = new Compil
eTimeErrorCode('RECURSIVE_COMPILE_TIME_CONSTANT', 102, ""); | 1409 static final CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = new Compil
eTimeErrorCode('RECURSIVE_COMPILE_TIME_CONSTANT', 106, ""); |
1284 | 1410 |
1285 /** | 1411 /** |
1286 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 1412 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
1287 * only action is to invoke another generative constructor. | 1413 * only action is to invoke another generative constructor. |
1288 * | 1414 * |
1289 * TODO(scheglov) review this later, there are no explicit "it is a compile-ti
me error" in | 1415 * TODO(scheglov) review this later, there are no explicit "it is a compile-ti
me error" in |
1290 * specification. But it was added to the co19 and there is same error for fac
tories. | 1416 * specification. But it was added to the co19 and there is same error for fac
tories. |
1291 * | 1417 * |
1292 * https://code.google.com/p/dart/issues/detail?id=954 | 1418 * https://code.google.com/p/dart/issues/detail?id=954 |
1293 */ | 1419 */ |
1294 static final CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = new Compile
TimeErrorCode('RECURSIVE_CONSTRUCTOR_REDIRECT', 103, "Cycle in redirecting gener
ative constructors"); | 1420 static final CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = new Compile
TimeErrorCode('RECURSIVE_CONSTRUCTOR_REDIRECT', 107, "Cycle in redirecting gener
ative constructors"); |
1295 | 1421 |
1296 /** | 1422 /** |
1297 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr
uctor redirects to | 1423 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr
uctor redirects to |
1298 * itself, either directly or indirectly via a sequence of redirections. | 1424 * itself, either directly or indirectly via a sequence of redirections. |
1299 */ | 1425 */ |
1300 static final CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = new CompileTime
ErrorCode('RECURSIVE_FACTORY_REDIRECT', 104, "Cycle in redirecting factory const
ructors"); | 1426 static final CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = new CompileTime
ErrorCode('RECURSIVE_FACTORY_REDIRECT', 108, "Cycle in redirecting factory const
ructors"); |
1301 | 1427 |
1302 /** | 1428 /** |
1303 * 15.3.1 Typedef: It is a compile-time error if a typedef refers to itself vi
a a chain of | 1429 * 15.3.1 Typedef: It is a compile-time error if a typedef refers to itself vi
a a chain of |
1304 * references that does not include a class type. | 1430 * references that does not include a class type. |
1305 */ | 1431 */ |
1306 static final CompileTimeErrorCode RECURSIVE_FUNCTION_TYPE_ALIAS = new CompileT
imeErrorCode('RECURSIVE_FUNCTION_TYPE_ALIAS', 105, ""); | 1432 static final CompileTimeErrorCode RECURSIVE_FUNCTION_TYPE_ALIAS = new CompileT
imeErrorCode('RECURSIVE_FUNCTION_TYPE_ALIAS', 109, ""); |
1307 | 1433 |
1308 /** | 1434 /** |
1309 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a | 1435 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a |
1310 * superinterface of itself. | 1436 * superinterface of itself. |
1311 * | 1437 * |
1312 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. | 1438 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. |
1313 * | 1439 * |
1314 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. | 1440 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. |
| 1441 * |
1315 * @param className the name of the class that implements itself recursively | 1442 * @param className the name of the class that implements itself recursively |
1316 * @param strImplementsPath a string representation of the implements loop | 1443 * @param strImplementsPath a string representation of the implements loop |
1317 */ | 1444 */ |
1318 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = new Compil
eTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE', 106, "'%s' cannot be a superin
terface of itself: %s"); | 1445 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = new Compil
eTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE', 110, "'%s' cannot be a superin
terface of itself: %s"); |
1319 | 1446 |
1320 /** | 1447 /** |
1321 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a | 1448 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a |
1322 * superinterface of itself. | 1449 * superinterface of itself. |
1323 * | 1450 * |
1324 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. | 1451 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. |
1325 * | 1452 * |
1326 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. | 1453 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. |
| 1454 * |
1327 * @param className the name of the class that implements itself recursively | 1455 * @param className the name of the class that implements itself recursively |
1328 */ | 1456 */ |
1329 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EX
TENDS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTE
NDS', 107, "'%s' cannot extend itself"); | 1457 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EX
TENDS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTE
NDS', 111, "'%s' cannot extend itself"); |
1330 | 1458 |
1331 /** | 1459 /** |
1332 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a | 1460 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a |
1333 * superinterface of itself. | 1461 * superinterface of itself. |
1334 * | 1462 * |
1335 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. | 1463 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. |
1336 * | 1464 * |
1337 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. | 1465 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. |
| 1466 * |
1338 * @param className the name of the class that implements itself recursively | 1467 * @param className the name of the class that implements itself recursively |
1339 */ | 1468 */ |
1340 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IM
PLEMENTS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_I
MPLEMENTS', 108, "'%s' cannot implement itself"); | 1469 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IM
PLEMENTS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_I
MPLEMENTS', 112, "'%s' cannot implement itself"); |
1341 | 1470 |
1342 /** | 1471 /** |
1343 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th
e const modifier but | 1472 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th
e const modifier but |
1344 * <i>k'</i> is not a constant constructor. | 1473 * <i>k'</i> is not a constant constructor. |
1345 */ | 1474 */ |
1346 static final CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = new Comp
ileTimeErrorCode('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 109, "Constant factory con
structor cannot delegate to a non-constant constructor"); | 1475 static final CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = new Comp
ileTimeErrorCode('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 113, "Constant factory con
structor cannot delegate to a non-constant constructor"); |
1347 | 1476 |
1348 /** | 1477 /** |
1349 * 13.3 Local Variable Declaration: It is a compile-time error if <i>e</i> ref
ers to the name | 1478 * 13.3 Local Variable Declaration: It is a compile-time error if <i>e</i> ref
ers to the name |
1350 * <i>v</i> or the name <i>v=</i>. | 1479 * <i>v</i> or the name <i>v=</i>. |
1351 */ | 1480 */ |
1352 static final CompileTimeErrorCode REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZE
R = new CompileTimeErrorCode('REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER', 11
0, "The name '%s' cannot be referenced in the initializer of a variable with the
same name"); | 1481 static final CompileTimeErrorCode REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZE
R = new CompileTimeErrorCode('REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER', 11
4, "The name '%s' cannot be referenced in the initializer of a variable with the
same name"); |
1353 | 1482 |
1354 /** | 1483 /** |
1355 * 16.1.1 Reserved Words: A reserved word may not be used as an identifier; it
is a compile-time | 1484 * 16.1.1 Reserved Words: A reserved word may not be used as an identifier; it
is a compile-time |
1356 * error if a reserved word is used where an identifier is expected. | 1485 * error if a reserved word is used where an identifier is expected. |
1357 */ | 1486 */ |
1358 static final CompileTimeErrorCode RESERVED_WORD_AS_IDENTIFIER = new CompileTim
eErrorCode('RESERVED_WORD_AS_IDENTIFIER', 111, ""); | 1487 static final CompileTimeErrorCode RESERVED_WORD_AS_IDENTIFIER = new CompileTim
eErrorCode('RESERVED_WORD_AS_IDENTIFIER', 115, ""); |
1359 | 1488 |
1360 /** | 1489 /** |
1361 * 12.8.1 Rethrow: It is a compile-time error if an expression of the form <i>
rethrow;</i> is not | 1490 * 12.8.1 Rethrow: It is a compile-time error if an expression of the form <i>
rethrow;</i> is not |
1362 * enclosed within a on-catch clause. | 1491 * enclosed within a on-catch clause. |
1363 */ | 1492 */ |
1364 static final CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = new CompileTimeError
Code('RETHROW_OUTSIDE_CATCH', 112, "rethrow must be inside of a catch clause"); | 1493 static final CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = new CompileTimeError
Code('RETHROW_OUTSIDE_CATCH', 116, "rethrow must be inside of a catch clause"); |
1365 | 1494 |
1366 /** | 1495 /** |
1367 * 13.11 Return: It is a compile-time error if a return statement of the form
<i>return e;</i> | 1496 * 13.11 Return: It is a compile-time error if a return statement of the form
<i>return e;</i> |
1368 * appears in a generative constructor. | 1497 * appears in a generative constructor. |
1369 */ | 1498 */ |
1370 static final CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = new Compi
leTimeErrorCode('RETURN_IN_GENERATIVE_CONSTRUCTOR', 113, "Constructors cannot re
turn a value"); | 1499 static final CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = new Compi
leTimeErrorCode('RETURN_IN_GENERATIVE_CONSTRUCTOR', 117, "Constructors cannot re
turn a value"); |
1371 | 1500 |
1372 /** | 1501 /** |
1373 * 6.1 Function Declarations: It is a compile-time error to preface a function
declaration with | 1502 * 6.1 Function Declarations: It is a compile-time error to preface a function
declaration with |
1374 * the built-in identifier static. | 1503 * the built-in identifier static. |
1375 */ | 1504 */ |
1376 static final CompileTimeErrorCode STATIC_TOP_LEVEL_FUNCTION = new CompileTimeE
rrorCode('STATIC_TOP_LEVEL_FUNCTION', 114, ""); | 1505 static final CompileTimeErrorCode STATIC_TOP_LEVEL_FUNCTION = new CompileTimeE
rrorCode('STATIC_TOP_LEVEL_FUNCTION', 118, ""); |
1377 | 1506 |
1378 /** | 1507 /** |
1379 * 5 Variables: It is a compile-time error to preface a top level variable dec
laration with the | 1508 * 5 Variables: It is a compile-time error to preface a top level variable dec
laration with the |
1380 * built-in identifier static. | 1509 * built-in identifier static. |
1381 */ | 1510 */ |
1382 static final CompileTimeErrorCode STATIC_TOP_LEVEL_VARIABLE = new CompileTimeE
rrorCode('STATIC_TOP_LEVEL_VARIABLE', 115, ""); | 1511 static final CompileTimeErrorCode STATIC_TOP_LEVEL_VARIABLE = new CompileTimeE
rrorCode('STATIC_TOP_LEVEL_VARIABLE', 119, ""); |
1383 | 1512 |
1384 /** | 1513 /** |
1385 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form | 1514 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form |
1386 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … | 1515 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … |
1387 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe
r method invocation | 1516 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe
r method invocation |
1388 * occurs in a top-level function or variable initializer, in an instance vari
able initializer or | 1517 * occurs in a top-level function or variable initializer, in an instance vari
able initializer or |
1389 * initializer list, in class Object, in a factory constructor, or in a static
method or variable | 1518 * initializer list, in class Object, in a factory constructor, or in a static
method or variable |
1390 * initializer. | 1519 * initializer. |
1391 */ | 1520 */ |
1392 static final CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = new CompileTimeEr
rorCode('SUPER_IN_INVALID_CONTEXT', 116, "Invalid context for 'super' invocation
"); | 1521 static final CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = new CompileTimeEr
rorCode('SUPER_IN_INVALID_CONTEXT', 120, "Invalid context for 'super' invocation
"); |
1393 | 1522 |
1394 /** | 1523 /** |
1395 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 1524 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
1396 * only action is to invoke another generative constructor. | 1525 * only action is to invoke another generative constructor. |
1397 */ | 1526 */ |
1398 static final CompileTimeErrorCode SUPER_IN_REDIRECTING_CONSTRUCTOR = new Compi
leTimeErrorCode('SUPER_IN_REDIRECTING_CONSTRUCTOR', 117, "The redirecting constr
uctor cannot have a 'super' initializer"); | 1527 static final CompileTimeErrorCode SUPER_IN_REDIRECTING_CONSTRUCTOR = new Compi
leTimeErrorCode('SUPER_IN_REDIRECTING_CONSTRUCTOR', 121, "The redirecting constr
uctor cannot have a 'super' initializer"); |
1399 | 1528 |
1400 /** | 1529 /** |
1401 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time | 1530 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time |
1402 * error if a generative constructor of class Object includes a superinitializ
er. | 1531 * error if a generative constructor of class Object includes a superinitializ
er. |
1403 */ | 1532 */ |
1404 static final CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = new CompileTim
eErrorCode('SUPER_INITIALIZER_IN_OBJECT', 118, ""); | 1533 static final CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = new CompileTim
eErrorCode('SUPER_INITIALIZER_IN_OBJECT', 122, ""); |
1405 | 1534 |
1406 /** | 1535 /** |
1407 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current | 1536 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current |
1408 * scope, optionally followed by type arguments. | 1537 * scope, optionally followed by type arguments. |
1409 */ | 1538 */ |
1410 static final CompileTimeErrorCode UNDEFINED_CLASS = new CompileTimeErrorCode('
UNDEFINED_CLASS', 119, "Undefined class '%s'"); | 1539 static final CompileTimeErrorCode UNDEFINED_CLASS = new CompileTimeErrorCode('
UNDEFINED_CLASS', 123, "Undefined class '%s'"); |
1411 | 1540 |
1412 /** | 1541 /** |
1413 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears | 1542 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears |
1414 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is | 1543 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is |
1415 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> | 1544 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> |
1416 * (respectively <i>S.id</i>) | 1545 * (respectively <i>S.id</i>) |
1417 */ | 1546 */ |
1418 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = new C
ompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 120, "The class '%s'
does not have a generative constructor '%s'"); | 1547 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = new C
ompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 124, "The class '%s'
does not have a generative constructor '%s'"); |
1419 | 1548 |
1420 /** | 1549 /** |
1421 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears | 1550 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears |
1422 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is | 1551 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is |
1423 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> | 1552 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> |
1424 * (respectively <i>S.id</i>) | 1553 * (respectively <i>S.id</i>) |
1425 */ | 1554 */ |
1426 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT
= new CompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT', 121,
"The class '%s' does not have a default generative constructor"); | 1555 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT
= new CompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT', 125,
"The class '%s' does not have a default generative constructor"); |
1427 | 1556 |
1428 /** | 1557 /** |
1429 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Ea
ch final instance | 1558 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Ea
ch final instance |
1430 * variable <i>f</i> declared in the immediately enclosing class must have an
initializer in | 1559 * variable <i>f</i> declared in the immediately enclosing class must have an
initializer in |
1431 * <i>k</i>'s initializer list unless it has already been initialized by one o
f the following | 1560 * <i>k</i>'s initializer list unless it has already been initialized by one o
f the following |
1432 * means: | 1561 * means: |
1433 * <ol> | 1562 * <ol> |
1434 * * Initialization at the declaration of <i>f</i>. | 1563 * * Initialization at the declaration of <i>f</i>. |
1435 * * Initialization by means of an initializing formal of <i>k</i>. | 1564 * * Initialization by means of an initializing formal of <i>k</i>. |
1436 * </ol> | 1565 * </ol> |
1437 * or a compile-time error occurs. | 1566 * or a compile-time error occurs. |
1438 */ | 1567 */ |
1439 static final CompileTimeErrorCode UNINITIALIZED_FINAL_FIELD = new CompileTimeE
rrorCode('UNINITIALIZED_FINAL_FIELD', 122, ""); | 1568 static final CompileTimeErrorCode UNINITIALIZED_FINAL_FIELD = new CompileTimeE
rrorCode('UNINITIALIZED_FINAL_FIELD', 126, ""); |
1440 | 1569 |
1441 /** | 1570 /** |
1442 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>,
<i>1<=i<=l</i>, | 1571 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>,
<i>1<=i<=l</i>, |
1443 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i
> ... | 1572 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i
> ... |
1444 * <i>p<sub>n+k</sub></i>} or a static warning occurs. | 1573 * <i>p<sub>n+k</sub></i>} or a static warning occurs. |
1445 * | 1574 * |
1446 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 1575 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
1447 * uncaught exception being thrown. | 1576 * uncaught exception being thrown. |
| 1577 * |
1448 * @param name the name of the requested named parameter | 1578 * @param name the name of the requested named parameter |
1449 */ | 1579 */ |
1450 static final CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER = new CompileTimeE
rrorCode('UNDEFINED_NAMED_PARAMETER', 123, "The named parameter '%s' is not defi
ned"); | 1580 static final CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER = new CompileTimeE
rrorCode('UNDEFINED_NAMED_PARAMETER', 127, "The named parameter '%s' is not defi
ned"); |
1451 | 1581 |
1452 /** | 1582 /** |
1453 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1583 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is |
1454 * not a library declaration. | 1584 * not a library declaration. |
1455 * | 1585 * |
1456 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1586 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is |
1457 * not a library declaration. | 1587 * not a library declaration. |
1458 * | 1588 * |
1459 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part | 1589 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part |
1460 * declaration. | 1590 * declaration. |
| 1591 * |
1461 * @param uri the URI pointing to a non-existent file | 1592 * @param uri the URI pointing to a non-existent file |
1462 * @see #INVALID_URI | 1593 * @see #INVALID_URI |
1463 */ | 1594 */ |
1464 static final CompileTimeErrorCode URI_DOES_NOT_EXIST = new CompileTimeErrorCod
e('URI_DOES_NOT_EXIST', 124, "Target of URI does not exist: '%s'"); | 1595 static final CompileTimeErrorCode URI_DOES_NOT_EXIST = new CompileTimeErrorCod
e('URI_DOES_NOT_EXIST', 128, "Target of URI does not exist: '%s'"); |
1465 | 1596 |
1466 /** | 1597 /** |
1467 * 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time
constant, or if | 1598 * 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time
constant, or if |
1468 * <i>x</i> involves string interpolation. | 1599 * <i>x</i> involves string interpolation. |
1469 * | 1600 * |
1470 * 14.3 Parts: It is a compile-time error if <i>s</i> is not a compile-time co
nstant, or if | 1601 * 14.3 Parts: It is a compile-time error if <i>s</i> is not a compile-time co
nstant, or if |
1471 * <i>s</i> involves string interpolation. | 1602 * <i>s</i> involves string interpolation. |
1472 * | 1603 * |
1473 * 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that d
escribes a URI is | 1604 * 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that d
escribes a URI is |
1474 * not a compile-time constant, or if <i>x</i> involves string interpolation. | 1605 * not a compile-time constant, or if <i>x</i> involves string interpolation. |
1475 */ | 1606 */ |
1476 static final CompileTimeErrorCode URI_WITH_INTERPOLATION = new CompileTimeErro
rCode('URI_WITH_INTERPOLATION', 125, "URIs cannot use string interpolation"); | 1607 static final CompileTimeErrorCode URI_WITH_INTERPOLATION = new CompileTimeErro
rCode('URI_WITH_INTERPOLATION', 129, "URIs cannot use string interpolation"); |
1477 | 1608 |
1478 /** | 1609 /** |
1479 * 7.1.1 Operators: It is a compile-time error if the arity of the user-declar
ed operator \[\]= is | 1610 * 7.1.1 Operators: It is a compile-time error if the arity of the user-declar
ed operator []= is |
1480 * not 2. It is a compile time error if the arity of a user-declared operator
with one of the | 1611 * not 2. It is a compile time error if the arity of a user-declared operator
with one of the |
1481 * names: <, >, <=, >=, ==, +, /, ~/, *, %, |, ^, &, <<, >
;>, \[\] is not 1. | 1612 * names: <, >, <=, >=, ==, +, /, ~/, *, %, |, ^, &, <<, >
;>, [] is not 1. |
1482 * It is a compile time error if the arity of the user-declared operator - is
not 0 or 1. It is a | 1613 * It is a compile time error if the arity of the user-declared operator - is
not 0 or 1. It is a |
1483 * compile time error if the arity of the user-declared operator ~ is not 0. | 1614 * compile time error if the arity of the user-declared operator ~ is not 0. |
| 1615 * |
1484 * @param operatorName the name of the declared operator | 1616 * @param operatorName the name of the declared operator |
1485 * @param expectedNumberOfParameters the number of parameters expected | 1617 * @param expectedNumberOfParameters the number of parameters expected |
1486 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration | 1618 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration |
1487 */ | 1619 */ |
1488 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = ne
w CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 126, "Operator
'%s' should declare exactly %d parameter(s), but %d found"); | 1620 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = ne
w CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 130, "Operator
'%s' should declare exactly %d parameter(s), but %d found"); |
1489 | 1621 |
1490 /** | 1622 /** |
1491 * 7.1.1 Operators: It is a compile time error if the arity of the user-declar
ed operator - is not | 1623 * 7.1.1 Operators: It is a compile time error if the arity of the user-declar
ed operator - is not |
1492 * 0 or 1. | 1624 * 0 or 1. |
| 1625 * |
1493 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration | 1626 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration |
1494 */ | 1627 */ |
1495 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINU
S = new CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS', 12
7, "Operator '-' should declare 0 or 1 parameter, but %d found"); | 1628 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINU
S = new CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS', 13
1, "Operator '-' should declare 0 or 1 parameter, but %d found"); |
1496 | 1629 |
1497 /** | 1630 /** |
1498 * 7.3 Setters: It is a compile-time error if a setter's formal parameter list
does not include | 1631 * 7.3 Setters: It is a compile-time error if a setter's formal parameter list
does not include |
1499 * exactly one required formal parameter <i>p</i>. | 1632 * exactly one required formal parameter <i>p</i>. |
1500 * @param numberOfParameters the number of parameters found in the setter | |
1501 */ | 1633 */ |
1502 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = new
CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 128, "Setters shou
ld declare exactly one parameter, %d found"); | 1634 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = new
CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 132, "Setters shou
ld declare exactly one required parameter"); |
1503 | 1635 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_GETTER_AND_METHOD, CONFLICTING_METHOD
_AND_GETTER, CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, CONFLICTING_CONSTRUCTOR_NAM
E_AND_METHOD, CONST_CONSTRUCTOR_THROWS_EXCEPTION, CONST_CONSTRUCTOR_WITH_NON_FIN
AL_FIELD, CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE, CONST_FORMAL_PARAMETER, CONST_
INITIALIZED_WITH_NON_CONSTANT_VALUE, CONST_INSTANCE_FIELD, CONST_EVAL_TYPE_BOOL,
CONST_EVAL_TYPE_BOOL_NUM_STRING, CONST_EVAL_TYPE_INT, CONST_EVAL_TYPE_NUM, CONS
T_EVAL_THROWS_EXCEPTION, CONST_EVAL_THROWS_IDBZE, CONST_WITH_INVALID_TYPE_PARAME
TERS, CONST_WITH_NON_CONST, CONST_WITH_NON_CONSTANT_ARGUMENT, CONST_WITH_NON_TYP
E, CONST_WITH_TYPE_PARAMETERS, CONST_WITH_UNDEFINED_CONSTRUCTOR, CONST_WITH_UNDE
FINED_CONSTRUCTOR_DEFAULT, DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS, DUPLICATE_CONST
RUCTOR_DEFAULT, DUPLICATE_CONSTRUCTOR_NAME, DUPLICATE_DEFINITION, DUPLICATE_DEFI
NITION_INHERITANCE, DUPLICATE_NAMED_ARGUMENT, EXPORT_INTERNAL_LIBRARY, EXPORT_OF
_NON_LIBRARY, EXTENDS_NON_CLASS, EXTENDS_DISALLOWED_CLASS, EXTRA_POSITIONAL_ARGU
MENTS, FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS, FIELD_INITIALIZED_IN_INITIALI
ZER_AND_DECLARATION, FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER, FINAL_INITI
ALIZED_IN_DECLARATION_AND_CONSTRUCTOR, FINAL_INITIALIZED_MULTIPLE_TIMES, FIELD_I
NITIALIZER_FACTORY_CONSTRUCTOR, FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR, FIELD_INI
TIALIZER_REDIRECTING_CONSTRUCTOR, GETTER_AND_METHOD_WITH_SAME_NAME, IMPLEMENTS_D
ISALLOWED_CLASS, IMPLEMENTS_DYNAMIC, IMPLEMENTS_NON_CLASS, IMPLEMENTS_REPEATED,
IMPLICIT_THIS_REFERENCE_IN_INITIALIZER, IMPORT_INTERNAL_LIBRARY, IMPORT_OF_NON_L
IBRARY, INCONSISTENT_CASE_EXPRESSION_TYPES, INITIALIZER_FOR_NON_EXISTANT_FIELD,
INITIALIZER_FOR_STATIC_FIELD, INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD, INITIA
LIZING_FORMAL_FOR_STATIC_FIELD, INSTANCE_MEMBER_ACCESS_FROM_STATIC, INVALID_CONS
TANT, INVALID_CONSTRUCTOR_NAME, INVALID_FACTORY_NAME_NOT_A_CLASS, INVALID_OVERRI
DE_NAMED, INVALID_OVERRIDE_POSITIONAL, INVALID_OVERRIDE_REQUIRED, INVALID_REFERE
NCE_TO_THIS, INVALID_TYPE_ARGUMENT_FOR_KEY, INVALID_TYPE_ARGUMENT_IN_CONST_LIST,
INVALID_TYPE_ARGUMENT_IN_CONST_MAP, INVALID_URI, LABEL_IN_OUTER_SCOPE, LABEL_UN
DEFINED, MEMBER_WITH_CLASS_NAME, METHOD_AND_GETTER_WITH_SAME_NAME, MISSING_CONST
_IN_LIST_LITERAL, MISSING_CONST_IN_MAP_LITERAL, MIXIN_DECLARES_CONSTRUCTOR, MIXI
N_INHERITS_FROM_NOT_OBJECT, MIXIN_OF_NON_CLASS, MIXIN_REFERENCES_SUPER, MIXIN_WI
TH_NON_CLASS_SUPERCLASS, MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS, MULTIPLE_
SUPER_INITIALIZERS, NEW_WITH_INVALID_TYPE_PARAMETERS, NO_DEFAULT_SUPER_CONSTRUCT
OR_EXPLICIT, NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT, NON_CONST_MAP_AS_EXPRESSION_
STATEMENT, NON_CONSTANT_CASE_EXPRESSION, NON_CONSTANT_DEFAULT_VALUE, NON_CONSTAN
T_LIST_ELEMENT, NON_CONSTANT_MAP_KEY, NON_CONSTANT_MAP_VALUE, NON_CONSTANT_VALUE
_IN_INITIALIZER, NOT_ENOUGH_REQUIRED_ARGUMENTS, NON_GENERATIVE_CONSTRUCTOR, OBJE
CT_CANNOT_EXTEND_ANOTHER_CLASS, OPTIONAL_PARAMETER_IN_OPERATOR, PART_OF_NON_PART
, PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER, PRIVATE_OPTIONAL_PARAMETER, RECURSIVE_C
OMPILE_TIME_CONSTANT, RECURSIVE_CONSTRUCTOR_REDIRECT, RECURSIVE_FACTORY_REDIRECT
, RECURSIVE_FUNCTION_TYPE_ALIAS, RECURSIVE_INTERFACE_INHERITANCE, RECURSIVE_INTE
RFACE_INHERITANCE_BASE_CASE_EXTENDS, RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_I
MPLEMENTS, REDIRECT_TO_NON_CONST_CONSTRUCTOR, REFERENCE_TO_DECLARED_VARIABLE_IN_
INITIALIZER, RESERVED_WORD_AS_IDENTIFIER, RETHROW_OUTSIDE_CATCH, RETURN_IN_GENER
ATIVE_CONSTRUCTOR, STATIC_TOP_LEVEL_FUNCTION, STATIC_TOP_LEVEL_VARIABLE, SUPER_I
N_INVALID_CONTEXT, SUPER_IN_REDIRECTING_CONSTRUCTOR, SUPER_INITIALIZER_IN_OBJECT
, UNDEFINED_CLASS, UNDEFINED_CONSTRUCTOR_IN_INITIALIZER, UNDEFINED_CONSTRUCTOR_I
N_INITIALIZER_DEFAULT, UNINITIALIZED_FINAL_FIELD, UNDEFINED_NAMED_PARAMETER, URI
_DOES_NOT_EXIST, URI_WITH_INTERPOLATION, WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR
, WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS, WRONG_NUMBER_OF_PARAMETERS_FOR_
SETTER]; |
1504 /** | |
1505 * 12.11 Instance Creation: It is a compile-time error if a constructor of a g
eneric type with | |
1506 * <i>n</i> type parameters invoked by a new expression or a constant object e
xpression is passed | |
1507 * <i>m</i> type arguments where <i>m != n</i>. | |
1508 * | |
1509 * 12.31 Type Test: It is a compile-time error if <i>T</i> is a parameterized
type of the form | |
1510 * <i>G<T<sub>1</sub>, …, T<sub>n</sub>></i> and <i>G</i> is not
a generic type with | |
1511 * <i>n</i> type parameters. | |
1512 */ | |
1513 static final CompileTimeErrorCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = new Compile
TimeErrorCode('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 129, ""); | |
1514 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_INSTANCE_FIELD, CON
ST_EVAL_TYPE_BOOL, CONST_EVAL_TYPE_BOOL_NUM_STRING, CONST_EVAL_TYPE_INT, CONST_E
VAL_TYPE_NUM, CONST_EVAL_THROWS_EXCEPTION, CONST_WITH_INVALID_TYPE_PARAMETERS, C
ONST_WITH_NON_CONST, CONST_WITH_NON_CONSTANT_ARGUMENT, CONST_WITH_NON_TYPE, CONS
T_WITH_TYPE_PARAMETERS, CONST_WITH_UNDEFINED_CONSTRUCTOR, CONST_WITH_UNDEFINED_C
ONSTRUCTOR_DEFAULT, DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS, DUPLICATE_CONSTRUCTOR_
DEFAULT, DUPLICATE_CONSTRUCTOR_NAME, DUPLICATE_DEFINITION, DUPLICATE_MEMBER_NAME
, DUPLICATE_MEMBER_NAME_INSTANCE_STATIC, DUPLICATE_NAMED_ARGUMENT, EXPORT_INTERN
AL_LIBRARY, EXPORT_OF_NON_LIBRARY, EXTENDS_NON_CLASS, EXTENDS_DISALLOWED_CLASS,
EXTRA_POSITIONAL_ARGUMENTS, IMPLEMENTS_DISALLOWED_CLASS, FIELD_INITIALIZED_BY_MU
LTIPLE_INITIALIZERS, FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION, FIELD_INI
TIALIZED_IN_PARAMETER_AND_INITIALIZER, FINAL_INITIALIZED_IN_DECLARATION_AND_CONS
TRUCTOR, FINAL_INITIALIZED_MULTIPLE_TIMES, FIELD_INITIALIZER_FACTORY_CONSTRUCTOR
, FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR, FIELD_INITIALIZER_REDIRECTING_CONSTRUCT
OR, GETTER_AND_METHOD_WITH_SAME_NAME, IMPLEMENTS_DYNAMIC, IMPLEMENTS_NON_CLASS,
IMPLEMENTS_REPEATED, IMPLICIT_THIS_REFERENCE_IN_INITIALIZER, IMPORT_INTERNAL_LIB
RARY, IMPORT_OF_NON_LIBRARY, INCONSISTENT_CASE_EXPRESSION_TYPES, INITIALIZER_FOR
_NON_EXISTANT_FIELD, INITIALIZER_FOR_STATIC_FIELD, INITIALIZING_FORMAL_FOR_NON_E
XISTANT_FIELD, INITIALIZING_FORMAL_FOR_STATIC_FIELD, INVALID_CONSTANT, INVALID_C
ONSTRUCTOR_NAME, INVALID_FACTORY_NAME_NOT_A_CLASS, INVALID_OVERRIDE_DEFAULT_VALU
E, INVALID_OVERRIDE_NAMED, INVALID_OVERRIDE_POSITIONAL, INVALID_OVERRIDE_REQUIRE
D, INVALID_REFERENCE_TO_THIS, INVALID_TYPE_ARGUMENT_FOR_KEY, INVALID_TYPE_ARGUME
NT_IN_CONST_LIST, INVALID_TYPE_ARGUMENT_IN_CONST_MAP, INVALID_URI, LABEL_IN_OUTE
R_SCOPE, LABEL_UNDEFINED, MEMBER_WITH_CLASS_NAME, METHOD_AND_GETTER_WITH_SAME_NA
ME, MISSING_CONST_IN_LIST_LITERAL, MISSING_CONST_IN_MAP_LITERAL, MIXIN_DECLARES_
CONSTRUCTOR, MIXIN_INHERITS_FROM_NOT_OBJECT, MIXIN_OF_NON_CLASS, MIXIN_REFERENCE
S_SUPER, MIXIN_WITH_NON_CLASS_SUPERCLASS, MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOC
ATIONS, MULTIPLE_SUPER_INITIALIZERS, NEW_WITH_INVALID_TYPE_PARAMETERS, 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_ARGUMENTS, NON_GENERATIV
E_CONSTRUCTOR, OBJECT_CANNOT_EXTEND_ANOTHER_CLASS, OPTIONAL_PARAMETER_IN_OPERATO
R, PART_OF_NON_PART, PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER, PRIVATE_OPTIONAL_PAR
AMETER, RECURSIVE_COMPILE_TIME_CONSTANT, RECURSIVE_CONSTRUCTOR_REDIRECT, RECURSI
VE_FACTORY_REDIRECT, RECURSIVE_FUNCTION_TYPE_ALIAS, RECURSIVE_INTERFACE_INHERITA
NCE, RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS, RECURSIVE_INTERFACE_INHE
RITANCE_BASE_CASE_IMPLEMENTS, REDIRECT_TO_NON_CONST_CONSTRUCTOR, REFERENCE_TO_DE
CLARED_VARIABLE_IN_INITIALIZER, RESERVED_WORD_AS_IDENTIFIER, RETHROW_OUTSIDE_CAT
CH, RETURN_IN_GENERATIVE_CONSTRUCTOR, STATIC_TOP_LEVEL_FUNCTION, STATIC_TOP_LEVE
L_VARIABLE, SUPER_IN_INVALID_CONTEXT, SUPER_IN_REDIRECTING_CONSTRUCTOR, SUPER_IN
ITIALIZER_IN_OBJECT, UNDEFINED_CLASS, UNDEFINED_CONSTRUCTOR_IN_INITIALIZER, UNDE
FINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT, UNINITIALIZED_FINAL_FIELD, UNDEFINED_N
AMED_PARAMETER, URI_DOES_NOT_EXIST, URI_WITH_INTERPOLATION, WRONG_NUMBER_OF_PARA
METERS_FOR_OPERATOR, WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS, WRONG_NUMBER
_OF_PARAMETERS_FOR_SETTER, WRONG_NUMBER_OF_TYPE_ARGUMENTS]; | |
1515 | 1636 |
1516 /// The name of this enum constant, as declared in the enum declaration. | 1637 /// The name of this enum constant, as declared in the enum declaration. |
1517 final String name; | 1638 final String name; |
1518 | 1639 |
1519 /// The position in the enum declaration. | 1640 /// The position in the enum declaration. |
1520 final int ordinal; | 1641 final int ordinal; |
1521 | 1642 |
1522 /** | 1643 /** |
1523 * The message template used to create the message to be displayed for this er
ror. | 1644 * The message template used to create the message to be displayed for this er
ror. |
1524 */ | 1645 */ |
1525 String _message; | 1646 String _message; |
1526 | 1647 |
1527 /** | 1648 /** |
1528 * Initialize a newly created error code to have the given message. | 1649 * Initialize a newly created error code to have the given message. |
| 1650 * |
1529 * @param message the message template used to create the message to be displa
yed for the error | 1651 * @param message the message template used to create the message to be displa
yed for the error |
1530 */ | 1652 */ |
1531 CompileTimeErrorCode(this.name, this.ordinal, String message) { | 1653 CompileTimeErrorCode(this.name, this.ordinal, String message) { |
1532 this._message = message; | 1654 this._message = message; |
1533 } | 1655 } |
1534 ErrorSeverity get errorSeverity => ErrorType.COMPILE_TIME_ERROR.severity; | 1656 ErrorSeverity get errorSeverity => ErrorType.COMPILE_TIME_ERROR.severity; |
1535 String get message => _message; | 1657 String get message => _message; |
1536 ErrorType get type => ErrorType.COMPILE_TIME_ERROR; | 1658 ErrorType get type => ErrorType.COMPILE_TIME_ERROR; |
1537 int compareTo(CompileTimeErrorCode other) => ordinal - other.ordinal; | 1659 int compareTo(CompileTimeErrorCode other) => ordinal - other.ordinal; |
1538 int get hashCode => ordinal; | 1660 int get hashCode => ordinal; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1576 /// The position in the enum declaration. | 1698 /// The position in the enum declaration. |
1577 final int ordinal; | 1699 final int ordinal; |
1578 | 1700 |
1579 /** | 1701 /** |
1580 * The message template used to create the message to be displayed for this er
ror. | 1702 * The message template used to create the message to be displayed for this er
ror. |
1581 */ | 1703 */ |
1582 String _message; | 1704 String _message; |
1583 | 1705 |
1584 /** | 1706 /** |
1585 * Initialize a newly created error code to have the given message. | 1707 * Initialize a newly created error code to have the given message. |
| 1708 * |
1586 * @param message the message template used to create the message to be displa
yed for the error | 1709 * @param message the message template used to create the message to be displa
yed for the error |
1587 */ | 1710 */ |
1588 PubSuggestionCode(this.name, this.ordinal, String message) { | 1711 PubSuggestionCode(this.name, this.ordinal, String message) { |
1589 this._message = message; | 1712 this._message = message; |
1590 } | 1713 } |
1591 ErrorSeverity get errorSeverity => ErrorType.PUB_SUGGESTION.severity; | 1714 ErrorSeverity get errorSeverity => ErrorType.PUB_SUGGESTION.severity; |
1592 String get message => _message; | 1715 String get message => _message; |
1593 ErrorType get type => ErrorType.PUB_SUGGESTION; | 1716 ErrorType get type => ErrorType.PUB_SUGGESTION; |
1594 int compareTo(PubSuggestionCode other) => ordinal - other.ordinal; | 1717 int compareTo(PubSuggestionCode other) => ordinal - other.ordinal; |
1595 int get hashCode => ordinal; | 1718 int get hashCode => ordinal; |
1596 String toString() => name; | 1719 String toString() => name; |
1597 } | 1720 } |
1598 /** | 1721 /** |
1599 * The enumeration `StaticWarningCode` defines the error codes used for static w
arnings. The | 1722 * The enumeration `StaticWarningCode` defines the error codes used for static w
arnings. The |
1600 * convention for this class is for the name of the error code to indicate the p
roblem that caused | 1723 * convention for this class is for the name of the error code to indicate the p
roblem that caused |
1601 * the error to be generated and for the error message to explain what is wrong
and, when | 1724 * the error to be generated and for the error message to explain what is wrong
and, when |
1602 * appropriate, how the problem can be corrected. | 1725 * appropriate, how the problem can be corrected. |
| 1726 * |
1603 * @coverage dart.engine.error | 1727 * @coverage dart.engine.error |
1604 */ | 1728 */ |
1605 class StaticWarningCode implements Comparable<StaticWarningCode>, ErrorCode { | 1729 class StaticWarningCode implements Comparable<StaticWarningCode>, ErrorCode { |
1606 | 1730 |
1607 /** | 1731 /** |
1608 * 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i
>N</i> is introduced | 1732 * 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i
>N</i> is introduced |
1609 * into the top level scope <i>L</i> by more than one import then: | 1733 * into the top level scope <i>L</i> by more than one import then: |
1610 * <ol> | 1734 * <ol> |
1611 * * It is a static warning if <i>N</i> is used as a type annotation. | 1735 * * It is a static warning if <i>N</i> is used as a type annotation. |
1612 * * In checked mode, it is a dynamic error if <i>N</i> is used as a type anno
tation and | 1736 * * In checked mode, it is a dynamic error if <i>N</i> is used as a type anno
tation and |
1613 * referenced during a subtype test. | 1737 * referenced during a subtype test. |
1614 * * Otherwise, it is a compile-time error. | 1738 * * Otherwise, it is a compile-time error. |
1615 * </ol> | 1739 * </ol> |
| 1740 * |
1616 * @param ambiguousTypeName the name of the ambiguous type | 1741 * @param ambiguousTypeName the name of the ambiguous type |
1617 * @param firstLibraryName the name of the first library that the type is foun
d | 1742 * @param firstLibraryName the name of the first library that the type is foun
d |
1618 * @param secondLibraryName the name of the second library that the type is fo
und | 1743 * @param secondLibraryName the name of the second library that the type is fo
und |
1619 */ | 1744 */ |
1620 static final StaticWarningCode AMBIGUOUS_IMPORT = new StaticWarningCode('AMBIG
UOUS_IMPORT', 0, "The type '%s' is defined in the libraries '%s' and '%s'"); | 1745 static final StaticWarningCode AMBIGUOUS_IMPORT = new StaticWarningCode('AMBIG
UOUS_IMPORT', 0, "The type '%s' is defined in the libraries '%s' and '%s'"); |
1621 | 1746 |
1622 /** | 1747 /** |
1623 * 12.11.1 New: It is a static warning if the static type of <i>a<sub>i</sub>,
1 <= i <= n+ | 1748 * 12.11.1 New: It is a static warning if the static type of <i>a<sub>i</sub>,
1 <= i <= n+ |
1624 * k</i> may not be assigned to the type of the corresponding formal parameter
of the constructor | 1749 * k</i> may not be assigned to the type of the corresponding formal parameter
of the constructor |
1625 * <i>T.id</i> (respectively <i>T</i>). | 1750 * <i>T.id</i> (respectively <i>T</i>). |
(...skipping 29 matching lines...) Expand all Loading... |
1655 */ | 1780 */ |
1656 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'"); | 1781 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'"); |
1657 | 1782 |
1658 /** | 1783 /** |
1659 * 12.32 Type Cast: It is a static warning if <i>T</i> does not denote a type
available in the | 1784 * 12.32 Type Cast: It is a static warning if <i>T</i> does not denote a type
available in the |
1660 * current lexical scope. | 1785 * current lexical scope. |
1661 */ | 1786 */ |
1662 static final StaticWarningCode CAST_TO_NON_TYPE = new StaticWarningCode('CAST_
TO_NON_TYPE', 4, "The name '%s' is not a type and cannot be used in an 'as' expr
ession"); | 1787 static final StaticWarningCode CAST_TO_NON_TYPE = new StaticWarningCode('CAST_
TO_NON_TYPE', 4, "The name '%s' is not a type and cannot be used in an 'as' expr
ession"); |
1663 | 1788 |
1664 /** | 1789 /** |
1665 * 16.1.2 Comments: A token of the form <i>\[new c\](uri)</i> will be replaced
by a link in the | 1790 * 16.1.2 Comments: A token of the form <i>[new c](uri)</i> will be replaced b
y a link in the |
1666 * formatted output. The link will point at the constructor named <i>c</i> in
<i>L</i>. The title | 1791 * formatted output. The link will point at the constructor named <i>c</i> in
<i>L</i>. The title |
1667 * of the link will be <i>c</i>. It is a static warning if uri is not the URI
of a dart library | 1792 * of the link will be <i>c</i>. It is a static warning if uri is not the URI
of a dart library |
1668 * <i>L</i>, or if <i>c</i> is not the name of a constructor of a class declar
ed in the exported | 1793 * <i>L</i>, or if <i>c</i> is not the name of a constructor of a class declar
ed in the exported |
1669 * namespace of <i>L</i>. | 1794 * namespace of <i>L</i>. |
1670 */ | 1795 */ |
1671 static final StaticWarningCode COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE = new
StaticWarningCode('COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE', 5, ""); | 1796 static final StaticWarningCode COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE = new
StaticWarningCode('COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE', 5, ""); |
1672 | 1797 |
1673 /** | 1798 /** |
1674 * 16.1.2 Comments: A token of the form <i>\[id\](uri)</i> will be replaced by
a link in the | 1799 * 16.1.2 Comments: A token of the form <i>[id](uri)</i> will be replaced by a
link in the |
1675 * formatted output. The link will point at the declaration named <i>id</i> in
<i>L</i>. The title | 1800 * formatted output. The link will point at the declaration named <i>id</i> in
<i>L</i>. The title |
1676 * of the link will be <i>id</i>. It is a static warning if uri is not the URI
of a dart library | 1801 * of the link will be <i>id</i>. It is a static warning if uri is not the URI
of a dart library |
1677 * <i>L</i>, or if <i>id</i> is not a name declared in the exported namespace
of <i>L</i>. | 1802 * <i>L</i>, or if <i>id</i> is not a name declared in the exported namespace
of <i>L</i>. |
1678 */ | 1803 */ |
1679 static final StaticWarningCode COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE = new
StaticWarningCode('COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE', 6, ""); | 1804 static final StaticWarningCode COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE = new
StaticWarningCode('COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE', 6, ""); |
1680 | 1805 |
1681 /** | 1806 /** |
1682 * 16.1.2 Comments: It is a static warning if <i>c</i> does not denote a const
ructor that | 1807 * 16.1.2 Comments: It is a static warning if <i>c</i> does not denote a const
ructor that |
1683 * available in the scope of the documentation comment. | 1808 * available in the scope of the documentation comment. |
1684 */ | 1809 */ |
1685 static final StaticWarningCode COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR = new
StaticWarningCode('COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR', 7, ""); | 1810 static final StaticWarningCode COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR = new
StaticWarningCode('COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR', 7, ""); |
1686 | 1811 |
1687 /** | 1812 /** |
1688 * 16.1.2 Comments: It is a static warning if <i>id</i> does not denote a decl
aration that | 1813 * 16.1.2 Comments: It is a static warning if <i>id</i> does not denote a decl
aration that |
1689 * available in the scope of the documentation comment. | 1814 * available in the scope of the documentation comment. |
1690 */ | 1815 */ |
1691 static final StaticWarningCode COMMENT_REFERENCE_UNDECLARED_IDENTIFIER = new S
taticWarningCode('COMMENT_REFERENCE_UNDECLARED_IDENTIFIER', 8, ""); | 1816 static final StaticWarningCode COMMENT_REFERENCE_UNDECLARED_IDENTIFIER = new S
taticWarningCode('COMMENT_REFERENCE_UNDECLARED_IDENTIFIER', 8, ""); |
1692 | 1817 |
1693 /** | 1818 /** |
1694 * 16.1.2 Comments: A token of the form <i>\[id\](uri)</i> will be replaced by
a link in the | 1819 * 16.1.2 Comments: A token of the form <i>[id](uri)</i> will be replaced by a
link in the |
1695 * formatted output. The link will point at the declaration named <i>id</i> in
<i>L</i>. The title | 1820 * formatted output. The link will point at the declaration named <i>id</i> in
<i>L</i>. The title |
1696 * of the link will be <i>id</i>. It is a static warning if uri is not the URI
of a dart library | 1821 * of the link will be <i>id</i>. It is a static warning if uri is not the URI
of a dart library |
1697 * <i>L</i>, or if <i>id</i> is not a name declared in the exported namespace
of <i>L</i>. | 1822 * <i>L</i>, or if <i>id</i> is not a name declared in the exported namespace
of <i>L</i>. |
1698 */ | 1823 */ |
1699 static final StaticWarningCode COMMENT_REFERENCE_URI_NOT_LIBRARY = new StaticW
arningCode('COMMENT_REFERENCE_URI_NOT_LIBRARY', 9, ""); | 1824 static final StaticWarningCode COMMENT_REFERENCE_URI_NOT_LIBRARY = new StaticW
arningCode('COMMENT_REFERENCE_URI_NOT_LIBRARY', 9, ""); |
1700 | 1825 |
1701 /** | 1826 /** |
1702 * 7.4 Abstract Instance Members: It is a static warning if an abstract member
is declared or | 1827 * 7.4 Abstract Instance Members: It is a static warning if an abstract member
is declared or |
1703 * inherited in a concrete class. | 1828 * inherited in a concrete class. |
1704 */ | 1829 */ |
1705 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"); | 1830 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"); |
1706 | 1831 |
1707 /** | 1832 /** |
1708 * 7.2 Getters: It is a static warning if a class <i>C</i> declares an instanc
e getter named | 1833 * 7.2 Getters: It is a static warning if a class <i>C</i> declares an instanc
e getter named |
1709 * <i>v</i> and an accessible static member named <i>v</i> or <i>v=</i> is dec
lared in a | 1834 * <i>v</i> and an accessible static member named <i>v</i> or <i>v=</i> is dec
lared in a |
1710 * superclass of <i>C</i>. | 1835 * superclass of <i>C</i>. |
| 1836 * |
1711 * @param superName the name of the super class declaring a static member | 1837 * @param superName the name of the super class declaring a static member |
1712 */ | 1838 */ |
1713 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"); | 1839 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"); |
1714 | 1840 |
1715 /** | 1841 /** |
1716 * 7.3 Setters: It is a static warning if a class <i>C</i> declares an instanc
e setter named | 1842 * 7.3 Setters: It is a static warning if a class <i>C</i> declares an instanc
e setter named |
1717 * <i>v=</i> and an accessible static member named <i>v=</i> or <i>v</i> is de
clared in a | 1843 * <i>v=</i> and an accessible static member named <i>v=</i> or <i>v</i> is de
clared in a |
1718 * superclass of <i>C</i>. | 1844 * superclass of <i>C</i>. |
| 1845 * |
1719 * @param superName the name of the super class declaring a static member | 1846 * @param superName the name of the super class declaring a static member |
1720 */ | 1847 */ |
1721 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"); | 1848 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"); |
1722 | 1849 |
1723 /** | 1850 /** |
1724 * 7.2 Getters: It is a static warning if a class declares a static getter nam
ed <i>v</i> and also | 1851 * 7.2 Getters: It is a static warning if a class declares a static getter nam
ed <i>v</i> and also |
1725 * has a non-static setter named <i>v=</i>. | 1852 * has a non-static setter named <i>v=</i>. |
1726 */ | 1853 */ |
1727 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"); | 1854 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"); |
1728 | 1855 |
(...skipping 10 matching lines...) Expand all Loading... |
1739 */ | 1866 */ |
1740 static final StaticWarningCode CONST_WITH_ABSTRACT_CLASS = new StaticWarningCo
de('CONST_WITH_ABSTRACT_CLASS', 15, "Abstract classes cannot be created with a '
const' expression"); | 1867 static final StaticWarningCode CONST_WITH_ABSTRACT_CLASS = new StaticWarningCo
de('CONST_WITH_ABSTRACT_CLASS', 15, "Abstract classes cannot be created with a '
const' expression"); |
1741 | 1868 |
1742 /** | 1869 /** |
1743 * 12.7 Maps: It is a static warning if the values of any two keys in a map li
teral are equal. | 1870 * 12.7 Maps: It is a static warning if the values of any two keys in a map li
teral are equal. |
1744 */ | 1871 */ |
1745 static final StaticWarningCode EQUAL_KEYS_IN_MAP = new StaticWarningCode('EQUA
L_KEYS_IN_MAP', 16, "Keys in a map cannot be equal"); | 1872 static final StaticWarningCode EQUAL_KEYS_IN_MAP = new StaticWarningCode('EQUA
L_KEYS_IN_MAP', 16, "Keys in a map cannot be equal"); |
1746 | 1873 |
1747 /** | 1874 /** |
1748 * 14.2 Exports: It is a static warning to export two different libraries with
the same name. | 1875 * 14.2 Exports: It is a static warning to export two different libraries with
the same name. |
| 1876 * |
1749 * @param uri1 the uri pointing to a first library | 1877 * @param uri1 the uri pointing to a first library |
1750 * @param uri2 the uri pointing to a second library | 1878 * @param uri2 the uri pointing to a second library |
1751 * @param name the shared name of the exported libraries | 1879 * @param name the shared name of the exported libraries |
1752 */ | 1880 */ |
1753 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'"); | 1881 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'"); |
1754 | 1882 |
1755 /** | 1883 /** |
1756 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i>
or if <i>m > n</i>. | 1884 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i>
or if <i>m > n</i>. |
| 1885 * |
1757 * @param requiredCount the maximum number of positional arguments | 1886 * @param requiredCount the maximum number of positional arguments |
1758 * @param argumentCount the actual number of positional arguments given | 1887 * @param argumentCount the actual number of positional arguments given |
1759 */ | 1888 */ |
1760 static final StaticWarningCode EXTRA_POSITIONAL_ARGUMENTS = new StaticWarningC
ode('EXTRA_POSITIONAL_ARGUMENTS', 18, "%d positional arguments expected, but %d
found"); | 1889 static final StaticWarningCode EXTRA_POSITIONAL_ARGUMENTS = new StaticWarningC
ode('EXTRA_POSITIONAL_ARGUMENTS', 18, "%d positional arguments expected, but %d
found"); |
1761 | 1890 |
1762 /** | 1891 /** |
1763 * 7.6.1 Generative Constructors: Execution of an initializer of the form <b>t
his</b>.<i>v</i> = | 1892 * 7.6.1 Generative Constructors: Execution of an initializer of the form <b>t
his</b>.<i>v</i> = |
1764 * <i>e</i> proceeds as follows: First, the expression <i>e</i> is evaluated t
o an object | 1893 * <i>e</i> proceeds as follows: First, the expression <i>e</i> is evaluated t
o an object |
1765 * <i>o</i>. Then, the instance variable <i>v</i> of the object denoted by thi
s is bound to | 1894 * <i>o</i>. Then, the instance variable <i>v</i> of the object denoted by thi
s is bound to |
1766 * <i>o</i>. | 1895 * <i>o</i>. |
1767 * | 1896 * |
1768 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 1897 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
1769 * <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 <= | 1898 * <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 <= |
1770 * 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>. | 1899 * 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>. |
1771 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 1900 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
1772 * j <= m</i>. | 1901 * j <= m</i>. |
| 1902 * |
1773 * @param initializerType the name of the type of the initializer expression | 1903 * @param initializerType the name of the type of the initializer expression |
1774 * @param fieldType the name of the type of the field | 1904 * @param fieldType the name of the type of the field |
1775 */ | 1905 */ |
1776 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'"); | 1906 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'"); |
1777 | 1907 |
1778 /** | 1908 /** |
1779 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a | 1909 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a |
1780 * static warning if the static type of <i>id</i> is not assignable to <i>T<su
b>id</sub></i>. | 1910 * static warning if the static type of <i>id</i> is not assignable to <i>T<su
b>id</sub></i>. |
| 1911 * |
1781 * @param parameterType the name of the type of the field formal parameter | 1912 * @param parameterType the name of the type of the field formal parameter |
1782 * @param fieldType the name of the type of the field | 1913 * @param fieldType the name of the type of the field |
1783 */ | 1914 */ |
1784 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'"); | 1915 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'"); |
1785 | 1916 |
1786 /** | 1917 /** |
1787 * 5 Variables: It is a static warning if a library, static or local variable
<i>v</i> is final | 1918 * 5 Variables: It is a static warning if a library, static or local variable
<i>v</i> is final |
1788 * and <i>v</i> is not initialized at its point of declaration. | 1919 * and <i>v</i> is not initialized at its point of declaration. |
| 1920 * |
1789 * @param name the name of the uninitialized final variable | 1921 * @param name the name of the uninitialized final variable |
1790 */ | 1922 */ |
1791 static final StaticWarningCode FINAL_NOT_INITIALIZED = new StaticWarningCode('
FINAL_NOT_INITIALIZED', 21, "The final variable '%s' must be initialized"); | 1923 static final StaticWarningCode FINAL_NOT_INITIALIZED = new StaticWarningCode('
FINAL_NOT_INITIALIZED', 21, "The final variable '%s' must be initialized"); |
1792 | 1924 |
1793 /** | 1925 /** |
1794 * 14.1 Imports: It is a static warning to import two different libraries with
the same name. | 1926 * 14.1 Imports: It is a static warning to import two different libraries with
the same name. |
| 1927 * |
1795 * @param uri1 the uri pointing to a first library | 1928 * @param uri1 the uri pointing to a first library |
1796 * @param uri2 the uri pointing to a second library | 1929 * @param uri2 the uri pointing to a second library |
1797 * @param name the shared name of the imported libraries | 1930 * @param name the shared name of the imported libraries |
1798 */ | 1931 */ |
1799 static final StaticWarningCode IMPORT_DUPLICATED_LIBRARY_NAME = new StaticWarn
ingCode('IMPORT_DUPLICATED_LIBRARY_NAME', 22, "The imported libraries '%s' and '
%s' should not have the same name '%s'"); | 1932 static final StaticWarningCode IMPORT_DUPLICATED_LIBRARY_NAME = new StaticWarn
ingCode('IMPORT_DUPLICATED_LIBRARY_NAME', 22, "The imported libraries '%s' and '
%s' should not have the same name '%s'"); |
1800 | 1933 |
1801 /** | 1934 /** |
1802 * 8.1.1 Inheritance and Overriding: However, if there are multiple members <i
>m<sub>1</sub>, | 1935 * 8.1.1 Inheritance and Overriding: However, if there are multiple members <i
>m<sub>1</sub>, |
1803 * … m<sub>k</sub></i> with the same name <i>n</i> that would be inheri
ted (because | 1936 * … m<sub>k</sub></i> with the same name <i>n</i> that would be inheri
ted (because |
1804 * identically named members existed in several superinterfaces) then at most
one member is | 1937 * identically named members existed in several superinterfaces) then at most
one member is |
1805 * inherited. | 1938 * inherited. |
1806 * | 1939 * |
1807 * If some but not all of the <i>m<sub>i</sub>, 1 <= i <= k</i>, are get
ters, or if some but | 1940 * If some but not all of the <i>m<sub>i</sub>, 1 <= i <= k</i>, are get
ters, or if some but |
1808 * not all of the <i>m<sub>i</sub></i> are setters, none of the <i>m<sub>i</su
b></i> are | 1941 * not all of the <i>m<sub>i</sub></i> are setters, none of the <i>m<sub>i</su
b></i> are |
1809 * inherited, and a static warning is issued. | 1942 * inherited, and a static warning is issued. |
1810 */ | 1943 */ |
1811 static final StaticWarningCode INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METH
OD = new StaticWarningCode('INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD',
23, "'%s' is inherited as a getter and also a method"); | 1944 static final StaticWarningCode INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METH
OD = new StaticWarningCode('INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD',
23, "'%s' is inherited as a getter and also a method"); |
1812 | 1945 |
1813 /** | 1946 /** |
1814 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > | 1947 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > |
1815 * n</i>. | 1948 * n</i>. |
1816 */ | 1949 */ |
1817 static final StaticWarningCode INCORRECT_NUMBER_OF_ARGUMENTS = new StaticWarni
ngCode('INCORRECT_NUMBER_OF_ARGUMENTS', 24, ""); | 1950 static final StaticWarningCode INCORRECT_NUMBER_OF_ARGUMENTS = new StaticWarni
ngCode('INCORRECT_NUMBER_OF_ARGUMENTS', 24, ""); |
1818 | 1951 |
1819 /** | 1952 /** |
1820 * 7.1 Instance Methods: It is a static warning if a class <i>C</i> declares a
n instance method | 1953 * 7.1 Instance Methods: It is a static warning if a class <i>C</i> declares a
n instance method |
1821 * named <i>n</i> and an accessible static member named <i>n</i> is declared i
n a superclass of | 1954 * named <i>n</i> and an accessible static member named <i>n</i> is declared i
n a superclass of |
1822 * <i>C</i>. | 1955 * <i>C</i>. |
| 1956 * |
1823 * @param memberName the name of the member with the name conflict | 1957 * @param memberName the name of the member with the name conflict |
1824 * @param superclassName the name of the enclosing class that has the static m
ember | 1958 * @param superclassName the name of the enclosing class that has the static m
ember |
1825 */ | 1959 */ |
1826 static final StaticWarningCode INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_S
TATIC = new StaticWarningCode('INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STA
TIC', 25, "'%s' collides with a static member in the superclass '%s'"); | 1960 static final StaticWarningCode INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_S
TATIC = new StaticWarningCode('INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STA
TIC', 25, "'%s' collides with a static member in the superclass '%s'"); |
1827 | 1961 |
1828 /** | 1962 /** |
1829 * 7.6.2 Factories: It is a static warning if <i>M.id</i> is not a constructor
name. | 1963 * 7.6.2 Factories: It is a static warning if <i>M.id</i> is not a constructor
name. |
1830 */ | 1964 */ |
1831 static final StaticWarningCode INVALID_FACTORY_NAME = new StaticWarningCode('I
NVALID_FACTORY_NAME', 26, ""); | 1965 static final StaticWarningCode INVALID_FACTORY_NAME = new StaticWarningCode('I
NVALID_FACTORY_NAME', 26, ""); |
1832 | 1966 |
1833 /** | 1967 /** |
1834 * 7.2 Getters: It is a static warning if a getter <i>m1</i> overrides a gette
r <i>m2</i> and the | 1968 * 7.2 Getters: It is a static warning if a getter <i>m1</i> overrides a gette
r <i>m2</i> and the |
1835 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>. | 1969 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>. |
| 1970 * |
1836 * @param actualReturnTypeName the name of the expected return type | 1971 * @param actualReturnTypeName the name of the expected return type |
1837 * @param expectedReturnType the name of the actual return type, not assignabl
e to the | 1972 * @param expectedReturnType the name of the actual return type, not assignabl
e to the |
1838 * actualReturnTypeName | 1973 * actualReturnTypeName |
1839 * @param className the name of the class where the overridden getter is decla
red | 1974 * @param className the name of the class where the overridden getter is decla
red |
1840 * @see #INVALID_METHOD_OVERRIDE_RETURN_TYPE | 1975 * @see #INVALID_METHOD_OVERRIDE_RETURN_TYPE |
1841 */ | 1976 */ |
1842 static final StaticWarningCode INVALID_GETTER_OVERRIDE_RETURN_TYPE = new Stati
cWarningCode('INVALID_GETTER_OVERRIDE_RETURN_TYPE', 27, "The return type '%s' is
not assignable to '%s' as required from getter it is overriding from '%s'"); | 1977 static final StaticWarningCode INVALID_GETTER_OVERRIDE_RETURN_TYPE = new Stati
cWarningCode('INVALID_GETTER_OVERRIDE_RETURN_TYPE', 27, "The return type '%s' is
not assignable to '%s' as required from getter it is overriding from '%s'"); |
1843 | 1978 |
1844 /** | 1979 /** |
1845 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 1980 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
1846 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. | 1981 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. |
| 1982 * |
1847 * @param actualParamTypeName the name of the expected parameter type | 1983 * @param actualParamTypeName the name of the expected parameter type |
1848 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the | 1984 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the |
1849 * actualParamTypeName | 1985 * actualParamTypeName |
1850 * @param className the name of the class where the overridden method is decla
red | 1986 * @param className the name of the class where the overridden method is decla
red |
1851 */ | 1987 */ |
1852 static final StaticWarningCode INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE = new
StaticWarningCode('INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE', 28, "The parameter
type '%s' is not assignable to '%s' as required from method it is overriding fr
om '%s'"); | 1988 static final StaticWarningCode INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE = new
StaticWarningCode('INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE', 28, "The parameter
type '%s' is not assignable to '%s' as required from method it is overriding fr
om '%s'"); |
1853 | 1989 |
1854 /** | 1990 /** |
1855 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 1991 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
1856 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. | 1992 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. |
| 1993 * |
1857 * @param actualParamTypeName the name of the expected parameter type | 1994 * @param actualParamTypeName the name of the expected parameter type |
1858 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the | 1995 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the |
1859 * actualParamTypeName | 1996 * actualParamTypeName |
1860 * @param className the name of the class where the overridden method is decla
red | 1997 * @param className the name of the class where the overridden method is decla
red |
1861 * @see #INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE | 1998 * @see #INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE |
1862 */ | 1999 */ |
1863 static final StaticWarningCode INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE = new
StaticWarningCode('INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE', 29, "The paramet
er type '%s' is not assignable to '%s' as required by the method it is overridin
g from '%s'"); | 2000 static final StaticWarningCode INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE = new
StaticWarningCode('INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE', 29, "The paramet
er type '%s' is not assignable to '%s' as required by the method it is overridin
g from '%s'"); |
1864 | 2001 |
1865 /** | 2002 /** |
1866 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 2003 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
1867 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. | 2004 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. |
| 2005 * |
1868 * @param actualParamTypeName the name of the expected parameter type | 2006 * @param actualParamTypeName the name of the expected parameter type |
1869 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the | 2007 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the |
1870 * actualParamTypeName | 2008 * actualParamTypeName |
1871 * @param className the name of the class where the overridden method is decla
red | 2009 * @param className the name of the class where the overridden method is decla
red |
1872 */ | 2010 */ |
1873 static final StaticWarningCode INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE = n
ew StaticWarningCode('INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE', 30, "The par
ameter type '%s' is not assignable to '%s' as required from method it is overrid
ing from '%s'"); | 2011 static final StaticWarningCode INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE = n
ew StaticWarningCode('INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE', 30, "The par
ameter type '%s' is not assignable to '%s' as required from method it is overrid
ing from '%s'"); |
1874 | 2012 |
1875 /** | 2013 /** |
1876 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 2014 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
1877 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. | 2015 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. |
| 2016 * |
1878 * @param actualReturnTypeName the name of the expected return type | 2017 * @param actualReturnTypeName the name of the expected return type |
1879 * @param expectedReturnType the name of the actual return type, not assignabl
e to the | 2018 * @param expectedReturnType the name of the actual return type, not assignabl
e to the |
1880 * actualReturnTypeName | 2019 * actualReturnTypeName |
1881 * @param className the name of the class where the overridden method is decla
red | 2020 * @param className the name of the class where the overridden method is decla
red |
1882 * @see #INVALID_GETTER_OVERRIDE_RETURN_TYPE | 2021 * @see #INVALID_GETTER_OVERRIDE_RETURN_TYPE |
1883 */ | 2022 */ |
1884 static final StaticWarningCode INVALID_METHOD_OVERRIDE_RETURN_TYPE = new Stati
cWarningCode('INVALID_METHOD_OVERRIDE_RETURN_TYPE', 31, "The return type '%s' is
not assignable to '%s' as required from method it is overriding from '%s'"); | 2023 static final StaticWarningCode INVALID_METHOD_OVERRIDE_RETURN_TYPE = new Stati
cWarningCode('INVALID_METHOD_OVERRIDE_RETURN_TYPE', 31, "The return type '%s' is
not assignable to '%s' as required from method it is overriding from '%s'"); |
1885 | 2024 |
1886 /** | 2025 /** |
1887 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 2026 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
1888 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies
a default value for | 2027 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies
a default value for |
1889 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff
erent default value | 2028 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff
erent default value |
1890 * for <i>p</i>. | 2029 * for <i>p</i>. |
1891 */ | 2030 */ |
1892 static final StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED
= new StaticWarningCode('INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED', 32,
"Parameters cannot override default values, this method overrides '%s.%s' where
'%s' has a different value"); | 2031 static final StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED
= new StaticWarningCode('INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED', 32,
"Parameters cannot override default values, this method overrides '%s.%s' where
'%s' has a different value"); |
1893 | 2032 |
1894 /** | 2033 /** |
1895 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 2034 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
1896 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies
a default value for | 2035 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies
a default value for |
1897 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff
erent default value | 2036 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff
erent default value |
1898 * for <i>p</i>. | 2037 * for <i>p</i>. |
1899 */ | 2038 */ |
1900 static final StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSIT
IONAL = new StaticWarningCode('INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIO
NAL', 33, "Parameters cannot override default values, this method overrides '%s.
%s' where this positional parameter has a different value"); | 2039 static final StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSIT
IONAL = new StaticWarningCode('INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIO
NAL', 33, "Parameters cannot override default values, this method overrides '%s.
%s' where this positional parameter has a different value"); |
1901 | 2040 |
1902 /** | 2041 /** |
1903 * 7.3 Setters: It is a static warning if a setter <i>m1</i> overrides a sette
r <i>m2</i> and the | 2042 * 7.3 Setters: It is a static warning if a setter <i>m1</i> overrides a sette
r <i>m2</i> and the |
1904 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>. | 2043 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>. |
| 2044 * |
1905 * @param actualParamTypeName the name of the expected parameter type | 2045 * @param actualParamTypeName the name of the expected parameter type |
1906 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the | 2046 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the |
1907 * actualParamTypeName | 2047 * actualParamTypeName |
1908 * @param className the name of the class where the overridden setter is decla
red | 2048 * @param className the name of the class where the overridden setter is decla
red |
1909 * @see #INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE | 2049 * @see #INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE |
1910 */ | 2050 */ |
1911 static final StaticWarningCode INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE = new
StaticWarningCode('INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE', 34, "The paramet
er type '%s' is not assignable to '%s' as required by the setter it is overridin
g from '%s'"); | 2051 static final StaticWarningCode INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE = new
StaticWarningCode('INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE', 34, "The paramet
er type '%s' is not assignable to '%s' as required by the setter it is overridin
g from '%s'"); |
1912 | 2052 |
1913 /** | 2053 /** |
1914 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form | 2054 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form |
1915 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … | 2055 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … |
1916 * 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 | 2056 * 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 |
1917 * <i>F</i> of <i>S.m</i> may not be assigned to a function type. | 2057 * <i>F</i> of <i>S.m</i> may not be assigned to a function type. |
1918 */ | 2058 */ |
1919 static final StaticWarningCode INVOCATION_OF_NON_FUNCTION = new StaticWarningC
ode('INVOCATION_OF_NON_FUNCTION', 35, ""); | 2059 static final StaticWarningCode INVOCATION_OF_NON_FUNCTION = new StaticWarningC
ode('INVOCATION_OF_NON_FUNCTION', 35, ""); |
1920 | 2060 |
1921 /** | 2061 /** |
1922 * 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i>
with argument type | 2062 * 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i>
with argument type |
1923 * <i>T</i> and a getter named <i>v</i> with return type <i>S</i>, and <i>T</i
> may not be | 2063 * <i>T</i> and a getter named <i>v</i> with return type <i>S</i>, and <i>T</i
> may not be |
1924 * assigned to <i>S</i>. | 2064 * assigned to <i>S</i>. |
1925 */ | 2065 */ |
1926 static final StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES = new Static
WarningCode('MISMATCHED_GETTER_AND_SETTER_TYPES', 36, "The parameter type for se
tter '%s' is %s which is not assignable to its getter (of type %s)"); | 2066 static final StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES = new Static
WarningCode('MISMATCHED_GETTER_AND_SETTER_TYPES', 36, "The parameter type for se
tter '%s' is %s which is not assignable to its getter (of type %s)"); |
1927 | 2067 |
1928 /** | 2068 /** |
1929 * 12.11.1 New: It is a static warning if <i>q</i> is a constructor of an abst
ract class and | 2069 * 12.11.1 New: It is a static warning if <i>q</i> is a constructor of an abst
ract class and |
1930 * <i>q</i> is not a factory constructor. | 2070 * <i>q</i> is not a factory constructor. |
1931 */ | 2071 */ |
1932 static final StaticWarningCode NEW_WITH_ABSTRACT_CLASS = new StaticWarningCode
('NEW_WITH_ABSTRACT_CLASS', 37, "Abstract classes cannot be created with a 'new'
expression"); | 2072 static final StaticWarningCode NEW_WITH_ABSTRACT_CLASS = new StaticWarningCode
('NEW_WITH_ABSTRACT_CLASS', 37, "Abstract classes cannot be created with a 'new'
expression"); |
1933 | 2073 |
1934 /** | 2074 /** |
1935 * 12.11.1 New: It is a static warning if <i>T</i> is not a class accessible i
n the current scope, | 2075 * 12.11.1 New: It is a static warning if <i>T</i> is not a class accessible i
n the current scope, |
1936 * optionally followed by type arguments. | 2076 * optionally followed by type arguments. |
| 2077 * |
1937 * @param name the name of the non-type element | 2078 * @param name the name of the non-type element |
1938 */ | 2079 */ |
1939 static final StaticWarningCode NEW_WITH_NON_TYPE = new StaticWarningCode('NEW_
WITH_NON_TYPE', 38, "The name '%s' is not a class"); | 2080 static final StaticWarningCode NEW_WITH_NON_TYPE = new StaticWarningCode('NEW_
WITH_NON_TYPE', 38, "The name '%s' is not a class"); |
1940 | 2081 |
1941 /** | 2082 /** |
1942 * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the
current scope then: | 2083 * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the
current scope then: |
1943 * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, …, a<sub>n<
/sub>, | 2084 * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, …, a<sub>n<
/sub>, |
1944 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a | 2085 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a |
1945 * static warning if <i>T.id</i> is not the name of a constructor declared by
the type <i>T</i>. | 2086 * static warning if <i>T.id</i> is not the name of a constructor declared by
the type <i>T</i>. |
1946 * If <i>e</i> of the form <i>new T(a<sub>1</sub>, …, a<sub>n</sub>, x<
sub>n+1</sub>: | 2087 * If <i>e</i> of the form <i>new T(a<sub>1</sub>, …, a<sub>n</sub>, x<
sub>n+1</sub>: |
1947 * a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a sta
tic warning if the | 2088 * a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a sta
tic warning if the |
1948 * type <i>T</i> does not declare a constructor with the same name as the decl
aration of <i>T</i>. | 2089 * type <i>T</i> does not declare a constructor with the same name as the decl
aration of <i>T</i>. |
1949 */ | 2090 */ |
1950 static final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR = new StaticWarn
ingCode('NEW_WITH_UNDEFINED_CONSTRUCTOR', 39, "The class '%s' does not have a co
nstructor '%s'"); | 2091 static final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR = new StaticWarn
ingCode('NEW_WITH_UNDEFINED_CONSTRUCTOR', 39, "The class '%s' does not have a co
nstructor '%s'"); |
1951 | 2092 |
1952 /** | 2093 /** |
1953 * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the
current scope then: | 2094 * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the
current scope then: |
1954 * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, …, a<sub>n<
/sub>, | 2095 * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, …, a<sub>n<
/sub>, |
1955 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a | 2096 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a |
1956 * static warning if <i>T.id</i> is not the name of a constructor declared by
the type <i>T</i>. | 2097 * static warning if <i>T.id</i> is not the name of a constructor declared by
the type <i>T</i>. |
1957 * If <i>e</i> of the form <i>new T(a<sub>1</sub>, …, a<sub>n</sub>, x<
sub>n+1</sub>: | 2098 * If <i>e</i> of the form <i>new T(a<sub>1</sub>, …, a<sub>n</sub>, x<
sub>n+1</sub>: |
1958 * a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a sta
tic warning if the | 2099 * a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a sta
tic warning if the |
1959 * type <i>T</i> does not declare a constructor with the same name as the decl
aration of <i>T</i>. | 2100 * type <i>T</i> does not declare a constructor with the same name as the decl
aration of <i>T</i>. |
1960 */ | 2101 */ |
1961 static final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = new St
aticWarningCode('NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 40, "The class '%s' do
es not have a default constructor"); | 2102 static final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = new St
aticWarningCode('NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 40, "The class '%s' do
es not have a default constructor"); |
1962 | 2103 |
1963 /** | 2104 /** |
1964 * 7.6.1 Generative Constructors: If no superinitializer is provided, an impli
cit superinitializer | |
1965 * of the form <b>super</b>() is added at the end of <i>k</i>'s initializer li
st, unless the | |
1966 * enclosing class is class <i>Object</i>. | |
1967 */ | |
1968 static final StaticWarningCode NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT = new Sta
ticWarningCode('NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT', 41, "The class '%s' does
not have a default constructor"); | |
1969 | |
1970 /** | |
1971 * 7.6 Constructors: Iff no constructor is specified for a class <i>C</i>, it
implicitly has a | |
1972 * default constructor C() : <b>super<b>() {}, unless <i>C</i> is class <i>Obj
ect</i>. | |
1973 */ | |
1974 static final StaticWarningCode NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT = new Sta
ticWarningCode('NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT', 42, "The class '%s' does
not have a default constructor"); | |
1975 | |
1976 /** | |
1977 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an | 2105 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an |
1978 * abstract method. | 2106 * abstract method. |
1979 * | 2107 * |
1980 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class | 2108 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class |
1981 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a | 2109 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a |
1982 * corresponding instance member <i>m</i>. | 2110 * corresponding instance member <i>m</i>. |
1983 * @param getterSetterOrMethod a string containing either "get ", "set " or ""
for the first | 2111 * |
1984 * member | 2112 * @param memberName the name of the first member |
1985 * @param enclosingClass enclosing class of the first missing member | 2113 * @param memberName the name of the second member |
1986 * @param name first member name | 2114 * @param memberName the name of the third member |
1987 * @param getterSetterOrMethod a string containing either "get ", "set " or ""
for the second | 2115 * @param memberName the name of the fourth member |
1988 * member | |
1989 * @param enclosingClass enclosing class of the second missing member | |
1990 * @param name second member name | |
1991 * @param getterSetterOrMethod a string containing either "get ", "set " or ""
for the third | |
1992 * member | |
1993 * @param enclosingClass enclosing class of the third missing member | |
1994 * @param name third member name | |
1995 * @param getterSetterOrMethod a string containing either "get ", "set " or ""
for the fourth | |
1996 * member | |
1997 * @param enclosingClass enclosing class of the fourth missing member | |
1998 * @param name fourth member name | |
1999 * @param additionalCount the number of additional missing members that aren't
listed | 2116 * @param additionalCount the number of additional missing members that aren't
listed |
2000 */ | 2117 */ |
2001 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIV
E_PLUS = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE
_PLUS', 43, "Missing inherited members: %s'%s.%s', %s'%s.%s', %s'%s.%s', %s'%s.%
s' and %d more"); | 2118 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIV
E_PLUS = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE
_PLUS', 41, "Missing inherited members: '%s', '%s', '%s', '%s' and %d more"); |
2002 | 2119 |
2003 /** | 2120 /** |
2004 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an | 2121 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an |
2005 * abstract method. | 2122 * abstract method. |
2006 * | 2123 * |
2007 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class | 2124 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class |
2008 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a | 2125 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a |
2009 * corresponding instance member <i>m</i>. | 2126 * corresponding instance member <i>m</i>. |
2010 * @param getterSetterOrMethod a string containing either "get ", "set " or ""
for the first | 2127 * |
2011 * member | 2128 * @param memberName the name of the first member |
2012 * @param enclosingClass enclosing class of the first missing member | 2129 * @param memberName the name of the second member |
2013 * @param name first member name | 2130 * @param memberName the name of the third member |
2014 * @param getterSetterOrMethod a string containing either "get ", "set " or ""
for the second | 2131 * @param memberName the name of the fourth member |
2015 * member | |
2016 * @param enclosingClass enclosing class of the second missing member | |
2017 * @param name second member name | |
2018 * @param getterSetterOrMethod a string containing either "get ", "set " or ""
for the third | |
2019 * member | |
2020 * @param enclosingClass enclosing class of the third missing member | |
2021 * @param name third member name | |
2022 * @param getterSetterOrMethod a string containing either "get ", "set " or ""
for the fourth | |
2023 * member | |
2024 * @param enclosingClass enclosing class of the fourth missing member | |
2025 * @param name fourth member name | |
2026 */ | 2132 */ |
2027 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOU
R = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR', 44
, "Missing inherited members: %s'%s.%s', %s'%s.%s', %s'%s.%s' and %s'%s.%s'"); | 2133 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOU
R = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR', 42
, "Missing inherited members: '%s', '%s', '%s' and '%s'"); |
2028 | 2134 |
2029 /** | 2135 /** |
2030 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an | 2136 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an |
2031 * abstract method. | 2137 * abstract method. |
2032 * | 2138 * |
2033 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class | 2139 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class |
2034 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a | 2140 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a |
2035 * corresponding instance member <i>m</i>. | 2141 * corresponding instance member <i>m</i>. |
2036 * @param getterSetterOrMethod a string containing either "get ", "set " or "" | 2142 * |
2037 * @param enclosingClass enclosing class of the missing member | 2143 * @param memberName the name of the member |
2038 * @param name member name | |
2039 */ | 2144 */ |
2040 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE
= new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE', 45,
"Missing inherited member %s'%s.%s'"); | 2145 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE
= new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE', 43,
"Missing inherited member '%s'"); |
2041 | 2146 |
2042 /** | 2147 /** |
2043 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an | 2148 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an |
2044 * abstract method. | 2149 * abstract method. |
2045 * | 2150 * |
2046 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class | 2151 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class |
2047 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a | 2152 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a |
2048 * corresponding instance member <i>m</i>. | 2153 * corresponding instance member <i>m</i>. |
2049 * @param getterSetterOrMethod a string containing either "get ", "set " or ""
for the first | 2154 * |
2050 * member | 2155 * @param memberName the name of the first member |
2051 * @param enclosingClass enclosing class of the first missing member | 2156 * @param memberName the name of the second member |
2052 * @param name first member name | 2157 * @param memberName the name of the third member |
2053 * @param getterSetterOrMethod a string containing either "get ", "set " or ""
for the second | |
2054 * member | |
2055 * @param enclosingClass enclosing class of the second missing member | |
2056 * @param name second member name | |
2057 * @param getterSetterOrMethod a string containing either "get ", "set " or ""
for the third | |
2058 * member | |
2059 * @param enclosingClass enclosing class of the third missing member | |
2060 * @param name third member name | |
2061 */ | 2158 */ |
2062 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THR
EE = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE',
46, "Missing inherited members: %s'%s.%s', %s'%s.%s' and %s'%s.%s'"); | 2159 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THR
EE = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE',
44, "Missing inherited members: '%s', '%s' and '%s'"); |
2063 | 2160 |
2064 /** | 2161 /** |
2065 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an | 2162 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an |
2066 * abstract method. | 2163 * abstract method. |
2067 * | 2164 * |
2068 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class | 2165 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class |
2069 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a | 2166 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a |
2070 * corresponding instance member <i>m</i>. | 2167 * corresponding instance member <i>m</i>. |
2071 * @param getterSetterOrMethod a string containing either "get ", "set " or ""
for the first | 2168 * |
2072 * member | 2169 * @param memberName the name of the first member |
2073 * @param enclosingClass enclosing class of the first missing member | 2170 * @param memberName the name of the second member |
2074 * @param name first member name | |
2075 * @param getterSetterOrMethod a string containing either "get ", "set " or ""
for the second | |
2076 * member | |
2077 * @param enclosingClass enclosing class of the second missing member | |
2078 * @param name second member name | |
2079 */ | 2171 */ |
2080 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO
= new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO', 47,
"Missing inherited members: %s'%s.%s' and %s'%s.%s'"); | 2172 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO
= new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO', 45,
"Missing inherited members: '%s' and '%s'"); |
2081 | 2173 |
2082 /** | 2174 /** |
2083 * 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 | 2175 * 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 |
2084 * <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 | 2176 * <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 |
2085 * is a static warning if <i>T</i> does not denote a type available in the lex
ical scope of the | 2177 * is a static warning if <i>T</i> does not denote a type available in the lex
ical scope of the |
2086 * catch clause. | 2178 * catch clause. |
| 2179 * |
2087 * @param name the name of the non-type element | 2180 * @param name the name of the non-type element |
2088 */ | 2181 */ |
2089 static final StaticWarningCode NON_TYPE_IN_CATCH_CLAUSE = new StaticWarningCod
e('NON_TYPE_IN_CATCH_CLAUSE', 48, "The name '%s' is not a type and cannot be use
d in an on-catch clause"); | 2182 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"); |
2090 | 2183 |
2091 /** | 2184 /** |
2092 * 7.1.1 Operators: It is a static warning if the return type of the user-decl
ared operator \[\]= is | 2185 * 7.1.1 Operators: It is a static warning if the return type of the user-decl
ared operator []= is |
2093 * explicitly declared and not void. | 2186 * explicitly declared and not void. |
2094 */ | 2187 */ |
2095 static final StaticWarningCode NON_VOID_RETURN_FOR_OPERATOR = new StaticWarnin
gCode('NON_VOID_RETURN_FOR_OPERATOR', 49, "The return type of the operator []= m
ust be 'void'"); | 2188 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'"); |
2096 | 2189 |
2097 /** | 2190 /** |
2098 * 7.3 Setters: It is a static warning if a setter declares a return type othe
r than void. | 2191 * 7.3 Setters: It is a static warning if a setter declares a return type othe
r than void. |
2099 */ | 2192 */ |
2100 static final StaticWarningCode NON_VOID_RETURN_FOR_SETTER = new StaticWarningC
ode('NON_VOID_RETURN_FOR_SETTER', 50, "The return type of the setter must be 'vo
id'"); | 2193 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'"); |
2101 | 2194 |
2102 /** | 2195 /** |
2103 * 15.1 Static Types: A type <i>T</i> is malformed iff: * <i>T</i> has the for
m <i>id</i> or the | 2196 * 15.1 Static Types: A type <i>T</i> is malformed iff: * <i>T</i> has the for
m <i>id</i> or the |
2104 * form <i>prefix.id</i>, and in the enclosing lexical scope, the name <i>id</
i> (respectively | 2197 * form <i>prefix.id</i>, and in the enclosing lexical scope, the name <i>id</
i> (respectively |
2105 * <i>prefix.id</i>) does not denote a type. * <i>T</i> denotes a type variabl
e in the | 2198 * <i>prefix.id</i>) does not denote a type. * <i>T</i> denotes a type variabl
e in the |
2106 * enclosing lexical scope, but occurs in the signature or body of a static me
mber. * | 2199 * enclosing lexical scope, but occurs in the signature or body of a static me
mber. * |
2107 * <i>T</i> is a parameterized type of the form <i>G<S<sub>1</sub>, .., S<s
ub>n</sub>></i>, | 2200 * <i>T</i> is a parameterized type of the form <i>G<S<sub>1</sub>, .., S<s
ub>n</sub>></i>, |
2108 * and <i>G</i> is malformed. | 2201 * and <i>G</i> is malformed. |
2109 * | 2202 * |
2110 * Any use of a malformed type gives rise to a static warning. | 2203 * Any use of a malformed type gives rise to a static warning. |
| 2204 * |
2111 * @param nonTypeName the name that is not a type | 2205 * @param nonTypeName the name that is not a type |
2112 */ | 2206 */ |
2113 static final StaticWarningCode NOT_A_TYPE = new StaticWarningCode('NOT_A_TYPE'
, 51, "%s is not a type"); | 2207 static final StaticWarningCode NOT_A_TYPE = new StaticWarningCode('NOT_A_TYPE'
, 49, "%s is not a type"); |
2114 | 2208 |
2115 /** | 2209 /** |
2116 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i>
or if <i>m > n</i>. | 2210 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i>
or if <i>m > n</i>. |
| 2211 * |
2117 * @param requiredCount the expected number of required arguments | 2212 * @param requiredCount the expected number of required arguments |
2118 * @param argumentCount the actual number of positional arguments given | 2213 * @param argumentCount the actual number of positional arguments given |
2119 */ | 2214 */ |
2120 static final StaticWarningCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new StaticWarni
ngCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', 52, "%d required argument(s) expected, b
ut %d found"); | 2215 static final StaticWarningCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new StaticWarni
ngCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', 50, "%d required argument(s) expected, b
ut %d found"); |
2121 | 2216 |
2122 /** | 2217 /** |
2123 * 14.3 Parts: It is a static warning if the referenced part declaration <i>p<
/i> names a library | 2218 * 14.3 Parts: It is a static warning if the referenced part declaration <i>p<
/i> names a library |
2124 * other than the current library as the library to which <i>p</i> belongs. | 2219 * other than the current library as the library to which <i>p</i> belongs. |
| 2220 * |
2125 * @param expectedLibraryName the name of expected library name | 2221 * @param expectedLibraryName the name of expected library name |
2126 * @param actualLibraryName the non-matching actual library name from the "par
t of" declaration | 2222 * @param actualLibraryName the non-matching actual library name from the "par
t of" declaration |
2127 */ | 2223 */ |
2128 static final StaticWarningCode PART_OF_DIFFERENT_LIBRARY = new StaticWarningCo
de('PART_OF_DIFFERENT_LIBRARY', 53, "Expected this library to be part of '%s', n
ot '%s'"); | 2224 static final StaticWarningCode PART_OF_DIFFERENT_LIBRARY = new StaticWarningCo
de('PART_OF_DIFFERENT_LIBRARY', 51, "Expected this library to be part of '%s', n
ot '%s'"); |
2129 | 2225 |
2130 /** | 2226 /** |
2131 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> i
s not a subtype of | 2227 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> i
s not a subtype of |
2132 * the type of <i>k</i>. | 2228 * the type of <i>k</i>. |
| 2229 * |
2133 * @param redirectedName the name of the redirected constructor | 2230 * @param redirectedName the name of the redirected constructor |
2134 * @param redirectingName the name of the redirecting constructor | 2231 * @param redirectingName the name of the redirecting constructor |
2135 */ | 2232 */ |
2136 static final StaticWarningCode REDIRECT_TO_INVALID_FUNCTION_TYPE = new StaticW
arningCode('REDIRECT_TO_INVALID_FUNCTION_TYPE', 54, "The redirected constructor
'%s' has incompatible parameters with '%s'"); | 2233 static final StaticWarningCode REDIRECT_TO_INVALID_FUNCTION_TYPE = new StaticW
arningCode('REDIRECT_TO_INVALID_FUNCTION_TYPE', 52, "The redirected constructor
'%s' has incompatible parameters with '%s'"); |
2137 | 2234 |
2138 /** | 2235 /** |
2139 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> i
s not a subtype of | 2236 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> i
s not a subtype of |
2140 * the type of <i>k</i>. | 2237 * the type of <i>k</i>. |
| 2238 * |
2141 * @param redirectedName the name of the redirected constructor return type | 2239 * @param redirectedName the name of the redirected constructor return type |
2142 * @param redirectingName the name of the redirecting constructor return type | 2240 * @param redirectingName the name of the redirecting constructor return type |
2143 */ | 2241 */ |
2144 static final StaticWarningCode REDIRECT_TO_INVALID_RETURN_TYPE = new StaticWar
ningCode('REDIRECT_TO_INVALID_RETURN_TYPE', 55, "The return type '%s' of the red
irected constructor is not a subclass of '%s'"); | 2242 static final StaticWarningCode REDIRECT_TO_INVALID_RETURN_TYPE = new StaticWar
ningCode('REDIRECT_TO_INVALID_RETURN_TYPE', 53, "The return type '%s' of the red
irected constructor is not a subclass of '%s'"); |
2145 | 2243 |
2146 /** | 2244 /** |
2147 * 7.6.2 Factories: It is a static warning if type does not denote a class acc
essible in the | 2245 * 7.6.2 Factories: It is a static warning if type does not denote a class acc
essible in the |
2148 * current scope; if type does denote such a class <i>C</i> it is a static war
ning if the | 2246 * current scope; if type does denote such a class <i>C</i> it is a static war
ning if the |
2149 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const
ructor of <i>C</i>. | 2247 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const
ructor of <i>C</i>. |
2150 */ | 2248 */ |
2151 static final StaticWarningCode REDIRECT_TO_MISSING_CONSTRUCTOR = new StaticWar
ningCode('REDIRECT_TO_MISSING_CONSTRUCTOR', 56, "The constructor '%s' could not
be found in '%s'"); | 2249 static final StaticWarningCode REDIRECT_TO_MISSING_CONSTRUCTOR = new StaticWar
ningCode('REDIRECT_TO_MISSING_CONSTRUCTOR', 54, "The constructor '%s' could not
be found in '%s'"); |
2152 | 2250 |
2153 /** | 2251 /** |
2154 * 7.6.2 Factories: It is a static warning if type does not denote a class acc
essible in the | 2252 * 7.6.2 Factories: It is a static warning if type does not denote a class acc
essible in the |
2155 * current scope; if type does denote such a class <i>C</i> it is a static war
ning if the | 2253 * current scope; if type does denote such a class <i>C</i> it is a static war
ning if the |
2156 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const
ructor of <i>C</i>. | 2254 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const
ructor of <i>C</i>. |
2157 */ | 2255 */ |
2158 static final StaticWarningCode REDIRECT_TO_NON_CLASS = new StaticWarningCode('
REDIRECT_TO_NON_CLASS', 57, "The name '%s' is not a type and cannot be used in a
redirected constructor"); | 2256 static final StaticWarningCode REDIRECT_TO_NON_CLASS = new StaticWarningCode('
REDIRECT_TO_NON_CLASS', 55, "The name '%s' is not a type and cannot be used in a
redirected constructor"); |
2159 | 2257 |
2160 /** | 2258 /** |
2161 * 13.11 Return: Let <i>f</i> be the function immediately enclosing a return s
tatement of the form | 2259 * 13.11 Return: Let <i>f</i> be the function immediately enclosing a return s
tatement of the form |
2162 * <i>return;</i> It is a static warning if both of the following conditions h
old: | 2260 * <i>return;</i> It is a static warning if both of the following conditions h
old: |
2163 * <ol> | 2261 * <ol> |
2164 * * <i>f</i> is not a generative constructor. | 2262 * * <i>f</i> is not a generative constructor. |
2165 * * The return type of <i>f</i> may not be assigned to void. | 2263 * * The return type of <i>f</i> may not be assigned to void. |
2166 * </ol> | 2264 * </ol> |
2167 */ | 2265 */ |
2168 static final StaticWarningCode RETURN_WITHOUT_VALUE = new StaticWarningCode('R
ETURN_WITHOUT_VALUE', 58, "Missing return value after 'return'"); | 2266 static final StaticWarningCode RETURN_WITHOUT_VALUE = new StaticWarningCode('R
ETURN_WITHOUT_VALUE', 56, "Missing return value after 'return'"); |
2169 | 2267 |
2170 /** | 2268 /** |
2171 * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not decl
are a static method | 2269 * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not decl
are a static method |
2172 * or getter <i>m</i>. | 2270 * or getter <i>m</i>. |
| 2271 * |
2173 * @param memberName the name of the instance member | 2272 * @param memberName the name of the instance member |
2174 */ | 2273 */ |
2175 static final StaticWarningCode STATIC_ACCESS_TO_INSTANCE_MEMBER = new StaticWa
rningCode('STATIC_ACCESS_TO_INSTANCE_MEMBER', 59, "Instance member '%s' cannot b
e accessed using static access"); | 2274 static final StaticWarningCode STATIC_ACCESS_TO_INSTANCE_MEMBER = new StaticWa
rningCode('STATIC_ACCESS_TO_INSTANCE_MEMBER', 57, "Instance member '%s' cannot b
e accessed using static access"); |
2176 | 2275 |
2177 /** | 2276 /** |
2178 * 13.9 Switch: It is a static warning if the type of <i>e</i> may not be assi
gned to the type of | 2277 * 13.9 Switch: It is a static warning if the type of <i>e</i> may not be assi
gned to the type of |
2179 * <i>e<sub>k</sub></i>. | 2278 * <i>e<sub>k</sub></i>. |
2180 */ | 2279 */ |
2181 static final StaticWarningCode SWITCH_EXPRESSION_NOT_ASSIGNABLE = new StaticWa
rningCode('SWITCH_EXPRESSION_NOT_ASSIGNABLE', 60, "Type '%s' of the switch expre
ssion is not assignable to the type '%s' of case expressions"); | 2280 static final StaticWarningCode SWITCH_EXPRESSION_NOT_ASSIGNABLE = new StaticWa
rningCode('SWITCH_EXPRESSION_NOT_ASSIGNABLE', 58, "Type '%s' of the switch expre
ssion is not assignable to the type '%s' of case expressions"); |
2182 | 2281 |
2183 /** | 2282 /** |
2184 * 12.31 Type Test: It is a static warning if <i>T</i> does not denote a type
available in the | 2283 * 12.31 Type Test: It is a static warning if <i>T</i> does not denote a type
available in the |
2185 * current lexical scope. | 2284 * current lexical scope. |
2186 */ | 2285 */ |
2187 static final StaticWarningCode TYPE_TEST_NON_TYPE = new StaticWarningCode('TYP
E_TEST_NON_TYPE', 61, "The name '%s' is not a type and cannot be used in an 'is'
expression"); | 2286 static final StaticWarningCode TYPE_TEST_NON_TYPE = new StaticWarningCode('TYP
E_TEST_NON_TYPE', 59, "The name '%s' is not a type and cannot be used in an 'is'
expression"); |
2188 | 2287 |
2189 /** | 2288 /** |
2190 * 15.1 Static Types: A type <i>T</i> is malformed iff: * <i>T</i> has the for
m <i>id</i> or the | 2289 * 15.1 Static Types: A type <i>T</i> is malformed iff: * <i>T</i> has the for
m <i>id</i> or the |
2191 * form <i>prefix.id</i>, and in the enclosing lexical scope, the name <i>id</
i> (respectively | 2290 * form <i>prefix.id</i>, and in the enclosing lexical scope, the name <i>id</
i> (respectively |
2192 * <i>prefix.id</i>) does not denote a type. * <i>T</i> denotes a type variabl
e in the | 2291 * <i>prefix.id</i>) does not denote a type. * <i>T</i> denotes a type variabl
e in the |
2193 * enclosing lexical scope, but occurs in the signature or body of a static me
mber. * | 2292 * enclosing lexical scope, but occurs in the signature or body of a static me
mber. * |
2194 * <i>T</i> is a parameterized type of the form <i>G<S<sub>1</sub>, .., S<s
ub>n</sub>></i>, | 2293 * <i>T</i> is a parameterized type of the form <i>G<S<sub>1</sub>, .., S<s
ub>n</sub>></i>, |
2195 * and <i>G</i> is malformed. | 2294 * and <i>G</i> is malformed. |
2196 * | 2295 * |
2197 * Any use of a malformed type gives rise to a static warning. | 2296 * Any use of a malformed type gives rise to a static warning. |
2198 */ | 2297 */ |
2199 static final StaticWarningCode TYPE_VARIABLE_IN_STATIC_SCOPE = new StaticWarni
ngCode('TYPE_VARIABLE_IN_STATIC_SCOPE', 62, ""); | 2298 static final StaticWarningCode TYPE_VARIABLE_IN_STATIC_SCOPE = new StaticWarni
ngCode('TYPE_VARIABLE_IN_STATIC_SCOPE', 60, ""); |
2200 | 2299 |
2201 /** | 2300 /** |
2202 * 12.15.3 Static Invocation: A static method invocation <i>i</i> has the form | 2301 * 12.15.3 Static Invocation: A static method invocation <i>i</i> has the form |
2203 * <i>C.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</
sub>, … | 2302 * <i>C.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</
sub>, … |
2204 * 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 | 2303 * 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 |
2205 * class in the current scope. | 2304 * class in the current scope. |
| 2305 * |
| 2306 * @param undefinedClassName the name of the undefined class |
2206 */ | 2307 */ |
2207 static final StaticWarningCode UNDEFINED_CLASS = new StaticWarningCode('UNDEFI
NED_CLASS', 63, "Undefined class '%s'"); | 2308 static final StaticWarningCode UNDEFINED_CLASS = new StaticWarningCode('UNDEFI
NED_CLASS', 61, "Undefined class '%s'"); |
2208 | 2309 |
2209 /** | 2310 /** |
2210 * Same as [UNDEFINED_CLASS], but to catch using "boolean" instead of "bool". | 2311 * Same as [UNDEFINED_CLASS], but to catch using "boolean" instead of "bool". |
2211 */ | 2312 */ |
2212 static final StaticWarningCode UNDEFINED_CLASS_BOOLEAN = new StaticWarningCode
('UNDEFINED_CLASS_BOOLEAN', 64, "Undefined class 'boolean'; did you mean 'bool'?
"); | 2313 static final StaticWarningCode UNDEFINED_CLASS_BOOLEAN = new StaticWarningCode
('UNDEFINED_CLASS_BOOLEAN', 62, "Undefined class 'boolean'; did you mean 'bool'?
"); |
2213 | 2314 |
2214 /** | 2315 /** |
2215 * 12.17 Getter Invocation: It is a static warning if there is no class <i>C</
i> in the enclosing | 2316 * 12.17 Getter Invocation: It is a static warning if there is no class <i>C</
i> in the enclosing |
2216 * lexical scope of <i>i</i>, or if <i>C</i> does not declare, implicitly or e
xplicitly, a getter | 2317 * lexical scope of <i>i</i>, or if <i>C</i> does not declare, implicitly or e
xplicitly, a getter |
2217 * named <i>m</i>. | 2318 * named <i>m</i>. |
| 2319 * |
2218 * @param getterName the name of the getter | 2320 * @param getterName the name of the getter |
2219 * @param enclosingType the name of the enclosing type where the getter is bei
ng looked for | 2321 * @param enclosingType the name of the enclosing type where the getter is bei
ng looked for |
2220 */ | 2322 */ |
2221 static final StaticWarningCode UNDEFINED_GETTER = new StaticWarningCode('UNDEF
INED_GETTER', 65, "There is no such getter '%s' in '%s'"); | 2323 static final StaticWarningCode UNDEFINED_GETTER = new StaticWarningCode('UNDEF
INED_GETTER', 63, "There is no such getter '%s' in '%s'"); |
2222 | 2324 |
2223 /** | 2325 /** |
2224 * 12.30 Identifier Reference: It is as static warning if an identifier expres
sion of the form | 2326 * 12.30 Identifier Reference: It is as static warning if an identifier expres
sion of the form |
2225 * <i>id</i> occurs inside a top level or static function (be it function, met
hod, getter, or | 2327 * <i>id</i> occurs inside a top level or static function (be it function, met
hod, getter, or |
2226 * setter) or variable initializer and there is no declaration <i>d</i> with n
ame <i>id</i> in the | 2328 * setter) or variable initializer and there is no declaration <i>d</i> with n
ame <i>id</i> in the |
2227 * lexical scope enclosing the expression. | 2329 * lexical scope enclosing the expression. |
2228 */ | 2330 */ |
2229 static final StaticWarningCode UNDEFINED_IDENTIFIER = new StaticWarningCode('U
NDEFINED_IDENTIFIER', 66, "Undefined name '%s'"); | 2331 static final StaticWarningCode UNDEFINED_IDENTIFIER = new StaticWarningCode('U
NDEFINED_IDENTIFIER', 64, "Undefined name '%s'"); |
2230 | 2332 |
2231 /** | 2333 /** |
2232 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>,
<i>1<=i<=l</i>, | 2334 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>,
<i>1<=i<=l</i>, |
2233 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i
> ... | 2335 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i
> ... |
2234 * <i>p<sub>n+k</sub></i>} or a static warning occurs. | 2336 * <i>p<sub>n+k</sub></i>} or a static warning occurs. |
| 2337 * |
2235 * @param name the name of the requested named parameter | 2338 * @param name the name of the requested named parameter |
2236 */ | 2339 */ |
2237 static final StaticWarningCode UNDEFINED_NAMED_PARAMETER = new StaticWarningCo
de('UNDEFINED_NAMED_PARAMETER', 67, "The named parameter '%s' is not defined"); | 2340 static final StaticWarningCode UNDEFINED_NAMED_PARAMETER = new StaticWarningCo
de('UNDEFINED_NAMED_PARAMETER', 65, "The named parameter '%s' is not defined"); |
2238 | 2341 |
2239 /** | 2342 /** |
2240 * 12.18 Assignment: It is as static warning if an assignment of the form <i>v
= e</i> occurs | 2343 * 12.18 Assignment: It is as static warning if an assignment of the form <i>v
= e</i> occurs |
2241 * inside a top level or static function (be it function, method, getter, or s
etter) or variable | 2344 * inside a top level or static function (be it function, method, getter, or s
etter) or variable |
2242 * initializer and there is no declaration <i>d</i> with name <i>v=</i> in the
lexical scope | 2345 * initializer and there is no declaration <i>d</i> with name <i>v=</i> in the
lexical scope |
2243 * enclosing the assignment. | 2346 * enclosing the assignment. |
2244 * | 2347 * |
2245 * 12.18 Assignment: It is a static warning if there is no class <i>C</i> in t
he enclosing lexical | 2348 * 12.18 Assignment: It is a static warning if there is no class <i>C</i> in t
he enclosing lexical |
2246 * scope of the assignment, or if <i>C</i> does not declare, implicitly or exp
licitly, a setter | 2349 * scope of the assignment, or if <i>C</i> does not declare, implicitly or exp
licitly, a setter |
2247 * <i>v=</i>. | 2350 * <i>v=</i>. |
| 2351 * |
2248 * @param setterName the name of the getter | 2352 * @param setterName the name of the getter |
2249 * @param enclosingType the name of the enclosing type where the setter is bei
ng looked for | 2353 * @param enclosingType the name of the enclosing type where the setter is bei
ng looked for |
2250 */ | 2354 */ |
2251 static final StaticWarningCode UNDEFINED_SETTER = new StaticWarningCode('UNDEF
INED_SETTER', 68, "There is no such setter '%s' in '%s'"); | 2355 static final StaticWarningCode UNDEFINED_SETTER = new StaticWarningCode('UNDEF
INED_SETTER', 66, "There is no such setter '%s' in '%s'"); |
2252 | 2356 |
2253 /** | 2357 /** |
2254 * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not decl
are a static method | 2358 * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not decl
are a static method |
2255 * or getter <i>m</i>. | 2359 * or getter <i>m</i>. |
| 2360 * |
2256 * @param methodName the name of the method | 2361 * @param methodName the name of the method |
2257 * @param enclosingType the name of the enclosing type where the method is bei
ng looked for | 2362 * @param enclosingType the name of the enclosing type where the method is bei
ng looked for |
2258 */ | 2363 */ |
2259 static final StaticWarningCode UNDEFINED_STATIC_METHOD_OR_GETTER = new StaticW
arningCode('UNDEFINED_STATIC_METHOD_OR_GETTER', 69, "There is no such static met
hod '%s' in '%s'"); | 2364 static final StaticWarningCode UNDEFINED_STATIC_METHOD_OR_GETTER = new StaticW
arningCode('UNDEFINED_STATIC_METHOD_OR_GETTER', 67, "There is no such static met
hod '%s' in '%s'"); |
2260 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, FINAL_NOT_INITIALIZ
ED, IMPORT_DUPLICATED_LIBRARY_NAME, INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_M
ETHOD, INCORRECT_NUMBER_OF_ARGUMENTS, INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCL
ASS_STATIC, INVALID_FACTORY_NAME, INVALID_GETTER_OVERRIDE_RETURN_TYPE, INVALID_M
ETHOD_OVERRIDE_NAMED_PARAM_TYPE, INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE, INVA
LID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE, INVALID_METHOD_OVERRIDE_RETURN_TYPE, IN
VALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED, INVALID_OVERRIDE_DIFFERENT_DEFAUL
T_VALUES_POSITIONAL, INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE, INVOCATION_OF_NO
N_FUNCTION, MISMATCHED_GETTER_AND_SETTER_TYPES, NEW_WITH_ABSTRACT_CLASS, NEW_WIT
H_NON_TYPE, NEW_WITH_UNDEFINED_CONSTRUCTOR, NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAU
LT, NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT, NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT
, NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS, NON_ABSTRACT_CLASS_INHE
RITS_ABSTRACT_MEMBER_FOUR, NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE, NON_
ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE, NON_ABSTRACT_CLASS_INHERITS_ABSTR
ACT_MEMBER_TWO, NON_TYPE_IN_CATCH_CLAUSE, NON_VOID_RETURN_FOR_OPERATOR, NON_VOID
_RETURN_FOR_SETTER, NOT_A_TYPE, NOT_ENOUGH_REQUIRED_ARGUMENTS, PART_OF_DIFFERENT
_LIBRARY, REDIRECT_TO_INVALID_FUNCTION_TYPE, REDIRECT_TO_INVALID_RETURN_TYPE, RE
DIRECT_TO_MISSING_CONSTRUCTOR, REDIRECT_TO_NON_CLASS, RETURN_WITHOUT_VALUE, STAT
IC_ACCESS_TO_INSTANCE_MEMBER, SWITCH_EXPRESSION_NOT_ASSIGNABLE, TYPE_TEST_NON_TY
PE, TYPE_VARIABLE_IN_STATIC_SCOPE, UNDEFINED_CLASS, UNDEFINED_CLASS_BOOLEAN, UND
EFINED_GETTER, UNDEFINED_IDENTIFIER, UNDEFINED_NAMED_PARAMETER, UNDEFINED_SETTER
, UNDEFINED_STATIC_METHOD_OR_GETTER]; | 2365 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, FINAL_NOT_INITIALIZ
ED, IMPORT_DUPLICATED_LIBRARY_NAME, INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_M
ETHOD, INCORRECT_NUMBER_OF_ARGUMENTS, INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCL
ASS_STATIC, INVALID_FACTORY_NAME, INVALID_GETTER_OVERRIDE_RETURN_TYPE, INVALID_M
ETHOD_OVERRIDE_NAMED_PARAM_TYPE, INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE, INVA
LID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE, INVALID_METHOD_OVERRIDE_RETURN_TYPE, IN
VALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED, INVALID_OVERRIDE_DIFFERENT_DEFAUL
T_VALUES_POSITIONAL, INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE, INVOCATION_OF_NO
N_FUNCTION, MISMATCHED_GETTER_AND_SETTER_TYPES, NEW_WITH_ABSTRACT_CLASS, NEW_WIT
H_NON_TYPE, NEW_WITH_UNDEFINED_CONSTRUCTOR, NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAU
LT, NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS, NON_ABSTRACT_CLASS_IN
HERITS_ABSTRACT_MEMBER_FOUR, NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE, NO
N_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE, NON_ABSTRACT_CLASS_INHERITS_ABS
TRACT_MEMBER_TWO, NON_TYPE_IN_CATCH_CLAUSE, NON_VOID_RETURN_FOR_OPERATOR, NON_VO
ID_RETURN_FOR_SETTER, NOT_A_TYPE, NOT_ENOUGH_REQUIRED_ARGUMENTS, PART_OF_DIFFERE
NT_LIBRARY, REDIRECT_TO_INVALID_FUNCTION_TYPE, REDIRECT_TO_INVALID_RETURN_TYPE,
REDIRECT_TO_MISSING_CONSTRUCTOR, REDIRECT_TO_NON_CLASS, RETURN_WITHOUT_VALUE, ST
ATIC_ACCESS_TO_INSTANCE_MEMBER, SWITCH_EXPRESSION_NOT_ASSIGNABLE, TYPE_TEST_NON_
TYPE, TYPE_VARIABLE_IN_STATIC_SCOPE, UNDEFINED_CLASS, UNDEFINED_CLASS_BOOLEAN, U
NDEFINED_GETTER, UNDEFINED_IDENTIFIER, UNDEFINED_NAMED_PARAMETER, UNDEFINED_SETT
ER, UNDEFINED_STATIC_METHOD_OR_GETTER]; |
2261 | 2366 |
2262 /// The name of this enum constant, as declared in the enum declaration. | 2367 /// The name of this enum constant, as declared in the enum declaration. |
2263 final String name; | 2368 final String name; |
2264 | 2369 |
2265 /// The position in the enum declaration. | 2370 /// The position in the enum declaration. |
2266 final int ordinal; | 2371 final int ordinal; |
2267 | 2372 |
2268 /** | 2373 /** |
2269 * The message template used to create the message to be displayed for this er
ror. | 2374 * The message template used to create the message to be displayed for this er
ror. |
2270 */ | 2375 */ |
2271 String _message; | 2376 String _message; |
2272 | 2377 |
2273 /** | 2378 /** |
2274 * Initialize a newly created error code to have the given type and message. | 2379 * Initialize a newly created error code to have the given type and message. |
| 2380 * |
2275 * @param message the message template used to create the message to be displa
yed for the error | 2381 * @param message the message template used to create the message to be displa
yed for the error |
2276 */ | 2382 */ |
2277 StaticWarningCode(this.name, this.ordinal, String message) { | 2383 StaticWarningCode(this.name, this.ordinal, String message) { |
2278 this._message = message; | 2384 this._message = message; |
2279 } | 2385 } |
2280 ErrorSeverity get errorSeverity => ErrorType.STATIC_WARNING.severity; | 2386 ErrorSeverity get errorSeverity => ErrorType.STATIC_WARNING.severity; |
2281 String get message => _message; | 2387 String get message => _message; |
2282 ErrorType get type => ErrorType.STATIC_WARNING; | 2388 ErrorType get type => ErrorType.STATIC_WARNING; |
2283 int compareTo(StaticWarningCode other) => ordinal - other.ordinal; | 2389 int compareTo(StaticWarningCode other) => ordinal - other.ordinal; |
2284 int get hashCode => ordinal; | 2390 int get hashCode => ordinal; |
2285 String toString() => name; | 2391 String toString() => name; |
2286 } | 2392 } |
2287 /** | 2393 /** |
2288 * The interface `AnalysisErrorListener` defines the behavior of objects that li
sten for[AnalysisError analysis errors] being produced by the analysis engine. | 2394 * The interface `AnalysisErrorListener` defines the behavior of objects that li
sten for |
| 2395 * [AnalysisError] being produced by the analysis engine. |
| 2396 * |
2289 * @coverage dart.engine.error | 2397 * @coverage dart.engine.error |
2290 */ | 2398 */ |
2291 abstract class AnalysisErrorListener { | 2399 abstract class AnalysisErrorListener { |
2292 | 2400 |
2293 /** | 2401 /** |
2294 * An error listener that ignores errors that are reported to it. | 2402 * An error listener that ignores errors that are reported to it. |
2295 */ | 2403 */ |
2296 static final AnalysisErrorListener _NULL_LISTENER = new AnalysisErrorListener_
5(); | 2404 static final AnalysisErrorListener _NULL_LISTENER = new AnalysisErrorListener_
5(); |
2297 | 2405 |
2298 /** | 2406 /** |
2299 * This method is invoked when an error has been found by the analysis engine. | 2407 * This method is invoked when an error has been found by the analysis engine. |
| 2408 * |
2300 * @param error the error that was just found (not `null`) | 2409 * @param error the error that was just found (not `null`) |
2301 */ | 2410 */ |
2302 void onError(AnalysisError error); | 2411 void onError(AnalysisError error); |
2303 } | 2412 } |
2304 class AnalysisErrorListener_5 implements AnalysisErrorListener { | 2413 class AnalysisErrorListener_5 implements AnalysisErrorListener { |
2305 void onError(AnalysisError event) { | 2414 void onError(AnalysisError event) { |
2306 } | 2415 } |
2307 } | 2416 } |
2308 /** | 2417 /** |
2309 * The enumeration `HtmlWarningCode` defines the error codes used for warnings i
n HTML files. | 2418 * The enumeration `HtmlWarningCode` defines the error codes used for warnings i
n HTML files. |
2310 * The convention for this class is for the name of the error code to indicate t
he problem that | 2419 * The convention for this class is for the name of the error code to indicate t
he problem that |
2311 * caused the error to be generated and for the error message to explain what is
wrong and, when | 2420 * caused the error to be generated and for the error message to explain what is
wrong and, when |
2312 * appropriate, how the problem can be corrected. | 2421 * appropriate, how the problem can be corrected. |
| 2422 * |
2313 * @coverage dart.engine.error | 2423 * @coverage dart.engine.error |
2314 */ | 2424 */ |
2315 class HtmlWarningCode implements Comparable<HtmlWarningCode>, ErrorCode { | 2425 class HtmlWarningCode implements Comparable<HtmlWarningCode>, ErrorCode { |
2316 | 2426 |
2317 /** | 2427 /** |
2318 * An error code indicating that the value of the 'src' attribute of a Dart sc
ript tag is not a | 2428 * An error code indicating that the value of the 'src' attribute of a Dart sc
ript tag is not a |
2319 * valid URI. | 2429 * valid URI. |
| 2430 * |
2320 * @param uri the URI that is invalid | 2431 * @param uri the URI that is invalid |
2321 */ | 2432 */ |
2322 static final HtmlWarningCode INVALID_URI = new HtmlWarningCode('INVALID_URI',
0, "Invalid URI syntax: '%s'"); | 2433 static final HtmlWarningCode INVALID_URI = new HtmlWarningCode('INVALID_URI',
0, "Invalid URI syntax: '%s'"); |
2323 | 2434 |
2324 /** | 2435 /** |
2325 * An error code indicating that the value of the 'src' attribute of a Dart sc
ript tag references | 2436 * An error code indicating that the value of the 'src' attribute of a Dart sc
ript tag references |
2326 * a file that does not exist. | 2437 * a file that does not exist. |
| 2438 * |
2327 * @param uri the URI pointing to a non-existent file | 2439 * @param uri the URI pointing to a non-existent file |
2328 */ | 2440 */ |
2329 static final HtmlWarningCode URI_DOES_NOT_EXIST = new HtmlWarningCode('URI_DOE
S_NOT_EXIST', 1, "Target of URI does not exist: '%s'"); | 2441 static final HtmlWarningCode URI_DOES_NOT_EXIST = new HtmlWarningCode('URI_DOE
S_NOT_EXIST', 1, "Target of URI does not exist: '%s'"); |
2330 static final List<HtmlWarningCode> values = [INVALID_URI, URI_DOES_NOT_EXIST]; | 2442 static final List<HtmlWarningCode> values = [INVALID_URI, URI_DOES_NOT_EXIST]; |
2331 | 2443 |
2332 /// The name of this enum constant, as declared in the enum declaration. | 2444 /// The name of this enum constant, as declared in the enum declaration. |
2333 final String name; | 2445 final String name; |
2334 | 2446 |
2335 /// The position in the enum declaration. | 2447 /// The position in the enum declaration. |
2336 final int ordinal; | 2448 final int ordinal; |
2337 | 2449 |
2338 /** | 2450 /** |
2339 * The message template used to create the message to be displayed for this er
ror. | 2451 * The message template used to create the message to be displayed for this er
ror. |
2340 */ | 2452 */ |
2341 String _message; | 2453 String _message; |
2342 | 2454 |
2343 /** | 2455 /** |
2344 * Initialize a newly created error code to have the given type and message. | 2456 * Initialize a newly created error code to have the given type and message. |
| 2457 * |
2345 * @param message the message template used to create the message to be displa
yed for the error | 2458 * @param message the message template used to create the message to be displa
yed for the error |
2346 */ | 2459 */ |
2347 HtmlWarningCode(this.name, this.ordinal, String message) { | 2460 HtmlWarningCode(this.name, this.ordinal, String message) { |
2348 this._message = message; | 2461 this._message = message; |
2349 } | 2462 } |
2350 ErrorSeverity get errorSeverity => ErrorSeverity.WARNING; | 2463 ErrorSeverity get errorSeverity => ErrorSeverity.WARNING; |
2351 String get message => _message; | 2464 String get message => _message; |
2352 ErrorType get type => ErrorType.STATIC_WARNING; | 2465 ErrorType get type => ErrorType.STATIC_WARNING; |
2353 int compareTo(HtmlWarningCode other) => ordinal - other.ordinal; | 2466 int compareTo(HtmlWarningCode other) => ordinal - other.ordinal; |
2354 int get hashCode => ordinal; | 2467 int get hashCode => ordinal; |
2355 String toString() => name; | 2468 String toString() => name; |
2356 } | 2469 } |
2357 /** | 2470 /** |
2358 * The enumeration `StaticTypeWarningCode` defines the error codes used for stat
ic type | 2471 * The enumeration `StaticTypeWarningCode` defines the error codes used for stat
ic type |
2359 * warnings. The convention for this class is for the name of the error code to
indicate the problem | 2472 * warnings. The convention for this class is for the name of the error code to
indicate the problem |
2360 * that caused the error to be generated and for the error message to explain wh
at is wrong and, | 2473 * that caused the error to be generated and for the error message to explain wh
at is wrong and, |
2361 * when appropriate, how the problem can be corrected. | 2474 * when appropriate, how the problem can be corrected. |
| 2475 * |
2362 * @coverage dart.engine.error | 2476 * @coverage dart.engine.error |
2363 */ | 2477 */ |
2364 class StaticTypeWarningCode implements Comparable<StaticTypeWarningCode>, ErrorC
ode { | 2478 class StaticTypeWarningCode implements Comparable<StaticTypeWarningCode>, ErrorC
ode { |
2365 | 2479 |
2366 /** | 2480 /** |
2367 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
It is a static type | 2481 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
It is a static type |
2368 * warning if <i>T</i> does not have an accessible instance setter named <i>v=
</i>. | 2482 * warning if <i>T</i> does not have an accessible instance setter named <i>v=
</i>. |
| 2483 * |
2369 * @see #UNDEFINED_SETTER | 2484 * @see #UNDEFINED_SETTER |
2370 */ | 2485 */ |
2371 static final StaticTypeWarningCode INACCESSIBLE_SETTER = new StaticTypeWarning
Code('INACCESSIBLE_SETTER', 0, ""); | 2486 static final StaticTypeWarningCode INACCESSIBLE_SETTER = new StaticTypeWarning
Code('INACCESSIBLE_SETTER', 0, ""); |
2372 | 2487 |
2373 /** | 2488 /** |
2374 * 8.1.1 Inheritance and Overriding: However, if there are multiple members <i
>m<sub>1</sub>, | 2489 * 8.1.1 Inheritance and Overriding: However, if there are multiple members <i
>m<sub>1</sub>, |
2375 * … m<sub>k</sub></i> with the same name <i>n</i> that would be inheri
ted (because | 2490 * … m<sub>k</sub></i> with the same name <i>n</i> that would be inheri
ted (because |
2376 * identically named members existed in several superinterfaces) then at most
one member is | 2491 * identically named members existed in several superinterfaces) then at most
one member is |
2377 * inherited. | 2492 * inherited. |
2378 * | 2493 * |
(...skipping 17 matching lines...) Expand all Loading... |
2396 * 12.18 Assignment: It is a static type warning if the static type of <i>e</i
> may not be | 2511 * 12.18 Assignment: It is a static type warning if the static type of <i>e</i
> may not be |
2397 * assigned to the static type of <i>v</i>. The static type of the expression
<i>v = e</i> is the | 2512 * assigned to the static type of <i>v</i>. The static type of the expression
<i>v = e</i> is the |
2398 * static type of <i>e</i>. | 2513 * static type of <i>e</i>. |
2399 * | 2514 * |
2400 * 12.18 Assignment: It is a static type warning if the static type of <i>e</i
> may not be | 2515 * 12.18 Assignment: It is a static type warning if the static type of <i>e</i
> may not be |
2401 * assigned to the static type of <i>C.v</i>. The static type of the expressio
n <i>C.v = e</i> is | 2516 * assigned to the static type of <i>C.v</i>. The static type of the expressio
n <i>C.v = e</i> is |
2402 * the static type of <i>e</i>. | 2517 * the static type of <i>e</i>. |
2403 * | 2518 * |
2404 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
It is a static type | 2519 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
It is a static type |
2405 * warning if the static type of <i>e<sub>2</sub></i> may not be assigned to <
i>T</i>. | 2520 * warning if the static type of <i>e<sub>2</sub></i> may not be assigned to <
i>T</i>. |
| 2521 * |
2406 * @param rhsTypeName the name of the right hand side type | 2522 * @param rhsTypeName the name of the right hand side type |
2407 * @param lhsTypeName the name of the left hand side type | 2523 * @param lhsTypeName the name of the left hand side type |
2408 */ | 2524 */ |
2409 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'"); | 2525 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'"); |
2410 | 2526 |
2411 /** | 2527 /** |
2412 * 12.14.4 Function Expression Invocation: A function expression invocation <i
>i</i> has the form | 2528 * 12.14.4 Function Expression Invocation: A function expression invocation <i
>i</i> has the form |
2413 * <i>e<sub>f</sub>(a<sub>1</sub>, … a<sub>n</sub>, x<sub>n+1</sub>: a<
sub>n+1</sub>, | 2529 * <i>e<sub>f</sub>(a<sub>1</sub>, … a<sub>n</sub>, x<sub>n+1</sub>: a<
sub>n+1</sub>, |
2414 * …, x<sub>n+k</sub>: a<sub>n+k</sub>)</i>, where <i>e<sub>f</sub></i>
is an expression. | 2530 * …, x<sub>n+k</sub>: a<sub>n+k</sub>)</i>, where <i>e<sub>f</sub></i>
is an expression. |
2415 * | 2531 * |
2416 * It is a static type warning if the static type <i>F</i> of <i>e<sub>f</sub>
</i> may not be | 2532 * It is a static type warning if the static type <i>F</i> of <i>e<sub>f</sub>
</i> may not be |
2417 * assigned to a function type. | 2533 * assigned to a function type. |
2418 * | 2534 * |
2419 * 12.15.1 Ordinary Invocation: An ordinary method invocation <i>i</i> has the
form | 2535 * 12.15.1 Ordinary Invocation: An ordinary method invocation <i>i</i> has the
form |
2420 * <i>o.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</
sub>, … | 2536 * <i>o.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</
sub>, … |
2421 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. | 2537 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. |
2422 * | 2538 * |
2423 * Let <i>T</i> be the static type of <i>o</i>. It is a static type warning if
<i>T</i> does not | 2539 * Let <i>T</i> be the static type of <i>o</i>. It is a static type warning if
<i>T</i> does not |
2424 * have an accessible instance member named <i>m</i>. If <i>T.m</i> exists, it
is a static warning | 2540 * have an accessible instance member named <i>m</i>. If <i>T.m</i> exists, it
is a static warning |
2425 * 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 | 2541 * 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 |
2426 * not exist, or if <i>F</i> is not a function type, the static type of <i>i</
i> is dynamic. | 2542 * not exist, or if <i>F</i> is not a function type, the static type of <i>i</
i> is dynamic. |
2427 * | 2543 * |
2428 * 12.15.3 Static Invocation: It is a static type warning if the type <i>F</i>
of <i>C.m</i> may | 2544 * 12.15.3 Static Invocation: It is a static type warning if the type <i>F</i>
of <i>C.m</i> may |
2429 * not be assigned to a function type. | 2545 * not be assigned to a function type. |
| 2546 * |
2430 * @param nonFunctionIdentifier the name of the identifier that is not a funct
ion type | 2547 * @param nonFunctionIdentifier the name of the identifier that is not a funct
ion type |
2431 */ | 2548 */ |
2432 static final StaticTypeWarningCode INVOCATION_OF_NON_FUNCTION = new StaticType
WarningCode('INVOCATION_OF_NON_FUNCTION', 3, "'%s' is not a method"); | 2549 static final StaticTypeWarningCode INVOCATION_OF_NON_FUNCTION = new StaticType
WarningCode('INVOCATION_OF_NON_FUNCTION', 3, "'%s' is not a method"); |
2433 | 2550 |
2434 /** | 2551 /** |
2435 * 12.19 Conditional: It is a static type warning if the type of <i>e<sub>1</s
ub></i> may not be | 2552 * 12.19 Conditional: It is a static type warning if the type of <i>e<sub>1</s
ub></i> may not be |
2436 * assigned to bool. | 2553 * assigned to bool. |
2437 * | 2554 * |
2438 * 13.5 If: It is a static type warning if the type of the expression <i>b</i>
may not be assigned | 2555 * 13.5 If: It is a static type warning if the type of the expression <i>b</i>
may not be assigned |
2439 * to bool. | 2556 * to bool. |
2440 * | 2557 * |
2441 * 13.7 While: It is a static type warning if the type of <i>e</i> may not be
assigned to bool. | 2558 * 13.7 While: It is a static type warning if the type of <i>e</i> may not be
assigned to bool. |
2442 * | 2559 * |
2443 * 13.8 Do: It is a static type warning if the type of <i>e</i> cannot be assi
gned to bool. | 2560 * 13.8 Do: It is a static type warning if the type of <i>e</i> cannot be assi
gned to bool. |
2444 */ | 2561 */ |
2445 static final StaticTypeWarningCode NON_BOOL_CONDITION = new StaticTypeWarningC
ode('NON_BOOL_CONDITION', 4, "Conditions must have a static type of 'bool'"); | 2562 static final StaticTypeWarningCode NON_BOOL_CONDITION = new StaticTypeWarningC
ode('NON_BOOL_CONDITION', 4, "Conditions must have a static type of 'bool'"); |
2446 | 2563 |
2447 /** | 2564 /** |
2448 * 13.15 Assert: It is a static type warning if the type of <i>e</i> may not b
e assigned to either | 2565 * 13.15 Assert: It is a static type warning if the type of <i>e</i> may not b
e assigned to either |
2449 * bool or () → bool | 2566 * bool or () → bool |
2450 */ | 2567 */ |
2451 static final StaticTypeWarningCode NON_BOOL_EXPRESSION = new StaticTypeWarning
Code('NON_BOOL_EXPRESSION', 5, "Assertions must be on either a 'bool' or '() ->
bool'"); | 2568 static final StaticTypeWarningCode NON_BOOL_EXPRESSION = new StaticTypeWarning
Code('NON_BOOL_EXPRESSION', 5, "Assertions must be on either a 'bool' or '() ->
bool'"); |
2452 | 2569 |
2453 /** | 2570 /** |
2454 * 15.8 Parameterized Types: It is a static type warning if <i>A<sub>i</sub>,
1 <= i <= | 2571 * 15.8 Parameterized Types: It is a static type warning if <i>A<sub>i</sub>,
1 <= i <= |
2455 * n</i> does not denote a type in the enclosing lexical scope. | 2572 * n</i> does not denote a type in the enclosing lexical scope. |
2456 */ | 2573 */ |
2457 static final StaticTypeWarningCode NON_TYPE_AS_TYPE_ARGUMENT = new StaticTypeW
arningCode('NON_TYPE_AS_TYPE_ARGUMENT', 6, ""); | 2574 static final StaticTypeWarningCode NON_TYPE_AS_TYPE_ARGUMENT = new StaticTypeW
arningCode('NON_TYPE_AS_TYPE_ARGUMENT', 6, "The name '%s' is not a type and cann
ot be used as a parameterized type"); |
2458 | 2575 |
2459 /** | 2576 /** |
2460 * 7.6.2 Factories: It is a static type warning if any of the type arguments t
o <i>k'</i> are not | 2577 * 7.6.2 Factories: It is a static type warning if any of the type arguments t
o <i>k'</i> are not |
2461 * subtypes of the bounds of the corresponding formal type parameters of type. | 2578 * subtypes of the bounds of the corresponding formal type parameters of type. |
2462 */ | 2579 */ |
2463 static final StaticTypeWarningCode REDIRECT_WITH_INVALID_TYPE_PARAMETERS = new
StaticTypeWarningCode('REDIRECT_WITH_INVALID_TYPE_PARAMETERS', 7, ""); | 2580 static final StaticTypeWarningCode REDIRECT_WITH_INVALID_TYPE_PARAMETERS = new
StaticTypeWarningCode('REDIRECT_WITH_INVALID_TYPE_PARAMETERS', 7, ""); |
2464 | 2581 |
2465 /** | 2582 /** |
2466 * 13.11 Return: It is a static type warning if the type of <i>e</i> may not b
e assigned to the | 2583 * 13.11 Return: It is a static type warning if the type of <i>e</i> may not b
e assigned to the |
2467 * declared return type of the immediately enclosing function. | 2584 * declared return type of the immediately enclosing function. |
| 2585 * |
2468 * @param actualReturnType the return type as declared in the return statement | 2586 * @param actualReturnType the return type as declared in the return statement |
2469 * @param expectedReturnType the expected return type as defined by the method | 2587 * @param expectedReturnType the expected return type as defined by the method |
2470 * @param methodName the name of the method | 2588 * @param methodName the name of the method |
2471 */ | 2589 */ |
2472 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'"); | 2590 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'"); |
2473 | 2591 |
2474 /** | 2592 /** |
2475 * 12.11 Instance Creation: It is a static type warning if any of the type arg
uments to a | 2593 * 12.11 Instance Creation: It is a static type warning if any of the type arg
uments to a |
2476 * constructor of a generic type <i>G</i> invoked by a new expression or a con
stant object | 2594 * constructor of a generic type <i>G</i> invoked by a new expression or a con
stant object |
2477 * expression are not subtypes of the bounds of the corresponding formal type
parameters of | 2595 * expression are not subtypes of the bounds of the corresponding formal type
parameters of |
2478 * <i>G</i>. | 2596 * <i>G</i>. |
| 2597 * |
| 2598 * 10 Generics: It is a static type warning if a type parameter is a supertype
of its upper bound. |
| 2599 * |
| 2600 * 15.8 Parameterized Types: If <i>S</i> is the static type of a member <i>m</
i> of <i>G</i>, then |
| 2601 * the static type of the member <i>m</i> of <i>G<A<sub>1</sub>, … A
<sub>n</sub>></i> |
| 2602 * is <i>[A<sub>1</sub>, …, A<sub>n</sub>/T<sub>1</sub>, …, T<su
b>n</sub>]S</i> |
| 2603 * where <i>T<sub>1</sub>, … T<sub>n</sub></i> are the formal type para
meters of <i>G</i>. |
| 2604 * Let <i>B<sub>i</sub></i> be the bounds of <i>T<sub>i</sub>, 1 <= i <=
n</i>. It is a |
| 2605 * static type warning if <i>A<sub>i</sub></i> is not a subtype of <i>[A<sub>1
</sub>, …, |
| 2606 * A<sub>n</sub>/T<sub>1</sub>, …, T<sub>n</sub>]B<sub>i</sub>, 1 <=
i <= n</i>. |
| 2607 * |
2479 * @param boundedTypeName the name of the type used in the instance creation t
hat should be | 2608 * @param boundedTypeName the name of the type used in the instance creation t
hat should be |
2480 * limited by the bound as specified in the class declaration | 2609 * limited by the bound as specified in the class declaration |
2481 * @param boundingTypeName the name of the bounding type | 2610 * @param boundingTypeName the name of the bounding type |
2482 */ | 2611 */ |
2483 static final StaticTypeWarningCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = new Sta
ticTypeWarningCode('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 9, "'%s' does not extend
'%s'"); | 2612 static final StaticTypeWarningCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = new Sta
ticTypeWarningCode('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 9, "'%s' does not extend
'%s'"); |
2484 | 2613 |
2485 /** | 2614 /** |
2486 * 10 Generics: It is a static type warning if a type parameter is a supertype
of its upper bound. | |
2487 * | |
2488 * 15.8 Parameterized Types: If <i>S</i> is the static type of a member <i>m</
i> of <i>G</i>, then | |
2489 * the static type of the member <i>m</i> of <i>G<A<sub>1</sub>, … A
<sub>n</sub>></i> | |
2490 * is <i>\[A<sub>1</sub>, …, A<sub>n</sub>/T<sub>1</sub>, …, T<s
ub>n</sub>\]S</i> | |
2491 * where <i>T<sub>1</sub>, … T<sub>n</sub></i> are the formal type para
meters of <i>G</i>. | |
2492 * Let <i>B<sub>i</sub></i> be the bounds of <i>T<sub>i</sub>, 1 <= i <=
n</i>. It is a | |
2493 * static type warning if <i>A<sub>i</sub></i> is not a subtype of <i>\[A<sub>
1</sub>, …, | |
2494 * A<sub>n</sub>/T<sub>1</sub>, …, T<sub>n</sub>\]B<sub>i</sub>, 1 <
= i <= n</i>. | |
2495 */ | |
2496 static final StaticTypeWarningCode TYPE_ARGUMENT_VIOLATES_BOUNDS = new StaticT
ypeWarningCode('TYPE_ARGUMENT_VIOLATES_BOUNDS', 10, ""); | |
2497 | |
2498 /** | |
2499 * Specification reference needed. This is equivalent to [UNDEFINED_METHOD], b
ut for | 2615 * Specification reference needed. This is equivalent to [UNDEFINED_METHOD], b
ut for |
2500 * top-level functions. | 2616 * top-level functions. |
| 2617 * |
2501 * @param methodName the name of the method that is undefined | 2618 * @param methodName the name of the method that is undefined |
2502 */ | 2619 */ |
2503 static final StaticTypeWarningCode UNDEFINED_FUNCTION = new StaticTypeWarningC
ode('UNDEFINED_FUNCTION', 11, "The function '%s' is not defined"); | 2620 static final StaticTypeWarningCode UNDEFINED_FUNCTION = new StaticTypeWarningC
ode('UNDEFINED_FUNCTION', 10, "The function '%s' is not defined"); |
2504 | 2621 |
2505 /** | 2622 /** |
2506 * 12.17 Getter Invocation: Let <i>T</i> be the static type of <i>e</i>. It is
a static type | 2623 * 12.17 Getter Invocation: Let <i>T</i> be the static type of <i>e</i>. It is
a static type |
2507 * warning if <i>T</i> does not have a getter named <i>m</i>. | 2624 * warning if <i>T</i> does not have a getter named <i>m</i>. |
| 2625 * |
2508 * @param getterName the name of the getter | 2626 * @param getterName the name of the getter |
2509 * @param enclosingType the name of the enclosing type where the getter is bei
ng looked for | 2627 * @param enclosingType the name of the enclosing type where the getter is bei
ng looked for |
2510 */ | 2628 */ |
2511 static final StaticTypeWarningCode UNDEFINED_GETTER = new StaticTypeWarningCod
e('UNDEFINED_GETTER', 12, "There is no such getter '%s' in '%s'"); | 2629 static final StaticTypeWarningCode UNDEFINED_GETTER = new StaticTypeWarningCod
e('UNDEFINED_GETTER', 11, "There is no such getter '%s' in '%s'"); |
2512 | 2630 |
2513 /** | 2631 /** |
2514 * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>. I
t is a static type | 2632 * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>. I
t is a static type |
2515 * warning if <i>T</i> does not have an accessible instance member named <i>m<
/i>. | 2633 * warning if <i>T</i> does not have an accessible instance member named <i>m<
/i>. |
| 2634 * |
2516 * @param methodName the name of the method that is undefined | 2635 * @param methodName the name of the method that is undefined |
2517 * @param typeName the resolved type name that the method lookup is happening
on | 2636 * @param typeName the resolved type name that the method lookup is happening
on |
2518 */ | 2637 */ |
2519 static final StaticTypeWarningCode UNDEFINED_METHOD = new StaticTypeWarningCod
e('UNDEFINED_METHOD', 13, "The method '%s' is not defined for the class '%s'"); | 2638 static final StaticTypeWarningCode UNDEFINED_METHOD = new StaticTypeWarningCod
e('UNDEFINED_METHOD', 12, "The method '%s' is not defined for the class '%s'"); |
2520 | 2639 |
2521 /** | 2640 /** |
2522 * 12.18 Assignment: Evaluation of an assignment of the form | 2641 * 12.18 Assignment: Evaluation of an assignment of the form |
2523 * <i>e<sub>1</sub></i>\[<i>e<sub>2</sub></i>\] = <i>e<sub>3</sub></i> is equi
valent to the | 2642 * <i>e<sub>1</sub></i>[<i>e<sub>2</sub></i>] = <i>e<sub>3</sub></i> is equiva
lent to the |
2524 * evaluation of the expression (a, i, e){a.\[\]=(i, e); return e;} (<i>e<sub>
1</sub></i>, | 2643 * evaluation of the expression (a, i, e){a.[]=(i, e); return e;} (<i>e<sub>1<
/sub></i>, |
2525 * <i>e<sub>2</sub></i>, <i>e<sub>2</sub></i>). | 2644 * <i>e<sub>2</sub></i>, <i>e<sub>2</sub></i>). |
2526 * | 2645 * |
2527 * 12.29 Assignable Expressions: An assignable expression of the form | 2646 * 12.29 Assignable Expressions: An assignable expression of the form |
2528 * <i>e<sub>1</sub></i>\[<i>e<sub>2</sub></i>\] is evaluated as a method invoc
ation of the operator | 2647 * <i>e<sub>1</sub></i>[<i>e<sub>2</sub></i>] is evaluated as a method invocat
ion of the operator |
2529 * method \[\] on <i>e<sub>1</sub></i> with argument <i>e<sub>2</sub></i>. | 2648 * method [] on <i>e<sub>1</sub></i> with argument <i>e<sub>2</sub></i>. |
2530 * | 2649 * |
2531 * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>. I
t is a static type | 2650 * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>. I
t is a static type |
2532 * warning if <i>T</i> does not have an accessible instance member named <i>m<
/i>. | 2651 * warning if <i>T</i> does not have an accessible instance member named <i>m<
/i>. |
| 2652 * |
2533 * @param operator the name of the operator | 2653 * @param operator the name of the operator |
2534 * @param enclosingType the name of the enclosing type where the operator is b
eing looked for | 2654 * @param enclosingType the name of the enclosing type where the operator is b
eing looked for |
2535 */ | 2655 */ |
2536 static final StaticTypeWarningCode UNDEFINED_OPERATOR = new StaticTypeWarningC
ode('UNDEFINED_OPERATOR', 14, "There is no such operator '%s' in '%s'"); | 2656 static final StaticTypeWarningCode UNDEFINED_OPERATOR = new StaticTypeWarningC
ode('UNDEFINED_OPERATOR', 13, "There is no such operator '%s' in '%s'"); |
2537 | 2657 |
2538 /** | 2658 /** |
2539 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
It is a static type | 2659 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
It is a static type |
2540 * warning if <i>T</i> does not have an accessible instance setter named <i>v=
</i>. | 2660 * warning if <i>T</i> does not have an accessible instance setter named <i>v=
</i>. |
| 2661 * |
2541 * @param setterName the name of the setter | 2662 * @param setterName the name of the setter |
2542 * @param enclosingType the name of the enclosing type where the setter is bei
ng looked for | 2663 * @param enclosingType the name of the enclosing type where the setter is bei
ng looked for |
2543 * @see #INACCESSIBLE_SETTER | 2664 * @see #INACCESSIBLE_SETTER |
2544 */ | 2665 */ |
2545 static final StaticTypeWarningCode UNDEFINED_SETTER = new StaticTypeWarningCod
e('UNDEFINED_SETTER', 15, "There is no such setter '%s' in '%s'"); | 2666 static final StaticTypeWarningCode UNDEFINED_SETTER = new StaticTypeWarningCod
e('UNDEFINED_SETTER', 14, "There is no such setter '%s' in '%s'"); |
2546 | 2667 |
2547 /** | 2668 /** |
2548 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form | 2669 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form |
2549 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … | 2670 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … |
2550 * 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 | 2671 * 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 |
2551 * accessible instance member named <i>m</i>. | 2672 * accessible instance member named <i>m</i>. |
| 2673 * |
2552 * @param methodName the name of the method that is undefined | 2674 * @param methodName the name of the method that is undefined |
2553 * @param typeName the resolved type name that the method lookup is happening
on | 2675 * @param typeName the resolved type name that the method lookup is happening
on |
2554 */ | 2676 */ |
2555 static final StaticTypeWarningCode UNDEFINED_SUPER_METHOD = new StaticTypeWarn
ingCode('UNDEFINED_SUPER_METHOD', 16, "There is no such method '%s' in '%s'"); | 2677 static final StaticTypeWarningCode UNDEFINED_SUPER_METHOD = new StaticTypeWarn
ingCode('UNDEFINED_SUPER_METHOD', 15, "There is no such method '%s' in '%s'"); |
2556 | 2678 |
2557 /** | 2679 /** |
2558 * 15.8 Parameterized Types: It is a static type warning if <i>G</i> is not an
accessible generic | 2680 * 15.8 Parameterized Types: It is a static type warning if <i>G</i> is not a
generic type with |
2559 * type declaration with <i>n</i> type parameters. | 2681 * exactly <i>n</i> type parameters. |
| 2682 * |
2560 * @param typeName the name of the type being referenced (<i>G</i>) | 2683 * @param typeName the name of the type being referenced (<i>G</i>) |
2561 * @param parameterCount the number of type parameters that were declared | 2684 * @param parameterCount the number of type parameters that were declared |
2562 * @param argumentCount the number of type arguments provided | 2685 * @param argumentCount the number of type arguments provided |
| 2686 * @see CompileTimeErrorCode#CONST_WITH_INVALID_TYPE_PARAMETERS |
| 2687 * @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS |
2563 */ | 2688 */ |
2564 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"); | 2689 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"); |
2565 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]; | 2690 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,
UNDEFINED_FUNCTION, UNDEFINED_GETTER, UNDEFINED_METHOD, UNDEFINED_OPERATOR, UND
EFINED_SETTER, UNDEFINED_SUPER_METHOD, WRONG_NUMBER_OF_TYPE_ARGUMENTS]; |
2566 | 2691 |
2567 /// The name of this enum constant, as declared in the enum declaration. | 2692 /// The name of this enum constant, as declared in the enum declaration. |
2568 final String name; | 2693 final String name; |
2569 | 2694 |
2570 /// The position in the enum declaration. | 2695 /// The position in the enum declaration. |
2571 final int ordinal; | 2696 final int ordinal; |
2572 | 2697 |
2573 /** | 2698 /** |
2574 * The message template used to create the message to be displayed for this er
ror. | 2699 * The message template used to create the message to be displayed for this er
ror. |
2575 */ | 2700 */ |
2576 String _message; | 2701 String _message; |
2577 | 2702 |
2578 /** | 2703 /** |
2579 * Initialize a newly created error code to have the given type and message. | 2704 * Initialize a newly created error code to have the given type and message. |
| 2705 * |
2580 * @param message the message template used to create the message to be displa
yed for the error | 2706 * @param message the message template used to create the message to be displa
yed for the error |
2581 */ | 2707 */ |
2582 StaticTypeWarningCode(this.name, this.ordinal, String message) { | 2708 StaticTypeWarningCode(this.name, this.ordinal, String message) { |
2583 this._message = message; | 2709 this._message = message; |
2584 } | 2710 } |
2585 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; | 2711 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; |
2586 String get message => _message; | 2712 String get message => _message; |
2587 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; | 2713 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; |
2588 int compareTo(StaticTypeWarningCode other) => ordinal - other.ordinal; | 2714 int compareTo(StaticTypeWarningCode other) => ordinal - other.ordinal; |
2589 int get hashCode => ordinal; | 2715 int get hashCode => ordinal; |
2590 String toString() => name; | 2716 String toString() => name; |
2591 } | 2717 } |
OLD | NEW |