Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: pkg/analyzer_experimental/lib/src/generated/error.dart

Issue 14308011: New Analysis Engine snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // This code was auto-generated, is not intended to be edited, and is subject to 1 // This code was auto-generated, is not intended to be edited, and is subject to
2 // significant change. Please see the README file for more information. 2 // significant change. Please see the README file for more information.
3 3
4 library engine.error; 4 library engine.error;
5 5
6 import 'java_core.dart'; 6 import 'java_core.dart';
7 import 'source.dart'; 7 import 'source.dart';
8 import 'ast.dart' show ASTNode; 8 import 'ast.dart' show ASTNode;
9 import 'scanner.dart' show Token; 9 import 'scanner.dart' show Token;
10 10
11 /** 11 /**
12 * Instances of the enumeration {@code ErrorSeverity} represent the severity of an {@link ErrorCode}. 12 * Instances of the enumeration {@code ErrorSeverity} represent the severity of an {@link ErrorCode}.
13 * @coverage dart.engine.error 13 * @coverage dart.engine.error
14 */ 14 */
15 class ErrorSeverity { 15 class ErrorSeverity implements Comparable<ErrorSeverity> {
16 /** 16 /**
17 * 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
18 * clients. 18 * clients.
19 */ 19 */
20 static final ErrorSeverity NONE = new ErrorSeverity('NONE', 0, " ", "none"); 20 static final ErrorSeverity NONE = new ErrorSeverity('NONE', 0, " ", "none");
21 /** 21 /**
22 * The severity representing a warning. Warnings can become errors if the {@co de -Werror} command 22 * The severity representing a warning. Warnings can become errors if the {@co de -Werror} command
23 * line flag is specified. 23 * line flag is specified.
24 */ 24 */
25 static final ErrorSeverity WARNING = new ErrorSeverity('WARNING', 1, "W", "war ning"); 25 static final ErrorSeverity WARNING = new ErrorSeverity('WARNING', 1, "W", "war ning");
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 * Return the name of the severity used when producing machine output. 57 * Return the name of the severity used when producing machine output.
58 * @return the name of the severity used when producing machine output 58 * @return the name of the severity used when producing machine output
59 */ 59 */
60 String get machineCode => _machineCode; 60 String get machineCode => _machineCode;
61 /** 61 /**
62 * Return the severity constant that represents the greatest severity. 62 * Return the severity constant that represents the greatest severity.
63 * @param severity the severity being compared against 63 * @param severity the severity being compared against
64 * @return the most sever of this or the given severity 64 * @return the most sever of this or the given severity
65 */ 65 */
66 ErrorSeverity max(ErrorSeverity severity) => this.ordinal >= severity.ordinal ? this : severity; 66 ErrorSeverity max(ErrorSeverity severity) => this.ordinal >= severity.ordinal ? this : severity;
67 int compareTo(ErrorSeverity other) => __ordinal - other.__ordinal;
67 String toString() => __name; 68 String toString() => __name;
68 } 69 }
69 /** 70 /**
70 * Instances of the class {@code ErrorReporter} wrap an error listener with util ity methods used to 71 * Instances of the class {@code ErrorReporter} wrap an error listener with util ity methods used to
71 * create the errors being reported. 72 * create the errors being reported.
72 * @coverage dart.engine.error 73 * @coverage dart.engine.error
73 */ 74 */
74 class ErrorReporter { 75 class ErrorReporter {
75 /** 76 /**
76 * The error listener to which errors will be reported. 77 * The error listener to which errors will be reported.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 * some Dart code. 132 * some Dart code.
132 * @see AnalysisErrorListener 133 * @see AnalysisErrorListener
133 * @coverage dart.engine.error 134 * @coverage dart.engine.error
134 */ 135 */
135 class AnalysisError { 136 class AnalysisError {
136 /** 137 /**
137 * An empty array of errors used when no errors are expected. 138 * An empty array of errors used when no errors are expected.
138 */ 139 */
139 static List<AnalysisError> NO_ERRORS = new List<AnalysisError>(0); 140 static List<AnalysisError> NO_ERRORS = new List<AnalysisError>(0);
140 /** 141 /**
142 * A {@link Comparator} that sorts by the name of the file that the {@link Ana lysisError} was
143 * found.
144 */
145 static Comparator<AnalysisError> FILE_COMPARATOR = (AnalysisError o1, Analysis Error o2) => o1.source.shortName.compareTo(o2.source.shortName);
146 /**
147 * A {@link Comparator} that sorts error codes first by their severity (errors first, warnings
148 * second), and then by the the error code type.
149 */
150 static Comparator<AnalysisError> ERROR_CODE_COMPARATOR = (AnalysisError o1, An alysisError o2) {
151 ErrorCode errorCode1 = o1.errorCode;
152 ErrorCode errorCode2 = o2.errorCode;
153 ErrorSeverity errorSeverity1 = errorCode1.errorSeverity;
154 ErrorSeverity errorSeverity2 = errorCode2.errorSeverity;
155 ErrorType errorType1 = errorCode1.type;
156 ErrorType errorType2 = errorCode2.type;
157 if (errorSeverity1 == errorSeverity2) {
158 return errorType1.compareTo(errorType2);
159 } else {
160 return errorSeverity2.compareTo(errorSeverity1);
161 }
162 };
163 /**
141 * The error code associated with the error. 164 * The error code associated with the error.
142 */ 165 */
143 ErrorCode _errorCode; 166 ErrorCode _errorCode;
144 /** 167 /**
145 * The localized error message. 168 * The localized error message.
146 */ 169 */
147 String _message; 170 String _message;
148 /** 171 /**
149 * The source in which the error occurred, or {@code null} if unknown. 172 * The source in which the error occurred, or {@code null} if unknown.
150 */ 173 */
151 Source _source; 174 Source _source;
152 /** 175 /**
153 * The character offset from the beginning of the source (zero based) where th e error occurred. 176 * The character offset from the beginning of the source (zero based) where th e error occurred.
154 */ 177 */
155 int _offset = 0; 178 int _offset = 0;
156 /** 179 /**
157 * The number of characters from the offset to the end of the source which enc ompasses the 180 * The number of characters from the offset to the end of the source which enc ompasses the
158 * compilation error. 181 * compilation error.
159 */ 182 */
160 int _length = 0; 183 int _length = 0;
161 /** 184 /**
162 * Initialize a newly created analysis error for the specified source. The err or has no location 185 * Initialize a newly created analysis error for the specified source. The err or has no location
163 * information. 186 * information.
164 * @param source the source for which the exception occurred 187 * @param source the source for which the exception occurred
165 * @param errorCode the error code to be associated with this error 188 * @param errorCode the error code to be associated with this error
166 * @param arguments the arguments used to build the error message 189 * @param arguments the arguments used to build the error message
167 */ 190 */
168 AnalysisError.con1(Source source2, ErrorCode errorCode2, List<Object> argument s) { 191 AnalysisError.con1(Source source2, ErrorCode errorCode3, List<Object> argument s) {
169 _jtd_constructor_130_impl(source2, errorCode2, arguments); 192 _jtd_constructor_131_impl(source2, errorCode3, arguments);
170 } 193 }
171 _jtd_constructor_130_impl(Source source2, ErrorCode errorCode2, List<Object> a rguments) { 194 _jtd_constructor_131_impl(Source source2, ErrorCode errorCode3, List<Object> a rguments) {
172 this._source = source2; 195 this._source = source2;
173 this._errorCode = errorCode2; 196 this._errorCode = errorCode3;
174 this._message = JavaString.format(errorCode2.message, arguments); 197 this._message = JavaString.format(errorCode3.message, arguments);
175 } 198 }
176 /** 199 /**
177 * Initialize a newly created analysis error for the specified source at the g iven location. 200 * Initialize a newly created analysis error for the specified source at the g iven location.
178 * @param source the source for which the exception occurred 201 * @param source the source for which the exception occurred
179 * @param offset the offset of the location of the error 202 * @param offset the offset of the location of the error
180 * @param length the length of the location of the error 203 * @param length the length of the location of the error
181 * @param errorCode the error code to be associated with this error 204 * @param errorCode the error code to be associated with this error
182 * @param arguments the arguments used to build the error message 205 * @param arguments the arguments used to build the error message
183 */ 206 */
184 AnalysisError.con2(Source source3, int offset2, int length11, ErrorCode errorC ode3, List<Object> arguments) { 207 AnalysisError.con2(Source source3, int offset2, int length11, ErrorCode errorC ode4, List<Object> arguments) {
185 _jtd_constructor_131_impl(source3, offset2, length11, errorCode3, arguments) ; 208 _jtd_constructor_132_impl(source3, offset2, length11, errorCode4, arguments) ;
186 } 209 }
187 _jtd_constructor_131_impl(Source source3, int offset2, int length11, ErrorCode errorCode3, List<Object> arguments) { 210 _jtd_constructor_132_impl(Source source3, int offset2, int length11, ErrorCode errorCode4, List<Object> arguments) {
188 this._source = source3; 211 this._source = source3;
189 this._offset = offset2; 212 this._offset = offset2;
190 this._length = length11; 213 this._length = length11;
191 this._errorCode = errorCode3; 214 this._errorCode = errorCode4;
192 this._message = JavaString.format(errorCode3.message, arguments); 215 this._message = JavaString.format(errorCode4.message, arguments);
193 } 216 }
194 /** 217 /**
195 * Return the error code associated with the error. 218 * Return the error code associated with the error.
196 * @return the error code associated with the error 219 * @return the error code associated with the error
197 */ 220 */
198 ErrorCode get errorCode => _errorCode; 221 ErrorCode get errorCode => _errorCode;
199 /** 222 /**
200 * Return the number of characters from the offset to the end of the source wh ich encompasses the 223 * Return the number of characters from the offset to the end of the source wh ich encompasses the
201 * compilation error. 224 * compilation error.
202 * @return the length of the error location 225 * @return the length of the error location
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 * incremental compilation. 292 * incremental compilation.
270 * @return {@code true} if this error should cause recompilation of the source during the next 293 * @return {@code true} if this error should cause recompilation of the source during the next
271 * incremental compilation 294 * incremental compilation
272 */ 295 */
273 bool needsRecompilation(); 296 bool needsRecompilation();
274 } 297 }
275 /** 298 /**
276 * Instances of the enumeration {@code ErrorType} represent the type of an {@lin k ErrorCode}. 299 * Instances of the enumeration {@code ErrorType} represent the type of an {@lin k ErrorCode}.
277 * @coverage dart.engine.error 300 * @coverage dart.engine.error
278 */ 301 */
279 class ErrorType { 302 class ErrorType implements Comparable<ErrorType> {
280 /** 303 /**
281 * Compile-time errors are errors that preclude execution. A compile time erro r must be reported 304 * Compile-time errors are errors that preclude execution. A compile time erro r must be reported
282 * by a Dart compiler before the erroneous code is executed. 305 * by a Dart compiler before the erroneous code is executed.
283 */ 306 */
284 static final ErrorType COMPILE_TIME_ERROR = new ErrorType('COMPILE_TIME_ERROR' , 0, ErrorSeverity.ERROR); 307 static final ErrorType COMPILE_TIME_ERROR = new ErrorType('COMPILE_TIME_ERROR' , 0, ErrorSeverity.ERROR);
285 /** 308 /**
286 * Static warnings are those warnings reported by the static checker. They hav e no effect on 309 * Static warnings are those warnings reported by the static checker. They hav e no effect on
287 * execution. Static warnings must be provided by Dart compilers used during d evelopment. 310 * execution. Static warnings must be provided by Dart compilers used during d evelopment.
288 */ 311 */
289 static final ErrorType STATIC_WARNING = new ErrorType('STATIC_WARNING', 1, Err orSeverity.WARNING); 312 static final ErrorType STATIC_WARNING = new ErrorType('STATIC_WARNING', 1, Err orSeverity.WARNING);
(...skipping 19 matching lines...) Expand all
309 * @param severity the severity of this type of error 332 * @param severity the severity of this type of error
310 */ 333 */
311 ErrorType(this.__name, this.__ordinal, ErrorSeverity severity) { 334 ErrorType(this.__name, this.__ordinal, ErrorSeverity severity) {
312 this._severity = severity; 335 this._severity = severity;
313 } 336 }
314 /** 337 /**
315 * Return the severity of this type of error. 338 * Return the severity of this type of error.
316 * @return the severity of this type of error 339 * @return the severity of this type of error
317 */ 340 */
318 ErrorSeverity get severity => _severity; 341 ErrorSeverity get severity => _severity;
342 int compareTo(ErrorType other) => __ordinal - other.__ordinal;
319 String toString() => __name; 343 String toString() => __name;
320 } 344 }
321 /** 345 /**
322 * The enumeration {@code CompileTimeErrorCode} defines the error codes used for compile time 346 * The enumeration {@code CompileTimeErrorCode} defines the error codes used for compile time
323 * errors. The convention for this class is for the name of the error code to in dicate the problem 347 * errors. The convention for this class is for the name of the error code to in dicate the problem
324 * that caused the error to be generated and for the error message to explain wh at is wrong and, 348 * that caused the error to be generated and for the error message to explain wh at is wrong and,
325 * when appropriate, how the problem can be corrected. 349 * when appropriate, how the problem can be corrected.
326 * @coverage dart.engine.error 350 * @coverage dart.engine.error
327 */ 351 */
328 class CompileTimeErrorCode implements ErrorCode { 352 class CompileTimeErrorCode implements Comparable<CompileTimeErrorCode>, ErrorCod e {
329 /** 353 /**
330 * 14.2 Exports: It is a compile-time error if a name <i>N</i> is re-exported by a library 354 * 14.2 Exports: It is a compile-time error if a name <i>N</i> is re-exported by a library
331 * <i>L</i> and <i>N</i> is introduced into the export namespace of <i>L</i> b y more than one 355 * <i>L</i> and <i>N</i> is introduced into the export namespace of <i>L</i> b y more than one
332 * export. 356 * export.
333 */ 357 */
334 static final CompileTimeErrorCode AMBIGUOUS_EXPORT = new CompileTimeErrorCode( 'AMBIGUOUS_EXPORT', 0, ""); 358 static final CompileTimeErrorCode AMBIGUOUS_EXPORT = new CompileTimeErrorCode( 'AMBIGUOUS_EXPORT', 0, "");
335 /** 359 /**
336 * 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i >N</i> is introduced 360 * 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i >N</i> is introduced
337 * into the top level scope <i>L</i> by more than one import then: 361 * into the top level scope <i>L</i> by more than one import then:
338 * <ol> 362 * <ol>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 * 13.9 Switch: It is a compile-time error if the class <i>C</i> implements th e operator 397 * 13.9 Switch: It is a compile-time error if the class <i>C</i> implements th e operator
374 * <i>==</i>. 398 * <i>==</i>.
375 */ 399 */
376 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"); 400 static final CompileTimeErrorCode CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS = new CompileTimeErrorCode('CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS', 7, "The switch c ase expression type '%s' cannot override the == operator");
377 /** 401 /**
378 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time constant would raise 402 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time constant would raise
379 * an exception. 403 * an exception.
380 */ 404 */
381 static final CompileTimeErrorCode COMPILE_TIME_CONSTANT_RAISES_EXCEPTION = new CompileTimeErrorCode('COMPILE_TIME_CONSTANT_RAISES_EXCEPTION', 8, ""); 405 static final CompileTimeErrorCode COMPILE_TIME_CONSTANT_RAISES_EXCEPTION = new CompileTimeErrorCode('COMPILE_TIME_CONSTANT_RAISES_EXCEPTION', 8, "");
382 /** 406 /**
383 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time constant would raise
384 * an exception.
385 */
386 static final CompileTimeErrorCode COMPILE_TIME_CONSTANT_RAISES_EXCEPTION_DIVID E_BY_ZERO = new CompileTimeErrorCode('COMPILE_TIME_CONSTANT_RAISES_EXCEPTION_DIV IDE_BY_ZERO', 9, "Cannot divide by zero");
387 /**
388 * 7.6 Constructors: A constructor name always begins with the name of its imm ediately enclosing 407 * 7.6 Constructors: A constructor name always begins with the name of its imm ediately enclosing
389 * class, and may optionally be followed by a dot and an identifier <i>id</i>. It is a 408 * class, and may optionally be followed by a dot and an identifier <i>id</i>. It is a
390 * compile-time error if <i>id</i> is the name of a member declared in the imm ediately enclosing 409 * compile-time error if <i>id</i> is the name of a member declared in the imm ediately enclosing
391 * class. 410 * class.
392 */ 411 */
393 static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD = new CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD', 10, "'%s' cannot be used to name a constructor and a method in this class"); 412 static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD = new CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD', 9, "'%s' cannot be used to name a constructor and a method in this class");
394 /** 413 /**
395 * 7.6 Constructors: A constructor name always begins with the name of its imm ediately enclosing 414 * 7.6 Constructors: A constructor name always begins with the name of its imm ediately enclosing
396 * class, and may optionally be followed by a dot and an identifier <i>id</i>. It is a 415 * class, and may optionally be followed by a dot and an identifier <i>id</i>. It is a
397 * compile-time error if <i>id</i> is the name of a member declared in the imm ediately enclosing 416 * compile-time error if <i>id</i> is the name of a member declared in the imm ediately enclosing
398 * class. 417 * class.
399 */ 418 */
400 static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD = ne w CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD', 11, "'%s' cann ot be used to name a constructor and a field in this class"); 419 static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD = ne w CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD', 10, "'%s' cann ot be used to name a constructor and a field in this class");
401 /** 420 /**
402 * 7.6.3 Constant Constructors: It is a compile-time error if a constant const ructor is declared 421 * 7.6.3 Constant Constructors: It is a compile-time error if a constant const ructor is declared
403 * by a class that has a non-final instance variable. 422 * by a class that has a non-final instance variable.
404 */ 423 */
405 static final CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD = new CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD', 12, "Classes wit h non-final fields cannot define 'const' constructors"); 424 static final CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD = new CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD', 11, "Classes wit h non-final fields cannot define 'const' constructors");
406 /** 425 /**
407 * 6.2 Formal Parameters: It is a compile-time error if a formal parameter is declared as a 426 * 6.2 Formal Parameters: It is a compile-time error if a formal parameter is declared as a
408 * constant variable. 427 * constant variable.
409 */ 428 */
410 static final CompileTimeErrorCode CONST_FORMAL_PARAMETER = new CompileTimeErro rCode('CONST_FORMAL_PARAMETER', 13, "Parameters cannot be 'const'"); 429 static final CompileTimeErrorCode CONST_FORMAL_PARAMETER = new CompileTimeErro rCode('CONST_FORMAL_PARAMETER', 12, "Parameters cannot be 'const'");
411 /** 430 /**
412 * 5 Variables: A constant variable must be initialized to a compile-time cons tant or a 431 * 5 Variables: A constant variable must be initialized to a compile-time cons tant or a
413 * compile-time error occurs. 432 * compile-time error occurs.
414 */ 433 */
415 static final CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE = new CompileTimeErrorCode('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', 14, "'cons t' variables must be constant value"); 434 static final CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE = new CompileTimeErrorCode('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', 13, "'cons t' variables must be constant value");
416 /** 435 /**
417 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an 436 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an
418 * uncaught exception being thrown. 437 * uncaught exception being thrown.
419 */ 438 */
420 static final CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = new CompileTim eErrorCode('CONST_EVAL_THROWS_EXCEPTION', 15, "'const' constructors cannot throw exceptions"); 439 static final CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = new CompileTim eErrorCode('CONST_EVAL_THROWS_EXCEPTION', 14, "'const' constructors cannot throw exceptions");
421 /** 440 /**
422 * 12.11.2 Const: If <i>T</i> is a parameterized type <i>S&lt;U<sub>1</sub>, & hellip;, 441 * 12.11.2 Const: If <i>T</i> is a parameterized type <i>S&lt;U<sub>1</sub>, & hellip;,
423 * U<sub>m</sub>&gt;</i>, let <i>R = S</i>; It is a compile time error if <i>S </i> is not a 442 * U<sub>m</sub>&gt;</i>, let <i>R = S</i>; It is a compile time error if <i>S </i> is not a
424 * generic type with <i>m</i> type parameters. 443 * generic type with <i>m</i> type parameters.
425 * @param typeName the name of the type being referenced (<i>S</i>) 444 * @param typeName the name of the type being referenced (<i>S</i>)
445 * @param parameterCount the number of type parameters that were declared
426 * @param argumentCount the number of type arguments provided 446 * @param argumentCount the number of type arguments provided
427 * @param parameterCount the number of type parameters that were declared
428 */ 447 */
429 static final CompileTimeErrorCode CONST_WITH_INVALID_TYPE_PARAMETERS = new Com pileTimeErrorCode('CONST_WITH_INVALID_TYPE_PARAMETERS', 16, "The type '%s' is de clared with %d type parameters, but %d type arguments were given"); 448 static final CompileTimeErrorCode CONST_WITH_INVALID_TYPE_PARAMETERS = new Com pileTimeErrorCode('CONST_WITH_INVALID_TYPE_PARAMETERS', 15, "The type '%s' is de clared with %d type parameters, but %d type arguments were given");
430 /** 449 /**
431 * 12.11.2 Const: If <i>e</i> is of the form <i>const T(a<sub>1</sub>, &hellip ;, a<sub>n</sub>, 450 * 12.11.2 Const: If <i>e</i> is of the form <i>const T(a<sub>1</sub>, &hellip ;, a<sub>n</sub>,
432 * x<sub>n+1</sub>: a<sub>n+1</sub>, &hellip;, x<sub>n+k</sub>: a<sub>n+k</sub >)</i> it is a 451 * x<sub>n+1</sub>: a<sub>n+1</sub>, &hellip;, x<sub>n+k</sub>: a<sub>n+k</sub >)</i> it is a
433 * compile-time error if the type <i>T</i> does not declare a constant constru ctor with the same 452 * compile-time error if the type <i>T</i> does not declare a constant constru ctor with the same
434 * name as the declaration of <i>T</i>. 453 * name as the declaration of <i>T</i>.
435 */ 454 */
436 static final CompileTimeErrorCode CONST_WITH_NON_CONST = new CompileTimeErrorC ode('CONST_WITH_NON_CONST', 17, "The constructor being called is not a 'const' c onstructor"); 455 static final CompileTimeErrorCode CONST_WITH_NON_CONST = new CompileTimeErrorC ode('CONST_WITH_NON_CONST', 16, "The constructor being called is not a 'const' c onstructor");
437 /** 456 /**
438 * 12.11.2 Const: In all of the above cases, it is a compile-time error if <i> a<sub>i</sub>, 1 457 * 12.11.2 Const: In all of the above cases, it is a compile-time error if <i> a<sub>i</sub>, 1
439 * &lt;= i &lt;= n + k</i>, is not a compile-time constant expression. 458 * &lt;= i &lt;= n + k</i>, is not a compile-time constant expression.
440 */ 459 */
441 static final CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = new Compi leTimeErrorCode('CONST_WITH_NON_CONSTANT_ARGUMENT', 18, ""); 460 static final CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = new Compi leTimeErrorCode('CONST_WITH_NON_CONSTANT_ARGUMENT', 17, "");
442 /** 461 /**
443 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access ible in the current 462 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access ible in the current
444 * scope, optionally followed by type arguments. 463 * scope, optionally followed by type arguments.
445 * <p> 464 * <p>
446 * 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>, 465 * 12.11.2 Const: If <i>e</i> is of the form <i>const T.id(a<sub>1</sub>, &hel lip;, a<sub>n</sub>,
447 * x<sub>n+1</sub>: a<sub>n+1</sub>, &hellip; x<sub>n+k</sub>: a<sub>n+k</sub> )</i> it is a 466 * x<sub>n+1</sub>: a<sub>n+1</sub>, &hellip; x<sub>n+k</sub>: a<sub>n+k</sub> )</i> it is a
448 * compile-time error if <i>T</i> is not a class accessible in the current sco pe, optionally 467 * compile-time error if <i>T</i> is not a class accessible in the current sco pe, optionally
449 * followed by type arguments. 468 * followed by type arguments.
450 */ 469 */
451 static final CompileTimeErrorCode CONST_WITH_NON_TYPE = new CompileTimeErrorCo de('CONST_WITH_NON_TYPE', 19, ""); 470 static final CompileTimeErrorCode CONST_WITH_NON_TYPE = new CompileTimeErrorCo de('CONST_WITH_NON_TYPE', 18, "");
452 /** 471 /**
453 * 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type par ameters. 472 * 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type par ameters.
454 */ 473 */
455 static final CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = new CompileTime ErrorCode('CONST_WITH_TYPE_PARAMETERS', 20, ""); 474 static final CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = new CompileTime ErrorCode('CONST_WITH_TYPE_PARAMETERS', 19, "");
456 /** 475 /**
457 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of a constant 476 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of a constant
458 * constructor declared by the type <i>T</i>. 477 * constructor declared by the type <i>T</i>.
459 */ 478 */
460 static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR = new Compi leTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR', 21, ""); 479 static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR = new Compi leTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR', 20, "");
461 /** 480 /**
462 * 15.3.1 Typedef: It is a compile-time error if any default values are specif ied in the signature 481 * 15.3.1 Typedef: It is a compile-time error if any default values are specif ied in the signature
463 * of a function type alias. 482 * of a function type alias.
464 */ 483 */
465 static final CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS = new C ompileTimeErrorCode('DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS', 22, "Default values aren't allowed in typedefs"); 484 static final CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS = new C ompileTimeErrorCode('DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS', 21, "Default values aren't allowed in typedefs");
466 /** 485 /**
467 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi th the same name 486 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi th the same name
468 * declared in the same scope. 487 * declared in the same scope.
469 * @param duplicateName the name of the duplicate entity 488 * @param duplicateName the name of the duplicate entity
470 */ 489 */
471 static final CompileTimeErrorCode DUPLICATE_DEFINITION = new CompileTimeErrorC ode('DUPLICATE_DEFINITION', 23, "The name '%s' is already defined"); 490 static final CompileTimeErrorCode DUPLICATE_DEFINITION = new CompileTimeErrorC ode('DUPLICATE_DEFINITION', 22, "The name '%s' is already defined");
472 /** 491 /**
473 * 7 Classes: It is a compile-time error if a class declares two members of th e same name. 492 * 7 Classes: It is a compile-time error if a class declares two members of th e same name.
474 */ 493 */
475 static final CompileTimeErrorCode DUPLICATE_MEMBER_NAME = new CompileTimeError Code('DUPLICATE_MEMBER_NAME', 24, ""); 494 static final CompileTimeErrorCode DUPLICATE_MEMBER_NAME = new CompileTimeError Code('DUPLICATE_MEMBER_NAME', 23, "");
476 /** 495 /**
477 * 7 Classes: It is a compile-time error if a class has an instance member and a static member 496 * 7 Classes: It is a compile-time error if a class has an instance member and a static member
478 * with the same name. 497 * with the same name.
479 */ 498 */
480 static final CompileTimeErrorCode DUPLICATE_MEMBER_NAME_INSTANCE_STATIC = new CompileTimeErrorCode('DUPLICATE_MEMBER_NAME_INSTANCE_STATIC', 25, ""); 499 static final CompileTimeErrorCode DUPLICATE_MEMBER_NAME_INSTANCE_STATIC = new CompileTimeErrorCode('DUPLICATE_MEMBER_NAME_INSTANCE_STATIC', 24, "");
481 /** 500 /**
482 * 12.14.2 Binding Actuals to Formals: It is a compile-time error if <i>q<sub> i</sub> = 501 * 12.14.2 Binding Actuals to Formals: It is a compile-time error if <i>q<sub> i</sub> =
483 * q<sub>j</sub></i> for any <i>i != j</i> [where <i>q<sub>i</sub></i> is the label for a named 502 * q<sub>j</sub></i> for any <i>i != j</i> [where <i>q<sub>i</sub></i> is the label for a named
484 * argument]. 503 * argument].
485 */ 504 */
486 static final CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = new CompileTimeEr rorCode('DUPLICATE_NAMED_ARGUMENT', 26, ""); 505 static final CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = new CompileTimeEr rorCode('DUPLICATE_NAMED_ARGUMENT', 25, "");
487 /** 506 /**
488 * 14.2 Exports: It is a compile-time error if the compilation unit found at t he specified URI is 507 * 14.2 Exports: It is a compile-time error if the compilation unit found at t he specified URI is
489 * not a library declaration. 508 * not a library declaration.
509 * @param uri the uri pointing to a non-library declaration
490 */ 510 */
491 static final CompileTimeErrorCode EXPORT_OF_NON_LIBRARY = new CompileTimeError Code('EXPORT_OF_NON_LIBRARY', 27, ""); 511 static final CompileTimeErrorCode EXPORT_OF_NON_LIBRARY = new CompileTimeError Code('EXPORT_OF_NON_LIBRARY', 26, "The exported library '%s' must not have a par t-of directive");
492 /** 512 /**
493 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla ss <i>C</i> includes 513 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla ss <i>C</i> includes
494 * a type expression that does not denote a class available in the lexical sco pe of <i>C</i>. 514 * a type expression that does not denote a class available in the lexical sco pe of <i>C</i>.
495 * @param typeName the name of the superclass that was not found 515 * @param typeName the name of the superclass that was not found
496 */ 516 */
497 static final CompileTimeErrorCode EXTENDS_NON_CLASS = new CompileTimeErrorCode ('EXTENDS_NON_CLASS', 28, "Classes can only extend other classes"); 517 static final CompileTimeErrorCode EXTENDS_NON_CLASS = new CompileTimeErrorCode ('EXTENDS_NON_CLASS', 27, "Classes can only extend other classes");
498 /** 518 /**
499 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i mplement Null. 519 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i mplement Null.
500 * <p> 520 * <p>
501 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement int. 521 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement int.
502 * <p> 522 * <p>
503 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement double. 523 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement double.
504 * <p> 524 * <p>
505 * 12.3 Numbers: It is a compile-time error for any type other than the types int and double to 525 * 12.3 Numbers: It is a compile-time error for any type other than the types int and double to
506 * attempt to extend or implement num. 526 * attempt to extend or implement num.
507 * <p> 527 * <p>
508 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend or implement bool. 528 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend or implement bool.
509 * <p> 529 * <p>
510 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o r implement String. 530 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o r implement String.
511 * @param typeName the name of the type that cannot be extended 531 * @param typeName the name of the type that cannot be extended
512 * @see #IMPLEMENTS_DISALLOWED_CLASS 532 * @see #IMPLEMENTS_DISALLOWED_CLASS
513 */ 533 */
514 static final CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = new CompileTimeEr rorCode('EXTENDS_DISALLOWED_CLASS', 29, "Classes cannot extend '%s'"); 534 static final CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = new CompileTimeEr rorCode('EXTENDS_DISALLOWED_CLASS', 28, "Classes cannot extend '%s'");
515 /** 535 /**
516 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i mplement Null. 536 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i mplement Null.
517 * <p> 537 * <p>
518 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement int. 538 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement int.
519 * <p> 539 * <p>
520 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement double. 540 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement double.
521 * <p> 541 * <p>
522 * 12.3 Numbers: It is a compile-time error for any type other than the types int and double to 542 * 12.3 Numbers: It is a compile-time error for any type other than the types int and double to
523 * attempt to extend or implement num. 543 * attempt to extend or implement num.
524 * <p> 544 * <p>
525 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend or implement bool. 545 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend or implement bool.
526 * <p> 546 * <p>
527 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o r implement String. 547 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o r implement String.
528 * @param typeName the name of the type that cannot be implemented 548 * @param typeName the name of the type that cannot be implemented
529 * @see #EXTENDS_DISALLOWED_CLASS 549 * @see #EXTENDS_DISALLOWED_CLASS
530 */ 550 */
531 static final CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = new CompileTim eErrorCode('IMPLEMENTS_DISALLOWED_CLASS', 30, "Classes cannot implement '%s'"); 551 static final CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = new CompileTim eErrorCode('IMPLEMENTS_DISALLOWED_CLASS', 29, "Classes cannot implement '%s'");
532 /** 552 /**
533 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile time 553 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile time
534 * error if more than one initializer corresponding to a given instance variab le appears in 554 * error if more than one initializer corresponding to a given instance variab le appears in
535 * <i>k</i>’s list. 555 * <i>k</i>’s list.
536 */ 556 */
537 static final CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS = new CompileTimeErrorCode('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 31, ""); 557 static final CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS = new CompileTimeErrorCode('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 30, "The field '%s' cannot be initialized twice in the same constructor");
538 /** 558 /**
539 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile time 559 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile time
540 * error if <i>k</i>’s initializer list contains an initializer for a final variable <i>f</i> 560 * error if <i>k</i>’s initializer list contains an initializer for a final variable <i>f</i>
541 * whose declaration includes an initialization expression. 561 * whose declaration includes an initialization expression.
542 */ 562 */
543 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARA TION = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATIO N', 32, "Values cannot be set in the constructor if they are final, and have alr eady been set"); 563 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARA TION = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATIO N', 31, "Values cannot be set in the constructor if they are final, and have alr eady been set");
544 /** 564 /**
545 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile time 565 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile time
546 * error if <i>k</i>’s initializer list contains an initializer for a variab le that is initialized 566 * error if <i>k</i>’s initializer list contains an initializer for a variab le that is initialized
547 * by means of an initializing formal of <i>k</i>. 567 * by means of an initializing formal of <i>k</i>.
548 */ 568 */
549 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ ER = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER', 33, "Fields cannot be initialized in both the parameter list and the initializer s"); 569 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ ER = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER', 32, "Fields cannot be initialized in both the parameter list and the initializer s");
550 /** 570 /**
551 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin g formal is used by 571 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin g formal is used by
552 * a function other than a non-redirecting generative constructor. 572 * a function other than a non-redirecting generative constructor.
553 */ 573 */
554 static final CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new CompileTimeErrorCode('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 34, "Initializing formal fields can only be used in constructors"); 574 static final CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new CompileTimeErrorCode('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 33, "Initializing formal fields can only be used in constructors");
555 /** 575 /**
556 * 5 Variables: It is a compile-time error if a final instance variable that h as been initialized 576 * 5 Variables: It is a compile-time error if a final instance variable that h as been initialized
557 * at its point of declaration is also initialized in a constructor. 577 * at its point of declaration is also initialized in a constructor.
578 * @param name the name of the field in question
558 */ 579 */
559 static final CompileTimeErrorCode FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRU CTOR = new CompileTimeErrorCode('FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTO R', 35, ""); 580 static final CompileTimeErrorCode FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRU CTOR = new CompileTimeErrorCode('FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTO R', 34, "'%s' is final and was given a value when it was declared, so it cannot be set to a new value");
560 /** 581 /**
561 * 5 Variables: It is a compile-time error if a final instance variable that h as is initialized by 582 * 5 Variables: It is a compile-time error if a final instance variable that h as is initialized by
562 * means of an initializing formal of a constructor is also initialized elsewh ere in the same 583 * means of an initializing formal of a constructor is also initialized elsewh ere in the same
563 * constructor. 584 * constructor.
585 * @param name the name of the field in question
564 */ 586 */
565 static final CompileTimeErrorCode FINAL_INITIALIZED_MULTIPLE_TIMES = new Compi leTimeErrorCode('FINAL_INITIALIZED_MULTIPLE_TIMES', 36, ""); 587 static final CompileTimeErrorCode FINAL_INITIALIZED_MULTIPLE_TIMES = new Compi leTimeErrorCode('FINAL_INITIALIZED_MULTIPLE_TIMES', 35, "'%s' is a final field a nd so can only be set once");
566 /** 588 /**
567 * 5 Variables: It is a compile-time error if a library, static or local varia ble <i>v</i> is 589 * 5 Variables: It is a compile-time error if a library, static or local varia ble <i>v</i> is
568 * final and <i>v</i> is not initialized at its point of declaration. 590 * final and <i>v</i> is not initialized at its point of declaration.
591 * @param name the name of the variable in question
569 */ 592 */
570 static final CompileTimeErrorCode FINAL_NOT_INITIALIZED = new CompileTimeError Code('FINAL_NOT_INITIALIZED', 37, ""); 593 static final CompileTimeErrorCode FINAL_NOT_INITIALIZED = new CompileTimeError Code('FINAL_NOT_INITIALIZED', 36, "The final variable '%s' must be initialized") ;
571 /** 594 /**
572 * 7.2 Getters: It is a compile-time error if a class has both a getter and a method with the same 595 * 7.2 Getters: It is a compile-time error if a class has both a getter and a method with the same
573 * name. 596 * name.
574 */ 597 */
575 static final CompileTimeErrorCode GETTER_AND_METHOD_WITH_SAME_NAME = new Compi leTimeErrorCode('GETTER_AND_METHOD_WITH_SAME_NAME', 38, ""); 598 static final CompileTimeErrorCode GETTER_AND_METHOD_WITH_SAME_NAME = new Compi leTimeErrorCode('GETTER_AND_METHOD_WITH_SAME_NAME', 37, "");
576 /** 599 /**
577 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o f a class includes 600 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o f a class includes
578 * type dynamic. 601 * type dynamic.
579 */ 602 */
580 static final CompileTimeErrorCode IMPLEMENTS_DYNAMIC = new CompileTimeErrorCod e('IMPLEMENTS_DYNAMIC', 39, ""); 603 static final CompileTimeErrorCode IMPLEMENTS_DYNAMIC = new CompileTimeErrorCod e('IMPLEMENTS_DYNAMIC', 38, "Classes cannot implement 'dynamic'");
581 /** 604 /**
582 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o f a class <i>C</i> 605 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o f a class <i>C</i>
583 * includes a type expression that does not denote a class available in the le xical scope of 606 * includes a type expression that does not denote a class available in the le xical scope of
584 * <i>C</i>. 607 * <i>C</i>.
585 * @param typeName the name of the interface that was not found 608 * @param typeName the name of the interface that was not found
586 */ 609 */
587 static final CompileTimeErrorCode IMPLEMENTS_NON_CLASS = new CompileTimeErrorC ode('IMPLEMENTS_NON_CLASS', 40, "Classes can only implement other classes"); 610 static final CompileTimeErrorCode IMPLEMENTS_NON_CLASS = new CompileTimeErrorC ode('IMPLEMENTS_NON_CLASS', 39, "Classes can only implement other classes");
588 /** 611 /**
589 * 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears more than once in 612 * 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears more than once in
590 * the implements clause of a class. 613 * the implements clause of a class.
614 * @param name the name of the type in question
591 */ 615 */
592 static final CompileTimeErrorCode IMPLEMENTS_REPEATED = new CompileTimeErrorCo de('IMPLEMENTS_REPEATED', 41, ""); 616 static final CompileTimeErrorCode IMPLEMENTS_REPEATED = new CompileTimeErrorCo de('IMPLEMENTS_REPEATED', 40, "'%s' can only be implemented once");
593 /** 617 /**
594 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas s <i>C</i> is a 618 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas s <i>C</i> is a
595 * superinterface of itself. 619 * superinterface of itself.
620 * @param name the name of the type in question
596 */ 621 */
597 static final CompileTimeErrorCode IMPLEMENTS_SELF = new CompileTimeErrorCode(' IMPLEMENTS_SELF', 42, ""); 622 static final CompileTimeErrorCode IMPLEMENTS_SELF = new CompileTimeErrorCode(' IMPLEMENTS_SELF', 41, "'%s' cannot implement itself");
598 /** 623 /**
599 * 14.1 Imports: It is a compile-time error to import two different libraries with the same name. 624 * 14.1 Imports: It is a compile-time error to import two different libraries with the same name.
600 */ 625 */
601 static final CompileTimeErrorCode IMPORT_DUPLICATED_LIBRARY_NAME = new Compile TimeErrorCode('IMPORT_DUPLICATED_LIBRARY_NAME', 43, ""); 626 static final CompileTimeErrorCode IMPORT_DUPLICATED_LIBRARY_NAME = new Compile TimeErrorCode('IMPORT_DUPLICATED_LIBRARY_NAME', 42, "");
602 /** 627 /**
603 * 14.1 Imports: It is a compile-time error if the compilation unit found at t he specified URI is 628 * 14.1 Imports: It is a compile-time error if the compilation unit found at t he specified URI is
604 * not a library declaration. 629 * not a library declaration.
630 * @param uri the uri pointing to a non-library declaration
605 */ 631 */
606 static final CompileTimeErrorCode IMPORT_OF_NON_LIBRARY = new CompileTimeError Code('IMPORT_OF_NON_LIBRARY', 44, ""); 632 static final CompileTimeErrorCode IMPORT_OF_NON_LIBRARY = new CompileTimeError Code('IMPORT_OF_NON_LIBRARY', 43, "The imported library '%s' must not have a par t-of directive");
607 /** 633 /**
608 * 13.9 Switch: It is a compile-time error if values of the expressions <i>e<s ub>k</sub></i> are 634 * 13.9 Switch: It is a compile-time error if values of the expressions <i>e<s ub>k</sub></i> are
609 * not instances of the same class <i>C</i>, for all <i>1 &lt;= k &lt;= n</i>. 635 * not instances of the same class <i>C</i>, for all <i>1 &lt;= k &lt;= n</i>.
610 */ 636 */
611 static final CompileTimeErrorCode INCONSITENT_CASE_EXPRESSION_TYPES = new Comp ileTimeErrorCode('INCONSITENT_CASE_EXPRESSION_TYPES', 45, ""); 637 static final CompileTimeErrorCode INCONSITENT_CASE_EXPRESSION_TYPES = new Comp ileTimeErrorCode('INCONSITENT_CASE_EXPRESSION_TYPES', 44, "");
638 /**
639 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile-time
640 * error if <i>k</i>'s initializer list contains an initializer for a variable that is not an
641 * instance variable declared in the immediately surrounding class.
642 * @see #INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD
643 */
644 static final CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTANT_FIELD = new Com pileTimeErrorCode('INITIALIZER_FOR_NON_EXISTANT_FIELD', 45, "");
645 /**
646 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile-time
647 * error if <i>k</i>'s initializer list contains an initializer for a variable that is not an
648 * instance variable declared in the immediately surrounding class.
649 */
650 static final CompileTimeErrorCode INITIALIZER_FOR_STATIC_FIELD = new CompileTi meErrorCode('INITIALIZER_FOR_STATIC_FIELD', 46, "");
612 /** 651 /**
613 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this. id</i>. It is a 652 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this. id</i>. It is a
614 * compile-time error if <i>id</i> is not the name of an instance variable of the immediately 653 * compile-time error if <i>id</i> is not the name of an instance variable of the immediately
615 * enclosing class. 654 * enclosing class.
655 * @param id the name of the initializing formal that is not an instance varia ble in the
656 * immediately enclosing class
657 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD
658 * @see #INITIALIZER_FOR_NON_EXISTANT_FIELD
616 */ 659 */
617 static final CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTANT_FIELD = new Com pileTimeErrorCode('INITIALIZER_FOR_NON_EXISTANT_FIELD', 46, ""); 660 static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD = new CompileTimeErrorCode('INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD', 47, "'%s ' is not a variable in the enclosing class");
661 /**
662 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this. id</i>. It is a
663 * compile-time error if <i>id</i> is not the name of an instance variable of the immediately
664 * enclosing class.
665 * @param id the name of the initializing formal that is a static variable in the immediately
666 * enclosing class
667 * @see #INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD
668 */
669 static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_STATIC_FIELD = new C ompileTimeErrorCode('INITIALIZING_FORMAL_FOR_STATIC_FIELD', 48, "'%s' is a stati c variable in the enclosing class, variable initialized in a constructor cannot be static");
618 /** 670 /**
619 * TODO(brianwilkerson) Remove this when we have decided on how to report erro rs in compile-time 671 * TODO(brianwilkerson) Remove this when we have decided on how to report erro rs in compile-time
620 * constants. Until then, this acts as a placeholder for more informative erro rs. 672 * constants. Until then, this acts as a placeholder for more informative erro rs.
621 */ 673 */
622 static final CompileTimeErrorCode INVALID_CONSTANT = new CompileTimeErrorCode( 'INVALID_CONSTANT', 47, ""); 674 static final CompileTimeErrorCode INVALID_CONSTANT = new CompileTimeErrorCode( 'INVALID_CONSTANT', 49, "");
623 /** 675 /**
624 * 7.6 Constructors: It is a compile-time error if the name of a constructor i s not a constructor 676 * 7.6 Constructors: It is a compile-time error if the name of a constructor i s not a constructor
625 * name. 677 * name.
626 */ 678 */
627 static final CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = new CompileTimeEr rorCode('INVALID_CONSTRUCTOR_NAME', 48, ""); 679 static final CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = new CompileTimeEr rorCode('INVALID_CONSTRUCTOR_NAME', 50, "");
628 /** 680 /**
629 * 7.6.2 Factories: It is a compile-time error if <i>M</i> is not the name of the immediately 681 * 7.6.2 Factories: It is a compile-time error if <i>M</i> is not the name of the immediately
630 * enclosing class. 682 * enclosing class.
631 */ 683 */
632 static final CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS = new Compi leTimeErrorCode('INVALID_FACTORY_NAME_NOT_A_CLASS', 49, ""); 684 static final CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS = new Compi leTimeErrorCode('INVALID_FACTORY_NAME_NOT_A_CLASS', 51, "");
633 /** 685 /**
634 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i > overrides an 686 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i > overrides an
635 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies a default value for 687 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies a default value for
636 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff erent default value 688 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff erent default value
637 * for <i>p</i>. 689 * for <i>p</i>.
638 */ 690 */
639 static final CompileTimeErrorCode INVALID_OVERRIDE_DEFAULT_VALUE = new Compile TimeErrorCode('INVALID_OVERRIDE_DEFAULT_VALUE', 50, ""); 691 static final CompileTimeErrorCode INVALID_OVERRIDE_DEFAULT_VALUE = new Compile TimeErrorCode('INVALID_OVERRIDE_DEFAULT_VALUE', 52, "");
640 /** 692 /**
641 * 7.1: It is a compile-time error if an instance method <i>m1</i> overrides a n instance member 693 * 7.1: It is a compile-time error if an instance method <i>m1</i> overrides a n instance member
642 * <i>m2</i> and <i>m1</i> does not declare all the named parameters declared by <i>m2</i>. 694 * <i>m2</i> and <i>m1</i> does not declare all the named parameters declared by <i>m2</i>.
643 */ 695 */
644 static final CompileTimeErrorCode INVALID_OVERRIDE_NAMED = new CompileTimeErro rCode('INVALID_OVERRIDE_NAMED', 51, ""); 696 static final CompileTimeErrorCode INVALID_OVERRIDE_NAMED = new CompileTimeErro rCode('INVALID_OVERRIDE_NAMED', 53, "");
645 /** 697 /**
646 * 7.1 Instance Methods: It is a compile-time error if an instance method m1 o verrides an instance 698 * 7.1 Instance Methods: It is a compile-time error if an instance method m1 o verrides an instance
647 * member <i>m2</i> and <i>m1</i> has fewer optional positional parameters tha n <i>m2</i>. 699 * member <i>m2</i> and <i>m1</i> has fewer optional positional parameters tha n <i>m2</i>.
648 */ 700 */
649 static final CompileTimeErrorCode INVALID_OVERRIDE_POSITIONAL = new CompileTim eErrorCode('INVALID_OVERRIDE_POSITIONAL', 52, ""); 701 static final CompileTimeErrorCode INVALID_OVERRIDE_POSITIONAL = new CompileTim eErrorCode('INVALID_OVERRIDE_POSITIONAL', 54, "");
650 /** 702 /**
651 * 7.1 Instance Methods: It is a compile-time error if an instance method <i>m 1</i> overrides an 703 * 7.1 Instance Methods: It is a compile-time error if an instance method <i>m 1</i> overrides an
652 * instance member <i>m2</i> and <i>m1</i> has a different number of required parameters than 704 * instance member <i>m2</i> and <i>m1</i> has a different number of required parameters than
653 * <i>m2</i>. 705 * <i>m2</i>.
654 */ 706 */
655 static final CompileTimeErrorCode INVALID_OVERRIDE_REQUIRED = new CompileTimeE rrorCode('INVALID_OVERRIDE_REQUIRED', 53, ""); 707 static final CompileTimeErrorCode INVALID_OVERRIDE_REQUIRED = new CompileTimeE rrorCode('INVALID_OVERRIDE_REQUIRED', 55, "");
656 /** 708 /**
657 * 12.10 This: It is a compile-time error if this appears in a top-level funct ion or variable 709 * 12.10 This: It is a compile-time error if this appears in a top-level funct ion or variable
658 * initializer, in a factory constructor, or in a static method or variable in itializer, or in the 710 * initializer, in a factory constructor, or in a static method or variable in itializer, or in the
659 * initializer of an instance variable. 711 * initializer of an instance variable.
660 */ 712 */
661 static final CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = new CompileTimeE rrorCode('INVALID_REFERENCE_TO_THIS', 54, ""); 713 static final CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = new CompileTimeE rrorCode('INVALID_REFERENCE_TO_THIS', 56, "");
662 /** 714 /**
663 * 12.7 Maps: It is a compile-time error if the first type argument to a map l iteral is not 715 * 12.7 Maps: It is a compile-time error if the first type argument to a map l iteral is not
664 * String. 716 * String.
665 */ 717 */
666 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_FOR_KEY = new CompileT imeErrorCode('INVALID_TYPE_ARGUMENT_FOR_KEY', 55, ""); 718 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_FOR_KEY = new CompileT imeErrorCode('INVALID_TYPE_ARGUMENT_FOR_KEY', 57, "");
667 /** 719 /**
668 * 12.6 Lists: It is a compile time error if the type argument of a constant l ist literal includes 720 * 12.6 Lists: It is a compile time error if the type argument of a constant l ist literal includes
669 * a type parameter. 721 * a type parameter.
670 */ 722 */
671 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST = new Co mpileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_LIST', 56, ""); 723 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST = new Co mpileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_LIST', 58, "");
672 /** 724 /**
673 * 12.7 Maps: It is a compile time error if the type arguments of a constant m ap literal include a 725 * 12.7 Maps: It is a compile time error if the type arguments of a constant m ap literal include a
674 * type parameter. 726 * type parameter.
675 */ 727 */
676 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = new Com pileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 57, ""); 728 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = new Com pileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 59, "");
677 /** 729 /**
678 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile-time 730 * 14.2 Exports: It is a compile-time error if the compilation unit found at t he specified URI is
679 * error if <i>k</i>'s initializer list contains an initializer for a variable that is not an 731 * not a library declaration.
680 * instance variable declared in the immediately surrounding class. 732 * <p>
733 * 14.1 Imports: It is a compile-time error if the compilation unit found at t he specified URI is
734 * not a library declaration.
735 * <p>
736 * 14.3 Parts: It is a compile time error if the contents of the URI are not a valid part
737 * declaration.
738 * @param uri the uri pointing to a non-library declaration
681 */ 739 */
682 static final CompileTimeErrorCode INVALID_VARIABLE_IN_INITIALIZER = new Compil eTimeErrorCode('INVALID_VARIABLE_IN_INITIALIZER', 58, ""); 740 static final CompileTimeErrorCode INVALID_URI = new CompileTimeErrorCode('INVA LID_URI', 60, "'%s' is not a valid uri");
683 /** 741 /**
684 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su b></i> exists within 742 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su b></i> exists within
685 * the innermost function in which <i>s<sub>b</sub></i> occurs. 743 * the innermost function in which <i>s<sub>b</sub></i> occurs.
686 * <p> 744 * <p>
687 * 13.14 Continue: It is a compile-time error if no such statement or case cla use 745 * 13.14 Continue: It is a compile-time error if no such statement or case cla use
688 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub >c</sub></i> occurs. 746 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub >c</sub></i> occurs.
689 * @param labelName the name of the unresolvable label 747 * @param labelName the name of the unresolvable label
690 */ 748 */
691 static final CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = new CompileTimeErrorC ode('LABEL_IN_OUTER_SCOPE', 59, "Cannot reference label '%s' declared in an oute r method"); 749 static final CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = new CompileTimeErrorC ode('LABEL_IN_OUTER_SCOPE', 61, "Cannot reference label '%s' declared in an oute r method");
692 /** 750 /**
693 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su b></i> exists within 751 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su b></i> exists within
694 * the innermost function in which <i>s<sub>b</sub></i> occurs. 752 * the innermost function in which <i>s<sub>b</sub></i> occurs.
695 * <p> 753 * <p>
696 * 13.14 Continue: It is a compile-time error if no such statement or case cla use 754 * 13.14 Continue: It is a compile-time error if no such statement or case cla use
697 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub >c</sub></i> occurs. 755 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub >c</sub></i> occurs.
698 * @param labelName the name of the unresolvable label 756 * @param labelName the name of the unresolvable label
699 */ 757 */
700 static final CompileTimeErrorCode LABEL_UNDEFINED = new CompileTimeErrorCode(' LABEL_UNDEFINED', 60, "Cannot reference undefined label '%s'"); 758 static final CompileTimeErrorCode LABEL_UNDEFINED = new CompileTimeErrorCode(' LABEL_UNDEFINED', 62, "Cannot reference undefined label '%s'");
701 /** 759 /**
702 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member with the same name 760 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member with the same name
703 * as <i>C</i>. 761 * as <i>C</i>.
704 */ 762 */
705 static final CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = new CompileTimeErro rCode('MEMBER_WITH_CLASS_NAME', 61, ""); 763 static final CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = new CompileTimeErro rCode('MEMBER_WITH_CLASS_NAME', 63, "");
706 /** 764 /**
707 * 9 Mixins: It is a compile-time error if a declared or derived mixin explici tly declares a 765 * 9 Mixins: It is a compile-time error if a declared or derived mixin explici tly declares a
708 * constructor. 766 * constructor.
709 */ 767 */
710 static final CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = new CompileTime ErrorCode('MIXIN_DECLARES_CONSTRUCTOR', 62, ""); 768 static final CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = new CompileTime ErrorCode('MIXIN_DECLARES_CONSTRUCTOR', 64, "");
711 /** 769 /**
712 * 9 Mixins: It is a compile-time error if a mixin is derived from a class who se superclass is not 770 * 9 Mixins: It is a compile-time error if a mixin is derived from a class who se superclass is not
713 * Object. 771 * Object.
714 */ 772 */
715 static final CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = new Compile TimeErrorCode('MIXIN_INHERITS_FROM_NOT_OBJECT', 63, ""); 773 static final CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = new Compile TimeErrorCode('MIXIN_INHERITS_FROM_NOT_OBJECT', 65, "");
716 /** 774 /**
717 * 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not deno te a class or mixin 775 * 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not deno te a class or mixin
718 * available in the immediately enclosing scope. 776 * available in the immediately enclosing scope.
719 * @param typeName the name of the mixin that was not found 777 * @param typeName the name of the mixin that was not found
720 */ 778 */
721 static final CompileTimeErrorCode MIXIN_OF_NON_CLASS = new CompileTimeErrorCod e('MIXIN_OF_NON_CLASS', 64, "Classes can only mixin other classes"); 779 static final CompileTimeErrorCode MIXIN_OF_NON_CLASS = new CompileTimeErrorCod e('MIXIN_OF_NON_CLASS', 66, "Classes can only mixin other classes");
722 /** 780 /**
723 * 9.1 Mixin Application: If <i>M</i> is a class, it is a compile time error i f a well formed 781 * 9.1 Mixin Application: If <i>M</i> is a class, it is a compile time error i f a well formed
724 * mixin cannot be derived from <i>M</i>. 782 * mixin cannot be derived from <i>M</i>.
725 */ 783 */
726 static final CompileTimeErrorCode MIXIN_OF_NON_MIXIN = new CompileTimeErrorCod e('MIXIN_OF_NON_MIXIN', 65, ""); 784 static final CompileTimeErrorCode MIXIN_OF_NON_MIXIN = new CompileTimeErrorCod e('MIXIN_OF_NON_MIXIN', 67, "");
727 /** 785 /**
728 * 9 Mixins: It is a compile-time error if a declared or derived mixin refers to super. 786 * 9 Mixins: It is a compile-time error if a declared or derived mixin refers to super.
729 */ 787 */
730 static final CompileTimeErrorCode MIXIN_REFERENCES_SUPER = new CompileTimeErro rCode('MIXIN_REFERENCES_SUPER', 66, ""); 788 static final CompileTimeErrorCode MIXIN_REFERENCES_SUPER = new CompileTimeErro rCode('MIXIN_REFERENCES_SUPER', 68, "");
731 /** 789 /**
732 * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not deno te a class available 790 * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not deno te a class available
733 * in the immediately enclosing scope. 791 * in the immediately enclosing scope.
734 */ 792 */
735 static final CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = new Compil eTimeErrorCode('MIXIN_WITH_NON_CLASS_SUPERCLASS', 67, ""); 793 static final CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = new Compil eTimeErrorCode('MIXIN_WITH_NON_CLASS_SUPERCLASS', 69, "");
736 /** 794 /**
737 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Th en <i>k</i> may 795 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Th en <i>k</i> may
738 * include at most one superinitializer in its initializer list or a compile t ime error occurs. 796 * include at most one superinitializer in its initializer list or a compile t ime error occurs.
739 */ 797 */
740 static final CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = new CompileTim eErrorCode('MULTIPLE_SUPER_INITIALIZERS', 68, ""); 798 static final CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = new CompileTim eErrorCode('MULTIPLE_SUPER_INITIALIZERS', 70, "");
741 /** 799 /**
742 * 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 800 * 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
743 * parameters. 801 * parameters.
744 * @param typeName the name of the type being referenced (<i>S</i>) 802 * @param typeName the name of the type being referenced (<i>S</i>)
803 * @param parameterCount the number of type parameters that were declared
745 * @param argumentCount the number of type arguments provided 804 * @param argumentCount the number of type arguments provided
746 * @param parameterCount the number of type parameters that were declared
747 */ 805 */
748 static final CompileTimeErrorCode NEW_WITH_INVALID_TYPE_PARAMETERS = new Compi leTimeErrorCode('NEW_WITH_INVALID_TYPE_PARAMETERS', 69, "The type '%s' is declar ed with %d type parameters, but %d type arguments were given"); 806 static final CompileTimeErrorCode NEW_WITH_INVALID_TYPE_PARAMETERS = new Compi leTimeErrorCode('NEW_WITH_INVALID_TYPE_PARAMETERS', 71, "The type '%s' is declar ed with %d type parameters, but %d type arguments were given");
749 /** 807 /**
750 * 13.2 Expression Statements: It is a compile-time error if a non-constant ma p literal that has 808 * 13.2 Expression Statements: It is a compile-time error if a non-constant ma p literal that has
751 * no explicit type arguments appears in a place where a statement is expected . 809 * no explicit type arguments appears in a place where a statement is expected .
752 */ 810 */
753 static final CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = new CompileTimeErrorCode('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 70, ""); 811 static final CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = new CompileTimeErrorCode('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 72, "");
754 /** 812 /**
755 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub >11</sub> &hellip; 813 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub >11</sub> &hellip;
756 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> &hellip; label<sub>n1 </sub> &hellip; 814 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> &hellip; label<sub>n1 </sub> &hellip;
757 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s ub>}</i> or the form 815 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s ub>}</i> or the form
758 * <i>switch (e) { label<sub>11</sub> &hellip; label<sub>1j1</sub> case e<sub> 1</sub>: 816 * <i>switch (e) { label<sub>11</sub> &hellip; label<sub>1j1</sub> case e<sub> 1</sub>:
759 * s<sub>1</sub> &hellip; label<sub>n1</sub> &hellip; label<sub>njn</sub> case e<sub>n</sub>: 817 * s<sub>1</sub> &hellip; label<sub>n1</sub> &hellip; label<sub>njn</sub> case e<sub>n</sub>:
760 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub> k</sub></i> are not 818 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub> k</sub></i> are not
761 * compile-time constants, for all <i>1 &lt;= k &lt;= n</i>. 819 * compile-time constants, for all <i>1 &lt;= k &lt;= n</i>.
762 */ 820 */
763 static final CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = new CompileTi meErrorCode('NON_CONSTANT_CASE_EXPRESSION', 71, "Case expressions must be consta nt"); 821 static final CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = new CompileTi meErrorCode('NON_CONSTANT_CASE_EXPRESSION', 73, "Case expressions must be consta nt");
764 /** 822 /**
765 * 6.2.2 Optional Formals: It is a compile-time error if the default value of an optional 823 * 6.2.2 Optional Formals: It is a compile-time error if the default value of an optional
766 * parameter is not a compile-time constant. 824 * parameter is not a compile-time constant.
767 */ 825 */
768 static final CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = new CompileTime ErrorCode('NON_CONSTANT_DEFAULT_VALUE', 72, "Default values of an optional param eter must be constant"); 826 static final CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = new CompileTime ErrorCode('NON_CONSTANT_DEFAULT_VALUE', 74, "Default values of an optional param eter must be constant");
769 /** 827 /**
770 * 12.6 Lists: It is a compile time error if an element of a constant list lit eral is not a 828 * 12.6 Lists: It is a compile time error if an element of a constant list lit eral is not a
771 * compile-time constant. 829 * compile-time constant.
772 */ 830 */
773 static final CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = new CompileTimeE rrorCode('NON_CONSTANT_LIST_ELEMENT', 73, "'const' lists must have all constant values"); 831 static final CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = new CompileTimeE rrorCode('NON_CONSTANT_LIST_ELEMENT', 75, "'const' lists must have all constant values");
774 /** 832 /**
775 * 12.7 Maps: It is a compile time error if either a key or a value of an entr y in a constant map 833 * 12.7 Maps: It is a compile time error if either a key or a value of an entr y in a constant map
776 * literal is not a compile-time constant. 834 * literal is not a compile-time constant.
777 */ 835 */
778 static final CompileTimeErrorCode NON_CONSTANT_MAP_KEY = new CompileTimeErrorC ode('NON_CONSTANT_MAP_KEY', 74, "The keys in a map must be constant"); 836 static final CompileTimeErrorCode NON_CONSTANT_MAP_KEY = new CompileTimeErrorC ode('NON_CONSTANT_MAP_KEY', 76, "The keys in a map must be constant");
779 /** 837 /**
780 * 12.7 Maps: It is a compile time error if either a key or a value of an entr y in a constant map 838 * 12.7 Maps: It is a compile time error if either a key or a value of an entr y in a constant map
781 * literal is not a compile-time constant. 839 * literal is not a compile-time constant.
782 */ 840 */
783 static final CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = new CompileTimeErro rCode('NON_CONSTANT_MAP_VALUE', 75, "The values in a 'const' map must be constan t"); 841 static final CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = new CompileTimeErro rCode('NON_CONSTANT_MAP_VALUE', 77, "The values in a 'const' map must be constan t");
784 /** 842 /**
785 * 7.6.3 Constant Constructors: Any expression that appears within the initial izer list of a 843 * 7.6.3 Constant Constructors: Any expression that appears within the initial izer list of a
786 * constant constructor must be a potentially constant expression, or a compil e-time error occurs. 844 * constant constructor must be a potentially constant expression, or a compil e-time error occurs.
787 */ 845 */
788 static final CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = new Comp ileTimeErrorCode('NON_CONSTANT_VALUE_IN_INITIALIZER', 76, ""); 846 static final CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = new Comp ileTimeErrorCode('NON_CONSTANT_VALUE_IN_INITIALIZER', 78, "");
789 /** 847 /**
790 * 7.9 Superclasses: It is a compile-time error to specify an extends clause f or class Object. 848 * 7.9 Superclasses: It is a compile-time error to specify an extends clause f or class Object.
791 */ 849 */
792 static final CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = new Com pileTimeErrorCode('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 77, ""); 850 static final CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = new Com pileTimeErrorCode('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 79, "");
793 /** 851 /**
794 * 7.1.1 Operators: It is a compile-time error to declare an optional paramete r in an operator. 852 * 7.1.1 Operators: It is a compile-time error to declare an optional paramete r in an operator.
795 */ 853 */
796 static final CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = new Compile TimeErrorCode('OPTIONAL_PARAMETER_IN_OPERATOR', 78, ""); 854 static final CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = new Compile TimeErrorCode('OPTIONAL_PARAMETER_IN_OPERATOR', 80, "");
797 /** 855 /**
798 * 8 Interfaces: It is a compile-time error if an interface member <i>m1</i> o verrides an 856 * 8 Interfaces: It is a compile-time error if an interface member <i>m1</i> o verrides an
799 * interface member <i>m2</i> and <i>m1</i> does not declare all the named par ameters declared by 857 * interface member <i>m2</i> and <i>m1</i> does not declare all the named par ameters declared by
800 * <i>m2</i> in the same order. 858 * <i>m2</i> in the same order.
801 */ 859 */
802 static final CompileTimeErrorCode OVERRIDE_MISSING_NAMED_PARAMETERS = new Comp ileTimeErrorCode('OVERRIDE_MISSING_NAMED_PARAMETERS', 79, ""); 860 static final CompileTimeErrorCode OVERRIDE_MISSING_NAMED_PARAMETERS = new Comp ileTimeErrorCode('OVERRIDE_MISSING_NAMED_PARAMETERS', 81, "");
803 /** 861 /**
804 * 8 Interfaces: It is a compile-time error if an interface member <i>m1</i> o verrides an 862 * 8 Interfaces: It is a compile-time error if an interface member <i>m1</i> o verrides an
805 * interface member <i>m2</i> and <i>m1</i> has a different number of required parameters than 863 * interface member <i>m2</i> and <i>m1</i> has a different number of required parameters than
806 * <i>m2</i>. 864 * <i>m2</i>.
807 */ 865 */
808 static final CompileTimeErrorCode OVERRIDE_MISSING_REQUIRED_PARAMETERS = new C ompileTimeErrorCode('OVERRIDE_MISSING_REQUIRED_PARAMETERS', 80, ""); 866 static final CompileTimeErrorCode OVERRIDE_MISSING_REQUIRED_PARAMETERS = new C ompileTimeErrorCode('OVERRIDE_MISSING_REQUIRED_PARAMETERS', 82, "");
809 /** 867 /**
810 * 14.3 Parts: It is a compile time error if the contents of the URI are not a valid part 868 * 14.3 Parts: It is a compile time error if the contents of the URI are not a valid part
811 * declaration. 869 * declaration.
870 * @param uri the uri pointing to a non-library declaration
812 */ 871 */
813 static final CompileTimeErrorCode PART_OF_NON_PART = new CompileTimeErrorCode( 'PART_OF_NON_PART', 81, ""); 872 static final CompileTimeErrorCode PART_OF_NON_PART = new CompileTimeErrorCode( 'PART_OF_NON_PART', 83, "The included part '%s' must have a part-of directive");
814 /** 873 /**
815 * 14.1 Imports: It is a compile-time error if the current library declares a top-level member 874 * 14.1 Imports: It is a compile-time error if the current library declares a top-level member
816 * named <i>p</i>. 875 * named <i>p</i>.
817 */ 876 */
818 static final CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = new CompileTimeErrorCode('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 82, ""); 877 static final CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = new CompileTimeErrorCode('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 84, "");
819 /** 878 /**
820 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named o ptional parameter 879 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named o ptional parameter
821 * begins with an ‘_’ character. 880 * begins with an ‘_’ character.
822 */ 881 */
823 static final CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = new CompileTime ErrorCode('PRIVATE_OPTIONAL_PARAMETER', 83, ""); 882 static final CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = new CompileTime ErrorCode('PRIVATE_OPTIONAL_PARAMETER', 85, "");
824 /** 883 /**
825 * 12.1 Constants: It is a compile-time error if the value of a compile-time c onstant expression 884 * 12.1 Constants: It is a compile-time error if the value of a compile-time c onstant expression
826 * depends on itself. 885 * depends on itself.
827 */ 886 */
828 static final CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = new Compil eTimeErrorCode('RECURSIVE_COMPILE_TIME_CONSTANT', 84, ""); 887 static final CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = new Compil eTimeErrorCode('RECURSIVE_COMPILE_TIME_CONSTANT', 86, "");
829 /** 888 /**
830 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr uctor redirects to 889 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr uctor redirects to
831 * itself, either directly or indirectly via a sequence of redirections. 890 * itself, either directly or indirectly via a sequence of redirections.
832 */ 891 */
833 static final CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = new CompileTime ErrorCode('RECURSIVE_FACTORY_REDIRECT', 85, ""); 892 static final CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = new CompileTime ErrorCode('RECURSIVE_FACTORY_REDIRECT', 87, "");
834 /** 893 /**
835 * 15.3.1 Typedef: It is a compile-time error if a typedef refers to itself vi a a chain of 894 * 15.3.1 Typedef: It is a compile-time error if a typedef refers to itself vi a a chain of
836 * references that does not include a class type. 895 * references that does not include a class type.
837 */ 896 */
838 static final CompileTimeErrorCode RECURSIVE_FUNCTION_TYPE_ALIAS = new CompileT imeErrorCode('RECURSIVE_FUNCTION_TYPE_ALIAS', 86, ""); 897 static final CompileTimeErrorCode RECURSIVE_FUNCTION_TYPE_ALIAS = new CompileT imeErrorCode('RECURSIVE_FUNCTION_TYPE_ALIAS', 88, "");
839 /** 898 /**
840 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself. 899 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself.
841 */ 900 */
842 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = new Compil eTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE', 87, ""); 901 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = new Compil eTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE', 89, "");
843 /** 902 /**
844 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th e const modifier but 903 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th e const modifier but
845 * <i>k’</i> is not a constant constructor. 904 * <i>k’</i> is not a constant constructor.
846 */ 905 */
847 static final CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = new Comp ileTimeErrorCode('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 88, ""); 906 static final CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = new Comp ileTimeErrorCode('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 90, "");
848 /** 907 /**
849 * 13.3 Local Variable Declaration: It is a compile-time error if <i>e</i> ref ers to the name 908 * 13.3 Local Variable Declaration: It is a compile-time error if <i>e</i> ref ers to the name
850 * <i>v</i> or the name <i>v=</i>. 909 * <i>v</i> or the name <i>v=</i>.
851 */ 910 */
852 static final CompileTimeErrorCode REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZE R = new CompileTimeErrorCode('REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER', 89 , ""); 911 static final CompileTimeErrorCode REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZE R = new CompileTimeErrorCode('REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER', 91 , "");
853 /** 912 /**
854 * 16.1.1 Reserved Words: A reserved word may not be used as an identifier; it is a compile-time 913 * 16.1.1 Reserved Words: A reserved word may not be used as an identifier; it is a compile-time
855 * error if a reserved word is used where an identifier is expected. 914 * error if a reserved word is used where an identifier is expected.
856 */ 915 */
857 static final CompileTimeErrorCode RESERVED_WORD_AS_IDENTIFIER = new CompileTim eErrorCode('RESERVED_WORD_AS_IDENTIFIER', 90, ""); 916 static final CompileTimeErrorCode RESERVED_WORD_AS_IDENTIFIER = new CompileTim eErrorCode('RESERVED_WORD_AS_IDENTIFIER', 92, "");
858 /** 917 /**
859 * 12.8.1 Rethrow: It is a compile-time error if an expression of the form <i> rethrow;</i> is not 918 * 12.8.1 Rethrow: It is a compile-time error if an expression of the form <i> rethrow;</i> is not
860 * enclosed within a on-catch clause. 919 * enclosed within a on-catch clause.
861 */ 920 */
862 static final CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = new CompileTimeError Code('RETHROW_OUTSIDE_CATCH', 91, "rethrow must be inside of a catch clause"); 921 static final CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = new CompileTimeError Code('RETHROW_OUTSIDE_CATCH', 93, "rethrow must be inside of a catch clause");
863 /** 922 /**
864 * 13.11 Return: It is a compile-time error if a return statement of the form <i>return e;</i> 923 * 13.11 Return: It is a compile-time error if a return statement of the form <i>return e;</i>
865 * appears in a generative constructor. 924 * appears in a generative constructor.
866 */ 925 */
867 static final CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = new Compi leTimeErrorCode('RETURN_IN_GENERATIVE_CONSTRUCTOR', 92, ""); 926 static final CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = new Compi leTimeErrorCode('RETURN_IN_GENERATIVE_CONSTRUCTOR', 94, "");
868 /** 927 /**
869 * 6.1 Function Declarations: It is a compile-time error to preface a function declaration with 928 * 6.1 Function Declarations: It is a compile-time error to preface a function declaration with
870 * the built-in identifier static. 929 * the built-in identifier static.
871 */ 930 */
872 static final CompileTimeErrorCode STATIC_TOP_LEVEL_FUNCTION = new CompileTimeE rrorCode('STATIC_TOP_LEVEL_FUNCTION', 93, ""); 931 static final CompileTimeErrorCode STATIC_TOP_LEVEL_FUNCTION = new CompileTimeE rrorCode('STATIC_TOP_LEVEL_FUNCTION', 95, "");
873 /** 932 /**
874 * 5 Variables: It is a compile-time error to preface a top level variable dec laration with the 933 * 5 Variables: It is a compile-time error to preface a top level variable dec laration with the
875 * built-in identifier static. 934 * built-in identifier static.
876 */ 935 */
877 static final CompileTimeErrorCode STATIC_TOP_LEVEL_VARIABLE = new CompileTimeE rrorCode('STATIC_TOP_LEVEL_VARIABLE', 94, ""); 936 static final CompileTimeErrorCode STATIC_TOP_LEVEL_VARIABLE = new CompileTimeE rrorCode('STATIC_TOP_LEVEL_VARIABLE', 96, "");
878 /** 937 /**
879 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form 938 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form
880 * <i>super.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n +1</sub>, &hellip; 939 * <i>super.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n +1</sub>, &hellip;
881 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe r method invocation 940 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe r method invocation
882 * occurs in a top-level function or variable initializer, in an instance vari able initializer or 941 * occurs in a top-level function or variable initializer, in an instance vari able initializer or
883 * initializer list, in class Object, in a factory constructor, or in a static method or variable 942 * initializer list, in class Object, in a factory constructor, or in a static method or variable
884 * initializer. 943 * initializer.
885 */ 944 */
886 static final CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = new CompileTimeEr rorCode('SUPER_IN_INVALID_CONTEXT', 95, ""); 945 static final CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = new CompileTimeEr rorCode('SUPER_IN_INVALID_CONTEXT', 97, "");
887 /** 946 /**
888 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile-time 947 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile-time
889 * error if a generative constructor of class Object includes a superinitializ er. 948 * error if a generative constructor of class Object includes a superinitializ er.
890 */ 949 */
891 static final CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = new CompileTim eErrorCode('SUPER_INITIALIZER_IN_OBJECT', 96, ""); 950 static final CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = new CompileTim eErrorCode('SUPER_INITIALIZER_IN_OBJECT', 98, "");
892 /** 951 /**
893 * 12.11 Instance Creation: It is a compile-time error if a constructor of a n on-generic type 952 * 12.11 Instance Creation: It is a compile-time error if a constructor of a n on-generic type
894 * invoked by a new expression or a constant object expression is passed any t ype arguments. 953 * invoked by a new expression or a constant object expression is passed any t ype arguments.
895 * <p> 954 * <p>
896 * 12.32 Type Cast: It is a compile-time error if <i>T</i> is a parameterized type of the form 955 * 12.32 Type Cast: It is a compile-time error if <i>T</i> is a parameterized type of the form
897 * <i>G&lt;T<sub>1</sub>, &hellip;, T<sub>n</sub>&gt;</i> and <i>G</i> is not a generic type with 956 * <i>G&lt;T<sub>1</sub>, &hellip;, T<sub>n</sub>&gt;</i> and <i>G</i> is not a generic type with
898 * <i>n</i> type parameters. 957 * <i>n</i> type parameters.
899 */ 958 */
900 static final CompileTimeErrorCode TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS = new C ompileTimeErrorCode('TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS', 97, ""); 959 static final CompileTimeErrorCode TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS = new C ompileTimeErrorCode('TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS', 99, "");
901 /** 960 /**
902 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super initializer appears 961 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super initializer appears
903 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ e constructor. It is 962 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ e constructor. It is
904 * a compile-time error if class <i>S</i> does not declare a generative constr uctor named <i>S</i> 963 * a compile-time error if class <i>S</i> does not declare a generative constr uctor named <i>S</i>
905 * (respectively <i>S.id</i>) 964 * (respectively <i>S.id</i>)
906 */ 965 */
907 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = new C ompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 98, ""); 966 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = new C ompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 100, "");
908 /** 967 /**
909 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Ea ch final instance 968 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Ea ch final instance
910 * variable <i>f</i> declared in the immediately enclosing class must have an initializer in 969 * variable <i>f</i> declared in the immediately enclosing class must have an initializer in
911 * <i>k</i>'s initializer list unless it has already been initialized by one o f the following 970 * <i>k</i>'s initializer list unless it has already been initialized by one o f the following
912 * means: 971 * means:
913 * <ol> 972 * <ol>
914 * <li>Initialization at the declaration of <i>f</i>. 973 * <li>Initialization at the declaration of <i>f</i>.
915 * <li>Initialization by means of an initializing formal of <i>k</i>. 974 * <li>Initialization by means of an initializing formal of <i>k</i>.
916 * </ol> 975 * </ol>
917 * or a compile-time error occurs. 976 * or a compile-time error occurs.
918 */ 977 */
919 static final CompileTimeErrorCode UNINITIALIZED_FINAL_FIELD = new CompileTimeE rrorCode('UNINITIALIZED_FINAL_FIELD', 99, ""); 978 static final CompileTimeErrorCode UNINITIALIZED_FINAL_FIELD = new CompileTimeE rrorCode('UNINITIALIZED_FINAL_FIELD', 101, "");
920 /** 979 /**
921 * 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time constant, or if 980 * 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time constant, or if
922 * <i>x</i> involves string interpolation. 981 * <i>x</i> involves string interpolation.
923 * <p> 982 * <p>
924 * 14.3 Parts: It is a compile-time error if <i>s</i> is not a compile-time co nstant, or if 983 * 14.3 Parts: It is a compile-time error if <i>s</i> is not a compile-time co nstant, or if
925 * <i>s</i> involves string interpolation. 984 * <i>s</i> involves string interpolation.
926 * <p> 985 * <p>
927 * 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that d escribes a URI is 986 * 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that d escribes a URI is
928 * not a compile-time constant, or if <i>x</i> involves string interpolation. 987 * not a compile-time constant, or if <i>x</i> involves string interpolation.
929 */ 988 */
930 static final CompileTimeErrorCode URI_WITH_INTERPOLATION = new CompileTimeErro rCode('URI_WITH_INTERPOLATION', 100, "URIs cannot use string interpolation"); 989 static final CompileTimeErrorCode URI_WITH_INTERPOLATION = new CompileTimeErro rCode('URI_WITH_INTERPOLATION', 102, "URIs cannot use string interpolation");
931 /** 990 /**
932 * 7.1.1 Operators: It is a compile-time error if the arity of the user-declar ed operator []= is 991 * 7.1.1 Operators: It is a compile-time error if the arity of the user-declar ed operator []= is
933 * not 2. It is a compile time error if the arity of a user-declared operator with one of the 992 * not 2. It is a compile time error if the arity of a user-declared operator with one of the
934 * names: &lt;, &gt;, &lt;=, &gt;=, ==, +, /, ~/, *, %, |, ^, &, &lt;&lt;, &gt ;&gt;, [] is not 1. 993 * names: &lt;, &gt;, &lt;=, &gt;=, ==, +, /, ~/, *, %, |, ^, &, &lt;&lt;, &gt ;&gt;, [] is not 1.
935 * It is a compile time error if the arity of the user-declared operator - is not 0 or 1. It is a 994 * It is a compile time error if the arity of the user-declared operator - is not 0 or 1. It is a
936 * compile time error if the arity of the user-declared operator ~ is not 0. 995 * compile time error if the arity of the user-declared operator ~ is not 0.
937 */ 996 */
938 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = ne w CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 101, ""); 997 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = ne w CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 103, "");
939 /** 998 /**
940 * 7.3 Setters: It is a compile-time error if a setter’s formal parameter li st does not include 999 * 7.3 Setters: It is a compile-time error if a setter’s formal parameter li st does not include
941 * exactly one required formal parameter <i>p</i>. 1000 * exactly one required formal parameter <i>p</i>.
942 */ 1001 */
943 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = new CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 102, ""); 1002 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = new CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 104, "");
944 /** 1003 /**
945 * 12.11 Instance Creation: It is a compile-time error if a constructor of a g eneric type with 1004 * 12.11 Instance Creation: It is a compile-time error if a constructor of a g eneric type with
946 * <i>n</i> type parameters invoked by a new expression or a constant object e xpression is passed 1005 * <i>n</i> type parameters invoked by a new expression or a constant object e xpression is passed
947 * <i>m</i> type arguments where <i>m != n</i>. 1006 * <i>m</i> type arguments where <i>m != n</i>.
948 * <p> 1007 * <p>
949 * 12.31 Type Test: It is a compile-time error if <i>T</i> is a parameterized type of the form 1008 * 12.31 Type Test: It is a compile-time error if <i>T</i> is a parameterized type of the form
950 * <i>G&lt;T<sub>1</sub>, &hellip;, T<sub>n</sub>&gt;</i> and <i>G</i> is not a generic type with 1009 * <i>G&lt;T<sub>1</sub>, &hellip;, T<sub>n</sub>&gt;</i> and <i>G</i> is not a generic type with
951 * <i>n</i> type parameters. 1010 * <i>n</i> type parameters.
952 */ 1011 */
953 static final CompileTimeErrorCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = new Compile TimeErrorCode('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 103, ""); 1012 static final CompileTimeErrorCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = new Compile TimeErrorCode('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 105, "");
954 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, COMPILE_TIME_CONSTANT_RAISES_EXCEPTION_DIVIDE_BY_ ZERO, CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, CONFLICTING_CONSTRUCTOR_NAME_AND_M ETHOD, CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, CONST_FORMAL_PARAMETER, CONST_INI TIALIZED_WITH_NON_CONSTANT_VALUE, CONST_EVAL_THROWS_EXCEPTION, CONST_WITH_INVALI D_TYPE_PARAMETERS, CONST_WITH_NON_CONST, CONST_WITH_NON_CONSTANT_ARGUMENT, CONST _WITH_NON_TYPE, CONST_WITH_TYPE_PARAMETERS, CONST_WITH_UNDEFINED_CONSTRUCTOR, DE FAULT_VALUE_IN_FUNCTION_TYPE_ALIAS, DUPLICATE_DEFINITION, DUPLICATE_MEMBER_NAME, DUPLICATE_MEMBER_NAME_INSTANCE_STATIC, DUPLICATE_NAMED_ARGUMENT, EXPORT_OF_NON_ LIBRARY, EXTENDS_NON_CLASS, EXTENDS_DISALLOWED_CLASS, IMPLEMENTS_DISALLOWED_CLAS S, FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS, FIELD_INITIALIZED_IN_INITIALIZER_ AND_DECLARATION, FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER, FIELD_INITIALIZ ER_OUTSIDE_CONSTRUCTOR, FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR, FINAL_ INITIALIZED_MULTIPLE_TIMES, FINAL_NOT_INITIALIZED, GETTER_AND_METHOD_WITH_SAME_N AME, IMPLEMENTS_DYNAMIC, IMPLEMENTS_NON_CLASS, IMPLEMENTS_REPEATED, IMPLEMENTS_S ELF, IMPORT_DUPLICATED_LIBRARY_NAME, IMPORT_OF_NON_LIBRARY, INCONSITENT_CASE_EXP RESSION_TYPES, INITIALIZER_FOR_NON_EXISTANT_FIELD, INVALID_CONSTANT, INVALID_CON STRUCTOR_NAME, INVALID_FACTORY_NAME_NOT_A_CLASS, INVALID_OVERRIDE_DEFAULT_VALUE, INVALID_OVERRIDE_NAMED, INVALID_OVERRIDE_POSITIONAL, INVALID_OVERRIDE_REQUIRED, INVALID_REFERENCE_TO_THIS, INVALID_TYPE_ARGUMENT_FOR_KEY, INVALID_TYPE_ARGUMENT _IN_CONST_LIST, INVALID_TYPE_ARGUMENT_IN_CONST_MAP, INVALID_VARIABLE_IN_INITIALI ZER, LABEL_IN_OUTER_SCOPE, LABEL_UNDEFINED, MEMBER_WITH_CLASS_NAME, MIXIN_DECLAR ES_CONSTRUCTOR, MIXIN_INHERITS_FROM_NOT_OBJECT, MIXIN_OF_NON_CLASS, MIXIN_OF_NON _MIXIN, MIXIN_REFERENCES_SUPER, MIXIN_WITH_NON_CLASS_SUPERCLASS, MULTIPLE_SUPER_ INITIALIZERS, NEW_WITH_INVALID_TYPE_PARAMETERS, NON_CONST_MAP_AS_EXPRESSION_STAT EMENT, NON_CONSTANT_CASE_EXPRESSION, NON_CONSTANT_DEFAULT_VALUE, NON_CONSTANT_LI ST_ELEMENT, NON_CONSTANT_MAP_KEY, NON_CONSTANT_MAP_VALUE, NON_CONSTANT_VALUE_IN_ INITIALIZER, OBJECT_CANNOT_EXTEND_ANOTHER_CLASS, OPTIONAL_PARAMETER_IN_OPERATOR, OVERRIDE_MISSING_NAMED_PARAMETERS, OVERRIDE_MISSING_REQUIRED_PARAMETERS, PART_O F_NON_PART, PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER, PRIVATE_OPTIONAL_PARAMETER, R ECURSIVE_COMPILE_TIME_CONSTANT, RECURSIVE_FACTORY_REDIRECT, RECURSIVE_FUNCTION_T YPE_ALIAS, RECURSIVE_INTERFACE_INHERITANCE, REDIRECT_TO_NON_CONST_CONSTRUCTOR, R EFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER, RESERVED_WORD_AS_IDENTIFIER, RETHR OW_OUTSIDE_CATCH, RETURN_IN_GENERATIVE_CONSTRUCTOR, STATIC_TOP_LEVEL_FUNCTION, S TATIC_TOP_LEVEL_VARIABLE, SUPER_IN_INVALID_CONTEXT, SUPER_INITIALIZER_IN_OBJECT, TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS, UNDEFINED_CONSTRUCTOR_IN_INITIALIZER, UNI NITIALIZED_FINAL_FIELD, URI_WITH_INTERPOLATION, WRONG_NUMBER_OF_PARAMETERS_FOR_O PERATOR, WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER, WRONG_NUMBER_OF_TYPE_ARGUMENTS]; 1013 static final List<CompileTimeErrorCode> values = [AMBIGUOUS_EXPORT, AMBIGUOUS_ IMPORT, ARGUMENT_DEFINITION_TEST_NON_PARAMETER, BUILT_IN_IDENTIFIER_AS_TYPE, BUI LT_IN_IDENTIFIER_AS_TYPE_NAME, BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, BUILT_IN_IDE NTIFIER_AS_TYPE_VARIABLE_NAME, CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, COMPILE_T IME_CONSTANT_RAISES_EXCEPTION, CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, CONFLICTI NG_CONSTRUCTOR_NAME_AND_METHOD, CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, CONST_FO RMAL_PARAMETER, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, CONST_EVAL_THROWS_EXC EPTION, CONST_WITH_INVALID_TYPE_PARAMETERS, CONST_WITH_NON_CONST, CONST_WITH_NON _CONSTANT_ARGUMENT, CONST_WITH_NON_TYPE, CONST_WITH_TYPE_PARAMETERS, CONST_WITH_ UNDEFINED_CONSTRUCTOR, DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS, DUPLICATE_DEFINITIO N, DUPLICATE_MEMBER_NAME, DUPLICATE_MEMBER_NAME_INSTANCE_STATIC, DUPLICATE_NAMED _ARGUMENT, EXPORT_OF_NON_LIBRARY, EXTENDS_NON_CLASS, EXTENDS_DISALLOWED_CLASS, I MPLEMENTS_DISALLOWED_CLASS, FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS, FIELD_IN ITIALIZED_IN_INITIALIZER_AND_DECLARATION, FIELD_INITIALIZED_IN_PARAMETER_AND_INI TIALIZER, FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR, FINAL_INITIALIZED_IN_DECLARATIO N_AND_CONSTRUCTOR, FINAL_INITIALIZED_MULTIPLE_TIMES, FINAL_NOT_INITIALIZED, GETT ER_AND_METHOD_WITH_SAME_NAME, IMPLEMENTS_DYNAMIC, IMPLEMENTS_NON_CLASS, IMPLEMEN TS_REPEATED, IMPLEMENTS_SELF, IMPORT_DUPLICATED_LIBRARY_NAME, IMPORT_OF_NON_LIBR ARY, INCONSITENT_CASE_EXPRESSION_TYPES, INITIALIZER_FOR_NON_EXISTANT_FIELD, INIT IALIZER_FOR_STATIC_FIELD, INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD, INITIALIZI NG_FORMAL_FOR_STATIC_FIELD, INVALID_CONSTANT, INVALID_CONSTRUCTOR_NAME, INVALID_ FACTORY_NAME_NOT_A_CLASS, INVALID_OVERRIDE_DEFAULT_VALUE, INVALID_OVERRIDE_NAMED , INVALID_OVERRIDE_POSITIONAL, INVALID_OVERRIDE_REQUIRED, INVALID_REFERENCE_TO_T HIS, INVALID_TYPE_ARGUMENT_FOR_KEY, INVALID_TYPE_ARGUMENT_IN_CONST_LIST, INVALID _TYPE_ARGUMENT_IN_CONST_MAP, INVALID_URI, LABEL_IN_OUTER_SCOPE, LABEL_UNDEFINED, MEMBER_WITH_CLASS_NAME, MIXIN_DECLARES_CONSTRUCTOR, MIXIN_INHERITS_FROM_NOT_OBJ ECT, MIXIN_OF_NON_CLASS, MIXIN_OF_NON_MIXIN, MIXIN_REFERENCES_SUPER, MIXIN_WITH_ NON_CLASS_SUPERCLASS, MULTIPLE_SUPER_INITIALIZERS, NEW_WITH_INVALID_TYPE_PARAMET ERS, NON_CONST_MAP_AS_EXPRESSION_STATEMENT, NON_CONSTANT_CASE_EXPRESSION, NON_CO NSTANT_DEFAULT_VALUE, NON_CONSTANT_LIST_ELEMENT, NON_CONSTANT_MAP_KEY, NON_CONST ANT_MAP_VALUE, NON_CONSTANT_VALUE_IN_INITIALIZER, OBJECT_CANNOT_EXTEND_ANOTHER_C LASS, OPTIONAL_PARAMETER_IN_OPERATOR, OVERRIDE_MISSING_NAMED_PARAMETERS, OVERRID E_MISSING_REQUIRED_PARAMETERS, PART_OF_NON_PART, PREFIX_COLLIDES_WITH_TOP_LEVEL_ MEMBER, PRIVATE_OPTIONAL_PARAMETER, RECURSIVE_COMPILE_TIME_CONSTANT, RECURSIVE_F ACTORY_REDIRECT, RECURSIVE_FUNCTION_TYPE_ALIAS, RECURSIVE_INTERFACE_INHERITANCE, REDIRECT_TO_NON_CONST_CONSTRUCTOR, REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZE R, RESERVED_WORD_AS_IDENTIFIER, RETHROW_OUTSIDE_CATCH, RETURN_IN_GENERATIVE_CONS TRUCTOR, STATIC_TOP_LEVEL_FUNCTION, STATIC_TOP_LEVEL_VARIABLE, SUPER_IN_INVALID_ CONTEXT, SUPER_INITIALIZER_IN_OBJECT, TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS, UNDE FINED_CONSTRUCTOR_IN_INITIALIZER, UNINITIALIZED_FINAL_FIELD, URI_WITH_INTERPOLAT ION, WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR, WRONG_NUMBER_OF_PARAMETERS_FOR_SET TER, WRONG_NUMBER_OF_TYPE_ARGUMENTS];
955 final String __name; 1014 final String __name;
956 final int __ordinal; 1015 final int __ordinal;
957 int get ordinal => __ordinal; 1016 int get ordinal => __ordinal;
958 /** 1017 /**
959 * The message template used to create the message to be displayed for this er ror. 1018 * The message template used to create the message to be displayed for this er ror.
960 */ 1019 */
961 String _message; 1020 String _message;
962 /** 1021 /**
963 * Initialize a newly created error code to have the given message. 1022 * Initialize a newly created error code to have the given message.
964 * @param message the message template used to create the message to be displa yed for the error 1023 * @param message the message template used to create the message to be displa yed for the error
965 */ 1024 */
966 CompileTimeErrorCode(this.__name, this.__ordinal, String message) { 1025 CompileTimeErrorCode(this.__name, this.__ordinal, String message) {
967 this._message = message; 1026 this._message = message;
968 } 1027 }
969 ErrorSeverity get errorSeverity => ErrorType.COMPILE_TIME_ERROR.severity; 1028 ErrorSeverity get errorSeverity => ErrorType.COMPILE_TIME_ERROR.severity;
970 String get message => _message; 1029 String get message => _message;
971 ErrorType get type => ErrorType.COMPILE_TIME_ERROR; 1030 ErrorType get type => ErrorType.COMPILE_TIME_ERROR;
972 bool needsRecompilation() => true; 1031 bool needsRecompilation() => true;
1032 int compareTo(CompileTimeErrorCode other) => __ordinal - other.__ordinal;
973 String toString() => __name; 1033 String toString() => __name;
974 } 1034 }
975 /** 1035 /**
976 * The enumeration {@code StaticWarningCode} defines the error codes used for st atic warnings. The 1036 * The enumeration {@code StaticWarningCode} defines the error codes used for st atic warnings. The
977 * convention for this class is for the name of the error code to indicate the p roblem that caused 1037 * convention for this class is for the name of the error code to indicate the p roblem that caused
978 * the error to be generated and for the error message to explain what is wrong and, when 1038 * the error to be generated and for the error message to explain what is wrong and, when
979 * appropriate, how the problem can be corrected. 1039 * appropriate, how the problem can be corrected.
980 * @coverage dart.engine.error 1040 * @coverage dart.engine.error
981 */ 1041 */
982 class StaticWarningCode implements ErrorCode { 1042 class StaticWarningCode implements Comparable<StaticWarningCode>, ErrorCode {
983 /** 1043 /**
984 * 12.11.1 New: It is a static warning if the static type of <i>a<sub>i</sub>, 1 &lt;= i &lt;= n+ 1044 * 12.11.1 New: It is a static warning if the static type of <i>a<sub>i</sub>, 1 &lt;= i &lt;= n+
985 * k</i> may not be assigned to the type of the corresponding formal parameter of the constructor 1045 * k</i> may not be assigned to the type of the corresponding formal parameter of the constructor
986 * <i>T.id</i> (respectively <i>T</i>). 1046 * <i>T.id</i> (respectively <i>T</i>).
987 * <p> 1047 * <p>
988 * 12.11.2 Const: It is a static warning if the static type of <i>a<sub>i</sub >, 1 &lt;= i &lt;= 1048 * 12.11.2 Const: It is a static warning if the static type of <i>a<sub>i</sub >, 1 &lt;= i &lt;=
989 * n+ k</i> may not be assigned to the type of the corresponding formal parame ter of the 1049 * n+ k</i> may not be assigned to the type of the corresponding formal parame ter of the
990 * constructor <i>T.id</i> (respectively <i>T</i>). 1050 * constructor <i>T.id</i> (respectively <i>T</i>).
991 * <p> 1051 * <p>
992 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of 1052 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 * 13.9 Switch: It is a static warning if the type of <i>e</i> may not be assi gned to the type of 1296 * 13.9 Switch: It is a static warning if the type of <i>e</i> may not be assi gned to the type of
1237 * <i>e<sub>k</sub></i>. 1297 * <i>e<sub>k</sub></i>.
1238 */ 1298 */
1239 static final StaticWarningCode SWITCH_EXPRESSION_NOT_ASSIGNABLE = new StaticWa rningCode('SWITCH_EXPRESSION_NOT_ASSIGNABLE', 41, ""); 1299 static final StaticWarningCode SWITCH_EXPRESSION_NOT_ASSIGNABLE = new StaticWa rningCode('SWITCH_EXPRESSION_NOT_ASSIGNABLE', 41, "");
1240 /** 1300 /**
1241 * 12.15.3 Static Invocation: A static method invocation <i>i</i> has the form 1301 * 12.15.3 Static Invocation: A static method invocation <i>i</i> has the form
1242 * <i>C.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</ sub>, &hellip; 1302 * <i>C.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</ sub>, &hellip;
1243 * 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 1303 * 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
1244 * class in the current scope. 1304 * class in the current scope.
1245 */ 1305 */
1246 static final StaticWarningCode UNDEFINED_CLASS = new StaticWarningCode('UNDEFI NED_CLASS', 42, ""); 1306 static final StaticWarningCode UNDEFINED_CLASS = new StaticWarningCode('UNDEFI NED_CLASS', 42, "Undefined class '%s'");
1247 /** 1307 /**
1248 * 12.17 Getter Invocation: It is a static warning if there is no class <i>C</ i> in the enclosing 1308 * 12.17 Getter Invocation: It is a static warning if there is no class <i>C</ i> in the enclosing
1249 * lexical scope of <i>i</i>, or if <i>C</i> does not declare, implicitly or e xplicitly, a getter 1309 * lexical scope of <i>i</i>, or if <i>C</i> does not declare, implicitly or e xplicitly, a getter
1250 * named <i>m</i>. 1310 * named <i>m</i>.
1311 * @param getterName the name of the getter
1312 * @param enclosingType the name of the enclosing type where the getter is bei ng looked for
1251 */ 1313 */
1252 static final StaticWarningCode UNDEFINED_GETTER = new StaticWarningCode('UNDEF INED_GETTER', 43, ""); 1314 static final StaticWarningCode UNDEFINED_GETTER = new StaticWarningCode('UNDEF INED_GETTER', 43, "There is no such getter '%s' in '%s'");
1253 /** 1315 /**
1254 * 12.30 Identifier Reference: It is as static warning if an identifier expres sion of the form 1316 * 12.30 Identifier Reference: It is as static warning if an identifier expres sion of the form
1255 * <i>id</i> occurs inside a top level or static function (be it function, met hod, getter, or 1317 * <i>id</i> occurs inside a top level or static function (be it function, met hod, getter, or
1256 * setter) or variable initializer and there is no declaration <i>d</i> with n ame <i>id</i> in the 1318 * setter) or variable initializer and there is no declaration <i>d</i> with n ame <i>id</i> in the
1257 * lexical scope enclosing the expression. 1319 * lexical scope enclosing the expression.
1258 */ 1320 */
1259 static final StaticWarningCode UNDEFINED_IDENTIFIER = new StaticWarningCode('U NDEFINED_IDENTIFIER', 44, ""); 1321 static final StaticWarningCode UNDEFINED_IDENTIFIER = new StaticWarningCode('U NDEFINED_IDENTIFIER', 44, "Undefined name '%s'");
1322 /**
1323 * 12.30 Identifier Reference: It is as static warning if an identifier expres sion of the form
1324 * <i>id</i> occurs inside a top level or static function (be it function, met hod, getter, or
1325 * setter) or variable initializer and there is no declaration <i>d</i> with n ame <i>id</i> in the
1326 * lexical scope enclosing the expression.
1327 * @param operator the name of the operator
1328 * @param enclosingType the name of the enclosing type where the operator is b eing looked for
1329 */
1330 static final StaticWarningCode UNDEFINED_OPERATOR = new StaticWarningCode('UND EFINED_OPERATOR', 45, "There is no such operator '%s' in '%s'");
1260 /** 1331 /**
1261 * 12.18 Assignment: It is as static warning if an assignment of the form <i>v = e</i> occurs 1332 * 12.18 Assignment: It is as static warning if an assignment of the form <i>v = e</i> occurs
1262 * inside a top level or static function (be it function, method, getter, or s etter) or variable 1333 * inside a top level or static function (be it function, method, getter, or s etter) or variable
1263 * initializer and there is no declaration <i>d</i> with name <i>v=</i> in the lexical scope 1334 * initializer and there is no declaration <i>d</i> with name <i>v=</i> in the lexical scope
1264 * enclosing the assignment. 1335 * enclosing the assignment.
1265 * <p> 1336 * <p>
1266 * 12.18 Assignment: It is a static warning if there is no class <i>C</i> in t he enclosing lexical 1337 * 12.18 Assignment: It is a static warning if there is no class <i>C</i> in t he enclosing lexical
1267 * scope of the assignment, or if <i>C</i> does not declare, implicitly or exp licitly, a setter 1338 * scope of the assignment, or if <i>C</i> does not declare, implicitly or exp licitly, a setter
1268 * <i>v=</i>. 1339 * <i>v=</i>.
1340 * @param setterName the name of the getter
1341 * @param enclosingType the name of the enclosing type where the setter is bei ng looked for
1269 */ 1342 */
1270 static final StaticWarningCode UNDEFINED_SETTER = new StaticWarningCode('UNDEF INED_SETTER', 45, ""); 1343 static final StaticWarningCode UNDEFINED_SETTER = new StaticWarningCode('UNDEF INED_SETTER', 46, "There is no such setter '%s' in '%s'");
1271 /** 1344 /**
1272 * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not decl are a static method 1345 * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not decl are a static method
1273 * or getter <i>m</i>. 1346 * or getter <i>m</i>.
1347 * @param methodName the name of the method
1348 * @param enclosingType the name of the enclosing type where the method is bei ng looked for
1274 */ 1349 */
1275 static final StaticWarningCode UNDEFINED_STATIC_METHOD_OR_GETTER = new StaticW arningCode('UNDEFINED_STATIC_METHOD_OR_GETTER', 46, ""); 1350 static final StaticWarningCode UNDEFINED_STATIC_METHOD_OR_GETTER = new StaticW arningCode('UNDEFINED_STATIC_METHOD_OR_GETTER', 47, "There is no such static met hod '%s' in '%s'");
1276 static final List<StaticWarningCode> values = [ARGUMENT_TYPE_NOT_ASSIGNABLE, A SSIGNMENT_TO_FINAL, CASE_BLOCK_NOT_TERMINATED, CAST_TO_NON_TYPE, COMMENT_REFEREN CE_CONSTRUCTOR_NOT_VISIBLE, COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE, COMMENT_RE FERENCE_UNDECLARED_CONSTRUCTOR, COMMENT_REFERENCE_UNDECLARED_IDENTIFIER, COMMENT _REFERENCE_URI_NOT_LIBRARY, CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, CONFLICTING_INS TANCE_GETTER_AND_SUPERCLASS_MEMBER, CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_M EMBER, CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER, CONFLICTING_STATIC_SETTER_ AND_INSTANCE_GETTER, CONST_WITH_ABSTRACT_CLASS, EQUAL_KEYS_IN_MAP, FIELD_INITIAL IZER_WITH_INVALID_TYPE, INCORRECT_NUMBER_OF_ARGUMENTS, INSTANCE_METHOD_NAME_COLL IDES_WITH_SUPERCLASS_STATIC, INVALID_FACTORY_NAME, INVALID_OVERRIDE_GETTER_TYPE, INVALID_OVERRIDE_RETURN_TYPE, INVALID_OVERRIDE_SETTER_RETURN_TYPE, INVOCATION_O F_NON_FUNCTION, MISMATCHED_GETTER_AND_SETTER_TYPES, NEW_WITH_ABSTRACT_CLASS, NEW _WITH_NON_TYPE, NEW_WITH_UNDEFINED_CONSTRUCTOR, NON_ABSTRACT_CLASS_INHERITS_ABST RACT_MEMBER, NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_METHOD, NON_TYPE, NON_TYPE_IN_ CATCH_CLAUSE, NON_VOID_RETURN_FOR_OPERATOR, NON_VOID_RETURN_FOR_SETTER, OVERRIDE _NOT_SUBTYPE, OVERRIDE_WITH_DIFFERENT_DEFAULT, PART_OF_DIFFERENT_LIBRARY, REDIRE CT_TO_INVALID_RETURN_TYPE, REDIRECT_TO_MISSING_CONSTRUCTOR, REDIRECT_TO_NON_CLAS S, RETURN_WITHOUT_VALUE, SWITCH_EXPRESSION_NOT_ASSIGNABLE, UNDEFINED_CLASS, UNDE FINED_GETTER, UNDEFINED_IDENTIFIER, UNDEFINED_SETTER, UNDEFINED_STATIC_METHOD_OR _GETTER]; 1351 static final List<StaticWarningCode> values = [ARGUMENT_TYPE_NOT_ASSIGNABLE, A SSIGNMENT_TO_FINAL, CASE_BLOCK_NOT_TERMINATED, CAST_TO_NON_TYPE, COMMENT_REFEREN CE_CONSTRUCTOR_NOT_VISIBLE, COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE, COMMENT_RE FERENCE_UNDECLARED_CONSTRUCTOR, COMMENT_REFERENCE_UNDECLARED_IDENTIFIER, COMMENT _REFERENCE_URI_NOT_LIBRARY, CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, CONFLICTING_INS TANCE_GETTER_AND_SUPERCLASS_MEMBER, CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_M EMBER, CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER, CONFLICTING_STATIC_SETTER_ AND_INSTANCE_GETTER, CONST_WITH_ABSTRACT_CLASS, EQUAL_KEYS_IN_MAP, FIELD_INITIAL IZER_WITH_INVALID_TYPE, INCORRECT_NUMBER_OF_ARGUMENTS, INSTANCE_METHOD_NAME_COLL IDES_WITH_SUPERCLASS_STATIC, INVALID_FACTORY_NAME, INVALID_OVERRIDE_GETTER_TYPE, INVALID_OVERRIDE_RETURN_TYPE, INVALID_OVERRIDE_SETTER_RETURN_TYPE, INVOCATION_O F_NON_FUNCTION, MISMATCHED_GETTER_AND_SETTER_TYPES, NEW_WITH_ABSTRACT_CLASS, NEW _WITH_NON_TYPE, NEW_WITH_UNDEFINED_CONSTRUCTOR, NON_ABSTRACT_CLASS_INHERITS_ABST RACT_MEMBER, NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_METHOD, NON_TYPE, NON_TYPE_IN_ CATCH_CLAUSE, NON_VOID_RETURN_FOR_OPERATOR, NON_VOID_RETURN_FOR_SETTER, OVERRIDE _NOT_SUBTYPE, OVERRIDE_WITH_DIFFERENT_DEFAULT, PART_OF_DIFFERENT_LIBRARY, REDIRE CT_TO_INVALID_RETURN_TYPE, REDIRECT_TO_MISSING_CONSTRUCTOR, REDIRECT_TO_NON_CLAS S, RETURN_WITHOUT_VALUE, SWITCH_EXPRESSION_NOT_ASSIGNABLE, UNDEFINED_CLASS, UNDE FINED_GETTER, UNDEFINED_IDENTIFIER, UNDEFINED_OPERATOR, UNDEFINED_SETTER, UNDEFI NED_STATIC_METHOD_OR_GETTER];
1277 final String __name; 1352 final String __name;
1278 final int __ordinal; 1353 final int __ordinal;
1279 int get ordinal => __ordinal; 1354 int get ordinal => __ordinal;
1280 /** 1355 /**
1281 * The message template used to create the message to be displayed for this er ror. 1356 * The message template used to create the message to be displayed for this er ror.
1282 */ 1357 */
1283 String _message; 1358 String _message;
1284 /** 1359 /**
1285 * Initialize a newly created error code to have the given type and message. 1360 * Initialize a newly created error code to have the given type and message.
1286 * @param message the message template used to create the message to be displa yed for the error 1361 * @param message the message template used to create the message to be displa yed for the error
1287 */ 1362 */
1288 StaticWarningCode(this.__name, this.__ordinal, String message) { 1363 StaticWarningCode(this.__name, this.__ordinal, String message) {
1289 this._message = message; 1364 this._message = message;
1290 } 1365 }
1291 ErrorSeverity get errorSeverity => ErrorType.STATIC_WARNING.severity; 1366 ErrorSeverity get errorSeverity => ErrorType.STATIC_WARNING.severity;
1292 String get message => _message; 1367 String get message => _message;
1293 ErrorType get type => ErrorType.STATIC_WARNING; 1368 ErrorType get type => ErrorType.STATIC_WARNING;
1294 bool needsRecompilation() => true; 1369 bool needsRecompilation() => true;
1370 int compareTo(StaticWarningCode other) => __ordinal - other.__ordinal;
1295 String toString() => __name; 1371 String toString() => __name;
1296 } 1372 }
1297 /** 1373 /**
1298 * The interface {@code AnalysisErrorListener} defines the behavior of objects t hat listen for{@link AnalysisError analysis errors} being produced by the analys is engine. 1374 * The interface {@code AnalysisErrorListener} defines the behavior of objects t hat listen for{@link AnalysisError analysis errors} being produced by the analys is engine.
1299 * @coverage dart.engine.error 1375 * @coverage dart.engine.error
1300 */ 1376 */
1301 abstract class AnalysisErrorListener { 1377 abstract class AnalysisErrorListener {
1302 /** 1378 /**
1379 * An error listener that ignores errors that are reported to it.
1380 */
1381 AnalysisErrorListener _NULL_LISTENER = new AnalysisErrorListener_4();
1382 /**
1303 * This method is invoked when an error has been found by the analysis engine. 1383 * This method is invoked when an error has been found by the analysis engine.
1304 * @param error the error that was just found (not {@code null}) 1384 * @param error the error that was just found (not {@code null})
1305 */ 1385 */
1306 void onError(AnalysisError error); 1386 void onError(AnalysisError error);
1307 } 1387 }
1388 class AnalysisErrorListener_4 implements AnalysisErrorListener {
1389 void onError(AnalysisError event) {
1390 }
1391 }
1308 /** 1392 /**
1309 * The enumeration {@code StaticTypeWarningCode} defines the error codes used fo r static type 1393 * The enumeration {@code StaticTypeWarningCode} defines the error codes used fo r static type
1310 * warnings. The convention for this class is for the name of the error code to indicate the problem 1394 * warnings. The convention for this class is for the name of the error code to indicate the problem
1311 * that caused the error to be generated and for the error message to explain wh at is wrong and, 1395 * that caused the error to be generated and for the error message to explain wh at is wrong and,
1312 * when appropriate, how the problem can be corrected. 1396 * when appropriate, how the problem can be corrected.
1313 * @coverage dart.engine.error 1397 * @coverage dart.engine.error
1314 */ 1398 */
1315 class StaticTypeWarningCode implements ErrorCode { 1399 class StaticTypeWarningCode implements Comparable<StaticTypeWarningCode>, ErrorC ode {
1316 /** 1400 /**
1317 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. It is a static type 1401 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. It is a static type
1318 * warning if <i>T</i> does not have an accessible instance setter named <i>v= </i>. 1402 * warning if <i>T</i> does not have an accessible instance setter named <i>v= </i>.
1319 * @see #UNDEFINED_SETTER 1403 * @see #UNDEFINED_SETTER
1320 */ 1404 */
1321 static final StaticTypeWarningCode INACCESSIBLE_SETTER = new StaticTypeWarning Code('INACCESSIBLE_SETTER', 0, ""); 1405 static final StaticTypeWarningCode INACCESSIBLE_SETTER = new StaticTypeWarning Code('INACCESSIBLE_SETTER', 0, "");
1322 /** 1406 /**
1323 * 8.1.1 Inheritance and Overriding: However, if there are multiple members <i >m<sub>1</sub>, 1407 * 8.1.1 Inheritance and Overriding: However, if there are multiple members <i >m<sub>1</sub>,
1324 * &hellip; m<sub>k</sub></i> with the same name <i>n</i> that would be inheri ted (because 1408 * &hellip; m<sub>k</sub></i> with the same name <i>n</i> that would be inheri ted (because
1325 * identically named members existed in several superinterfaces) then at most one member is 1409 * identically named members existed in several superinterfaces) then at most one member is
(...skipping 16 matching lines...) Expand all
1342 * 12.18 Assignment: It is a static type warning if the static type of <i>e</i > may not be 1426 * 12.18 Assignment: It is a static type warning if the static type of <i>e</i > may not be
1343 * assigned to the static type of <i>v</i>. The static type of the expression <i>v = e</i> is the 1427 * assigned to the static type of <i>v</i>. The static type of the expression <i>v = e</i> is the
1344 * static type of <i>e</i>. 1428 * static type of <i>e</i>.
1345 * <p> 1429 * <p>
1346 * 12.18 Assignment: It is a static type warning if the static type of <i>e</i > may not be 1430 * 12.18 Assignment: It is a static type warning if the static type of <i>e</i > may not be
1347 * assigned to the static type of <i>C.v</i>. The static type of the expressio n <i>C.v = e</i> is 1431 * assigned to the static type of <i>C.v</i>. The static type of the expressio n <i>C.v = e</i> is
1348 * the static type of <i>e</i>. 1432 * the static type of <i>e</i>.
1349 * <p> 1433 * <p>
1350 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. It is a static type 1434 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. It is a static type
1351 * warning if the static type of <i>e<sub>2</sub></i> may not be assigned to < i>T</i>. 1435 * warning if the static type of <i>e<sub>2</sub></i> may not be assigned to < i>T</i>.
1436 * @param rhsTypeName the name of the right hand side type
1352 * @param lhsTypeName the name of the left hand side type 1437 * @param lhsTypeName the name of the left hand side type
1353 * @param rhsTypeName the name of the right hand side type
1354 */ 1438 */
1355 static final StaticTypeWarningCode INVALID_ASSIGNMENT = new StaticTypeWarningC ode('INVALID_ASSIGNMENT', 2, "The type '%s' can't be assigned a '%s'"); 1439 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'");
1356 /** 1440 /**
1357 * 12.14.4 Function Expression Invocation: A function expression invocation <i >i</i> has the form 1441 * 12.14.4 Function Expression Invocation: A function expression invocation <i >i</i> has the form
1358 * <i>e<sub>f</sub>(a<sub>1</sub>, &hellip; a<sub>n</sub>, x<sub>n+1</sub>: a< sub>n+1</sub>, 1442 * <i>e<sub>f</sub>(a<sub>1</sub>, &hellip; a<sub>n</sub>, x<sub>n+1</sub>: a< sub>n+1</sub>,
1359 * &hellip;, x<sub>n+k</sub>: a<sub>n+k</sub>)</i>, where <i>e<sub>f</sub></i> is an expression. 1443 * &hellip;, x<sub>n+k</sub>: a<sub>n+k</sub>)</i>, where <i>e<sub>f</sub></i> is an expression.
1360 * <p> 1444 * <p>
1361 * It is a static type warning if the static type <i>F</i> of <i>e<sub>f</sub> </i> may not be 1445 * It is a static type warning if the static type <i>F</i> of <i>e<sub>f</sub> </i> may not be
1362 * assigned to a function type. 1446 * assigned to a function type.
1363 * <p> 1447 * <p>
1364 * 12.15.1 Ordinary Invocation: An ordinary method invocation <i>i</i> has the form 1448 * 12.15.1 Ordinary Invocation: An ordinary method invocation <i>i</i> has the form
1365 * <i>o.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</ sub>, &hellip; 1449 * <i>o.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</ sub>, &hellip;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 */ 1482 */
1399 static final StaticTypeWarningCode NON_TYPE_AS_TYPE_ARGUMENT = new StaticTypeW arningCode('NON_TYPE_AS_TYPE_ARGUMENT', 6, ""); 1483 static final StaticTypeWarningCode NON_TYPE_AS_TYPE_ARGUMENT = new StaticTypeW arningCode('NON_TYPE_AS_TYPE_ARGUMENT', 6, "");
1400 /** 1484 /**
1401 * 7.6.2 Factories: It is a static type warning if any of the type arguments t o <i>k’</i> are not 1485 * 7.6.2 Factories: It is a static type warning if any of the type arguments t o <i>k’</i> are not
1402 * subtypes of the bounds of the corresponding formal type parameters of type. 1486 * subtypes of the bounds of the corresponding formal type parameters of type.
1403 */ 1487 */
1404 static final StaticTypeWarningCode REDIRECT_WITH_INVALID_TYPE_PARAMETERS = new StaticTypeWarningCode('REDIRECT_WITH_INVALID_TYPE_PARAMETERS', 7, ""); 1488 static final StaticTypeWarningCode REDIRECT_WITH_INVALID_TYPE_PARAMETERS = new StaticTypeWarningCode('REDIRECT_WITH_INVALID_TYPE_PARAMETERS', 7, "");
1405 /** 1489 /**
1406 * 13.11 Return: It is a static type warning if the type of <i>e</i> may not b e assigned to the 1490 * 13.11 Return: It is a static type warning if the type of <i>e</i> may not b e assigned to the
1407 * declared return type of the immediately enclosing function. 1491 * declared return type of the immediately enclosing function.
1492 * @param actualReturnType the return type as declared in the return statement
1493 * @param expectedReturnType the expected return type as defined by the method
1494 * @param methodName the name of the method
1408 */ 1495 */
1409 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"); 1496 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'");
1410 /** 1497 /**
1411 * 12.11 Instance Creation: It is a static type warning if any of the type arg uments to a 1498 * 12.11 Instance Creation: It is a static type warning if any of the type arg uments to a
1412 * constructor of a generic type <i>G</i> invoked by a new expression or a con stant object 1499 * constructor of a generic type <i>G</i> invoked by a new expression or a con stant object
1413 * expression are not subtypes of the bounds of the corresponding formal type parameters of 1500 * expression are not subtypes of the bounds of the corresponding formal type parameters of
1414 * <i>G</i>. 1501 * <i>G</i>.
1415 * @param boundedTypeName the name of the type used in the instance creation t hat should be 1502 * @param boundedTypeName the name of the type used in the instance creation t hat should be
1416 * limited by the bound as specified in the class declaration 1503 * limited by the bound as specified in the class declaration
1417 * @param boundingTypeName the name of the bounding type 1504 * @param boundingTypeName the name of the bounding type
1418 */ 1505 */
1419 static final StaticTypeWarningCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = new Sta ticTypeWarningCode('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 9, "'%s' does not extend '%s'"); 1506 static final StaticTypeWarningCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = new Sta ticTypeWarningCode('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 9, "'%s' does not extend '%s'");
1420 /** 1507 /**
1421 * 10 Generics: It is a static type warning if a type parameter is a supertype of its upper bound. 1508 * 10 Generics: It is a static type warning if a type parameter is a supertype of its upper bound.
1422 * <p> 1509 * <p>
1423 * 15.8 Parameterized Types: If <i>S</i> is the static type of a member <i>m</ i> of <i>G</i>, then 1510 * 15.8 Parameterized Types: If <i>S</i> is the static type of a member <i>m</ i> of <i>G</i>, then
1424 * the static type of the member <i>m</i> of <i>G&lt;A<sub>1</sub>, &hellip; A <sub>n</sub>&gt;</i> 1511 * the static type of the member <i>m</i> of <i>G&lt;A<sub>1</sub>, &hellip; A <sub>n</sub>&gt;</i>
1425 * is <i>[A<sub>1</sub>, &hellip;, A<sub>n</sub>/T<sub>1</sub>, &hellip;, T<su b>n</sub>]S</i> 1512 * is <i>[A<sub>1</sub>, &hellip;, A<sub>n</sub>/T<sub>1</sub>, &hellip;, T<su b>n</sub>]S</i>
1426 * where <i>T<sub>1</sub>, &hellip; T<sub>n</sub></i> are the formal type para meters of <i>G</i>. 1513 * where <i>T<sub>1</sub>, &hellip; T<sub>n</sub></i> are the formal type para meters of <i>G</i>.
1427 * Let <i>B<sub>i</sub></i> be the bounds of <i>T<sub>i</sub>, 1 &lt;= i &lt;= n</i>. It is a 1514 * Let <i>B<sub>i</sub></i> be the bounds of <i>T<sub>i</sub>, 1 &lt;= i &lt;= n</i>. It is a
1428 * static type warning if <i>A<sub>i</sub></i> is not a subtype of <i>[A<sub>1 </sub>, &hellip;, 1515 * static type warning if <i>A<sub>i</sub></i> is not a subtype of <i>[A<sub>1 </sub>, &hellip;,
1429 * A<sub>n</sub>/T<sub>1</sub>, &hellip;, T<sub>n</sub>]B<sub>i</sub>, 1 &lt;= i &lt;= n</i>. 1516 * A<sub>n</sub>/T<sub>1</sub>, &hellip;, T<sub>n</sub>]B<sub>i</sub>, 1 &lt;= i &lt;= n</i>.
1430 */ 1517 */
1431 static final StaticTypeWarningCode TYPE_ARGUMENT_VIOLATES_BOUNDS = new StaticT ypeWarningCode('TYPE_ARGUMENT_VIOLATES_BOUNDS', 10, ""); 1518 static final StaticTypeWarningCode TYPE_ARGUMENT_VIOLATES_BOUNDS = new StaticT ypeWarningCode('TYPE_ARGUMENT_VIOLATES_BOUNDS', 10, "");
1432 /** 1519 /**
1520 * Specification reference needed. This is equivalent to {@link #UNDEFINED_MET HOD}, but for
1521 * top-level functions.
1522 * @param methodName the name of the method that is undefined
1523 */
1524 static final StaticTypeWarningCode UNDEFINED_FUNCTION = new StaticTypeWarningC ode('UNDEFINED_FUNCTION', 11, "The FUNCTION '%s' is not defined");
1525 /**
1433 * 12.17 Getter Invocation: Let <i>T</i> be the static type of <i>e</i>. It is a static type 1526 * 12.17 Getter Invocation: Let <i>T</i> be the static type of <i>e</i>. It is a static type
1434 * warning if <i>T</i> does not have a getter named <i>m</i>. 1527 * warning if <i>T</i> does not have a getter named <i>m</i>.
1528 * @param getterName the name of the getter
1529 * @param enclosingType the name of the enclosing type where the getter is bei ng looked for
1435 */ 1530 */
1436 static final StaticTypeWarningCode UNDEFINED_GETTER = new StaticTypeWarningCod e('UNDEFINED_GETTER', 11, "There is no such getter '%s' in '%s'"); 1531 static final StaticTypeWarningCode UNDEFINED_GETTER = new StaticTypeWarningCod e('UNDEFINED_GETTER', 12, "There is no such getter '%s' in '%s'");
1532 /**
1533 * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>. I t is a static type
1534 * warning if <i>T</i> does not have an accessible instance member named <i>m< /i>.
1535 * @param methodName the name of the method that is undefined
1536 * @param typeName the resolved type name that the method lookup is happening on
1537 */
1538 static final StaticTypeWarningCode UNDEFINED_METHOD = new StaticTypeWarningCod e('UNDEFINED_METHOD', 13, "The method '%s' is not defined for the class '%s'");
1437 /** 1539 /**
1438 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. It is a static type 1540 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. It is a static type
1439 * warning if <i>T</i> does not have an accessible instance setter named <i>v= </i>. 1541 * warning if <i>T</i> does not have an accessible instance setter named <i>v= </i>.
1542 * @param setterName the name of the setter
1543 * @param enclosingType the name of the enclosing type where the setter is bei ng looked for
1440 * @see #INACCESSIBLE_SETTER 1544 * @see #INACCESSIBLE_SETTER
1441 */ 1545 */
1442 static final StaticTypeWarningCode UNDEFINED_SETTER = new StaticTypeWarningCod e('UNDEFINED_SETTER', 12, "There is no such setter '%s' in '%s'"); 1546 static final StaticTypeWarningCode UNDEFINED_SETTER = new StaticTypeWarningCod e('UNDEFINED_SETTER', 14, "There is no such setter '%s' in '%s'");
1443 /** 1547 /**
1444 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form 1548 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form
1445 * <i>super.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n +1</sub>, &hellip; 1549 * <i>super.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n +1</sub>, &hellip;
1446 * 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 1550 * 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
1447 * accessible instance member named <i>m</i>. 1551 * accessible instance member named <i>m</i>.
1448 * @param methodName the name of the method that is undefined 1552 * @param methodName the name of the method that is undefined
1449 * @param typeName the resolved type name that the method lookup is happening on 1553 * @param typeName the resolved type name that the method lookup is happening on
1450 */ 1554 */
1451 static final StaticTypeWarningCode UNDEFINED_SUPER_METHOD = new StaticTypeWarn ingCode('UNDEFINED_SUPER_METHOD', 13, "There is no such method '%s' in '%s'"); 1555 static final StaticTypeWarningCode UNDEFINED_SUPER_METHOD = new StaticTypeWarn ingCode('UNDEFINED_SUPER_METHOD', 15, "There is no such method '%s' in '%s'");
1452 /** 1556 /**
1453 * 15.8 Parameterized Types: It is a static type warning if <i>G</i> is not an accessible generic 1557 * 15.8 Parameterized Types: It is a static type warning if <i>G</i> is not an accessible generic
1454 * type declaration with <i>n</i> type parameters. 1558 * type declaration with <i>n</i> type parameters.
1455 * @param typeName the name of the type being referenced (<i>G</i>) 1559 * @param typeName the name of the type being referenced (<i>G</i>)
1560 * @param parameterCount the number of type parameters that were declared
1456 * @param argumentCount the number of type arguments provided 1561 * @param argumentCount the number of type arguments provided
1457 * @param parameterCount the number of type parameters that were declared
1458 */ 1562 */
1459 static final StaticTypeWarningCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = new Static TypeWarningCode('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 14, "The type '%s' is declared with %d type parameters, but %d type arguments were given"); 1563 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");
1460 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_GETTER, UNDEFINED_SETTER, UNDEFINED_SU PER_METHOD, WRONG_NUMBER_OF_TYPE_ARGUMENTS]; 1564 static final List<StaticTypeWarningCode> values = [INACCESSIBLE_SETTER, INCONS ISTENT_METHOD_INHERITANCE, INVALID_ASSIGNMENT, INVOCATION_OF_NON_FUNCTION, NON_B OOL_CONDITION, NON_BOOL_EXPRESSION, NON_TYPE_AS_TYPE_ARGUMENT, REDIRECT_WITH_INV ALID_TYPE_PARAMETERS, RETURN_OF_INVALID_TYPE, TYPE_ARGUMENT_NOT_MATCHING_BOUNDS, TYPE_ARGUMENT_VIOLATES_BOUNDS, UNDEFINED_FUNCTION, UNDEFINED_GETTER, UNDEFINED_ METHOD, UNDEFINED_SETTER, UNDEFINED_SUPER_METHOD, WRONG_NUMBER_OF_TYPE_ARGUMENTS ];
1461 final String __name; 1565 final String __name;
1462 final int __ordinal; 1566 final int __ordinal;
1463 int get ordinal => __ordinal; 1567 int get ordinal => __ordinal;
1464 /** 1568 /**
1465 * The message template used to create the message to be displayed for this er ror. 1569 * The message template used to create the message to be displayed for this er ror.
1466 */ 1570 */
1467 String _message; 1571 String _message;
1468 /** 1572 /**
1469 * Initialize a newly created error code to have the given type and message. 1573 * Initialize a newly created error code to have the given type and message.
1470 * @param message the message template used to create the message to be displa yed for the error 1574 * @param message the message template used to create the message to be displa yed for the error
1471 */ 1575 */
1472 StaticTypeWarningCode(this.__name, this.__ordinal, String message) { 1576 StaticTypeWarningCode(this.__name, this.__ordinal, String message) {
1473 this._message = message; 1577 this._message = message;
1474 } 1578 }
1475 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; 1579 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity;
1476 String get message => _message; 1580 String get message => _message;
1477 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; 1581 ErrorType get type => ErrorType.STATIC_TYPE_WARNING;
1478 bool needsRecompilation() => true; 1582 bool needsRecompilation() => true;
1583 int compareTo(StaticTypeWarningCode other) => __ordinal - other.__ordinal;
1479 String toString() => __name; 1584 String toString() => __name;
1480 } 1585 }
OLDNEW
« no previous file with comments | « pkg/analyzer_experimental/lib/src/generated/engine.dart ('k') | pkg/analyzer_experimental/lib/src/generated/html.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698