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

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

Issue 17249003: New analyzer_experimental snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 library engine.error; 3 library engine.error;
4 import 'java_core.dart'; 4 import 'java_core.dart';
5 import 'source.dart'; 5 import 'source.dart';
6 import 'ast.dart' show ASTNode; 6 import 'ast.dart' show ASTNode;
7 import 'scanner.dart' show Token; 7 import 'scanner.dart' show Token;
8 /** 8 /**
9 * Instances of the enumeration {@code ErrorSeverity} represent the severity of an {@link ErrorCode}. 9 * Instances of the enumeration `ErrorSeverity` represent the severity of an [Er rorCode].
10 * @coverage dart.engine.error 10 * @coverage dart.engine.error
11 */ 11 */
12 class ErrorSeverity implements Comparable<ErrorSeverity> { 12 class ErrorSeverity implements Comparable<ErrorSeverity> {
13 13
14 /** 14 /**
15 * The severity representing a non-error. This is never used for any error cod e, but is useful for 15 * The severity representing a non-error. This is never used for any error cod e, but is useful for
16 * clients. 16 * clients.
17 */ 17 */
18 static final ErrorSeverity NONE = new ErrorSeverity('NONE', 0, " ", "none"); 18 static final ErrorSeverity NONE = new ErrorSeverity('NONE', 0, " ", "none");
19 19
20 /** 20 /**
21 * The severity representing a suggestion. Suggestions are not specified in th e Dart language 21 * The severity representing a suggestion. Suggestions are not specified in th e Dart language
22 * specification, but provide information about best practices. 22 * specification, but provide information about best practices.
23 */ 23 */
24 static final ErrorSeverity SUGGESTION = new ErrorSeverity('SUGGESTION', 1, "S" , "suggestion"); 24 static final ErrorSeverity SUGGESTION = new ErrorSeverity('SUGGESTION', 1, "S" , "suggestion");
25 25
26 /** 26 /**
27 * The severity representing a warning. Warnings can become errors if the {@co de -Werror} command 27 * The severity representing a warning. Warnings can become errors if the `-We rror` command
28 * line flag is specified. 28 * line flag is specified.
29 */ 29 */
30 static final ErrorSeverity WARNING = new ErrorSeverity('WARNING', 2, "W", "war ning"); 30 static final ErrorSeverity WARNING = new ErrorSeverity('WARNING', 2, "W", "war ning");
31 31
32 /** 32 /**
33 * The severity representing an error. 33 * The severity representing an error.
34 */ 34 */
35 static final ErrorSeverity ERROR = new ErrorSeverity('ERROR', 3, "E", "error") ; 35 static final ErrorSeverity ERROR = new ErrorSeverity('ERROR', 3, "E", "error") ;
36 static final List<ErrorSeverity> values = [NONE, SUGGESTION, WARNING, ERROR]; 36 static final List<ErrorSeverity> values = [NONE, SUGGESTION, WARNING, ERROR];
37 37
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 * Return the severity constant that represents the greatest severity. 77 * Return the severity constant that represents the greatest severity.
78 * @param severity the severity being compared against 78 * @param severity the severity being compared against
79 * @return the most sever of this or the given severity 79 * @return the most sever of this or the given severity
80 */ 80 */
81 ErrorSeverity max(ErrorSeverity severity) => this.ordinal >= severity.ordinal ? this : severity; 81 ErrorSeverity max(ErrorSeverity severity) => this.ordinal >= severity.ordinal ? this : severity;
82 int compareTo(ErrorSeverity other) => ordinal - other.ordinal; 82 int compareTo(ErrorSeverity other) => ordinal - other.ordinal;
83 int get hashCode => ordinal; 83 int get hashCode => ordinal;
84 String toString() => name; 84 String toString() => name;
85 } 85 }
86 /** 86 /**
87 * Instances of the class {@code AnalysisErrorWithProperties} 87 * Instances of the class `AnalysisErrorWithProperties`
88 */ 88 */
89 class AnalysisErrorWithProperties extends AnalysisError { 89 class AnalysisErrorWithProperties extends AnalysisError {
90 90
91 /** 91 /**
92 * The properties associated with this error. 92 * The properties associated with this error.
93 */ 93 */
94 Map<ErrorProperty, Object> _propertyMap = new Map<ErrorProperty, Object>(); 94 Map<ErrorProperty, Object> _propertyMap = new Map<ErrorProperty, Object>();
95 95
96 /** 96 /**
97 * Initialize a newly created analysis error for the specified source. The err or has no location 97 * Initialize a newly created analysis error for the specified source. The err or has no location
(...skipping 17 matching lines...) Expand all
115 * @param arguments the arguments used to build the error message 115 * @param arguments the arguments used to build the error message
116 */ 116 */
117 AnalysisErrorWithProperties.con2(Source source, int offset, int length, ErrorC ode errorCode, List<Object> arguments) : super.con2(source, offset, length, erro rCode, arguments) { 117 AnalysisErrorWithProperties.con2(Source source, int offset, int length, ErrorC ode errorCode, List<Object> arguments) : super.con2(source, offset, length, erro rCode, arguments) {
118 _jtd_constructor_134_impl(source, offset, length, errorCode, arguments); 118 _jtd_constructor_134_impl(source, offset, length, errorCode, arguments);
119 } 119 }
120 _jtd_constructor_134_impl(Source source, int offset, int length, ErrorCode err orCode, List<Object> arguments) { 120 _jtd_constructor_134_impl(Source source, int offset, int length, ErrorCode err orCode, List<Object> arguments) {
121 } 121 }
122 Object getProperty(ErrorProperty property) => _propertyMap[property]; 122 Object getProperty(ErrorProperty property) => _propertyMap[property];
123 123
124 /** 124 /**
125 * Set the value of the given property to the given value. Using a value of {@ code null} will 125 * Set the value of the given property to the given value. Using a value of `n ull` will
126 * effectively remove the property from this error. 126 * effectively remove the property from this error.
127 * @param property the property whose value is to be returned 127 * @param property the property whose value is to be returned
128 * @param value the new value of the given property 128 * @param value the new value of the given property
129 */ 129 */
130 void setProperty(ErrorProperty property, Object value) { 130 void setProperty(ErrorProperty property, Object value) {
131 _propertyMap[property] = value; 131 _propertyMap[property] = value;
132 } 132 }
133 } 133 }
134 /** 134 /**
135 * Instances of the class {@code ErrorReporter} wrap an error listener with util ity methods used to 135 * Instances of the class `ErrorReporter` wrap an error listener with utility me thods used to
136 * create the errors being reported. 136 * create the errors being reported.
137 * @coverage dart.engine.error 137 * @coverage dart.engine.error
138 */ 138 */
139 class ErrorReporter { 139 class ErrorReporter {
140 140
141 /** 141 /**
142 * The error listener to which errors will be reported. 142 * The error listener to which errors will be reported.
143 */ 143 */
144 AnalysisErrorListener _errorListener; 144 AnalysisErrorListener _errorListener;
145 145
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 * Report an error with the given error code and arguments. 210 * Report an error with the given error code and arguments.
211 * @param errorCode the error code of the error to be reported 211 * @param errorCode the error code of the error to be reported
212 * @param token the token specifying the location of the error 212 * @param token the token specifying the location of the error
213 * @param arguments the arguments to the error, used to compose the error mess age 213 * @param arguments the arguments to the error, used to compose the error mess age
214 */ 214 */
215 void reportError4(ErrorCode errorCode, Token token, List<Object> arguments) { 215 void reportError4(ErrorCode errorCode, Token token, List<Object> arguments) {
216 _errorListener.onError(new AnalysisError.con2(_source, token.offset, token.l ength, errorCode, arguments)); 216 _errorListener.onError(new AnalysisError.con2(_source, token.offset, token.l ength, errorCode, arguments));
217 } 217 }
218 218
219 /** 219 /**
220 * Set the source to be used when reporting errors. Setting the source to {@co de null} will cause 220 * Set the source to be used when reporting errors. Setting the source to `nul l` will cause
221 * the default source to be used. 221 * the default source to be used.
222 * @param source the source to be used when reporting errors 222 * @param source the source to be used when reporting errors
223 */ 223 */
224 void set source(Source source2) { 224 void set source(Source source2) {
225 this._source = source2 == null ? _defaultSource : source2; 225 this._source = source2 == null ? _defaultSource : source2;
226 } 226 }
227 } 227 }
228 /** 228 /**
229 * Instances of the class {@code AnalysisError} represent an error discovered du ring the analysis of 229 * Instances of the class `AnalysisError` represent an error discovered during t he analysis of
230 * some Dart code. 230 * some Dart code.
231 * @see AnalysisErrorListener 231 * @see AnalysisErrorListener
232 * @coverage dart.engine.error 232 * @coverage dart.engine.error
233 */ 233 */
234 class AnalysisError { 234 class AnalysisError {
235 235
236 /** 236 /**
237 * An empty array of errors used when no errors are expected. 237 * An empty array of errors used when no errors are expected.
238 */ 238 */
239 static List<AnalysisError> NO_ERRORS = new List<AnalysisError>(0); 239 static List<AnalysisError> NO_ERRORS = new List<AnalysisError>(0);
240 240
241 /** 241 /**
242 * A {@link Comparator} that sorts by the name of the file that the {@link Ana lysisError} was 242 * A [Comparator] that sorts by the name of the file that the [AnalysisError] was
243 * found. 243 * found.
244 */ 244 */
245 static Comparator<AnalysisError> FILE_COMPARATOR = (AnalysisError o1, Analysis Error o2) => o1.source.shortName.compareTo(o2.source.shortName); 245 static Comparator<AnalysisError> FILE_COMPARATOR = (AnalysisError o1, Analysis Error o2) => o1.source.shortName.compareTo(o2.source.shortName);
246 246
247 /** 247 /**
248 * A {@link Comparator} that sorts error codes first by their severity (errors first, warnings 248 * A [Comparator] that sorts error codes first by their severity (errors first , warnings
249 * second), and then by the the error code type. 249 * second), and then by the the error code type.
250 */ 250 */
251 static Comparator<AnalysisError> ERROR_CODE_COMPARATOR = (AnalysisError o1, An alysisError o2) { 251 static Comparator<AnalysisError> ERROR_CODE_COMPARATOR = (AnalysisError o1, An alysisError o2) {
252 ErrorCode errorCode1 = o1.errorCode; 252 ErrorCode errorCode1 = o1.errorCode;
253 ErrorCode errorCode2 = o2.errorCode; 253 ErrorCode errorCode2 = o2.errorCode;
254 ErrorSeverity errorSeverity1 = errorCode1.errorSeverity; 254 ErrorSeverity errorSeverity1 = errorCode1.errorSeverity;
255 ErrorSeverity errorSeverity2 = errorCode2.errorSeverity; 255 ErrorSeverity errorSeverity2 = errorCode2.errorSeverity;
256 ErrorType errorType1 = errorCode1.type; 256 ErrorType errorType1 = errorCode1.type;
257 ErrorType errorType2 = errorCode2.type; 257 ErrorType errorType2 = errorCode2.type;
258 if (errorSeverity1 == errorSeverity2) { 258 if (errorSeverity1 == errorSeverity2) {
259 return errorType1.compareTo(errorType2); 259 return errorType1.compareTo(errorType2);
260 } else { 260 } else {
261 return errorSeverity2.compareTo(errorSeverity1); 261 return errorSeverity2.compareTo(errorSeverity1);
262 } 262 }
263 }; 263 };
264 264
265 /** 265 /**
266 * The error code associated with the error. 266 * The error code associated with the error.
267 */ 267 */
268 ErrorCode _errorCode; 268 ErrorCode _errorCode;
269 269
270 /** 270 /**
271 * The localized error message. 271 * The localized error message.
272 */ 272 */
273 String _message; 273 String _message;
274 274
275 /** 275 /**
276 * The source in which the error occurred, or {@code null} if unknown. 276 * The source in which the error occurred, or `null` if unknown.
277 */ 277 */
278 Source _source; 278 Source _source;
279 279
280 /** 280 /**
281 * The character offset from the beginning of the source (zero based) where th e error occurred. 281 * The character offset from the beginning of the source (zero based) where th e error occurred.
282 */ 282 */
283 int _offset = 0; 283 int _offset = 0;
284 284
285 /** 285 /**
286 * The number of characters from the offset to the end of the source which enc ompasses the 286 * The number of characters from the offset to the end of the source which enc ompasses the
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 String get message => _message; 343 String get message => _message;
344 344
345 /** 345 /**
346 * Return the character offset from the beginning of the source (zero based) w here the error 346 * Return the character offset from the beginning of the source (zero based) w here the error
347 * occurred. 347 * occurred.
348 * @return the offset to the start of the error location 348 * @return the offset to the start of the error location
349 */ 349 */
350 int get offset => _offset; 350 int get offset => _offset;
351 351
352 /** 352 /**
353 * Return the value of the given property, or {@code null} if the given proper ty is not defined 353 * Return the value of the given property, or `null` if the given property is not defined
354 * for this error. 354 * for this error.
355 * @param property the property whose value is to be returned 355 * @param property the property whose value is to be returned
356 * @return the value of the given property 356 * @return the value of the given property
357 */ 357 */
358 Object getProperty(ErrorProperty property) => null; 358 Object getProperty(ErrorProperty property) => null;
359 359
360 /** 360 /**
361 * Return the source in which the error occurred, or {@code null} if unknown. 361 * Return the source in which the error occurred, or `null` if unknown.
362 * @return the source in which the error occurred 362 * @return the source in which the error occurred
363 */ 363 */
364 Source get source => _source; 364 Source get source => _source;
365 int get hashCode { 365 int get hashCode {
366 int hashCode = _offset; 366 int hashCode = _offset;
367 hashCode ^= (_message != null) ? _message.hashCode : 0; 367 hashCode ^= (_message != null) ? _message.hashCode : 0;
368 hashCode ^= (_source != null) ? _source.hashCode : 0; 368 hashCode ^= (_source != null) ? _source.hashCode : 0;
369 return hashCode; 369 return hashCode;
370 } 370 }
371 371
(...skipping 10 matching lines...) Expand all
382 builder.append("("); 382 builder.append("(");
383 builder.append(_offset); 383 builder.append(_offset);
384 builder.append(".."); 384 builder.append("..");
385 builder.append(_offset + _length - 1); 385 builder.append(_offset + _length - 1);
386 builder.append("): "); 386 builder.append("): ");
387 builder.append(_message); 387 builder.append(_message);
388 return builder.toString(); 388 return builder.toString();
389 } 389 }
390 } 390 }
391 /** 391 /**
392 * The enumeration {@code ErrorProperty} defines the properties that can be asso ciated with an{@link AnalysisError}. 392 * The enumeration `ErrorProperty` defines the properties that can be associated with an[AnalysisError].
393 */ 393 */
394 class ErrorProperty implements Comparable<ErrorProperty> { 394 class ErrorProperty implements Comparable<ErrorProperty> {
395 395
396 /** 396 /**
397 * A property whose value is an array of {@link ExecutableElement executable e lements} that should 397 * A property whose value is an array of [ExecutableElement executable element s] that should
398 * be but are not implemented by a concrete class. 398 * be but are not implemented by a concrete class.
399 */ 399 */
400 static final ErrorProperty UNIMPLEMENTED_METHODS = new ErrorProperty('UNIMPLEM ENTED_METHODS', 0); 400 static final ErrorProperty UNIMPLEMENTED_METHODS = new ErrorProperty('UNIMPLEM ENTED_METHODS', 0);
401 static final List<ErrorProperty> values = [UNIMPLEMENTED_METHODS]; 401 static final List<ErrorProperty> values = [UNIMPLEMENTED_METHODS];
402 402
403 /// The name of this enum constant, as declared in the enum declaration. 403 /// The name of this enum constant, as declared in the enum declaration.
404 final String name; 404 final String name;
405 405
406 /// The position in the enum declaration. 406 /// The position in the enum declaration.
407 final int ordinal; 407 final int ordinal;
408 ErrorProperty(this.name, this.ordinal) { 408 ErrorProperty(this.name, this.ordinal) {
409 } 409 }
410 int compareTo(ErrorProperty other) => ordinal - other.ordinal; 410 int compareTo(ErrorProperty other) => ordinal - other.ordinal;
411 int get hashCode => ordinal; 411 int get hashCode => ordinal;
412 String toString() => name; 412 String toString() => name;
413 } 413 }
414 /** 414 /**
415 * The interface {@code ErrorCode} defines the behavior common to objects repres enting error codes 415 * The interface `ErrorCode` defines the behavior common to objects representing error codes
416 * associated with {@link AnalysisError analysis errors}. 416 * associated with [AnalysisError analysis errors].
417 * @coverage dart.engine.error 417 * @coverage dart.engine.error
418 */ 418 */
419 abstract class ErrorCode { 419 abstract class ErrorCode {
420 420
421 /** 421 /**
422 * Return the severity of this error. 422 * Return the severity of this error.
423 * @return the severity of this error 423 * @return the severity of this error
424 */ 424 */
425 ErrorSeverity get errorSeverity; 425 ErrorSeverity get errorSeverity;
426 426
427 /** 427 /**
428 * Return the message template used to create the message to be displayed for this error. 428 * Return the message template used to create the message to be displayed for this error.
429 * @return the message template used to create the message to be displayed for this error 429 * @return the message template used to create the message to be displayed for this error
430 */ 430 */
431 String get message; 431 String get message;
432 432
433 /** 433 /**
434 * Return the type of the error. 434 * Return the type of the error.
435 * @return the type of the error 435 * @return the type of the error
436 */ 436 */
437 ErrorType get type; 437 ErrorType get type;
438 } 438 }
439 /** 439 /**
440 * Instances of the enumeration {@code ErrorType} represent the type of an {@lin k ErrorCode}. 440 * Instances of the enumeration `ErrorType` represent the type of an [ErrorCode] .
441 * @coverage dart.engine.error 441 * @coverage dart.engine.error
442 */ 442 */
443 class ErrorType implements Comparable<ErrorType> { 443 class ErrorType implements Comparable<ErrorType> {
444 444
445 /** 445 /**
446 * Compile-time errors are errors that preclude execution. A compile time erro r must be reported 446 * Compile-time errors are errors that preclude execution. A compile time erro r must be reported
447 * by a Dart compiler before the erroneous code is executed. 447 * by a Dart compiler before the erroneous code is executed.
448 */ 448 */
449 static final ErrorType COMPILE_TIME_ERROR = new ErrorType('COMPILE_TIME_ERROR' , 0, ErrorSeverity.ERROR); 449 static final ErrorType COMPILE_TIME_ERROR = new ErrorType('COMPILE_TIME_ERROR' , 0, ErrorSeverity.ERROR);
450 450
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 /** 494 /**
495 * Return the severity of this type of error. 495 * Return the severity of this type of error.
496 * @return the severity of this type of error 496 * @return the severity of this type of error
497 */ 497 */
498 ErrorSeverity get severity => _severity; 498 ErrorSeverity get severity => _severity;
499 int compareTo(ErrorType other) => ordinal - other.ordinal; 499 int compareTo(ErrorType other) => ordinal - other.ordinal;
500 int get hashCode => ordinal; 500 int get hashCode => ordinal;
501 String toString() => name; 501 String toString() => name;
502 } 502 }
503 /** 503 /**
504 * The enumeration {@code CompileTimeErrorCode} defines the error codes used for compile time 504 * The enumeration `CompileTimeErrorCode` defines the error codes used for compi le time
505 * errors. The convention for this class is for the name of the error code to in dicate the problem 505 * errors. The convention for this class is for the name of the error code to in dicate the problem
506 * that caused the error to be generated and for the error message to explain wh at is wrong and, 506 * that caused the error to be generated and for the error message to explain wh at is wrong and,
507 * when appropriate, how the problem can be corrected. 507 * when appropriate, how the problem can be corrected.
508 * @coverage dart.engine.error 508 * @coverage dart.engine.error
509 */ 509 */
510 class CompileTimeErrorCode implements Comparable<CompileTimeErrorCode>, ErrorCod e { 510 class CompileTimeErrorCode implements Comparable<CompileTimeErrorCode>, ErrorCod e {
511 511
512 /** 512 /**
513 * 14.2 Exports: It is a compile-time error if a name <i>N</i> is re-exported by a library 513 * 14.2 Exports: It is a compile-time error if a name <i>N</i> is re-exported by a library
514 * <i>L</i> and <i>N</i> is introduced into the export namespace of <i>L</i> b y more than one 514 * <i>L</i> and <i>N</i> is introduced into the export namespace of <i>L</i> b y more than one
515 * export. 515 * export.
516 * @param ambiguousElementName the name of the ambiguous element 516 * @param ambiguousElementName the name of the ambiguous element
517 * @param firstLibraryName the name of the first library that the type is foun d 517 * @param firstLibraryName the name of the first library that the type is foun d
518 * @param secondLibraryName the name of the second library that the type is fo und 518 * @param secondLibraryName the name of the second library that the type is fo und
519 */ 519 */
520 static final CompileTimeErrorCode AMBIGUOUS_EXPORT = new CompileTimeErrorCode( 'AMBIGUOUS_EXPORT', 0, "The element '%s' is defined in the libraries '%s' and '% s'"); 520 static final CompileTimeErrorCode AMBIGUOUS_EXPORT = new CompileTimeErrorCode( 'AMBIGUOUS_EXPORT', 0, "The element '%s' is defined in the libraries '%s' and '% s'");
521 521
522 /** 522 /**
523 * 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i >N</i> is introduced 523 * 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i >N</i> is introduced
524 * into the top level scope <i>L</i> by more than one import then: 524 * into the top level scope <i>L</i> by more than one import then:
525 * <ol> 525 * <ol>
526 * <li>It is a static warning if <i>N</i> is used as a type annotation. 526 * * It is a static warning if <i>N</i> is used as a type annotation.
527 * <li>In checked mode, it is a dynamic error if <i>N</i> is used as a type an notation and 527 * * In checked mode, it is a dynamic error if <i>N</i> is used as a type anno tation and
528 * referenced during a subtype test. 528 * referenced during a subtype test.
529 * <li>Otherwise, it is a compile-time error. 529 * * Otherwise, it is a compile-time error.
530 * </ol> 530 * </ol>
531 * @param ambiguousElementName the name of the ambiguous element 531 * @param ambiguousElementName the name of the ambiguous element
532 * @param firstLibraryName the name of the first library that the type is foun d 532 * @param firstLibraryName the name of the first library that the type is foun d
533 * @param secondLibraryName the name of the second library that the type is fo und 533 * @param secondLibraryName the name of the second library that the type is fo und
534 */ 534 */
535 static final CompileTimeErrorCode AMBIGUOUS_IMPORT = new CompileTimeErrorCode( 'AMBIGUOUS_IMPORT', 1, "The element '%s' is defined in the libraries '%s' and '% s'"); 535 static final CompileTimeErrorCode AMBIGUOUS_IMPORT = new CompileTimeErrorCode( 'AMBIGUOUS_IMPORT', 1, "The element '%s' is defined in the libraries '%s' and '% s'");
536 536
537 /** 537 /**
538 * 12.33 Argument Definition Test: It is a compile time error if <i>v</i> does not denote a formal 538 * 12.33 Argument Definition Test: It is a compile time error if <i>v</i> does not denote a formal
539 * parameter. 539 * parameter.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 595
596 /** 596 /**
597 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an 597 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an
598 * uncaught exception being thrown. 598 * uncaught exception being thrown.
599 */ 599 */
600 static final CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION = new Com pileTimeErrorCode('CONST_CONSTRUCTOR_THROWS_EXCEPTION', 11, "'const' constructor s cannot throw exceptions"); 600 static final CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION = new Com pileTimeErrorCode('CONST_CONSTRUCTOR_THROWS_EXCEPTION', 11, "'const' constructor s cannot throw exceptions");
601 601
602 /** 602 /**
603 * 7.6.3 Constant Constructors: It is a compile-time error if a constant const ructor is declared 603 * 7.6.3 Constant Constructors: It is a compile-time error if a constant const ructor is declared
604 * by a class that has a non-final instance variable. 604 * by a class that has a non-final instance variable.
605 * <p> 605 *
606 * The above refers to both locally declared and inherited instance variables. 606 * The above refers to both locally declared and inherited instance variables.
607 */ 607 */
608 static final CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD = new CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD', 12, "Cannot defi ne the 'const' constructor for a class with non-final fields"); 608 static final CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD = new CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD', 12, "Cannot defi ne the 'const' constructor for a class with non-final fields");
609 609
610 /** 610 /**
611 * 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error if o is not 611 * 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error if o is not
612 * <b>null</b> and the interface of the class of <i>o</i> is not a subtype of the static type of 612 * <b>null</b> and the interface of the class of <i>o</i> is not a subtype of the static type of
613 * the field <i>v</i>. 613 * the field <i>v</i>.
614 * <p> 614 *
615 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an 615 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an
616 * uncaught exception being thrown. 616 * uncaught exception being thrown.
617 * @param initializerType the name of the type of the initializer expression 617 * @param initializerType the name of the type of the initializer expression
618 * @param fieldType the name of the type of the field 618 * @param fieldType the name of the type of the field
619 */ 619 */
620 static final CompileTimeErrorCode CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE = new CompileTimeErrorCode('CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE', 13, "The initial izer type '%s' cannot be assigned to the field type '%s'"); 620 static final CompileTimeErrorCode CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE = new CompileTimeErrorCode('CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE', 13, "The initial izer type '%s' cannot be assigned to the field type '%s'");
621 621
622 /** 622 /**
623 * 6.2 Formal Parameters: It is a compile-time error if a formal parameter is declared as a 623 * 6.2 Formal Parameters: It is a compile-time error if a formal parameter is declared as a
624 * constant variable. 624 * constant variable.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 689
690 /** 690 /**
691 * 12.11.2 Const: In all of the above cases, it is a compile-time error if <i> a<sub>i</sub>, 1 691 * 12.11.2 Const: In all of the above cases, it is a compile-time error if <i> a<sub>i</sub>, 1
692 * &lt;= i &lt;= n + k</i>, is not a compile-time constant expression. 692 * &lt;= i &lt;= n + k</i>, is not a compile-time constant expression.
693 */ 693 */
694 static final CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = new Compi leTimeErrorCode('CONST_WITH_NON_CONSTANT_ARGUMENT', 24, "Arguments of a constant creation must be constant expressions"); 694 static final CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = new Compi leTimeErrorCode('CONST_WITH_NON_CONSTANT_ARGUMENT', 24, "Arguments of a constant creation must be constant expressions");
695 695
696 /** 696 /**
697 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access ible in the current 697 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access ible in the current
698 * scope, optionally followed by type arguments. 698 * scope, optionally followed by type arguments.
699 * <p> 699 *
700 * 12.11.2 Const: If <i>e</i> is of the form <i>const T.id(a<sub>1</sub>, &hel lip;, a<sub>n</sub>, 700 * 12.11.2 Const: If <i>e</i> is of the form <i>const T.id(a<sub>1</sub>, &hel lip;, a<sub>n</sub>,
701 * 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 701 * 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
702 * compile-time error if <i>T</i> is not a class accessible in the current sco pe, optionally 702 * compile-time error if <i>T</i> is not a class accessible in the current sco pe, optionally
703 * followed by type arguments. 703 * followed by type arguments.
704 * @param name the name of the non-type element 704 * @param name the name of the non-type element
705 */ 705 */
706 static final CompileTimeErrorCode CONST_WITH_NON_TYPE = new CompileTimeErrorCo de('CONST_WITH_NON_TYPE', 25, "The name '%s' is not a class"); 706 static final CompileTimeErrorCode CONST_WITH_NON_TYPE = new CompileTimeErrorCo de('CONST_WITH_NON_TYPE', 25, "The name '%s' is not a class");
707 707
708 /** 708 /**
709 * 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type par ameters. 709 * 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type par ameters.
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 784
785 /** 785 /**
786 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla ss <i>C</i> includes 786 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla ss <i>C</i> includes
787 * a type expression that does not denote a class available in the lexical sco pe of <i>C</i>. 787 * a type expression that does not denote a class available in the lexical sco pe of <i>C</i>.
788 * @param typeName the name of the superclass that was not found 788 * @param typeName the name of the superclass that was not found
789 */ 789 */
790 static final CompileTimeErrorCode EXTENDS_NON_CLASS = new CompileTimeErrorCode ('EXTENDS_NON_CLASS', 38, "Classes can only extend other classes"); 790 static final CompileTimeErrorCode EXTENDS_NON_CLASS = new CompileTimeErrorCode ('EXTENDS_NON_CLASS', 38, "Classes can only extend other classes");
791 791
792 /** 792 /**
793 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i mplement Null. 793 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i mplement Null.
794 * <p> 794 *
795 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement int. 795 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement int.
796 * <p> 796 *
797 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement double. 797 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement double.
798 * <p> 798 *
799 * 12.3 Numbers: It is a compile-time error for any type other than the types int and double to 799 * 12.3 Numbers: It is a compile-time error for any type other than the types int and double to
800 * attempt to extend or implement num. 800 * attempt to extend or implement num.
801 * <p> 801 *
802 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend or implement bool. 802 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend or implement bool.
803 * <p> 803 *
804 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o r implement String. 804 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o r implement String.
805 * @param typeName the name of the type that cannot be extended 805 * @param typeName the name of the type that cannot be extended
806 * @see #IMPLEMENTS_DISALLOWED_CLASS 806 * @see #IMPLEMENTS_DISALLOWED_CLASS
807 */ 807 */
808 static final CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = new CompileTimeEr rorCode('EXTENDS_DISALLOWED_CLASS', 39, "Classes cannot extend '%s'"); 808 static final CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = new CompileTimeEr rorCode('EXTENDS_DISALLOWED_CLASS', 39, "Classes cannot extend '%s'");
809 809
810 /** 810 /**
811 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i> or if <i>m > n</i>. 811 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i> or if <i>m > n</i>.
812 * <p> 812 *
813 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an 813 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an
814 * uncaught exception being thrown. 814 * uncaught exception being thrown.
815 * @param requiredCount the maximum number of positional arguments 815 * @param requiredCount the maximum number of positional arguments
816 * @param argumentCount the actual number of positional arguments given 816 * @param argumentCount the actual number of positional arguments given
817 */ 817 */
818 static final CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS = new CompileTime ErrorCode('EXTRA_POSITIONAL_ARGUMENTS', 40, "%d positional arguments expected, b ut %d found"); 818 static final CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS = new CompileTime ErrorCode('EXTRA_POSITIONAL_ARGUMENTS', 40, "%d positional arguments expected, b ut %d found");
819 819
820 /** 820 /**
821 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i mplement Null. 821 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i mplement Null.
822 * <p> 822 *
823 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement int. 823 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement int.
824 * <p> 824 *
825 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement double. 825 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement double.
826 * <p> 826 *
827 * 12.3 Numbers: It is a compile-time error for any type other than the types int and double to 827 * 12.3 Numbers: It is a compile-time error for any type other than the types int and double to
828 * attempt to extend or implement num. 828 * attempt to extend or implement num.
829 * <p> 829 *
830 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend or implement bool. 830 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend or implement bool.
831 * <p> 831 *
832 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o r implement String. 832 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o r implement String.
833 * @param typeName the name of the type that cannot be implemented 833 * @param typeName the name of the type that cannot be implemented
834 * @see #EXTENDS_DISALLOWED_CLASS 834 * @see #EXTENDS_DISALLOWED_CLASS
835 */ 835 */
836 static final CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = new CompileTim eErrorCode('IMPLEMENTS_DISALLOWED_CLASS', 41, "Classes cannot implement '%s'"); 836 static final CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = new CompileTim eErrorCode('IMPLEMENTS_DISALLOWED_CLASS', 41, "Classes cannot implement '%s'");
837 837
838 /** 838 /**
839 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile time 839 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile time
840 * error if more than one initializer corresponding to a given instance variab le appears in 840 * error if more than one initializer corresponding to a given instance variab le appears in
841 * <i>k</i>'s list. 841 * <i>k</i>'s list.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 879
880 /** 880 /**
881 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin g formal is used by 881 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin g formal is used by
882 * a function other than a non-redirecting generative constructor. 882 * a function other than a non-redirecting generative constructor.
883 */ 883 */
884 static final CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new CompileTimeErrorCode('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 48, "Initializing formal fields can only be used in constructors"); 884 static final CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new CompileTimeErrorCode('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 48, "Initializing formal fields can only be used in constructors");
885 885
886 /** 886 /**
887 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its 887 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its
888 * only action is to invoke another generative constructor. 888 * only action is to invoke another generative constructor.
889 * <p> 889 *
890 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin g formal is used by 890 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin g formal is used by
891 * a function other than a non-redirecting generative constructor. 891 * a function other than a non-redirecting generative constructor.
892 */ 892 */
893 static final CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR = new CompileTimeErrorCode('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', 49, "The r edirecting constructor cannot have a field initializer"); 893 static final CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR = new CompileTimeErrorCode('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', 49, "The r edirecting constructor cannot have a field initializer");
894 894
895 /** 895 /**
896 * 7.2 Getters: It is a compile-time error if a class has both a getter and a method with the same 896 * 7.2 Getters: It is a compile-time error if a class has both a getter and a method with the same
897 * name. 897 * name.
898 * @param name the conflicting name of the getter and method 898 * @param name the conflicting name of the getter and method
899 */ 899 */
(...skipping 16 matching lines...) Expand all
916 /** 916 /**
917 * 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears more than once in 917 * 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears more than once in
918 * the implements clause of a class. 918 * the implements clause of a class.
919 * @param className the name of the class that is implemented more than once 919 * @param className the name of the class that is implemented more than once
920 */ 920 */
921 static final CompileTimeErrorCode IMPLEMENTS_REPEATED = new CompileTimeErrorCo de('IMPLEMENTS_REPEATED', 53, "'%s' can only be implemented once"); 921 static final CompileTimeErrorCode IMPLEMENTS_REPEATED = new CompileTimeErrorCo de('IMPLEMENTS_REPEATED', 53, "'%s' can only be implemented once");
922 922
923 /** 923 /**
924 * 7.6.1 Generative Constructors: Note that this is not in scope on the right hand side of an 924 * 7.6.1 Generative Constructors: Note that this is not in scope on the right hand side of an
925 * initializer. 925 * initializer.
926 * <p> 926 *
927 * 12.10 This: It is a compile-time error if this appears in a top-level funct ion or variable 927 * 12.10 This: It is a compile-time error if this appears in a top-level funct ion or variable
928 * initializer, in a factory constructor, or in a static method or variable in itializer, or in the 928 * initializer, in a factory constructor, or in a static method or variable in itializer, or in the
929 * initializer of an instance variable. 929 * initializer of an instance variable.
930 * @param name the name of the type in question 930 * @param name the name of the type in question
931 */ 931 */
932 static final CompileTimeErrorCode IMPLICIT_THIS_REFERENCE_IN_INITIALIZER = new CompileTimeErrorCode('IMPLICIT_THIS_REFERENCE_IN_INITIALIZER', 54, "The 'this' expression cannot be implicitly used in initializers"); 932 static final CompileTimeErrorCode IMPLICIT_THIS_REFERENCE_IN_INITIALIZER = new CompileTimeErrorCode('IMPLICIT_THIS_REFERENCE_IN_INITIALIZER', 54, "The 'this' expression cannot be implicitly used in initializers");
933 933
934 /** 934 /**
935 * SDK implementation libraries can be imported only by other SDK libraries. 935 * SDK implementation libraries can be imported only by other SDK libraries.
936 * @param uri the uri pointing to a library 936 * @param uri the uri pointing to a library
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 /** 1069 /**
1070 * 12.7 Maps: It is a compile time error if the type arguments of a constant m ap literal include a 1070 * 12.7 Maps: It is a compile time error if the type arguments of a constant m ap literal include a
1071 * type parameter. 1071 * type parameter.
1072 * @name the name of the type parameter 1072 * @name the name of the type parameter
1073 */ 1073 */
1074 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = new Com pileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 72, "Constant map litera ls cannot include a type parameter as a type argument, such as '%s'"); 1074 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = new Com pileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 72, "Constant map litera ls cannot include a type parameter as a type argument, such as '%s'");
1075 1075
1076 /** 1076 /**
1077 * 14.2 Exports: It is a compile-time error if the compilation unit found at t he specified URI is 1077 * 14.2 Exports: It is a compile-time error if the compilation unit found at t he specified URI is
1078 * not a library declaration. 1078 * not a library declaration.
1079 * <p> 1079 *
1080 * 14.1 Imports: It is a compile-time error if the compilation unit found at t he specified URI is 1080 * 14.1 Imports: It is a compile-time error if the compilation unit found at t he specified URI is
1081 * not a library declaration. 1081 * not a library declaration.
1082 * <p> 1082 *
1083 * 14.3 Parts: It is a compile time error if the contents of the URI are not a valid part 1083 * 14.3 Parts: It is a compile time error if the contents of the URI are not a valid part
1084 * declaration. 1084 * declaration.
1085 * @param uri the URI that is invalid 1085 * @param uri the URI that is invalid
1086 * @see #URI_DOES_NOT_EXIST 1086 * @see #URI_DOES_NOT_EXIST
1087 */ 1087 */
1088 static final CompileTimeErrorCode INVALID_URI = new CompileTimeErrorCode('INVA LID_URI', 73, "Invalid URI syntax: '%s'"); 1088 static final CompileTimeErrorCode INVALID_URI = new CompileTimeErrorCode('INVA LID_URI', 73, "Invalid URI syntax: '%s'");
1089 1089
1090 /** 1090 /**
1091 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su b></i> exists within 1091 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su b></i> exists within
1092 * the innermost function in which <i>s<sub>b</sub></i> occurs. 1092 * the innermost function in which <i>s<sub>b</sub></i> occurs.
1093 * <p> 1093 *
1094 * 13.14 Continue: It is a compile-time error if no such statement or case cla use 1094 * 13.14 Continue: It is a compile-time error if no such statement or case cla use
1095 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub >c</sub></i> occurs. 1095 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub >c</sub></i> occurs.
1096 * @param labelName the name of the unresolvable label 1096 * @param labelName the name of the unresolvable label
1097 */ 1097 */
1098 static final CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = new CompileTimeErrorC ode('LABEL_IN_OUTER_SCOPE', 74, "Cannot reference label '%s' declared in an oute r method"); 1098 static final CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = new CompileTimeErrorC ode('LABEL_IN_OUTER_SCOPE', 74, "Cannot reference label '%s' declared in an oute r method");
1099 1099
1100 /** 1100 /**
1101 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su b></i> exists within 1101 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su b></i> exists within
1102 * the innermost function in which <i>s<sub>b</sub></i> occurs. 1102 * the innermost function in which <i>s<sub>b</sub></i> occurs.
1103 * <p> 1103 *
1104 * 13.14 Continue: It is a compile-time error if no such statement or case cla use 1104 * 13.14 Continue: It is a compile-time error if no such statement or case cla use
1105 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub >c</sub></i> occurs. 1105 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub >c</sub></i> occurs.
1106 * @param labelName the name of the unresolvable label 1106 * @param labelName the name of the unresolvable label
1107 */ 1107 */
1108 static final CompileTimeErrorCode LABEL_UNDEFINED = new CompileTimeErrorCode(' LABEL_UNDEFINED', 75, "Cannot reference undefined label '%s'"); 1108 static final CompileTimeErrorCode LABEL_UNDEFINED = new CompileTimeErrorCode(' LABEL_UNDEFINED', 75, "Cannot reference undefined label '%s'");
1109 1109
1110 /** 1110 /**
1111 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member with the same name 1111 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member with the same name
1112 * as <i>C</i>. 1112 * as <i>C</i>.
1113 */ 1113 */
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1224 static final CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = new CompileTimeErro rCode('NON_CONSTANT_MAP_VALUE', 93, "The values in a 'const' map must be constan t"); 1224 static final CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = new CompileTimeErro rCode('NON_CONSTANT_MAP_VALUE', 93, "The values in a 'const' map must be constan t");
1225 1225
1226 /** 1226 /**
1227 * 7.6.3 Constant Constructors: Any expression that appears within the initial izer list of a 1227 * 7.6.3 Constant Constructors: Any expression that appears within the initial izer list of a
1228 * constant constructor must be a potentially constant expression, or a compil e-time error occurs. 1228 * constant constructor must be a potentially constant expression, or a compil e-time error occurs.
1229 */ 1229 */
1230 static final CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = new Comp ileTimeErrorCode('NON_CONSTANT_VALUE_IN_INITIALIZER', 94, "Initializer expressio ns in constant constructors must be constants"); 1230 static final CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = new Comp ileTimeErrorCode('NON_CONSTANT_VALUE_IN_INITIALIZER', 94, "Initializer expressio ns in constant constructors must be constants");
1231 1231
1232 /** 1232 /**
1233 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i> or if <i>m > n</i>. 1233 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i> or if <i>m > n</i>.
1234 * <p> 1234 *
1235 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an 1235 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an
1236 * uncaught exception being thrown. 1236 * uncaught exception being thrown.
1237 * @param requiredCount the expected number of required arguments 1237 * @param requiredCount the expected number of required arguments
1238 * @param argumentCount the actual number of positional arguments given 1238 * @param argumentCount the actual number of positional arguments given
1239 */ 1239 */
1240 static final CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new CompileT imeErrorCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', 95, "%d required argument(s) expec ted, but %d found"); 1240 static final CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new CompileT imeErrorCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', 95, "%d required argument(s) expec ted, but %d found");
1241 1241
1242 /** 1242 /**
1243 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super initializer appears 1243 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super initializer appears
1244 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ e constructor. It is 1244 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ e constructor. It is
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1278 1278
1279 /** 1279 /**
1280 * 12.1 Constants: It is a compile-time error if the value of a compile-time c onstant expression 1280 * 12.1 Constants: It is a compile-time error if the value of a compile-time c onstant expression
1281 * depends on itself. 1281 * depends on itself.
1282 */ 1282 */
1283 static final CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = new Compil eTimeErrorCode('RECURSIVE_COMPILE_TIME_CONSTANT', 102, ""); 1283 static final CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = new Compil eTimeErrorCode('RECURSIVE_COMPILE_TIME_CONSTANT', 102, "");
1284 1284
1285 /** 1285 /**
1286 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its 1286 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its
1287 * only action is to invoke another generative constructor. 1287 * only action is to invoke another generative constructor.
1288 * <p> 1288 *
1289 * TODO(scheglov) review this later, there are no explicit "it is a compile-ti me error" in 1289 * TODO(scheglov) review this later, there are no explicit "it is a compile-ti me error" in
1290 * specification. But it was added to the co19 and there is same error for fac tories. 1290 * specification. But it was added to the co19 and there is same error for fac tories.
1291 * <p> 1291 *
1292 * https://code.google.com/p/dart/issues/detail?id=954 1292 * https://code.google.com/p/dart/issues/detail?id=954
1293 */ 1293 */
1294 static final CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = new Compile TimeErrorCode('RECURSIVE_CONSTRUCTOR_REDIRECT', 103, "Cycle in redirecting gener ative constructors"); 1294 static final CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = new Compile TimeErrorCode('RECURSIVE_CONSTRUCTOR_REDIRECT', 103, "Cycle in redirecting gener ative constructors");
1295 1295
1296 /** 1296 /**
1297 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr uctor redirects to 1297 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr uctor redirects to
1298 * itself, either directly or indirectly via a sequence of redirections. 1298 * itself, either directly or indirectly via a sequence of redirections.
1299 */ 1299 */
1300 static final CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = new CompileTime ErrorCode('RECURSIVE_FACTORY_REDIRECT', 104, "Cycle in redirecting factory const ructors"); 1300 static final CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = new CompileTime ErrorCode('RECURSIVE_FACTORY_REDIRECT', 104, "Cycle in redirecting factory const ructors");
1301 1301
1302 /** 1302 /**
1303 * 15.3.1 Typedef: It is a compile-time error if a typedef refers to itself vi a a chain of 1303 * 15.3.1 Typedef: It is a compile-time error if a typedef refers to itself vi a a chain of
1304 * references that does not include a class type. 1304 * references that does not include a class type.
1305 */ 1305 */
1306 static final CompileTimeErrorCode RECURSIVE_FUNCTION_TYPE_ALIAS = new CompileT imeErrorCode('RECURSIVE_FUNCTION_TYPE_ALIAS', 105, ""); 1306 static final CompileTimeErrorCode RECURSIVE_FUNCTION_TYPE_ALIAS = new CompileT imeErrorCode('RECURSIVE_FUNCTION_TYPE_ALIAS', 105, "");
1307 1307
1308 /** 1308 /**
1309 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas s <i>C</i> is a 1309 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas s <i>C</i> is a
1310 * superinterface of itself. 1310 * superinterface of itself.
1311 * <p> 1311 *
1312 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself. 1312 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself.
1313 * <p> 1313 *
1314 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super class of itself. 1314 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super class of itself.
1315 * @param className the name of the class that implements itself recursively 1315 * @param className the name of the class that implements itself recursively
1316 * @param strImplementsPath a string representation of the implements loop 1316 * @param strImplementsPath a string representation of the implements loop
1317 */ 1317 */
1318 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = new Compil eTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE', 106, "'%s' cannot be a superin terface of itself: %s"); 1318 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = new Compil eTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE', 106, "'%s' cannot be a superin terface of itself: %s");
1319 1319
1320 /** 1320 /**
1321 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas s <i>C</i> is a 1321 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas s <i>C</i> is a
1322 * superinterface of itself. 1322 * superinterface of itself.
1323 * <p> 1323 *
1324 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself. 1324 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself.
1325 * <p> 1325 *
1326 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super class of itself. 1326 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super class of itself.
1327 * @param className the name of the class that implements itself recursively 1327 * @param className the name of the class that implements itself recursively
1328 */ 1328 */
1329 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EX TENDS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTE NDS', 107, "'%s' cannot extend itself"); 1329 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EX TENDS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTE NDS', 107, "'%s' cannot extend itself");
1330 1330
1331 /** 1331 /**
1332 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas s <i>C</i> is a 1332 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas s <i>C</i> is a
1333 * superinterface of itself. 1333 * superinterface of itself.
1334 * <p> 1334 *
1335 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself. 1335 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself.
1336 * <p> 1336 *
1337 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super class of itself. 1337 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super class of itself.
1338 * @param className the name of the class that implements itself recursively 1338 * @param className the name of the class that implements itself recursively
1339 */ 1339 */
1340 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IM PLEMENTS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_I MPLEMENTS', 108, "'%s' cannot implement itself"); 1340 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IM PLEMENTS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_I MPLEMENTS', 108, "'%s' cannot implement itself");
1341 1341
1342 /** 1342 /**
1343 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th e const modifier but 1343 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th e const modifier but
1344 * <i>k'</i> is not a constant constructor. 1344 * <i>k'</i> is not a constant constructor.
1345 */ 1345 */
1346 static final CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = new Comp ileTimeErrorCode('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 109, "Constant factory con structor cannot delegate to a non-constant constructor"); 1346 static final CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = new Comp ileTimeErrorCode('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 109, "Constant factory con structor cannot delegate to a non-constant constructor");
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1399 1399
1400 /** 1400 /**
1401 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile-time 1401 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile-time
1402 * error if a generative constructor of class Object includes a superinitializ er. 1402 * error if a generative constructor of class Object includes a superinitializ er.
1403 */ 1403 */
1404 static final CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = new CompileTim eErrorCode('SUPER_INITIALIZER_IN_OBJECT', 118, ""); 1404 static final CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = new CompileTim eErrorCode('SUPER_INITIALIZER_IN_OBJECT', 118, "");
1405 1405
1406 /** 1406 /**
1407 * 12.11 Instance Creation: It is a compile-time error if a constructor of a n on-generic type 1407 * 12.11 Instance Creation: It is a compile-time error if a constructor of a n on-generic type
1408 * invoked by a new expression or a constant object expression is passed any t ype arguments. 1408 * invoked by a new expression or a constant object expression is passed any t ype arguments.
1409 * <p> 1409 *
1410 * 12.32 Type Cast: It is a compile-time error if <i>T</i> is a parameterized type of the form 1410 * 12.32 Type Cast: It is a compile-time error if <i>T</i> is a parameterized type of the form
1411 * <i>G&lt;T<sub>1</sub>, &hellip;, T<sub>n</sub>&gt;</i> and <i>G</i> is not a generic type with 1411 * <i>G&lt;T<sub>1</sub>, &hellip;, T<sub>n</sub>&gt;</i> and <i>G</i> is not a generic type with
1412 * <i>n</i> type parameters. 1412 * <i>n</i> type parameters.
1413 */ 1413 */
1414 static final CompileTimeErrorCode TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS = new C ompileTimeErrorCode('TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS', 119, ""); 1414 static final CompileTimeErrorCode TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS = new C ompileTimeErrorCode('TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS', 119, "");
1415 1415
1416 /** 1416 /**
1417 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access ible in the current 1417 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access ible in the current
1418 * scope, optionally followed by type arguments. 1418 * scope, optionally followed by type arguments.
1419 */ 1419 */
(...skipping 14 matching lines...) Expand all
1434 * (respectively <i>S.id</i>) 1434 * (respectively <i>S.id</i>)
1435 */ 1435 */
1436 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT = new CompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT', 122, "The class '%s' does not have a default generative constructor"); 1436 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT = new CompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT', 122, "The class '%s' does not have a default generative constructor");
1437 1437
1438 /** 1438 /**
1439 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Ea ch final instance 1439 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Ea ch final instance
1440 * variable <i>f</i> declared in the immediately enclosing class must have an initializer in 1440 * variable <i>f</i> declared in the immediately enclosing class must have an initializer in
1441 * <i>k</i>'s initializer list unless it has already been initialized by one o f the following 1441 * <i>k</i>'s initializer list unless it has already been initialized by one o f the following
1442 * means: 1442 * means:
1443 * <ol> 1443 * <ol>
1444 * <li>Initialization at the declaration of <i>f</i>. 1444 * * Initialization at the declaration of <i>f</i>.
1445 * <li>Initialization by means of an initializing formal of <i>k</i>. 1445 * * Initialization by means of an initializing formal of <i>k</i>.
1446 * </ol> 1446 * </ol>
1447 * or a compile-time error occurs. 1447 * or a compile-time error occurs.
1448 */ 1448 */
1449 static final CompileTimeErrorCode UNINITIALIZED_FINAL_FIELD = new CompileTimeE rrorCode('UNINITIALIZED_FINAL_FIELD', 123, ""); 1449 static final CompileTimeErrorCode UNINITIALIZED_FINAL_FIELD = new CompileTimeE rrorCode('UNINITIALIZED_FINAL_FIELD', 123, "");
1450 1450
1451 /** 1451 /**
1452 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>, <i>1<=i<=l</i>, 1452 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>, <i>1<=i<=l</i>,
1453 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i > ... 1453 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i > ...
1454 * <i>p<sub>n+k</sub></i>} or a static warning occurs. 1454 * <i>p<sub>n+k</sub></i>} or a static warning occurs.
1455 * <p> 1455 *
1456 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an 1456 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an
1457 * uncaught exception being thrown. 1457 * uncaught exception being thrown.
1458 * @param name the name of the requested named parameter 1458 * @param name the name of the requested named parameter
1459 */ 1459 */
1460 static final CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER = new CompileTimeE rrorCode('UNDEFINED_NAMED_PARAMETER', 124, "The named parameter '%s' is not defi ned"); 1460 static final CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER = new CompileTimeE rrorCode('UNDEFINED_NAMED_PARAMETER', 124, "The named parameter '%s' is not defi ned");
1461 1461
1462 /** 1462 /**
1463 * 14.2 Exports: It is a compile-time error if the compilation unit found at t he specified URI is 1463 * 14.2 Exports: It is a compile-time error if the compilation unit found at t he specified URI is
1464 * not a library declaration. 1464 * not a library declaration.
1465 * <p> 1465 *
1466 * 14.1 Imports: It is a compile-time error if the compilation unit found at t he specified URI is 1466 * 14.1 Imports: It is a compile-time error if the compilation unit found at t he specified URI is
1467 * not a library declaration. 1467 * not a library declaration.
1468 * <p> 1468 *
1469 * 14.3 Parts: It is a compile time error if the contents of the URI are not a valid part 1469 * 14.3 Parts: It is a compile time error if the contents of the URI are not a valid part
1470 * declaration. 1470 * declaration.
1471 * @param uri the URI pointing to a non-existent file 1471 * @param uri the URI pointing to a non-existent file
1472 * @see #INVALID_URI 1472 * @see #INVALID_URI
1473 */ 1473 */
1474 static final CompileTimeErrorCode URI_DOES_NOT_EXIST = new CompileTimeErrorCod e('URI_DOES_NOT_EXIST', 125, "Target of URI does not exist: '%s'"); 1474 static final CompileTimeErrorCode URI_DOES_NOT_EXIST = new CompileTimeErrorCod e('URI_DOES_NOT_EXIST', 125, "Target of URI does not exist: '%s'");
1475 1475
1476 /** 1476 /**
1477 * 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time constant, or if 1477 * 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time constant, or if
1478 * <i>x</i> involves string interpolation. 1478 * <i>x</i> involves string interpolation.
1479 * <p> 1479 *
1480 * 14.3 Parts: It is a compile-time error if <i>s</i> is not a compile-time co nstant, or if 1480 * 14.3 Parts: It is a compile-time error if <i>s</i> is not a compile-time co nstant, or if
1481 * <i>s</i> involves string interpolation. 1481 * <i>s</i> involves string interpolation.
1482 * <p> 1482 *
1483 * 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that d escribes a URI is 1483 * 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that d escribes a URI is
1484 * not a compile-time constant, or if <i>x</i> involves string interpolation. 1484 * not a compile-time constant, or if <i>x</i> involves string interpolation.
1485 */ 1485 */
1486 static final CompileTimeErrorCode URI_WITH_INTERPOLATION = new CompileTimeErro rCode('URI_WITH_INTERPOLATION', 126, "URIs cannot use string interpolation"); 1486 static final CompileTimeErrorCode URI_WITH_INTERPOLATION = new CompileTimeErro rCode('URI_WITH_INTERPOLATION', 126, "URIs cannot use string interpolation");
1487 1487
1488 /** 1488 /**
1489 * 7.1.1 Operators: It is a compile-time error if the arity of the user-declar ed operator \[\]= is 1489 * 7.1.1 Operators: It is a compile-time error if the arity of the user-declar ed operator \[\]= is
1490 * not 2. It is a compile time error if the arity of a user-declared operator with one of the 1490 * not 2. It is a compile time error if the arity of a user-declared operator with one of the
1491 * names: &lt;, &gt;, &lt;=, &gt;=, ==, +, /, ~/, *, %, |, ^, &, &lt;&lt;, &gt ;&gt;, \[\] is not 1. 1491 * names: &lt;, &gt;, &lt;=, &gt;=, ==, +, /, ~/, *, %, |, ^, &, &lt;&lt;, &gt ;&gt;, \[\] is not 1.
1492 * It is a compile time error if the arity of the user-declared operator - is not 0 or 1. It is a 1492 * It is a compile time error if the arity of the user-declared operator - is not 0 or 1. It is a
(...skipping 15 matching lines...) Expand all
1508 * 7.3 Setters: It is a compile-time error if a setter's formal parameter list does not include 1508 * 7.3 Setters: It is a compile-time error if a setter's formal parameter list does not include
1509 * exactly one required formal parameter <i>p</i>. 1509 * exactly one required formal parameter <i>p</i>.
1510 * @param numberOfParameters the number of parameters found in the setter 1510 * @param numberOfParameters the number of parameters found in the setter
1511 */ 1511 */
1512 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = new CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 129, "Setters shou ld declare exactly one parameter, %d found"); 1512 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = new CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 129, "Setters shou ld declare exactly one parameter, %d found");
1513 1513
1514 /** 1514 /**
1515 * 12.11 Instance Creation: It is a compile-time error if a constructor of a g eneric type with 1515 * 12.11 Instance Creation: It is a compile-time error if a constructor of a g eneric type with
1516 * <i>n</i> type parameters invoked by a new expression or a constant object e xpression is passed 1516 * <i>n</i> type parameters invoked by a new expression or a constant object e xpression is passed
1517 * <i>m</i> type arguments where <i>m != n</i>. 1517 * <i>m</i> type arguments where <i>m != n</i>.
1518 * <p> 1518 *
1519 * 12.31 Type Test: It is a compile-time error if <i>T</i> is a parameterized type of the form 1519 * 12.31 Type Test: It is a compile-time error if <i>T</i> is a parameterized type of the form
1520 * <i>G&lt;T<sub>1</sub>, &hellip;, T<sub>n</sub>&gt;</i> and <i>G</i> is not a generic type with 1520 * <i>G&lt;T<sub>1</sub>, &hellip;, T<sub>n</sub>&gt;</i> and <i>G</i> is not a generic type with
1521 * <i>n</i> type parameters. 1521 * <i>n</i> type parameters.
1522 */ 1522 */
1523 static final CompileTimeErrorCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = new Compile TimeErrorCode('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 130, ""); 1523 static final CompileTimeErrorCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = new Compile TimeErrorCode('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 130, "");
1524 static final List<CompileTimeErrorCode> values = [AMBIGUOUS_EXPORT, AMBIGUOUS_ IMPORT, ARGUMENT_DEFINITION_TEST_NON_PARAMETER, BUILT_IN_IDENTIFIER_AS_TYPE, BUI LT_IN_IDENTIFIER_AS_TYPE_NAME, BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, BUILT_IN_IDE NTIFIER_AS_TYPE_VARIABLE_NAME, CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, COMPILE_T IME_CONSTANT_RAISES_EXCEPTION, CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, CONFLICTI NG_CONSTRUCTOR_NAME_AND_METHOD, CONST_CONSTRUCTOR_THROWS_EXCEPTION, CONST_CONSTR UCTOR_WITH_NON_FINAL_FIELD, CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE, CONST_FORMAL _PARAMETER, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, CONST_INSTANCE_FIELD, CON ST_EVAL_TYPE_BOOL, CONST_EVAL_TYPE_BOOL_NUM_STRING, CONST_EVAL_TYPE_INT, CONST_E VAL_TYPE_NUM, CONST_EVAL_THROWS_EXCEPTION, CONST_WITH_INVALID_TYPE_PARAMETERS, C ONST_WITH_NON_CONST, CONST_WITH_NON_CONSTANT_ARGUMENT, CONST_WITH_NON_TYPE, CONS T_WITH_TYPE_PARAMETERS, CONST_WITH_UNDEFINED_CONSTRUCTOR, CONST_WITH_UNDEFINED_C ONSTRUCTOR_DEFAULT, DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS, DUPLICATE_CONSTRUCTOR_ DEFAULT, DUPLICATE_CONSTRUCTOR_NAME, DUPLICATE_DEFINITION, DUPLICATE_MEMBER_NAME , DUPLICATE_MEMBER_NAME_INSTANCE_STATIC, DUPLICATE_NAMED_ARGUMENT, EXPORT_INTERN AL_LIBRARY, EXPORT_OF_NON_LIBRARY, EXTENDS_NON_CLASS, EXTENDS_DISALLOWED_CLASS, EXTRA_POSITIONAL_ARGUMENTS, IMPLEMENTS_DISALLOWED_CLASS, FIELD_INITIALIZED_BY_MU LTIPLE_INITIALIZERS, FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION, FIELD_INI TIALIZED_IN_PARAMETER_AND_INITIALIZER, FINAL_INITIALIZED_IN_DECLARATION_AND_CONS TRUCTOR, FINAL_INITIALIZED_MULTIPLE_TIMES, FIELD_INITIALIZER_FACTORY_CONSTRUCTOR , FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR, FIELD_INITIALIZER_REDIRECTING_CONSTRUCT OR, GETTER_AND_METHOD_WITH_SAME_NAME, IMPLEMENTS_DYNAMIC, IMPLEMENTS_NON_CLASS, IMPLEMENTS_REPEATED, IMPLICIT_THIS_REFERENCE_IN_INITIALIZER, IMPORT_INTERNAL_LIB RARY, IMPORT_OF_NON_LIBRARY, INCONSISTENT_CASE_EXPRESSION_TYPES, INITIALIZER_FOR _NON_EXISTANT_FIELD, INITIALIZER_FOR_STATIC_FIELD, INITIALIZING_FORMAL_FOR_NON_E XISTANT_FIELD, INITIALIZING_FORMAL_FOR_STATIC_FIELD, INVALID_CONSTANT, INVALID_C ONSTRUCTOR_NAME, INVALID_FACTORY_NAME_NOT_A_CLASS, INVALID_OVERRIDE_DEFAULT_VALU E, INVALID_OVERRIDE_NAMED, INVALID_OVERRIDE_POSITIONAL, INVALID_OVERRIDE_REQUIRE D, INVALID_REFERENCE_TO_THIS, INVALID_TYPE_ARGUMENT_FOR_KEY, INVALID_TYPE_ARGUME NT_IN_CONST_LIST, INVALID_TYPE_ARGUMENT_IN_CONST_MAP, INVALID_URI, LABEL_IN_OUTE R_SCOPE, LABEL_UNDEFINED, MEMBER_WITH_CLASS_NAME, METHOD_AND_GETTER_WITH_SAME_NA ME, MISSING_CONST_IN_LIST_LITERAL, MISSING_CONST_IN_MAP_LITERAL, MIXIN_DECLARES_ CONSTRUCTOR, MIXIN_INHERITS_FROM_NOT_OBJECT, MIXIN_OF_NON_CLASS, MIXIN_REFERENCE S_SUPER, MIXIN_WITH_NON_CLASS_SUPERCLASS, MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOC ATIONS, MULTIPLE_SUPER_INITIALIZERS, NEW_WITH_INVALID_TYPE_PARAMETERS, NON_CONST _MAP_AS_EXPRESSION_STATEMENT, NON_CONSTANT_CASE_EXPRESSION, NON_CONSTANT_DEFAULT _VALUE, NON_CONSTANT_LIST_ELEMENT, NON_CONSTANT_MAP_KEY, NON_CONSTANT_MAP_VALUE, NON_CONSTANT_VALUE_IN_INITIALIZER, NOT_ENOUGH_REQUIRED_ARGUMENTS, NON_GENERATIV E_CONSTRUCTOR, OBJECT_CANNOT_EXTEND_ANOTHER_CLASS, OPTIONAL_PARAMETER_IN_OPERATO R, PART_OF_NON_PART, PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER, PRIVATE_OPTIONAL_PAR AMETER, RECURSIVE_COMPILE_TIME_CONSTANT, RECURSIVE_CONSTRUCTOR_REDIRECT, RECURSI VE_FACTORY_REDIRECT, RECURSIVE_FUNCTION_TYPE_ALIAS, RECURSIVE_INTERFACE_INHERITA NCE, RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS, RECURSIVE_INTERFACE_INHE RITANCE_BASE_CASE_IMPLEMENTS, REDIRECT_TO_NON_CONST_CONSTRUCTOR, REFERENCE_TO_DE CLARED_VARIABLE_IN_INITIALIZER, RESERVED_WORD_AS_IDENTIFIER, RETHROW_OUTSIDE_CAT CH, RETURN_IN_GENERATIVE_CONSTRUCTOR, STATIC_TOP_LEVEL_FUNCTION, STATIC_TOP_LEVE L_VARIABLE, SUPER_IN_INVALID_CONTEXT, SUPER_IN_REDIRECTING_CONSTRUCTOR, SUPER_IN ITIALIZER_IN_OBJECT, TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS, UNDEFINED_CLASS, UNDE FINED_CONSTRUCTOR_IN_INITIALIZER, UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT, UNINITIALIZED_FINAL_FIELD, UNDEFINED_NAMED_PARAMETER, URI_DOES_NOT_EXIST, URI_WI TH_INTERPOLATION, WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR, WRONG_NUMBER_OF_PARAM ETERS_FOR_OPERATOR_MINUS, WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER, WRONG_NUMBER_OF _TYPE_ARGUMENTS]; 1524 static final List<CompileTimeErrorCode> values = [AMBIGUOUS_EXPORT, AMBIGUOUS_ IMPORT, ARGUMENT_DEFINITION_TEST_NON_PARAMETER, BUILT_IN_IDENTIFIER_AS_TYPE, BUI LT_IN_IDENTIFIER_AS_TYPE_NAME, BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, BUILT_IN_IDE NTIFIER_AS_TYPE_VARIABLE_NAME, CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, COMPILE_T IME_CONSTANT_RAISES_EXCEPTION, CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, CONFLICTI NG_CONSTRUCTOR_NAME_AND_METHOD, CONST_CONSTRUCTOR_THROWS_EXCEPTION, CONST_CONSTR UCTOR_WITH_NON_FINAL_FIELD, CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE, CONST_FORMAL _PARAMETER, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, CONST_INSTANCE_FIELD, CON ST_EVAL_TYPE_BOOL, CONST_EVAL_TYPE_BOOL_NUM_STRING, CONST_EVAL_TYPE_INT, CONST_E VAL_TYPE_NUM, CONST_EVAL_THROWS_EXCEPTION, CONST_WITH_INVALID_TYPE_PARAMETERS, C ONST_WITH_NON_CONST, CONST_WITH_NON_CONSTANT_ARGUMENT, CONST_WITH_NON_TYPE, CONS T_WITH_TYPE_PARAMETERS, CONST_WITH_UNDEFINED_CONSTRUCTOR, CONST_WITH_UNDEFINED_C ONSTRUCTOR_DEFAULT, DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS, DUPLICATE_CONSTRUCTOR_ DEFAULT, DUPLICATE_CONSTRUCTOR_NAME, DUPLICATE_DEFINITION, DUPLICATE_MEMBER_NAME , DUPLICATE_MEMBER_NAME_INSTANCE_STATIC, DUPLICATE_NAMED_ARGUMENT, EXPORT_INTERN AL_LIBRARY, EXPORT_OF_NON_LIBRARY, EXTENDS_NON_CLASS, EXTENDS_DISALLOWED_CLASS, EXTRA_POSITIONAL_ARGUMENTS, IMPLEMENTS_DISALLOWED_CLASS, FIELD_INITIALIZED_BY_MU LTIPLE_INITIALIZERS, FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION, FIELD_INI TIALIZED_IN_PARAMETER_AND_INITIALIZER, FINAL_INITIALIZED_IN_DECLARATION_AND_CONS TRUCTOR, FINAL_INITIALIZED_MULTIPLE_TIMES, FIELD_INITIALIZER_FACTORY_CONSTRUCTOR , FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR, FIELD_INITIALIZER_REDIRECTING_CONSTRUCT OR, GETTER_AND_METHOD_WITH_SAME_NAME, IMPLEMENTS_DYNAMIC, IMPLEMENTS_NON_CLASS, IMPLEMENTS_REPEATED, IMPLICIT_THIS_REFERENCE_IN_INITIALIZER, IMPORT_INTERNAL_LIB RARY, IMPORT_OF_NON_LIBRARY, INCONSISTENT_CASE_EXPRESSION_TYPES, INITIALIZER_FOR _NON_EXISTANT_FIELD, INITIALIZER_FOR_STATIC_FIELD, INITIALIZING_FORMAL_FOR_NON_E XISTANT_FIELD, INITIALIZING_FORMAL_FOR_STATIC_FIELD, INVALID_CONSTANT, INVALID_C ONSTRUCTOR_NAME, INVALID_FACTORY_NAME_NOT_A_CLASS, INVALID_OVERRIDE_DEFAULT_VALU E, INVALID_OVERRIDE_NAMED, INVALID_OVERRIDE_POSITIONAL, INVALID_OVERRIDE_REQUIRE D, INVALID_REFERENCE_TO_THIS, INVALID_TYPE_ARGUMENT_FOR_KEY, INVALID_TYPE_ARGUME NT_IN_CONST_LIST, INVALID_TYPE_ARGUMENT_IN_CONST_MAP, INVALID_URI, LABEL_IN_OUTE R_SCOPE, LABEL_UNDEFINED, MEMBER_WITH_CLASS_NAME, METHOD_AND_GETTER_WITH_SAME_NA ME, MISSING_CONST_IN_LIST_LITERAL, MISSING_CONST_IN_MAP_LITERAL, MIXIN_DECLARES_ CONSTRUCTOR, MIXIN_INHERITS_FROM_NOT_OBJECT, MIXIN_OF_NON_CLASS, MIXIN_REFERENCE S_SUPER, MIXIN_WITH_NON_CLASS_SUPERCLASS, MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOC ATIONS, MULTIPLE_SUPER_INITIALIZERS, NEW_WITH_INVALID_TYPE_PARAMETERS, NON_CONST _MAP_AS_EXPRESSION_STATEMENT, NON_CONSTANT_CASE_EXPRESSION, NON_CONSTANT_DEFAULT _VALUE, NON_CONSTANT_LIST_ELEMENT, NON_CONSTANT_MAP_KEY, NON_CONSTANT_MAP_VALUE, NON_CONSTANT_VALUE_IN_INITIALIZER, NOT_ENOUGH_REQUIRED_ARGUMENTS, NON_GENERATIV E_CONSTRUCTOR, OBJECT_CANNOT_EXTEND_ANOTHER_CLASS, OPTIONAL_PARAMETER_IN_OPERATO R, PART_OF_NON_PART, PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER, PRIVATE_OPTIONAL_PAR AMETER, RECURSIVE_COMPILE_TIME_CONSTANT, RECURSIVE_CONSTRUCTOR_REDIRECT, RECURSI VE_FACTORY_REDIRECT, RECURSIVE_FUNCTION_TYPE_ALIAS, RECURSIVE_INTERFACE_INHERITA NCE, RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS, RECURSIVE_INTERFACE_INHE RITANCE_BASE_CASE_IMPLEMENTS, REDIRECT_TO_NON_CONST_CONSTRUCTOR, REFERENCE_TO_DE CLARED_VARIABLE_IN_INITIALIZER, RESERVED_WORD_AS_IDENTIFIER, RETHROW_OUTSIDE_CAT CH, RETURN_IN_GENERATIVE_CONSTRUCTOR, STATIC_TOP_LEVEL_FUNCTION, STATIC_TOP_LEVE L_VARIABLE, SUPER_IN_INVALID_CONTEXT, SUPER_IN_REDIRECTING_CONSTRUCTOR, SUPER_IN ITIALIZER_IN_OBJECT, TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS, UNDEFINED_CLASS, UNDE FINED_CONSTRUCTOR_IN_INITIALIZER, UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT, UNINITIALIZED_FINAL_FIELD, UNDEFINED_NAMED_PARAMETER, URI_DOES_NOT_EXIST, URI_WI TH_INTERPOLATION, WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR, WRONG_NUMBER_OF_PARAM ETERS_FOR_OPERATOR_MINUS, WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER, WRONG_NUMBER_OF _TYPE_ARGUMENTS];
1525 1525
1526 /// The name of this enum constant, as declared in the enum declaration. 1526 /// The name of this enum constant, as declared in the enum declaration.
1527 final String name; 1527 final String name;
1528 1528
(...skipping 13 matching lines...) Expand all
1542 this._message = message; 1542 this._message = message;
1543 } 1543 }
1544 ErrorSeverity get errorSeverity => ErrorType.COMPILE_TIME_ERROR.severity; 1544 ErrorSeverity get errorSeverity => ErrorType.COMPILE_TIME_ERROR.severity;
1545 String get message => _message; 1545 String get message => _message;
1546 ErrorType get type => ErrorType.COMPILE_TIME_ERROR; 1546 ErrorType get type => ErrorType.COMPILE_TIME_ERROR;
1547 int compareTo(CompileTimeErrorCode other) => ordinal - other.ordinal; 1547 int compareTo(CompileTimeErrorCode other) => ordinal - other.ordinal;
1548 int get hashCode => ordinal; 1548 int get hashCode => ordinal;
1549 String toString() => name; 1549 String toString() => name;
1550 } 1550 }
1551 /** 1551 /**
1552 * The enumeration {@code PubSuggestionCode} defines the suggestions used for re porting deviations 1552 * The enumeration `PubSuggestionCode` defines the suggestions used for reportin g deviations
1553 * from pub best practices. The convention for this class is for the name of the bad practice to 1553 * from pub best practices. The convention for this class is for the name of the bad practice to
1554 * indicate the problem that caused the suggestion to be generated and for the m essage to explain 1554 * indicate the problem that caused the suggestion to be generated and for the m essage to explain
1555 * what is wrong and, when appropriate, how the situation can be corrected. 1555 * what is wrong and, when appropriate, how the situation can be corrected.
1556 */ 1556 */
1557 class PubSuggestionCode implements Comparable<PubSuggestionCode>, ErrorCode { 1557 class PubSuggestionCode implements Comparable<PubSuggestionCode>, ErrorCode {
1558 1558
1559 /** 1559 /**
1560 * It is a bad practice for a source file in a package "lib" directory hierarc hy to traverse 1560 * It is a bad practice for a source file in a package "lib" directory hierarc hy to traverse
1561 * outside that directory hierarchy. For example, a source file in the "lib" d irectory should not 1561 * outside that directory hierarchy. For example, a source file in the "lib" d irectory should not
1562 * contain a directive such as {@code import '../web/some.dart'} which referen ces a file outside 1562 * contain a directive such as `import '../web/some.dart'` which references a file outside
1563 * the lib directory. 1563 * the lib directory.
1564 */ 1564 */
1565 static final PubSuggestionCode FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE = new PubSuggestionCode('FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE', 0, "A file in the 'lib' directory hierarchy should not reference a file outside that h ierarchy"); 1565 static final PubSuggestionCode FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE = new PubSuggestionCode('FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE', 0, "A file in the 'lib' directory hierarchy should not reference a file outside that h ierarchy");
1566 1566
1567 /** 1567 /**
1568 * It is a bad practice for a source file ouside a package "lib" directory hie rarchy to traverse 1568 * It is a bad practice for a source file ouside a package "lib" directory hie rarchy to traverse
1569 * into that directory hierarchy. For example, a source file in the "web" dire ctory should not 1569 * into that directory hierarchy. For example, a source file in the "web" dire ctory should not
1570 * contain a directive such as {@code import '../lib/some.dart'} which referen ces a file inside 1570 * contain a directive such as `import '../lib/some.dart'` which references a file inside
1571 * the lib directory. 1571 * the lib directory.
1572 */ 1572 */
1573 static final PubSuggestionCode FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE = new PubSuggestionCode('FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE', 1, "A file outside the 'lib' directory hierarchy should not reference a file inside th at hierarchy. Use a package: reference instead."); 1573 static final PubSuggestionCode FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE = new PubSuggestionCode('FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE', 1, "A file outside the 'lib' directory hierarchy should not reference a file inside th at hierarchy. Use a package: reference instead.");
1574 1574
1575 /** 1575 /**
1576 * It is a bad practice for a package import to reference anything outside the given package, or 1576 * It is a bad practice for a package import to reference anything outside the given package, or
1577 * more generally, it is bad practice for a package import to contain a "..". For example, a 1577 * more generally, it is bad practice for a package import to contain a "..". For example, a
1578 * source file should not contain a directive such as {@code import 'package:f oo/../some.dart'}. 1578 * source file should not contain a directive such as `import 'package:foo/../ some.dart'`.
1579 */ 1579 */
1580 static final PubSuggestionCode PACKAGE_IMPORT_CONTAINS_DOT_DOT = new PubSugges tionCode('PACKAGE_IMPORT_CONTAINS_DOT_DOT', 2, "A package import should not cont ain '..'"); 1580 static final PubSuggestionCode PACKAGE_IMPORT_CONTAINS_DOT_DOT = new PubSugges tionCode('PACKAGE_IMPORT_CONTAINS_DOT_DOT', 2, "A package import should not cont ain '..'");
1581 static final List<PubSuggestionCode> values = [FILE_IMPORT_INSIDE_LIB_REFERENC ES_FILE_OUTSIDE, FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE, PACKAGE_IMPORT_ CONTAINS_DOT_DOT]; 1581 static final List<PubSuggestionCode> values = [FILE_IMPORT_INSIDE_LIB_REFERENC ES_FILE_OUTSIDE, FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE, PACKAGE_IMPORT_ CONTAINS_DOT_DOT];
1582 1582
1583 /// The name of this enum constant, as declared in the enum declaration. 1583 /// The name of this enum constant, as declared in the enum declaration.
1584 final String name; 1584 final String name;
1585 1585
1586 /// The position in the enum declaration. 1586 /// The position in the enum declaration.
1587 final int ordinal; 1587 final int ordinal;
1588 1588
(...skipping 10 matching lines...) Expand all
1599 this._message = message; 1599 this._message = message;
1600 } 1600 }
1601 ErrorSeverity get errorSeverity => ErrorType.PUB_SUGGESTION.severity; 1601 ErrorSeverity get errorSeverity => ErrorType.PUB_SUGGESTION.severity;
1602 String get message => _message; 1602 String get message => _message;
1603 ErrorType get type => ErrorType.PUB_SUGGESTION; 1603 ErrorType get type => ErrorType.PUB_SUGGESTION;
1604 int compareTo(PubSuggestionCode other) => ordinal - other.ordinal; 1604 int compareTo(PubSuggestionCode other) => ordinal - other.ordinal;
1605 int get hashCode => ordinal; 1605 int get hashCode => ordinal;
1606 String toString() => name; 1606 String toString() => name;
1607 } 1607 }
1608 /** 1608 /**
1609 * The enumeration {@code StaticWarningCode} defines the error codes used for st atic warnings. The 1609 * The enumeration `StaticWarningCode` defines the error codes used for static w arnings. The
1610 * convention for this class is for the name of the error code to indicate the p roblem that caused 1610 * convention for this class is for the name of the error code to indicate the p roblem that caused
1611 * the error to be generated and for the error message to explain what is wrong and, when 1611 * the error to be generated and for the error message to explain what is wrong and, when
1612 * appropriate, how the problem can be corrected. 1612 * appropriate, how the problem can be corrected.
1613 * @coverage dart.engine.error 1613 * @coverage dart.engine.error
1614 */ 1614 */
1615 class StaticWarningCode implements Comparable<StaticWarningCode>, ErrorCode { 1615 class StaticWarningCode implements Comparable<StaticWarningCode>, ErrorCode {
1616 1616
1617 /** 1617 /**
1618 * 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i >N</i> is introduced 1618 * 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i >N</i> is introduced
1619 * into the top level scope <i>L</i> by more than one import then: 1619 * into the top level scope <i>L</i> by more than one import then:
1620 * <ol> 1620 * <ol>
1621 * <li>It is a static warning if <i>N</i> is used as a type annotation. 1621 * * It is a static warning if <i>N</i> is used as a type annotation.
1622 * <li>In checked mode, it is a dynamic error if <i>N</i> is used as a type an notation and 1622 * * In checked mode, it is a dynamic error if <i>N</i> is used as a type anno tation and
1623 * referenced during a subtype test. 1623 * referenced during a subtype test.
1624 * <li>Otherwise, it is a compile-time error. 1624 * * Otherwise, it is a compile-time error.
1625 * </ol> 1625 * </ol>
1626 * @param ambiguousTypeName the name of the ambiguous type 1626 * @param ambiguousTypeName the name of the ambiguous type
1627 * @param firstLibraryName the name of the first library that the type is foun d 1627 * @param firstLibraryName the name of the first library that the type is foun d
1628 * @param secondLibraryName the name of the second library that the type is fo und 1628 * @param secondLibraryName the name of the second library that the type is fo und
1629 */ 1629 */
1630 static final StaticWarningCode AMBIGUOUS_IMPORT = new StaticWarningCode('AMBIG UOUS_IMPORT', 0, "The type '%s' is defined in the libraries '%s' and '%s'"); 1630 static final StaticWarningCode AMBIGUOUS_IMPORT = new StaticWarningCode('AMBIG UOUS_IMPORT', 0, "The type '%s' is defined in the libraries '%s' and '%s'");
1631 1631
1632 /** 1632 /**
1633 * 12.11.1 New: It is a static warning if the static type of <i>a<sub>i</sub>, 1 &lt;= i &lt;= n+ 1633 * 12.11.1 New: It is a static warning if the static type of <i>a<sub>i</sub>, 1 &lt;= i &lt;= n+
1634 * k</i> may not be assigned to the type of the corresponding formal parameter of the constructor 1634 * k</i> may not be assigned to the type of the corresponding formal parameter of the constructor
1635 * <i>T.id</i> (respectively <i>T</i>). 1635 * <i>T.id</i> (respectively <i>T</i>).
1636 * <p> 1636 *
1637 * 12.11.2 Const: It is a static warning if the static type of <i>a<sub>i</sub >, 1 &lt;= i &lt;= 1637 * 12.11.2 Const: It is a static warning if the static type of <i>a<sub>i</sub >, 1 &lt;= i &lt;=
1638 * n+ k</i> may not be assigned to the type of the corresponding formal parame ter of the 1638 * n+ k</i> may not be assigned to the type of the corresponding formal parame ter of the
1639 * constructor <i>T.id</i> (respectively <i>T</i>). 1639 * constructor <i>T.id</i> (respectively <i>T</i>).
1640 * <p> 1640 *
1641 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of 1641 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of
1642 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s ub>, 1 &lt;= i &lt;= 1642 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s ub>, 1 &lt;= i &lt;=
1643 * n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i> q</i> of <i>f</i>. 1643 * n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i> q</i> of <i>f</i>.
1644 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S< sub>j</sub>, 1 &lt;= 1644 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S< sub>j</sub>, 1 &lt;=
1645 * j &lt;= m</i>. 1645 * j &lt;= m</i>.
1646 * <p> 1646 *
1647 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub>, 1 & lt;= i &lt;= l</i>, 1647 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub>, 1 & lt;= i &lt;= l</i>,
1648 * must have a corresponding named parameter in the set <i>{p<sub>n+1</sub>, & hellip; 1648 * must have a corresponding named parameter in the set <i>{p<sub>n+1</sub>, & hellip;
1649 * p<sub>n+k</sub>}</i> or a static warning occurs. It is a static warning if 1649 * p<sub>n+k</sub>}</i> or a static warning occurs. It is a static warning if
1650 * <i>T<sub>m+j</sub></i> may not be assigned to <i>S<sub>r</sub></i>, where < i>r = q<sub>j</sub>, 1650 * <i>T<sub>m+j</sub></i> may not be assigned to <i>S<sub>r</sub></i>, where < i>r = q<sub>j</sub>,
1651 * 1 &lt;= j &lt;= l</i>. 1651 * 1 &lt;= j &lt;= l</i>.
1652 */ 1652 */
1653 static final StaticWarningCode ARGUMENT_TYPE_NOT_ASSIGNABLE = new StaticWarnin gCode('ARGUMENT_TYPE_NOT_ASSIGNABLE', 1, "The argument type '%s' cannot be assig ned to the parameter type '%s'"); 1653 static final StaticWarningCode ARGUMENT_TYPE_NOT_ASSIGNABLE = new StaticWarnin gCode('ARGUMENT_TYPE_NOT_ASSIGNABLE', 1, "The argument type '%s' cannot be assig ned to the parameter type '%s'");
1654 1654
1655 /** 1655 /**
1656 * 5 Variables: Attempting to assign to a final variable elsewhere will cause a NoSuchMethodError 1656 * 5 Variables: Attempting to assign to a final variable elsewhere will cause a NoSuchMethodError
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1767 * @param requiredCount the maximum number of positional arguments 1767 * @param requiredCount the maximum number of positional arguments
1768 * @param argumentCount the actual number of positional arguments given 1768 * @param argumentCount the actual number of positional arguments given
1769 */ 1769 */
1770 static final StaticWarningCode EXTRA_POSITIONAL_ARGUMENTS = new StaticWarningC ode('EXTRA_POSITIONAL_ARGUMENTS', 18, "%d positional arguments expected, but %d found"); 1770 static final StaticWarningCode EXTRA_POSITIONAL_ARGUMENTS = new StaticWarningC ode('EXTRA_POSITIONAL_ARGUMENTS', 18, "%d positional arguments expected, but %d found");
1771 1771
1772 /** 1772 /**
1773 * 7.6.1 Generative Constructors: Execution of an initializer of the form <b>t his</b>.<i>v</i> = 1773 * 7.6.1 Generative Constructors: Execution of an initializer of the form <b>t his</b>.<i>v</i> =
1774 * <i>e</i> proceeds as follows: First, the expression <i>e</i> is evaluated t o an object 1774 * <i>e</i> proceeds as follows: First, the expression <i>e</i> is evaluated t o an object
1775 * <i>o</i>. Then, the instance variable <i>v</i> of the object denoted by thi s is bound to 1775 * <i>o</i>. Then, the instance variable <i>v</i> of the object denoted by thi s is bound to
1776 * <i>o</i>. 1776 * <i>o</i>.
1777 * <p> 1777 *
1778 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of 1778 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of
1779 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s ub>, 1 &lt;= i &lt;= 1779 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s ub>, 1 &lt;= i &lt;=
1780 * n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i> q</i> of <i>f</i>. 1780 * n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i> q</i> of <i>f</i>.
1781 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S< sub>j</sub>, 1 &lt;= 1781 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S< sub>j</sub>, 1 &lt;=
1782 * j &lt;= m</i>. 1782 * j &lt;= m</i>.
1783 * @param initializerType the name of the type of the initializer expression 1783 * @param initializerType the name of the type of the initializer expression
1784 * @param fieldType the name of the type of the field 1784 * @param fieldType the name of the type of the field
1785 */ 1785 */
1786 static final StaticWarningCode FIELD_INITIALIZER_NOT_ASSIGNABLE = new StaticWa rningCode('FIELD_INITIALIZER_NOT_ASSIGNABLE', 19, "The initializer type '%s' can not be assigned to the field type '%s'"); 1786 static final StaticWarningCode FIELD_INITIALIZER_NOT_ASSIGNABLE = new StaticWa rningCode('FIELD_INITIALIZER_NOT_ASSIGNABLE', 19, "The initializer type '%s' can not be assigned to the field type '%s'");
1787 1787
(...skipping 18 matching lines...) Expand all
1806 * @param uri2 the uri pointing to a second library 1806 * @param uri2 the uri pointing to a second library
1807 * @param name the shared name of the imported libraries 1807 * @param name the shared name of the imported libraries
1808 */ 1808 */
1809 static final StaticWarningCode IMPORT_DUPLICATED_LIBRARY_NAME = new StaticWarn ingCode('IMPORT_DUPLICATED_LIBRARY_NAME', 22, "The imported libraries '%s' and ' %s' should not have the same name '%s'"); 1809 static final StaticWarningCode IMPORT_DUPLICATED_LIBRARY_NAME = new StaticWarn ingCode('IMPORT_DUPLICATED_LIBRARY_NAME', 22, "The imported libraries '%s' and ' %s' should not have the same name '%s'");
1810 1810
1811 /** 1811 /**
1812 * 8.1.1 Inheritance and Overriding: However, if there are multiple members <i >m<sub>1</sub>, 1812 * 8.1.1 Inheritance and Overriding: However, if there are multiple members <i >m<sub>1</sub>,
1813 * &hellip; m<sub>k</sub></i> with the same name <i>n</i> that would be inheri ted (because 1813 * &hellip; m<sub>k</sub></i> with the same name <i>n</i> that would be inheri ted (because
1814 * identically named members existed in several superinterfaces) then at most one member is 1814 * identically named members existed in several superinterfaces) then at most one member is
1815 * inherited. 1815 * inherited.
1816 * <p> 1816 *
1817 * If some but not all of the <i>m<sub>i</sub>, 1 &lt;= i &lt;= k</i>, are get ters, or if some but 1817 * If some but not all of the <i>m<sub>i</sub>, 1 &lt;= i &lt;= k</i>, are get ters, or if some but
1818 * not all of the <i>m<sub>i</sub></i> are setters, none of the <i>m<sub>i</su b></i> are 1818 * not all of the <i>m<sub>i</sub></i> are setters, none of the <i>m<sub>i</su b></i> are
1819 * inherited, and a static warning is issued. 1819 * inherited, and a static warning is issued.
1820 */ 1820 */
1821 static final StaticWarningCode INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METH OD = new StaticWarningCode('INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD', 23, "'%s' is inherited as a getter and also a method"); 1821 static final StaticWarningCode INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METH OD = new StaticWarningCode('INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD', 23, "'%s' is inherited as a getter and also a method");
1822 1822
1823 /** 1823 /**
1824 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m &lt; h</ i> or if <i>m &gt; 1824 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m &lt; h</ i> or if <i>m &gt;
1825 * n</i>. 1825 * n</i>.
1826 */ 1826 */
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1892 * @see #INVALID_GETTER_OVERRIDE_RETURN_TYPE 1892 * @see #INVALID_GETTER_OVERRIDE_RETURN_TYPE
1893 */ 1893 */
1894 static final StaticWarningCode INVALID_METHOD_OVERRIDE_RETURN_TYPE = new Stati cWarningCode('INVALID_METHOD_OVERRIDE_RETURN_TYPE', 31, "The return type '%s' is not assignable to '%s' as required from method it is overriding from '%s'"); 1894 static final StaticWarningCode INVALID_METHOD_OVERRIDE_RETURN_TYPE = new Stati cWarningCode('INVALID_METHOD_OVERRIDE_RETURN_TYPE', 31, "The return type '%s' is not assignable to '%s' as required from method it is overriding from '%s'");
1895 1895
1896 /** 1896 /**
1897 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i > overrides an 1897 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i > overrides an
1898 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies a default value for 1898 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies a default value for
1899 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff erent default value 1899 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff erent default value
1900 * for <i>p</i>. 1900 * for <i>p</i>.
1901 */ 1901 */
1902 static final StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES = new StaticWarningCode('INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES', 32, ""); 1902 static final StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED = new StaticWarningCode('INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED', 32, "Parameters cannot override default values, this method overrides '%s.%s' where '%s' has a different value");
1903
1904 /**
1905 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i > overrides an
1906 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies a default value for
1907 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff erent default value
1908 * for <i>p</i>.
1909 */
1910 static final StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSIT IONAL = new StaticWarningCode('INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIO NAL', 33, "Parameters cannot override default values, this method overrides '%s. %s' where this positional parameter has a different value");
1903 1911
1904 /** 1912 /**
1905 * 7.3 Setters: It is a static warning if a setter <i>m1</i> overrides a sette r <i>m2</i> and the 1913 * 7.3 Setters: It is a static warning if a setter <i>m1</i> overrides a sette r <i>m2</i> and the
1906 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>. 1914 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>.
1907 * @param actualParamTypeName the name of the expected parameter type 1915 * @param actualParamTypeName the name of the expected parameter type
1908 * @param expectedParamType the name of the actual parameter type, not assigna ble to the 1916 * @param expectedParamType the name of the actual parameter type, not assigna ble to the
1909 * actualParamTypeName 1917 * actualParamTypeName
1910 * @param className the name of the class where the overridden setter is decla red 1918 * @param className the name of the class where the overridden setter is decla red
1911 * @see #INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE 1919 * @see #INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE
1912 */ 1920 */
1913 static final StaticWarningCode INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE = new StaticWarningCode('INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE', 33, "The paramet er type '%s' is not assignable to '%s' as required by the setter it is overridin g from '%s'"); 1921 static final StaticWarningCode INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE = new StaticWarningCode('INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE', 34, "The paramet er type '%s' is not assignable to '%s' as required by the setter it is overridin g from '%s'");
1914 1922
1915 /** 1923 /**
1916 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form 1924 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form
1917 * <i>super.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n +1</sub>, &hellip; 1925 * <i>super.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n +1</sub>, &hellip;
1918 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. If <i>S.m</i> exists, it is a static warning if the type 1926 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. If <i>S.m</i> exists, it is a static warning if the type
1919 * <i>F</i> of <i>S.m</i> may not be assigned to a function type. 1927 * <i>F</i> of <i>S.m</i> may not be assigned to a function type.
1920 */ 1928 */
1921 static final StaticWarningCode INVOCATION_OF_NON_FUNCTION = new StaticWarningC ode('INVOCATION_OF_NON_FUNCTION', 34, ""); 1929 static final StaticWarningCode INVOCATION_OF_NON_FUNCTION = new StaticWarningC ode('INVOCATION_OF_NON_FUNCTION', 35, "");
1922 1930
1923 /** 1931 /**
1924 * 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i> with argument type 1932 * 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i> with argument type
1925 * <i>T</i> and a getter named <i>v</i> with return type <i>S</i>, and <i>T</i > may not be 1933 * <i>T</i> and a getter named <i>v</i> with return type <i>S</i>, and <i>T</i > may not be
1926 * assigned to <i>S</i>. 1934 * assigned to <i>S</i>.
1927 */ 1935 */
1928 static final StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES = new Static WarningCode('MISMATCHED_GETTER_AND_SETTER_TYPES', 35, "The parameter type for se tter '%s' is %s which is not assignable to its getter (of type %s)"); 1936 static final StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES = new Static WarningCode('MISMATCHED_GETTER_AND_SETTER_TYPES', 36, "The parameter type for se tter '%s' is %s which is not assignable to its getter (of type %s)");
1929 1937
1930 /** 1938 /**
1931 * 12.11.1 New: It is a static warning if <i>q</i> is a constructor of an abst ract class and 1939 * 12.11.1 New: It is a static warning if <i>q</i> is a constructor of an abst ract class and
1932 * <i>q</i> is not a factory constructor. 1940 * <i>q</i> is not a factory constructor.
1933 */ 1941 */
1934 static final StaticWarningCode NEW_WITH_ABSTRACT_CLASS = new StaticWarningCode ('NEW_WITH_ABSTRACT_CLASS', 36, "Abstract classes cannot be created with a 'new' expression"); 1942 static final StaticWarningCode NEW_WITH_ABSTRACT_CLASS = new StaticWarningCode ('NEW_WITH_ABSTRACT_CLASS', 37, "Abstract classes cannot be created with a 'new' expression");
1935 1943
1936 /** 1944 /**
1937 * 12.11.1 New: It is a static warning if <i>T</i> is not a class accessible i n the current scope, 1945 * 12.11.1 New: It is a static warning if <i>T</i> is not a class accessible i n the current scope,
1938 * optionally followed by type arguments. 1946 * optionally followed by type arguments.
1939 * @param name the name of the non-type element 1947 * @param name the name of the non-type element
1940 */ 1948 */
1941 static final StaticWarningCode NEW_WITH_NON_TYPE = new StaticWarningCode('NEW_ WITH_NON_TYPE', 37, "The name '%s' is not a class"); 1949 static final StaticWarningCode NEW_WITH_NON_TYPE = new StaticWarningCode('NEW_ WITH_NON_TYPE', 38, "The name '%s' is not a class");
1942 1950
1943 /** 1951 /**
1944 * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the current scope then: 1952 * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the current scope then:
1945 * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, &hellip;, a<sub>n< /sub>, 1953 * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, &hellip;, a<sub>n< /sub>,
1946 * 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 1954 * 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
1947 * static warning if <i>T.id</i> is not the name of a constructor declared by the type <i>T</i>. 1955 * static warning if <i>T.id</i> is not the name of a constructor declared by the type <i>T</i>.
1948 * If <i>e</i> of the form <i>new T(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x< sub>n+1</sub>: 1956 * If <i>e</i> of the form <i>new T(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x< sub>n+1</sub>:
1949 * a<sub>n+1</sub>, &hellip; x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a sta tic warning if the 1957 * a<sub>n+1</sub>, &hellip; x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a sta tic warning if the
1950 * type <i>T</i> does not declare a constructor with the same name as the decl aration of <i>T</i>. 1958 * type <i>T</i> does not declare a constructor with the same name as the decl aration of <i>T</i>.
1951 */ 1959 */
1952 static final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR = new StaticWarn ingCode('NEW_WITH_UNDEFINED_CONSTRUCTOR', 38, "The class '%s' does not have a co nstructor '%s'"); 1960 static final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR = new StaticWarn ingCode('NEW_WITH_UNDEFINED_CONSTRUCTOR', 39, "The class '%s' does not have a co nstructor '%s'");
1953 1961
1954 /** 1962 /**
1955 * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the current scope then: 1963 * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the current scope then:
1956 * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, &hellip;, a<sub>n< /sub>, 1964 * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, &hellip;, a<sub>n< /sub>,
1957 * 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 1965 * 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
1958 * static warning if <i>T.id</i> is not the name of a constructor declared by the type <i>T</i>. 1966 * static warning if <i>T.id</i> is not the name of a constructor declared by the type <i>T</i>.
1959 * If <i>e</i> of the form <i>new T(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x< sub>n+1</sub>: 1967 * If <i>e</i> of the form <i>new T(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x< sub>n+1</sub>:
1960 * a<sub>n+1</sub>, &hellip; x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a sta tic warning if the 1968 * a<sub>n+1</sub>, &hellip; x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a sta tic warning if the
1961 * type <i>T</i> does not declare a constructor with the same name as the decl aration of <i>T</i>. 1969 * type <i>T</i> does not declare a constructor with the same name as the decl aration of <i>T</i>.
1962 */ 1970 */
1963 static final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = new St aticWarningCode('NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 39, "The class '%s' do es not have a default constructor"); 1971 static final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = new St aticWarningCode('NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 40, "The class '%s' do es not have a default constructor");
1972
1973 /**
1974 * 7.6.1 Generative Constructors: If no superinitializer is provided, an impli cit superinitializer
1975 * of the form <b>super</b>() is added at the end of <i>k</i>'s initializer li st, unless the
1976 * enclosing class is class <i>Object</i>.
1977 */
1978 static final StaticWarningCode NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT = new Sta ticWarningCode('NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT', 41, "The class '%s' does not have a default constructor");
1979
1980 /**
1981 * 7.6 Constructors: Iff no constructor is specified for a class <i>C</i>, it implicitly has a
1982 * default constructor C() : <b>super<b>() {}, unless <i>C</i> is class <i>Obj ect</i>.
1983 */
1984 static final StaticWarningCode NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT = new Sta ticWarningCode('NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT', 42, "The class '%s' does not have a default constructor");
1964 1985
1965 /** 1986 /**
1966 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an 1987 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an
1967 * abstract method. 1988 * abstract method.
1968 * <p> 1989 *
1969 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a non-abstract class 1990 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a non-abstract class
1970 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare or inherit a 1991 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare or inherit a
1971 * corresponding instance member <i>m</i>. 1992 * corresponding instance member <i>m</i>.
1972 * @param getterSetterOrMethod a string containing either "get ", "set " or "" for the first 1993 * @param getterSetterOrMethod a string containing either "get ", "set " or "" for the first
1973 * member 1994 * member
1974 * @param enclosingClass enclosing class of the first missing member 1995 * @param enclosingClass enclosing class of the first missing member
1975 * @param name first member name 1996 * @param name first member name
1976 * @param getterSetterOrMethod a string containing either "get ", "set " or "" for the second 1997 * @param getterSetterOrMethod a string containing either "get ", "set " or "" for the second
1977 * member 1998 * member
1978 * @param enclosingClass enclosing class of the second missing member 1999 * @param enclosingClass enclosing class of the second missing member
1979 * @param name second member name 2000 * @param name second member name
1980 * @param getterSetterOrMethod a string containing either "get ", "set " or "" for the third 2001 * @param getterSetterOrMethod a string containing either "get ", "set " or "" for the third
1981 * member 2002 * member
1982 * @param enclosingClass enclosing class of the third missing member 2003 * @param enclosingClass enclosing class of the third missing member
1983 * @param name third member name 2004 * @param name third member name
1984 * @param getterSetterOrMethod a string containing either "get ", "set " or "" for the fourth 2005 * @param getterSetterOrMethod a string containing either "get ", "set " or "" for the fourth
1985 * member 2006 * member
1986 * @param enclosingClass enclosing class of the fourth missing member 2007 * @param enclosingClass enclosing class of the fourth missing member
1987 * @param name fourth member name 2008 * @param name fourth member name
1988 * @param additionalCount the number of additional missing members that aren't listed 2009 * @param additionalCount the number of additional missing members that aren't listed
1989 */ 2010 */
1990 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIV E_PLUS = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE _PLUS', 40, "Missing inherited members: %s'%s.%s', %s'%s.%s', %s'%s.%s', %s'%s.% s' and %d more"); 2011 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIV E_PLUS = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE _PLUS', 43, "Missing inherited members: %s'%s.%s', %s'%s.%s', %s'%s.%s', %s'%s.% s' and %d more");
1991 2012
1992 /** 2013 /**
1993 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an 2014 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an
1994 * abstract method. 2015 * abstract method.
1995 * <p> 2016 *
1996 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a non-abstract class 2017 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a non-abstract class
1997 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare or inherit a 2018 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare or inherit a
1998 * corresponding instance member <i>m</i>. 2019 * corresponding instance member <i>m</i>.
1999 * @param getterSetterOrMethod a string containing either "get ", "set " or "" for the first 2020 * @param getterSetterOrMethod a string containing either "get ", "set " or "" for the first
2000 * member 2021 * member
2001 * @param enclosingClass enclosing class of the first missing member 2022 * @param enclosingClass enclosing class of the first missing member
2002 * @param name first member name 2023 * @param name first member name
2003 * @param getterSetterOrMethod a string containing either "get ", "set " or "" for the second 2024 * @param getterSetterOrMethod a string containing either "get ", "set " or "" for the second
2004 * member 2025 * member
2005 * @param enclosingClass enclosing class of the second missing member 2026 * @param enclosingClass enclosing class of the second missing member
2006 * @param name second member name 2027 * @param name second member name
2007 * @param getterSetterOrMethod a string containing either "get ", "set " or "" for the third 2028 * @param getterSetterOrMethod a string containing either "get ", "set " or "" for the third
2008 * member 2029 * member
2009 * @param enclosingClass enclosing class of the third missing member 2030 * @param enclosingClass enclosing class of the third missing member
2010 * @param name third member name 2031 * @param name third member name
2011 * @param getterSetterOrMethod a string containing either "get ", "set " or "" for the fourth 2032 * @param getterSetterOrMethod a string containing either "get ", "set " or "" for the fourth
2012 * member 2033 * member
2013 * @param enclosingClass enclosing class of the fourth missing member 2034 * @param enclosingClass enclosing class of the fourth missing member
2014 * @param name fourth member name 2035 * @param name fourth member name
2015 */ 2036 */
2016 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOU R = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR', 41 , "Missing inherited members: %s'%s.%s', %s'%s.%s', %s'%s.%s' and %s'%s.%s'"); 2037 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOU R = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR', 44 , "Missing inherited members: %s'%s.%s', %s'%s.%s', %s'%s.%s' and %s'%s.%s'");
2017 2038
2018 /** 2039 /**
2019 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an 2040 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an
2020 * abstract method. 2041 * abstract method.
2021 * <p> 2042 *
2022 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a non-abstract class 2043 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a non-abstract class
2023 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare or inherit a 2044 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare or inherit a
2024 * corresponding instance member <i>m</i>. 2045 * corresponding instance member <i>m</i>.
2025 * @param getterSetterOrMethod a string containing either "get ", "set " or "" 2046 * @param getterSetterOrMethod a string containing either "get ", "set " or ""
2026 * @param enclosingClass enclosing class of the missing member 2047 * @param enclosingClass enclosing class of the missing member
2027 * @param name member name 2048 * @param name member name
2028 */ 2049 */
2029 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE', 42, "Missing inherited member %s'%s.%s'"); 2050 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE', 45, "Missing inherited member %s'%s.%s'");
2030 2051
2031 /** 2052 /**
2032 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an 2053 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an
2033 * abstract method. 2054 * abstract method.
2034 * <p> 2055 *
2035 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a non-abstract class 2056 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a non-abstract class
2036 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare or inherit a 2057 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare or inherit a
2037 * corresponding instance member <i>m</i>. 2058 * corresponding instance member <i>m</i>.
2038 * @param getterSetterOrMethod a string containing either "get ", "set " or "" for the first 2059 * @param getterSetterOrMethod a string containing either "get ", "set " or "" for the first
2039 * member 2060 * member
2040 * @param enclosingClass enclosing class of the first missing member 2061 * @param enclosingClass enclosing class of the first missing member
2041 * @param name first member name 2062 * @param name first member name
2042 * @param getterSetterOrMethod a string containing either "get ", "set " or "" for the second 2063 * @param getterSetterOrMethod a string containing either "get ", "set " or "" for the second
2043 * member 2064 * member
2044 * @param enclosingClass enclosing class of the second missing member 2065 * @param enclosingClass enclosing class of the second missing member
2045 * @param name second member name 2066 * @param name second member name
2046 * @param getterSetterOrMethod a string containing either "get ", "set " or "" for the third 2067 * @param getterSetterOrMethod a string containing either "get ", "set " or "" for the third
2047 * member 2068 * member
2048 * @param enclosingClass enclosing class of the third missing member 2069 * @param enclosingClass enclosing class of the third missing member
2049 * @param name third member name 2070 * @param name third member name
2050 */ 2071 */
2051 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THR EE = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE', 43, "Missing inherited members: %s'%s.%s', %s'%s.%s' and %s'%s.%s'"); 2072 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THR EE = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE', 46, "Missing inherited members: %s'%s.%s', %s'%s.%s' and %s'%s.%s'");
2052 2073
2053 /** 2074 /**
2054 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an 2075 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an
2055 * abstract method. 2076 * abstract method.
2056 * <p> 2077 *
2057 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a non-abstract class 2078 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a non-abstract class
2058 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare or inherit a 2079 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare or inherit a
2059 * corresponding instance member <i>m</i>. 2080 * corresponding instance member <i>m</i>.
2060 * @param getterSetterOrMethod a string containing either "get ", "set " or "" for the first 2081 * @param getterSetterOrMethod a string containing either "get ", "set " or "" for the first
2061 * member 2082 * member
2062 * @param enclosingClass enclosing class of the first missing member 2083 * @param enclosingClass enclosing class of the first missing member
2063 * @param name first member name 2084 * @param name first member name
2064 * @param getterSetterOrMethod a string containing either "get ", "set " or "" for the second 2085 * @param getterSetterOrMethod a string containing either "get ", "set " or "" for the second
2065 * member 2086 * member
2066 * @param enclosingClass enclosing class of the second missing member 2087 * @param enclosingClass enclosing class of the second missing member
2067 * @param name second member name 2088 * @param name second member name
2068 */ 2089 */
2069 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO', 44, "Missing inherited members: %s'%s.%s' and %s'%s.%s'"); 2090 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO', 47, "Missing inherited members: %s'%s.%s' and %s'%s.%s'");
2070 2091
2071 /** 2092 /**
2072 * 13.11 Try: An on-catch clause of the form <i>on T catch (p<sub>1</sub>, p<s ub>2</sub>) s</i> or 2093 * 13.11 Try: An on-catch clause of the form <i>on T catch (p<sub>1</sub>, p<s ub>2</sub>) s</i> or
2073 * <i>on T s</i> matches an object <i>o</i> if the type of <i>o</i> is a subty pe of <i>T</i>. It 2094 * <i>on T s</i> matches an object <i>o</i> if the type of <i>o</i> is a subty pe of <i>T</i>. It
2074 * is a static warning if <i>T</i> does not denote a type available in the lex ical scope of the 2095 * is a static warning if <i>T</i> does not denote a type available in the lex ical scope of the
2075 * catch clause. 2096 * catch clause.
2076 * @param name the name of the non-type element 2097 * @param name the name of the non-type element
2077 */ 2098 */
2078 static final StaticWarningCode NON_TYPE_IN_CATCH_CLAUSE = new StaticWarningCod e('NON_TYPE_IN_CATCH_CLAUSE', 45, "The name '%s' is not a type and cannot be use d in an on-catch clause"); 2099 static final StaticWarningCode NON_TYPE_IN_CATCH_CLAUSE = new StaticWarningCod e('NON_TYPE_IN_CATCH_CLAUSE', 48, "The name '%s' is not a type and cannot be use d in an on-catch clause");
2079 2100
2080 /** 2101 /**
2081 * 7.1.1 Operators: It is a static warning if the return type of the user-decl ared operator \[\]= is 2102 * 7.1.1 Operators: It is a static warning if the return type of the user-decl ared operator \[\]= is
2082 * explicitly declared and not void. 2103 * explicitly declared and not void.
2083 */ 2104 */
2084 static final StaticWarningCode NON_VOID_RETURN_FOR_OPERATOR = new StaticWarnin gCode('NON_VOID_RETURN_FOR_OPERATOR', 46, "The return type of the operator []= m ust be 'void'"); 2105 static final StaticWarningCode NON_VOID_RETURN_FOR_OPERATOR = new StaticWarnin gCode('NON_VOID_RETURN_FOR_OPERATOR', 49, "The return type of the operator []= m ust be 'void'");
2085 2106
2086 /** 2107 /**
2087 * 7.3 Setters: It is a static warning if a setter declares a return type othe r than void. 2108 * 7.3 Setters: It is a static warning if a setter declares a return type othe r than void.
2088 */ 2109 */
2089 static final StaticWarningCode NON_VOID_RETURN_FOR_SETTER = new StaticWarningC ode('NON_VOID_RETURN_FOR_SETTER', 47, "The return type of the setter must be 'vo id'"); 2110 static final StaticWarningCode NON_VOID_RETURN_FOR_SETTER = new StaticWarningC ode('NON_VOID_RETURN_FOR_SETTER', 50, "The return type of the setter must be 'vo id'");
2090 2111
2091 /** 2112 /**
2092 * 15.1 Static Types: A type <i>T</i> is malformed iff: <li><i>T</i> has the f orm <i>id</i> or the 2113 * 15.1 Static Types: A type <i>T</i> is malformed iff: * <i>T</i> has the for m <i>id</i> or the
2093 * form <i>prefix.id</i>, and in the enclosing lexical scope, the name <i>id</ i> (respectively 2114 * form <i>prefix.id</i>, and in the enclosing lexical scope, the name <i>id</ i> (respectively
2094 * <i>prefix.id</i>) does not denote a type.</li> <li><i>T</i> denotes a type variable in the 2115 * <i>prefix.id</i>) does not denote a type. * <i>T</i> denotes a type variabl e in the
2095 * enclosing lexical scope, but occurs in the signature or body of a static me mber.</li> <li> 2116 * enclosing lexical scope, but occurs in the signature or body of a static me mber. *
2096 * <i>T</i> is a parameterized type of the form <i>G&lt;S<sub>1</sub>, .., S<s ub>n</sub>&gt;</i>, 2117 * <i>T</i> is a parameterized type of the form <i>G&lt;S<sub>1</sub>, .., S<s ub>n</sub>&gt;</i>,
2097 * and <i>G</i> is malformed.</li></ul> 2118 * and <i>G</i> is malformed.
2098 * <p> 2119 *
2099 * Any use of a malformed type gives rise to a static warning. 2120 * Any use of a malformed type gives rise to a static warning.
2100 * @param nonTypeName the name that is not a type 2121 * @param nonTypeName the name that is not a type
2101 */ 2122 */
2102 static final StaticWarningCode NOT_A_TYPE = new StaticWarningCode('NOT_A_TYPE' , 48, "%s is not a type"); 2123 static final StaticWarningCode NOT_A_TYPE = new StaticWarningCode('NOT_A_TYPE' , 51, "%s is not a type");
2103 2124
2104 /** 2125 /**
2105 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i> or if <i>m > n</i>. 2126 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i> or if <i>m > n</i>.
2106 * @param requiredCount the expected number of required arguments 2127 * @param requiredCount the expected number of required arguments
2107 * @param argumentCount the actual number of positional arguments given 2128 * @param argumentCount the actual number of positional arguments given
2108 */ 2129 */
2109 static final StaticWarningCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new StaticWarni ngCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', 49, "%d required argument(s) expected, b ut %d found"); 2130 static final StaticWarningCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new StaticWarni ngCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', 52, "%d required argument(s) expected, b ut %d found");
2110 2131
2111 /** 2132 /**
2112 * 14.3 Parts: It is a static warning if the referenced part declaration <i>p< /i> names a library 2133 * 14.3 Parts: It is a static warning if the referenced part declaration <i>p< /i> names a library
2113 * other than the current library as the library to which <i>p</i> belongs. 2134 * other than the current library as the library to which <i>p</i> belongs.
2114 * @param expectedLibraryName the name of expected library name 2135 * @param expectedLibraryName the name of expected library name
2115 * @param actualLibraryName the non-matching actual library name from the "par t of" declaration 2136 * @param actualLibraryName the non-matching actual library name from the "par t of" declaration
2116 */ 2137 */
2117 static final StaticWarningCode PART_OF_DIFFERENT_LIBRARY = new StaticWarningCo de('PART_OF_DIFFERENT_LIBRARY', 50, "Expected this library to be part of '%s', n ot '%s'"); 2138 static final StaticWarningCode PART_OF_DIFFERENT_LIBRARY = new StaticWarningCo de('PART_OF_DIFFERENT_LIBRARY', 53, "Expected this library to be part of '%s', n ot '%s'");
2118 2139
2119 /** 2140 /**
2120 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> i s not a subtype of 2141 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> i s not a subtype of
2121 * the type of <i>k</i>. 2142 * the type of <i>k</i>.
2122 * @param redirectedName the name of the redirected constructor 2143 * @param redirectedName the name of the redirected constructor
2123 * @param redirectingName the name of the redirecting constructor 2144 * @param redirectingName the name of the redirecting constructor
2124 */ 2145 */
2125 static final StaticWarningCode REDIRECT_TO_INVALID_FUNCTION_TYPE = new StaticW arningCode('REDIRECT_TO_INVALID_FUNCTION_TYPE', 51, "The redirected constructor '%s' has incompatible parameters with '%s'"); 2146 static final StaticWarningCode REDIRECT_TO_INVALID_FUNCTION_TYPE = new StaticW arningCode('REDIRECT_TO_INVALID_FUNCTION_TYPE', 54, "The redirected constructor '%s' has incompatible parameters with '%s'");
2126 2147
2127 /** 2148 /**
2128 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> i s not a subtype of 2149 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> i s not a subtype of
2129 * the type of <i>k</i>. 2150 * the type of <i>k</i>.
2130 * @param redirectedName the name of the redirected constructor return type 2151 * @param redirectedName the name of the redirected constructor return type
2131 * @param redirectingName the name of the redirecting constructor return type 2152 * @param redirectingName the name of the redirecting constructor return type
2132 */ 2153 */
2133 static final StaticWarningCode REDIRECT_TO_INVALID_RETURN_TYPE = new StaticWar ningCode('REDIRECT_TO_INVALID_RETURN_TYPE', 52, "The return type '%s' of the red irected constructor is not a subclass of '%s'"); 2154 static final StaticWarningCode REDIRECT_TO_INVALID_RETURN_TYPE = new StaticWar ningCode('REDIRECT_TO_INVALID_RETURN_TYPE', 55, "The return type '%s' of the red irected constructor is not a subclass of '%s'");
2134 2155
2135 /** 2156 /**
2136 * 7.6.2 Factories: It is a static warning if type does not denote a class acc essible in the 2157 * 7.6.2 Factories: It is a static warning if type does not denote a class acc essible in the
2137 * current scope; if type does denote such a class <i>C</i> it is a static war ning if the 2158 * current scope; if type does denote such a class <i>C</i> it is a static war ning if the
2138 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const ructor of <i>C</i>. 2159 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const ructor of <i>C</i>.
2139 */ 2160 */
2140 static final StaticWarningCode REDIRECT_TO_MISSING_CONSTRUCTOR = new StaticWar ningCode('REDIRECT_TO_MISSING_CONSTRUCTOR', 53, "The constructor '%s' could not be found in '%s'"); 2161 static final StaticWarningCode REDIRECT_TO_MISSING_CONSTRUCTOR = new StaticWar ningCode('REDIRECT_TO_MISSING_CONSTRUCTOR', 56, "The constructor '%s' could not be found in '%s'");
2141 2162
2142 /** 2163 /**
2143 * 7.6.2 Factories: It is a static warning if type does not denote a class acc essible in the 2164 * 7.6.2 Factories: It is a static warning if type does not denote a class acc essible in the
2144 * current scope; if type does denote such a class <i>C</i> it is a static war ning if the 2165 * current scope; if type does denote such a class <i>C</i> it is a static war ning if the
2145 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const ructor of <i>C</i>. 2166 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const ructor of <i>C</i>.
2146 */ 2167 */
2147 static final StaticWarningCode REDIRECT_TO_NON_CLASS = new StaticWarningCode(' REDIRECT_TO_NON_CLASS', 54, "The name '%s' is not a type and cannot be used in a redirected constructor"); 2168 static final StaticWarningCode REDIRECT_TO_NON_CLASS = new StaticWarningCode(' REDIRECT_TO_NON_CLASS', 57, "The name '%s' is not a type and cannot be used in a redirected constructor");
2148 2169
2149 /** 2170 /**
2150 * 13.11 Return: Let <i>f</i> be the function immediately enclosing a return s tatement of the form 2171 * 13.11 Return: Let <i>f</i> be the function immediately enclosing a return s tatement of the form
2151 * <i>return;</i> It is a static warning if both of the following conditions h old: 2172 * <i>return;</i> It is a static warning if both of the following conditions h old:
2152 * <ol> 2173 * <ol>
2153 * <li><i>f</i> is not a generative constructor. 2174 * * <i>f</i> is not a generative constructor.
2154 * <li>The return type of <i>f</i> may not be assigned to void. 2175 * * The return type of <i>f</i> may not be assigned to void.
2155 * </ol> 2176 * </ol>
2156 */ 2177 */
2157 static final StaticWarningCode RETURN_WITHOUT_VALUE = new StaticWarningCode('R ETURN_WITHOUT_VALUE', 55, "Missing return value after 'return'"); 2178 static final StaticWarningCode RETURN_WITHOUT_VALUE = new StaticWarningCode('R ETURN_WITHOUT_VALUE', 58, "Missing return value after 'return'");
2158 2179
2159 /** 2180 /**
2160 * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not decl are a static method 2181 * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not decl are a static method
2161 * or getter <i>m</i>. 2182 * or getter <i>m</i>.
2162 * @param memberName the name of the instance member 2183 * @param memberName the name of the instance member
2163 */ 2184 */
2164 static final StaticWarningCode STATIC_ACCESS_TO_INSTANCE_MEMBER = new StaticWa rningCode('STATIC_ACCESS_TO_INSTANCE_MEMBER', 56, "Instance member '%s' cannot b e accessed using static access"); 2185 static final StaticWarningCode STATIC_ACCESS_TO_INSTANCE_MEMBER = new StaticWa rningCode('STATIC_ACCESS_TO_INSTANCE_MEMBER', 59, "Instance member '%s' cannot b e accessed using static access");
2165 2186
2166 /** 2187 /**
2167 * 13.9 Switch: It is a static warning if the type of <i>e</i> may not be assi gned to the type of 2188 * 13.9 Switch: It is a static warning if the type of <i>e</i> may not be assi gned to the type of
2168 * <i>e<sub>k</sub></i>. 2189 * <i>e<sub>k</sub></i>.
2169 */ 2190 */
2170 static final StaticWarningCode SWITCH_EXPRESSION_NOT_ASSIGNABLE = new StaticWa rningCode('SWITCH_EXPRESSION_NOT_ASSIGNABLE', 57, "Type '%s' of the switch expre ssion is not assignable to the type '%s' of case expressions"); 2191 static final StaticWarningCode SWITCH_EXPRESSION_NOT_ASSIGNABLE = new StaticWa rningCode('SWITCH_EXPRESSION_NOT_ASSIGNABLE', 60, "Type '%s' of the switch expre ssion is not assignable to the type '%s' of case expressions");
2171 2192
2172 /** 2193 /**
2173 * 12.31 Type Test: It is a static warning if <i>T</i> does not denote a type available in the 2194 * 12.31 Type Test: It is a static warning if <i>T</i> does not denote a type available in the
2174 * current lexical scope. 2195 * current lexical scope.
2175 */ 2196 */
2176 static final StaticWarningCode TYPE_TEST_NON_TYPE = new StaticWarningCode('TYP E_TEST_NON_TYPE', 58, "The name '%s' is not a type and cannot be used in an 'is' expression"); 2197 static final StaticWarningCode TYPE_TEST_NON_TYPE = new StaticWarningCode('TYP E_TEST_NON_TYPE', 61, "The name '%s' is not a type and cannot be used in an 'is' expression");
2177 2198
2178 /** 2199 /**
2179 * 15.1 Static Types: A type <i>T</i> is malformed iff: <li><i>T</i> has the f orm <i>id</i> or the 2200 * 15.1 Static Types: A type <i>T</i> is malformed iff: * <i>T</i> has the for m <i>id</i> or the
2180 * form <i>prefix.id</i>, and in the enclosing lexical scope, the name <i>id</ i> (respectively 2201 * form <i>prefix.id</i>, and in the enclosing lexical scope, the name <i>id</ i> (respectively
2181 * <i>prefix.id</i>) does not denote a type.</li> <li><i>T</i> denotes a type variable in the 2202 * <i>prefix.id</i>) does not denote a type. * <i>T</i> denotes a type variabl e in the
2182 * enclosing lexical scope, but occurs in the signature or body of a static me mber.</li> <li> 2203 * enclosing lexical scope, but occurs in the signature or body of a static me mber. *
2183 * <i>T</i> is a parameterized type of the form <i>G&lt;S<sub>1</sub>, .., S<s ub>n</sub>&gt;</i>, 2204 * <i>T</i> is a parameterized type of the form <i>G&lt;S<sub>1</sub>, .., S<s ub>n</sub>&gt;</i>,
2184 * and <i>G</i> is malformed.</li></ul> 2205 * and <i>G</i> is malformed.
2185 * <p> 2206 *
2186 * Any use of a malformed type gives rise to a static warning. 2207 * Any use of a malformed type gives rise to a static warning.
2187 */ 2208 */
2188 static final StaticWarningCode TYPE_VARIABLE_IN_STATIC_SCOPE = new StaticWarni ngCode('TYPE_VARIABLE_IN_STATIC_SCOPE', 59, ""); 2209 static final StaticWarningCode TYPE_VARIABLE_IN_STATIC_SCOPE = new StaticWarni ngCode('TYPE_VARIABLE_IN_STATIC_SCOPE', 62, "");
2189 2210
2190 /** 2211 /**
2191 * 12.15.3 Static Invocation: A static method invocation <i>i</i> has the form 2212 * 12.15.3 Static Invocation: A static method invocation <i>i</i> has the form
2192 * <i>C.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</ sub>, &hellip; 2213 * <i>C.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</ sub>, &hellip;
2193 * 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 2214 * 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
2194 * class in the current scope. 2215 * class in the current scope.
2195 */ 2216 */
2196 static final StaticWarningCode UNDEFINED_CLASS = new StaticWarningCode('UNDEFI NED_CLASS', 60, "Undefined class '%s'"); 2217 static final StaticWarningCode UNDEFINED_CLASS = new StaticWarningCode('UNDEFI NED_CLASS', 63, "Undefined class '%s'");
2197 2218
2198 /** 2219 /**
2199 * Same as {@link #UNDEFINED_CLASS}, but to catch using "boolean" instead of " bool". 2220 * Same as [UNDEFINED_CLASS], but to catch using "boolean" instead of "bool".
2200 */ 2221 */
2201 static final StaticWarningCode UNDEFINED_CLASS_BOOLEAN = new StaticWarningCode ('UNDEFINED_CLASS_BOOLEAN', 61, "Undefined class 'boolean'; did you mean 'bool'? "); 2222 static final StaticWarningCode UNDEFINED_CLASS_BOOLEAN = new StaticWarningCode ('UNDEFINED_CLASS_BOOLEAN', 64, "Undefined class 'boolean'; did you mean 'bool'? ");
2202 2223
2203 /** 2224 /**
2204 * 12.17 Getter Invocation: It is a static warning if there is no class <i>C</ i> in the enclosing 2225 * 12.17 Getter Invocation: It is a static warning if there is no class <i>C</ i> in the enclosing
2205 * lexical scope of <i>i</i>, or if <i>C</i> does not declare, implicitly or e xplicitly, a getter 2226 * lexical scope of <i>i</i>, or if <i>C</i> does not declare, implicitly or e xplicitly, a getter
2206 * named <i>m</i>. 2227 * named <i>m</i>.
2207 * @param getterName the name of the getter 2228 * @param getterName the name of the getter
2208 * @param enclosingType the name of the enclosing type where the getter is bei ng looked for 2229 * @param enclosingType the name of the enclosing type where the getter is bei ng looked for
2209 */ 2230 */
2210 static final StaticWarningCode UNDEFINED_GETTER = new StaticWarningCode('UNDEF INED_GETTER', 62, "There is no such getter '%s' in '%s'"); 2231 static final StaticWarningCode UNDEFINED_GETTER = new StaticWarningCode('UNDEF INED_GETTER', 65, "There is no such getter '%s' in '%s'");
2211 2232
2212 /** 2233 /**
2213 * 12.30 Identifier Reference: It is as static warning if an identifier expres sion of the form 2234 * 12.30 Identifier Reference: It is as static warning if an identifier expres sion of the form
2214 * <i>id</i> occurs inside a top level or static function (be it function, met hod, getter, or 2235 * <i>id</i> occurs inside a top level or static function (be it function, met hod, getter, or
2215 * setter) or variable initializer and there is no declaration <i>d</i> with n ame <i>id</i> in the 2236 * setter) or variable initializer and there is no declaration <i>d</i> with n ame <i>id</i> in the
2216 * lexical scope enclosing the expression. 2237 * lexical scope enclosing the expression.
2217 */ 2238 */
2218 static final StaticWarningCode UNDEFINED_IDENTIFIER = new StaticWarningCode('U NDEFINED_IDENTIFIER', 63, "Undefined name '%s'"); 2239 static final StaticWarningCode UNDEFINED_IDENTIFIER = new StaticWarningCode('U NDEFINED_IDENTIFIER', 66, "Undefined name '%s'");
2219 2240
2220 /** 2241 /**
2221 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>, <i>1<=i<=l</i>, 2242 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>, <i>1<=i<=l</i>,
2222 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i > ... 2243 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i > ...
2223 * <i>p<sub>n+k</sub></i>} or a static warning occurs. 2244 * <i>p<sub>n+k</sub></i>} or a static warning occurs.
2224 * @param name the name of the requested named parameter 2245 * @param name the name of the requested named parameter
2225 */ 2246 */
2226 static final StaticWarningCode UNDEFINED_NAMED_PARAMETER = new StaticWarningCo de('UNDEFINED_NAMED_PARAMETER', 64, "The named parameter '%s' is not defined"); 2247 static final StaticWarningCode UNDEFINED_NAMED_PARAMETER = new StaticWarningCo de('UNDEFINED_NAMED_PARAMETER', 67, "The named parameter '%s' is not defined");
2227 2248
2228 /** 2249 /**
2229 * 12.18 Assignment: It is as static warning if an assignment of the form <i>v = e</i> occurs 2250 * 12.18 Assignment: It is as static warning if an assignment of the form <i>v = e</i> occurs
2230 * inside a top level or static function (be it function, method, getter, or s etter) or variable 2251 * inside a top level or static function (be it function, method, getter, or s etter) or variable
2231 * initializer and there is no declaration <i>d</i> with name <i>v=</i> in the lexical scope 2252 * initializer and there is no declaration <i>d</i> with name <i>v=</i> in the lexical scope
2232 * enclosing the assignment. 2253 * enclosing the assignment.
2233 * <p> 2254 *
2234 * 12.18 Assignment: It is a static warning if there is no class <i>C</i> in t he enclosing lexical 2255 * 12.18 Assignment: It is a static warning if there is no class <i>C</i> in t he enclosing lexical
2235 * scope of the assignment, or if <i>C</i> does not declare, implicitly or exp licitly, a setter 2256 * scope of the assignment, or if <i>C</i> does not declare, implicitly or exp licitly, a setter
2236 * <i>v=</i>. 2257 * <i>v=</i>.
2237 * @param setterName the name of the getter 2258 * @param setterName the name of the getter
2238 * @param enclosingType the name of the enclosing type where the setter is bei ng looked for 2259 * @param enclosingType the name of the enclosing type where the setter is bei ng looked for
2239 */ 2260 */
2240 static final StaticWarningCode UNDEFINED_SETTER = new StaticWarningCode('UNDEF INED_SETTER', 65, "There is no such setter '%s' in '%s'"); 2261 static final StaticWarningCode UNDEFINED_SETTER = new StaticWarningCode('UNDEF INED_SETTER', 68, "There is no such setter '%s' in '%s'");
2241 2262
2242 /** 2263 /**
2243 * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not decl are a static method 2264 * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not decl are a static method
2244 * or getter <i>m</i>. 2265 * or getter <i>m</i>.
2245 * @param methodName the name of the method 2266 * @param methodName the name of the method
2246 * @param enclosingType the name of the enclosing type where the method is bei ng looked for 2267 * @param enclosingType the name of the enclosing type where the method is bei ng looked for
2247 */ 2268 */
2248 static final StaticWarningCode UNDEFINED_STATIC_METHOD_OR_GETTER = new StaticW arningCode('UNDEFINED_STATIC_METHOD_OR_GETTER', 66, "There is no such static met hod '%s' in '%s'"); 2269 static final StaticWarningCode UNDEFINED_STATIC_METHOD_OR_GETTER = new StaticW arningCode('UNDEFINED_STATIC_METHOD_OR_GETTER', 69, "There is no such static met hod '%s' in '%s'");
2249 static final List<StaticWarningCode> values = [AMBIGUOUS_IMPORT, ARGUMENT_TYPE _NOT_ASSIGNABLE, ASSIGNMENT_TO_FINAL, CASE_BLOCK_NOT_TERMINATED, CAST_TO_NON_TYP E, COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE, COMMENT_REFERENCE_IDENTIFIER_NOT_V ISIBLE, COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR, COMMENT_REFERENCE_UNDECLARED_I DENTIFIER, COMMENT_REFERENCE_URI_NOT_LIBRARY, CONCRETE_CLASS_WITH_ABSTRACT_MEMBE R, CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER, CONFLICTING_INSTANCE_SETTE R_AND_SUPERCLASS_MEMBER, CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER, CONFLICT ING_STATIC_SETTER_AND_INSTANCE_MEMBER, CONST_WITH_ABSTRACT_CLASS, EQUAL_KEYS_IN_ MAP, EXPORT_DUPLICATED_LIBRARY_NAME, EXTRA_POSITIONAL_ARGUMENTS, FIELD_INITIALIZ ER_NOT_ASSIGNABLE, FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE, FINAL_NOT_INITIALIZ ED, IMPORT_DUPLICATED_LIBRARY_NAME, INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_M ETHOD, INCORRECT_NUMBER_OF_ARGUMENTS, INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCL ASS_STATIC, INVALID_FACTORY_NAME, INVALID_GETTER_OVERRIDE_RETURN_TYPE, INVALID_M ETHOD_OVERRIDE_NAMED_PARAM_TYPE, INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE, INVA LID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE, INVALID_METHOD_OVERRIDE_RETURN_TYPE, IN VALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES, INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TY PE, INVOCATION_OF_NON_FUNCTION, MISMATCHED_GETTER_AND_SETTER_TYPES, NEW_WITH_ABS TRACT_CLASS, NEW_WITH_NON_TYPE, NEW_WITH_UNDEFINED_CONSTRUCTOR, NEW_WITH_UNDEFIN ED_CONSTRUCTOR_DEFAULT, NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS, N ON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR, NON_ABSTRACT_CLASS_INHERITS_ABS TRACT_MEMBER_ONE, NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE, NON_ABSTRAC T_CLASS_INHERITS_ABSTRACT_MEMBER_TWO, NON_TYPE_IN_CATCH_CLAUSE, NON_VOID_RETURN_ FOR_OPERATOR, NON_VOID_RETURN_FOR_SETTER, NOT_A_TYPE, NOT_ENOUGH_REQUIRED_ARGUME NTS, PART_OF_DIFFERENT_LIBRARY, REDIRECT_TO_INVALID_FUNCTION_TYPE, REDIRECT_TO_I NVALID_RETURN_TYPE, REDIRECT_TO_MISSING_CONSTRUCTOR, REDIRECT_TO_NON_CLASS, RETU RN_WITHOUT_VALUE, STATIC_ACCESS_TO_INSTANCE_MEMBER, SWITCH_EXPRESSION_NOT_ASSIGN ABLE, TYPE_TEST_NON_TYPE, TYPE_VARIABLE_IN_STATIC_SCOPE, UNDEFINED_CLASS, UNDEFI NED_CLASS_BOOLEAN, UNDEFINED_GETTER, UNDEFINED_IDENTIFIER, UNDEFINED_NAMED_PARAM ETER, UNDEFINED_SETTER, UNDEFINED_STATIC_METHOD_OR_GETTER]; 2270 static final List<StaticWarningCode> values = [AMBIGUOUS_IMPORT, ARGUMENT_TYPE _NOT_ASSIGNABLE, ASSIGNMENT_TO_FINAL, CASE_BLOCK_NOT_TERMINATED, CAST_TO_NON_TYP E, COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE, COMMENT_REFERENCE_IDENTIFIER_NOT_V ISIBLE, COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR, COMMENT_REFERENCE_UNDECLARED_I DENTIFIER, COMMENT_REFERENCE_URI_NOT_LIBRARY, CONCRETE_CLASS_WITH_ABSTRACT_MEMBE R, CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER, CONFLICTING_INSTANCE_SETTE R_AND_SUPERCLASS_MEMBER, CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER, CONFLICT ING_STATIC_SETTER_AND_INSTANCE_MEMBER, CONST_WITH_ABSTRACT_CLASS, EQUAL_KEYS_IN_ MAP, EXPORT_DUPLICATED_LIBRARY_NAME, EXTRA_POSITIONAL_ARGUMENTS, FIELD_INITIALIZ ER_NOT_ASSIGNABLE, FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE, FINAL_NOT_INITIALIZ ED, IMPORT_DUPLICATED_LIBRARY_NAME, INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_M ETHOD, INCORRECT_NUMBER_OF_ARGUMENTS, INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCL ASS_STATIC, INVALID_FACTORY_NAME, INVALID_GETTER_OVERRIDE_RETURN_TYPE, INVALID_M ETHOD_OVERRIDE_NAMED_PARAM_TYPE, INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE, INVA LID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE, INVALID_METHOD_OVERRIDE_RETURN_TYPE, IN VALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED, INVALID_OVERRIDE_DIFFERENT_DEFAUL T_VALUES_POSITIONAL, INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE, INVOCATION_OF_NO N_FUNCTION, MISMATCHED_GETTER_AND_SETTER_TYPES, NEW_WITH_ABSTRACT_CLASS, NEW_WIT H_NON_TYPE, NEW_WITH_UNDEFINED_CONSTRUCTOR, NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAU LT, NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT, NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT , NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS, NON_ABSTRACT_CLASS_INHE RITS_ABSTRACT_MEMBER_FOUR, NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE, NON_ ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE, NON_ABSTRACT_CLASS_INHERITS_ABSTR ACT_MEMBER_TWO, NON_TYPE_IN_CATCH_CLAUSE, NON_VOID_RETURN_FOR_OPERATOR, NON_VOID _RETURN_FOR_SETTER, NOT_A_TYPE, NOT_ENOUGH_REQUIRED_ARGUMENTS, PART_OF_DIFFERENT _LIBRARY, REDIRECT_TO_INVALID_FUNCTION_TYPE, REDIRECT_TO_INVALID_RETURN_TYPE, RE DIRECT_TO_MISSING_CONSTRUCTOR, REDIRECT_TO_NON_CLASS, RETURN_WITHOUT_VALUE, STAT IC_ACCESS_TO_INSTANCE_MEMBER, SWITCH_EXPRESSION_NOT_ASSIGNABLE, TYPE_TEST_NON_TY PE, TYPE_VARIABLE_IN_STATIC_SCOPE, UNDEFINED_CLASS, UNDEFINED_CLASS_BOOLEAN, UND EFINED_GETTER, UNDEFINED_IDENTIFIER, UNDEFINED_NAMED_PARAMETER, UNDEFINED_SETTER , UNDEFINED_STATIC_METHOD_OR_GETTER];
2250 2271
2251 /// The name of this enum constant, as declared in the enum declaration. 2272 /// The name of this enum constant, as declared in the enum declaration.
2252 final String name; 2273 final String name;
2253 2274
2254 /// The position in the enum declaration. 2275 /// The position in the enum declaration.
2255 final int ordinal; 2276 final int ordinal;
2256 2277
2257 /** 2278 /**
2258 * The message template used to create the message to be displayed for this er ror. 2279 * The message template used to create the message to be displayed for this er ror.
2259 */ 2280 */
2260 String _message; 2281 String _message;
2261 2282
2262 /** 2283 /**
2263 * Initialize a newly created error code to have the given type and message. 2284 * Initialize a newly created error code to have the given type and message.
2264 * @param message the message template used to create the message to be displa yed for the error 2285 * @param message the message template used to create the message to be displa yed for the error
2265 */ 2286 */
2266 StaticWarningCode(this.name, this.ordinal, String message) { 2287 StaticWarningCode(this.name, this.ordinal, String message) {
2267 this._message = message; 2288 this._message = message;
2268 } 2289 }
2269 ErrorSeverity get errorSeverity => ErrorType.STATIC_WARNING.severity; 2290 ErrorSeverity get errorSeverity => ErrorType.STATIC_WARNING.severity;
2270 String get message => _message; 2291 String get message => _message;
2271 ErrorType get type => ErrorType.STATIC_WARNING; 2292 ErrorType get type => ErrorType.STATIC_WARNING;
2272 int compareTo(StaticWarningCode other) => ordinal - other.ordinal; 2293 int compareTo(StaticWarningCode other) => ordinal - other.ordinal;
2273 int get hashCode => ordinal; 2294 int get hashCode => ordinal;
2274 String toString() => name; 2295 String toString() => name;
2275 } 2296 }
2276 /** 2297 /**
2277 * The interface {@code AnalysisErrorListener} defines the behavior of objects t hat listen for{@link AnalysisError analysis errors} being produced by the analys is engine. 2298 * The interface `AnalysisErrorListener` defines the behavior of objects that li sten for[AnalysisError analysis errors] being produced by the analysis engine.
2278 * @coverage dart.engine.error 2299 * @coverage dart.engine.error
2279 */ 2300 */
2280 abstract class AnalysisErrorListener { 2301 abstract class AnalysisErrorListener {
2281 2302
2282 /** 2303 /**
2283 * An error listener that ignores errors that are reported to it. 2304 * An error listener that ignores errors that are reported to it.
2284 */ 2305 */
2285 static final AnalysisErrorListener _NULL_LISTENER = new AnalysisErrorListener_ 5(); 2306 static final AnalysisErrorListener _NULL_LISTENER = new AnalysisErrorListener_ 5();
2286 2307
2287 /** 2308 /**
2288 * This method is invoked when an error has been found by the analysis engine. 2309 * This method is invoked when an error has been found by the analysis engine.
2289 * @param error the error that was just found (not {@code null}) 2310 * @param error the error that was just found (not `null`)
2290 */ 2311 */
2291 void onError(AnalysisError error); 2312 void onError(AnalysisError error);
2292 } 2313 }
2293 class AnalysisErrorListener_5 implements AnalysisErrorListener { 2314 class AnalysisErrorListener_5 implements AnalysisErrorListener {
2294 void onError(AnalysisError event) { 2315 void onError(AnalysisError event) {
2295 } 2316 }
2296 } 2317 }
2297 /** 2318 /**
2298 * The enumeration {@code HtmlWarningCode} defines the error codes used for warn ings in HTML files. 2319 * The enumeration `HtmlWarningCode` defines the error codes used for warnings i n HTML files.
2299 * The convention for this class is for the name of the error code to indicate t he problem that 2320 * The convention for this class is for the name of the error code to indicate t he problem that
2300 * caused the error to be generated and for the error message to explain what is wrong and, when 2321 * caused the error to be generated and for the error message to explain what is wrong and, when
2301 * appropriate, how the problem can be corrected. 2322 * appropriate, how the problem can be corrected.
2302 * @coverage dart.engine.error 2323 * @coverage dart.engine.error
2303 */ 2324 */
2304 class HtmlWarningCode implements Comparable<HtmlWarningCode>, ErrorCode { 2325 class HtmlWarningCode implements Comparable<HtmlWarningCode>, ErrorCode {
2305 2326
2306 /** 2327 /**
2307 * An error code indicating that the value of the 'src' attribute of a Dart sc ript tag is not a 2328 * An error code indicating that the value of the 'src' attribute of a Dart sc ript tag is not a
2308 * valid URI. 2329 * valid URI.
(...skipping 28 matching lines...) Expand all
2337 this._message = message; 2358 this._message = message;
2338 } 2359 }
2339 ErrorSeverity get errorSeverity => ErrorSeverity.WARNING; 2360 ErrorSeverity get errorSeverity => ErrorSeverity.WARNING;
2340 String get message => _message; 2361 String get message => _message;
2341 ErrorType get type => ErrorType.STATIC_WARNING; 2362 ErrorType get type => ErrorType.STATIC_WARNING;
2342 int compareTo(HtmlWarningCode other) => ordinal - other.ordinal; 2363 int compareTo(HtmlWarningCode other) => ordinal - other.ordinal;
2343 int get hashCode => ordinal; 2364 int get hashCode => ordinal;
2344 String toString() => name; 2365 String toString() => name;
2345 } 2366 }
2346 /** 2367 /**
2347 * The enumeration {@code StaticTypeWarningCode} defines the error codes used fo r static type 2368 * The enumeration `StaticTypeWarningCode` defines the error codes used for stat ic type
2348 * warnings. The convention for this class is for the name of the error code to indicate the problem 2369 * warnings. The convention for this class is for the name of the error code to indicate the problem
2349 * that caused the error to be generated and for the error message to explain wh at is wrong and, 2370 * that caused the error to be generated and for the error message to explain wh at is wrong and,
2350 * when appropriate, how the problem can be corrected. 2371 * when appropriate, how the problem can be corrected.
2351 * @coverage dart.engine.error 2372 * @coverage dart.engine.error
2352 */ 2373 */
2353 class StaticTypeWarningCode implements Comparable<StaticTypeWarningCode>, ErrorC ode { 2374 class StaticTypeWarningCode implements Comparable<StaticTypeWarningCode>, ErrorC ode {
2354 2375
2355 /** 2376 /**
2356 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. It is a static type 2377 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. It is a static type
2357 * warning if <i>T</i> does not have an accessible instance setter named <i>v= </i>. 2378 * warning if <i>T</i> does not have an accessible instance setter named <i>v= </i>.
2358 * @see #UNDEFINED_SETTER 2379 * @see #UNDEFINED_SETTER
2359 */ 2380 */
2360 static final StaticTypeWarningCode INACCESSIBLE_SETTER = new StaticTypeWarning Code('INACCESSIBLE_SETTER', 0, ""); 2381 static final StaticTypeWarningCode INACCESSIBLE_SETTER = new StaticTypeWarning Code('INACCESSIBLE_SETTER', 0, "");
2361 2382
2362 /** 2383 /**
2363 * 8.1.1 Inheritance and Overriding: However, if there are multiple members <i >m<sub>1</sub>, 2384 * 8.1.1 Inheritance and Overriding: However, if there are multiple members <i >m<sub>1</sub>,
2364 * &hellip; m<sub>k</sub></i> with the same name <i>n</i> that would be inheri ted (because 2385 * &hellip; m<sub>k</sub></i> with the same name <i>n</i> that would be inheri ted (because
2365 * identically named members existed in several superinterfaces) then at most one member is 2386 * identically named members existed in several superinterfaces) then at most one member is
2366 * inherited. 2387 * inherited.
2367 * <p> 2388 *
2368 * If the static types <i>T<sub>1</sub>, &hellip;, T<sub>k</sub></i> of the me mbers 2389 * If the static types <i>T<sub>1</sub>, &hellip;, T<sub>k</sub></i> of the me mbers
2369 * <i>m<sub>1</sub>, &hellip;, m<sub>k</sub></i> are not identical, then there must be a member 2390 * <i>m<sub>1</sub>, &hellip;, m<sub>k</sub></i> are not identical, then there must be a member
2370 * <i>m<sub>x</sub></i> such that <i>T<sub>x</sub> &lt; T<sub>i</sub>, 1 &lt;= x &lt;= k</i> for 2391 * <i>m<sub>x</sub></i> such that <i>T<sub>x</sub> &lt; T<sub>i</sub>, 1 &lt;= x &lt;= k</i> for
2371 * all <i>i, 1 &lt;= i &lt; k</i>, or a static type warning occurs. The member that is inherited 2392 * all <i>i, 1 &lt;= i &lt; k</i>, or a static type warning occurs. The member that is inherited
2372 * is <i>m<sub>x</sub></i>, if it exists; otherwise: 2393 * is <i>m<sub>x</sub></i>, if it exists; otherwise:
2373 * <ol> 2394 * <ol>
2374 * <li>If all of <i>m<sub>1</sub>, &hellip; m<sub>k</sub></i> have the same nu mber <i>r</i> of 2395 * * If all of <i>m<sub>1</sub>, &hellip; m<sub>k</sub></i> have the same numb er <i>r</i> of
2375 * required parameters and the same set of named parameters <i>s</i>, then let <i>h = max( 2396 * required parameters and the same set of named parameters <i>s</i>, then let <i>h = max(
2376 * numberOfOptionalPositionals( m<sub>i</sub> ) ), 1 &lt;= i &lt;= k</i>. <i>I </i> has a method 2397 * numberOfOptionalPositionals( m<sub>i</sub> ) ), 1 &lt;= i &lt;= k</i>. <i>I </i> has a method
2377 * named <i>n</i>, with <i>r</i> required parameters of type dynamic, <i>h</i> optional positional 2398 * named <i>n</i>, with <i>r</i> required parameters of type dynamic, <i>h</i> optional positional
2378 * parameters of type dynamic, named parameters <i>s</i> of type dynamic and r eturn type dynamic. 2399 * parameters of type dynamic, named parameters <i>s</i> of type dynamic and r eturn type dynamic.
2379 * <li>Otherwise none of the members <i>m<sub>1</sub>, &hellip;, m<sub>k</sub> </i> is inherited. 2400 * * Otherwise none of the members <i>m<sub>1</sub>, &hellip;, m<sub>k</sub></ i> is inherited.
2380 * </ol> 2401 * </ol>
2381 */ 2402 */
2382 static final StaticTypeWarningCode INCONSISTENT_METHOD_INHERITANCE = new Stati cTypeWarningCode('INCONSISTENT_METHOD_INHERITANCE', 1, "'%s' is inherited by at least two interfaces inconsistently"); 2403 static final StaticTypeWarningCode INCONSISTENT_METHOD_INHERITANCE = new Stati cTypeWarningCode('INCONSISTENT_METHOD_INHERITANCE', 1, "'%s' is inherited by at least two interfaces inconsistently");
2383 2404
2384 /** 2405 /**
2385 * 12.18 Assignment: It is a static type warning if the static type of <i>e</i > may not be 2406 * 12.18 Assignment: It is a static type warning if the static type of <i>e</i > may not be
2386 * assigned to the static type of <i>v</i>. The static type of the expression <i>v = e</i> is the 2407 * assigned to the static type of <i>v</i>. The static type of the expression <i>v = e</i> is the
2387 * static type of <i>e</i>. 2408 * static type of <i>e</i>.
2388 * <p> 2409 *
2389 * 12.18 Assignment: It is a static type warning if the static type of <i>e</i > may not be 2410 * 12.18 Assignment: It is a static type warning if the static type of <i>e</i > may not be
2390 * assigned to the static type of <i>C.v</i>. The static type of the expressio n <i>C.v = e</i> is 2411 * assigned to the static type of <i>C.v</i>. The static type of the expressio n <i>C.v = e</i> is
2391 * the static type of <i>e</i>. 2412 * the static type of <i>e</i>.
2392 * <p> 2413 *
2393 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. It is a static type 2414 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. It is a static type
2394 * warning if the static type of <i>e<sub>2</sub></i> may not be assigned to < i>T</i>. 2415 * warning if the static type of <i>e<sub>2</sub></i> may not be assigned to < i>T</i>.
2395 * @param rhsTypeName the name of the right hand side type 2416 * @param rhsTypeName the name of the right hand side type
2396 * @param lhsTypeName the name of the left hand side type 2417 * @param lhsTypeName the name of the left hand side type
2397 */ 2418 */
2398 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'"); 2419 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'");
2399 2420
2400 /** 2421 /**
2401 * 12.14.4 Function Expression Invocation: A function expression invocation <i >i</i> has the form 2422 * 12.14.4 Function Expression Invocation: A function expression invocation <i >i</i> has the form
2402 * <i>e<sub>f</sub>(a<sub>1</sub>, &hellip; a<sub>n</sub>, x<sub>n+1</sub>: a< sub>n+1</sub>, 2423 * <i>e<sub>f</sub>(a<sub>1</sub>, &hellip; a<sub>n</sub>, x<sub>n+1</sub>: a< sub>n+1</sub>,
2403 * &hellip;, x<sub>n+k</sub>: a<sub>n+k</sub>)</i>, where <i>e<sub>f</sub></i> is an expression. 2424 * &hellip;, x<sub>n+k</sub>: a<sub>n+k</sub>)</i>, where <i>e<sub>f</sub></i> is an expression.
2404 * <p> 2425 *
2405 * It is a static type warning if the static type <i>F</i> of <i>e<sub>f</sub> </i> may not be 2426 * It is a static type warning if the static type <i>F</i> of <i>e<sub>f</sub> </i> may not be
2406 * assigned to a function type. 2427 * assigned to a function type.
2407 * <p> 2428 *
2408 * 12.15.1 Ordinary Invocation: An ordinary method invocation <i>i</i> has the form 2429 * 12.15.1 Ordinary Invocation: An ordinary method invocation <i>i</i> has the form
2409 * <i>o.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</ sub>, &hellip; 2430 * <i>o.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</ sub>, &hellip;
2410 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. 2431 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>.
2411 * <p> 2432 *
2412 * Let <i>T</i> be the static type of <i>o</i>. It is a static type warning if <i>T</i> does not 2433 * Let <i>T</i> be the static type of <i>o</i>. It is a static type warning if <i>T</i> does not
2413 * have an accessible instance member named <i>m</i>. If <i>T.m</i> exists, it is a static warning 2434 * have an accessible instance member named <i>m</i>. If <i>T.m</i> exists, it is a static warning
2414 * if the type <i>F</i> of <i>T.m</i> may not be assigned to a function type. If <i>T.m</i> does 2435 * if the type <i>F</i> of <i>T.m</i> may not be assigned to a function type. If <i>T.m</i> does
2415 * not exist, or if <i>F</i> is not a function type, the static type of <i>i</ i> is dynamic. 2436 * not exist, or if <i>F</i> is not a function type, the static type of <i>i</ i> is dynamic.
2416 * <p> 2437 *
2417 * 12.15.3 Static Invocation: It is a static type warning if the type <i>F</i> of <i>C.m</i> may 2438 * 12.15.3 Static Invocation: It is a static type warning if the type <i>F</i> of <i>C.m</i> may
2418 * not be assigned to a function type. 2439 * not be assigned to a function type.
2419 * @param nonFunctionIdentifier the name of the identifier that is not a funct ion type 2440 * @param nonFunctionIdentifier the name of the identifier that is not a funct ion type
2420 */ 2441 */
2421 static final StaticTypeWarningCode INVOCATION_OF_NON_FUNCTION = new StaticType WarningCode('INVOCATION_OF_NON_FUNCTION', 3, "'%s' is not a method"); 2442 static final StaticTypeWarningCode INVOCATION_OF_NON_FUNCTION = new StaticType WarningCode('INVOCATION_OF_NON_FUNCTION', 3, "'%s' is not a method");
2422 2443
2423 /** 2444 /**
2424 * 12.19 Conditional: It is a static type warning if the type of <i>e<sub>1</s ub></i> may not be 2445 * 12.19 Conditional: It is a static type warning if the type of <i>e<sub>1</s ub></i> may not be
2425 * assigned to bool. 2446 * assigned to bool.
2426 * <p> 2447 *
2427 * 13.5 If: It is a static type warning if the type of the expression <i>b</i> may not be assigned 2448 * 13.5 If: It is a static type warning if the type of the expression <i>b</i> may not be assigned
2428 * to bool. 2449 * to bool.
2429 * <p> 2450 *
2430 * 13.7 While: It is a static type warning if the type of <i>e</i> may not be assigned to bool. 2451 * 13.7 While: It is a static type warning if the type of <i>e</i> may not be assigned to bool.
2431 * <p> 2452 *
2432 * 13.8 Do: It is a static type warning if the type of <i>e</i> cannot be assi gned to bool. 2453 * 13.8 Do: It is a static type warning if the type of <i>e</i> cannot be assi gned to bool.
2433 */ 2454 */
2434 static final StaticTypeWarningCode NON_BOOL_CONDITION = new StaticTypeWarningC ode('NON_BOOL_CONDITION', 4, "Conditions must have a static type of 'bool'"); 2455 static final StaticTypeWarningCode NON_BOOL_CONDITION = new StaticTypeWarningC ode('NON_BOOL_CONDITION', 4, "Conditions must have a static type of 'bool'");
2435 2456
2436 /** 2457 /**
2437 * 13.15 Assert: It is a static type warning if the type of <i>e</i> may not b e assigned to either 2458 * 13.15 Assert: It is a static type warning if the type of <i>e</i> may not b e assigned to either
2438 * bool or () &rarr; bool 2459 * bool or () &rarr; bool
2439 */ 2460 */
2440 static final StaticTypeWarningCode NON_BOOL_EXPRESSION = new StaticTypeWarning Code('NON_BOOL_EXPRESSION', 5, "Assertions must be on either a 'bool' or '() -> bool'"); 2461 static final StaticTypeWarningCode NON_BOOL_EXPRESSION = new StaticTypeWarning Code('NON_BOOL_EXPRESSION', 5, "Assertions must be on either a 'bool' or '() -> bool'");
2441 2462
(...skipping 24 matching lines...) Expand all
2466 * expression are not subtypes of the bounds of the corresponding formal type parameters of 2487 * expression are not subtypes of the bounds of the corresponding formal type parameters of
2467 * <i>G</i>. 2488 * <i>G</i>.
2468 * @param boundedTypeName the name of the type used in the instance creation t hat should be 2489 * @param boundedTypeName the name of the type used in the instance creation t hat should be
2469 * limited by the bound as specified in the class declaration 2490 * limited by the bound as specified in the class declaration
2470 * @param boundingTypeName the name of the bounding type 2491 * @param boundingTypeName the name of the bounding type
2471 */ 2492 */
2472 static final StaticTypeWarningCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = new Sta ticTypeWarningCode('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 9, "'%s' does not extend '%s'"); 2493 static final StaticTypeWarningCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = new Sta ticTypeWarningCode('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 9, "'%s' does not extend '%s'");
2473 2494
2474 /** 2495 /**
2475 * 10 Generics: It is a static type warning if a type parameter is a supertype of its upper bound. 2496 * 10 Generics: It is a static type warning if a type parameter is a supertype of its upper bound.
2476 * <p> 2497 *
2477 * 15.8 Parameterized Types: If <i>S</i> is the static type of a member <i>m</ i> of <i>G</i>, then 2498 * 15.8 Parameterized Types: If <i>S</i> is the static type of a member <i>m</ i> of <i>G</i>, then
2478 * the static type of the member <i>m</i> of <i>G&lt;A<sub>1</sub>, &hellip; A <sub>n</sub>&gt;</i> 2499 * the static type of the member <i>m</i> of <i>G&lt;A<sub>1</sub>, &hellip; A <sub>n</sub>&gt;</i>
2479 * is <i>\[A<sub>1</sub>, &hellip;, A<sub>n</sub>/T<sub>1</sub>, &hellip;, T<s ub>n</sub>\]S</i> 2500 * is <i>\[A<sub>1</sub>, &hellip;, A<sub>n</sub>/T<sub>1</sub>, &hellip;, T<s ub>n</sub>\]S</i>
2480 * where <i>T<sub>1</sub>, &hellip; T<sub>n</sub></i> are the formal type para meters of <i>G</i>. 2501 * where <i>T<sub>1</sub>, &hellip; T<sub>n</sub></i> are the formal type para meters of <i>G</i>.
2481 * 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 2502 * 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
2482 * static type warning if <i>A<sub>i</sub></i> is not a subtype of <i>\[A<sub> 1</sub>, &hellip;, 2503 * static type warning if <i>A<sub>i</sub></i> is not a subtype of <i>\[A<sub> 1</sub>, &hellip;,
2483 * A<sub>n</sub>/T<sub>1</sub>, &hellip;, T<sub>n</sub>\]B<sub>i</sub>, 1 &lt; = i &lt;= n</i>. 2504 * A<sub>n</sub>/T<sub>1</sub>, &hellip;, T<sub>n</sub>\]B<sub>i</sub>, 1 &lt; = i &lt;= n</i>.
2484 */ 2505 */
2485 static final StaticTypeWarningCode TYPE_ARGUMENT_VIOLATES_BOUNDS = new StaticT ypeWarningCode('TYPE_ARGUMENT_VIOLATES_BOUNDS', 10, ""); 2506 static final StaticTypeWarningCode TYPE_ARGUMENT_VIOLATES_BOUNDS = new StaticT ypeWarningCode('TYPE_ARGUMENT_VIOLATES_BOUNDS', 10, "");
2486 2507
2487 /** 2508 /**
2488 * Specification reference needed. This is equivalent to {@link #UNDEFINED_MET HOD}, but for 2509 * Specification reference needed. This is equivalent to [UNDEFINED_METHOD], b ut for
2489 * top-level functions. 2510 * top-level functions.
2490 * @param methodName the name of the method that is undefined 2511 * @param methodName the name of the method that is undefined
2491 */ 2512 */
2492 static final StaticTypeWarningCode UNDEFINED_FUNCTION = new StaticTypeWarningC ode('UNDEFINED_FUNCTION', 11, "The function '%s' is not defined"); 2513 static final StaticTypeWarningCode UNDEFINED_FUNCTION = new StaticTypeWarningC ode('UNDEFINED_FUNCTION', 11, "The function '%s' is not defined");
2493 2514
2494 /** 2515 /**
2495 * 12.17 Getter Invocation: Let <i>T</i> be the static type of <i>e</i>. It is a static type 2516 * 12.17 Getter Invocation: Let <i>T</i> be the static type of <i>e</i>. It is a static type
2496 * warning if <i>T</i> does not have a getter named <i>m</i>. 2517 * warning if <i>T</i> does not have a getter named <i>m</i>.
2497 * @param getterName the name of the getter 2518 * @param getterName the name of the getter
2498 * @param enclosingType the name of the enclosing type where the getter is bei ng looked for 2519 * @param enclosingType the name of the enclosing type where the getter is bei ng looked for
2499 */ 2520 */
2500 static final StaticTypeWarningCode UNDEFINED_GETTER = new StaticTypeWarningCod e('UNDEFINED_GETTER', 12, "There is no such getter '%s' in '%s'"); 2521 static final StaticTypeWarningCode UNDEFINED_GETTER = new StaticTypeWarningCod e('UNDEFINED_GETTER', 12, "There is no such getter '%s' in '%s'");
2501 2522
2502 /** 2523 /**
2503 * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>. I t is a static type 2524 * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>. I t is a static type
2504 * warning if <i>T</i> does not have an accessible instance member named <i>m< /i>. 2525 * warning if <i>T</i> does not have an accessible instance member named <i>m< /i>.
2505 * @param methodName the name of the method that is undefined 2526 * @param methodName the name of the method that is undefined
2506 * @param typeName the resolved type name that the method lookup is happening on 2527 * @param typeName the resolved type name that the method lookup is happening on
2507 */ 2528 */
2508 static final StaticTypeWarningCode UNDEFINED_METHOD = new StaticTypeWarningCod e('UNDEFINED_METHOD', 13, "The method '%s' is not defined for the class '%s'"); 2529 static final StaticTypeWarningCode UNDEFINED_METHOD = new StaticTypeWarningCod e('UNDEFINED_METHOD', 13, "The method '%s' is not defined for the class '%s'");
2509 2530
2510 /** 2531 /**
2511 * 12.18 Assignment: Evaluation of an assignment of the form 2532 * 12.18 Assignment: Evaluation of an assignment of the form
2512 * <i>e<sub>1</sub></i>\[<i>e<sub>2</sub></i>\] = <i>e<sub>3</sub></i> is equi valent to the 2533 * <i>e<sub>1</sub></i>\[<i>e<sub>2</sub></i>\] = <i>e<sub>3</sub></i> is equi valent to the
2513 * evaluation of the expression (a, i, e){a.\[\]=(i, e); return e;} (<i>e<sub> 1</sub></i>, 2534 * evaluation of the expression (a, i, e){a.\[\]=(i, e); return e;} (<i>e<sub> 1</sub></i>,
2514 * <i>e<sub>2</sub></i>, <i>e<sub>2</sub></i>). 2535 * <i>e<sub>2</sub></i>, <i>e<sub>2</sub></i>).
2515 * <p> 2536 *
2516 * 12.29 Assignable Expressions: An assignable expression of the form 2537 * 12.29 Assignable Expressions: An assignable expression of the form
2517 * <i>e<sub>1</sub></i>\[<i>e<sub>2</sub></i>\] is evaluated as a method invoc ation of the operator 2538 * <i>e<sub>1</sub></i>\[<i>e<sub>2</sub></i>\] is evaluated as a method invoc ation of the operator
2518 * method \[\] on <i>e<sub>1</sub></i> with argument <i>e<sub>2</sub></i>. 2539 * method \[\] on <i>e<sub>1</sub></i> with argument <i>e<sub>2</sub></i>.
2519 * <p> 2540 *
2520 * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>. I t is a static type 2541 * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>. I t is a static type
2521 * warning if <i>T</i> does not have an accessible instance member named <i>m< /i>. 2542 * warning if <i>T</i> does not have an accessible instance member named <i>m< /i>.
2522 * @param operator the name of the operator 2543 * @param operator the name of the operator
2523 * @param enclosingType the name of the enclosing type where the operator is b eing looked for 2544 * @param enclosingType the name of the enclosing type where the operator is b eing looked for
2524 */ 2545 */
2525 static final StaticTypeWarningCode UNDEFINED_OPERATOR = new StaticTypeWarningC ode('UNDEFINED_OPERATOR', 14, "There is no such operator '%s' in '%s'"); 2546 static final StaticTypeWarningCode UNDEFINED_OPERATOR = new StaticTypeWarningC ode('UNDEFINED_OPERATOR', 14, "There is no such operator '%s' in '%s'");
2526 2547
2527 /** 2548 /**
2528 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. It is a static type 2549 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. It is a static type
2529 * warning if <i>T</i> does not have an accessible instance setter named <i>v= </i>. 2550 * warning if <i>T</i> does not have an accessible instance setter named <i>v= </i>.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
2571 StaticTypeWarningCode(this.name, this.ordinal, String message) { 2592 StaticTypeWarningCode(this.name, this.ordinal, String message) {
2572 this._message = message; 2593 this._message = message;
2573 } 2594 }
2574 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; 2595 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity;
2575 String get message => _message; 2596 String get message => _message;
2576 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; 2597 ErrorType get type => ErrorType.STATIC_TYPE_WARNING;
2577 int compareTo(StaticTypeWarningCode other) => ordinal - other.ordinal; 2598 int compareTo(StaticTypeWarningCode other) => ordinal - other.ordinal;
2578 int get hashCode => ordinal; 2599 int get hashCode => ordinal;
2579 String toString() => name; 2600 String toString() => name;
2580 } 2601 }
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