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

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

Issue 16256021: Remove trailing spaces in analyzer_experimental (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
4 library engine.error; 3 library engine.error;
5
6 import 'java_core.dart'; 4 import 'java_core.dart';
7 import 'source.dart'; 5 import 'source.dart';
8 import 'ast.dart' show ASTNode; 6 import 'ast.dart' show ASTNode;
9 import 'scanner.dart' show Token; 7 import 'scanner.dart' show Token;
10
11
12 /** 8 /**
13 * Instances of the enumeration {@code ErrorSeverity} represent the severity of an {@link ErrorCode}. 9 * Instances of the enumeration {@code ErrorSeverity} represent the severity of an {@link ErrorCode}.
14 * @coverage dart.engine.error 10 * @coverage dart.engine.error
15 */ 11 */
16 class ErrorSeverity implements Comparable<ErrorSeverity> { 12 class ErrorSeverity implements Comparable<ErrorSeverity> {
17 13
18 /** 14 /**
19 * 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
20 * clients. 16 * clients.
21 */ 17 */
22 static final ErrorSeverity NONE = new ErrorSeverity('NONE', 0, " ", "none"); 18 static final ErrorSeverity NONE = new ErrorSeverity('NONE', 0, " ", "none");
23 19
24 /** 20 /**
21 * The severity representing a suggestion. Suggestions are not specified in th e Dart language
22 * specification, but provide information about best practices.
23 */
24 static final ErrorSeverity SUGGESTION = new ErrorSeverity('SUGGESTION', 1, "S" , "suggestion");
25
26 /**
25 * 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 {@co de -Werror} command
26 * line flag is specified. 28 * line flag is specified.
27 */ 29 */
28 static final ErrorSeverity WARNING = new ErrorSeverity('WARNING', 1, "W", "war ning"); 30 static final ErrorSeverity WARNING = new ErrorSeverity('WARNING', 2, "W", "war ning");
29 31
30 /** 32 /**
31 * The severity representing an error. 33 * The severity representing an error.
32 */ 34 */
33 static final ErrorSeverity ERROR = new ErrorSeverity('ERROR', 2, "E", "error") ; 35 static final ErrorSeverity ERROR = new ErrorSeverity('ERROR', 3, "E", "error") ;
34 static final List<ErrorSeverity> values = [NONE, WARNING, ERROR]; 36 static final List<ErrorSeverity> values = [NONE, SUGGESTION, WARNING, ERROR];
35 37
36 /// The name of this enum constant, as declared in the enum declaration. 38 /// The name of this enum constant, as declared in the enum declaration.
37 final String name; 39 final String name;
38 40
39 /// The position in the enum declaration. 41 /// The position in the enum declaration.
40 final int ordinal; 42 final int ordinal;
41 43
42 /** 44 /**
43 * The name of the severity used when producing machine output. 45 * The name of the severity used when producing machine output.
44 */ 46 */
(...skipping 28 matching lines...) Expand all
73 75
74 /** 76 /**
75 * Return the severity constant that represents the greatest severity. 77 * Return the severity constant that represents the greatest severity.
76 * @param severity the severity being compared against 78 * @param severity the severity being compared against
77 * @return the most sever of this or the given severity 79 * @return the most sever of this or the given severity
78 */ 80 */
79 ErrorSeverity max(ErrorSeverity severity) => this.ordinal >= severity.ordinal ? this : severity; 81 ErrorSeverity max(ErrorSeverity severity) => this.ordinal >= severity.ordinal ? this : severity;
80 int compareTo(ErrorSeverity other) => ordinal - other.ordinal; 82 int compareTo(ErrorSeverity other) => ordinal - other.ordinal;
81 String toString() => name; 83 String toString() => name;
82 } 84 }
83
84 /** 85 /**
85 * Instances of the class {@code AnalysisErrorWithProperties} 86 * Instances of the class {@code AnalysisErrorWithProperties}
86 */ 87 */
87 class AnalysisErrorWithProperties extends AnalysisError { 88 class AnalysisErrorWithProperties extends AnalysisError {
88 89
89 /** 90 /**
90 * The properties associated with this error. 91 * The properties associated with this error.
91 */ 92 */
92 Map<ErrorProperty, Object> _propertyMap = new Map<ErrorProperty, Object>(); 93 Map<ErrorProperty, Object> _propertyMap = new Map<ErrorProperty, Object>();
93 94
(...skipping 28 matching lines...) Expand all
122 /** 123 /**
123 * Set the value of the given property to the given value. Using a value of {@ code null} will 124 * Set the value of the given property to the given value. Using a value of {@ code null} will
124 * effectively remove the property from this error. 125 * effectively remove the property from this error.
125 * @param property the property whose value is to be returned 126 * @param property the property whose value is to be returned
126 * @param value the new value of the given property 127 * @param value the new value of the given property
127 */ 128 */
128 void setProperty(ErrorProperty property, Object value) { 129 void setProperty(ErrorProperty property, Object value) {
129 _propertyMap[property] = value; 130 _propertyMap[property] = value;
130 } 131 }
131 } 132 }
132
133 /** 133 /**
134 * Instances of the class {@code ErrorReporter} wrap an error listener with util ity methods used to 134 * Instances of the class {@code ErrorReporter} wrap an error listener with util ity methods used to
135 * create the errors being reported. 135 * create the errors being reported.
136 * @coverage dart.engine.error 136 * @coverage dart.engine.error
137 */ 137 */
138 class ErrorReporter { 138 class ErrorReporter {
139 139
140 /** 140 /**
141 * The error listener to which errors will be reported. 141 * The error listener to which errors will be reported.
142 */ 142 */
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 209
210 /** 210 /**
211 * Set the source to be used when reporting errors. Setting the source to {@co de null} will cause 211 * Set the source to be used when reporting errors. Setting the source to {@co de null} will cause
212 * the default source to be used. 212 * the default source to be used.
213 * @param source the source to be used when reporting errors 213 * @param source the source to be used when reporting errors
214 */ 214 */
215 void set source(Source source2) { 215 void set source(Source source2) {
216 this._source = source2 == null ? _defaultSource : source2; 216 this._source = source2 == null ? _defaultSource : source2;
217 } 217 }
218 } 218 }
219
220 /** 219 /**
221 * Instances of the class {@code AnalysisError} represent an error discovered du ring the analysis of 220 * Instances of the class {@code AnalysisError} represent an error discovered du ring the analysis of
222 * some Dart code. 221 * some Dart code.
223 * @see AnalysisErrorListener 222 * @see AnalysisErrorListener
224 * @coverage dart.engine.error 223 * @coverage dart.engine.error
225 */ 224 */
226 class AnalysisError { 225 class AnalysisError {
227 226
228 /** 227 /**
229 * An empty array of errors used when no errors are expected. 228 * An empty array of errors used when no errors are expected.
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 builder.append((_source != null) ? _source.fullName : "<unknown source>"); 372 builder.append((_source != null) ? _source.fullName : "<unknown source>");
374 builder.append("("); 373 builder.append("(");
375 builder.append(_offset); 374 builder.append(_offset);
376 builder.append(".."); 375 builder.append("..");
377 builder.append(_offset + _length - 1); 376 builder.append(_offset + _length - 1);
378 builder.append("): "); 377 builder.append("): ");
379 builder.append(_message); 378 builder.append(_message);
380 return builder.toString(); 379 return builder.toString();
381 } 380 }
382 } 381 }
383
384 /** 382 /**
385 * The enumeration {@code ErrorProperty} defines the properties that can be asso ciated with an{@link AnalysisError}. 383 * The enumeration {@code ErrorProperty} defines the properties that can be asso ciated with an{@link AnalysisError}.
386 */ 384 */
387 class ErrorProperty implements Comparable<ErrorProperty> { 385 class ErrorProperty implements Comparable<ErrorProperty> {
388 386
389 /** 387 /**
390 * A property whose value is an array of {@link ExecutableElement executable e lements} that should 388 * A property whose value is an array of {@link ExecutableElement executable e lements} that should
391 * be but are not implemented by a concrete class. 389 * be but are not implemented by a concrete class.
392 */ 390 */
393 static final ErrorProperty UNIMPLEMENTED_METHODS = new ErrorProperty('UNIMPLEM ENTED_METHODS', 0); 391 static final ErrorProperty UNIMPLEMENTED_METHODS = new ErrorProperty('UNIMPLEM ENTED_METHODS', 0);
394 static final List<ErrorProperty> values = [UNIMPLEMENTED_METHODS]; 392 static final List<ErrorProperty> values = [UNIMPLEMENTED_METHODS];
395 393
396 /// The name of this enum constant, as declared in the enum declaration. 394 /// The name of this enum constant, as declared in the enum declaration.
397 final String name; 395 final String name;
398 396
399 /// The position in the enum declaration. 397 /// The position in the enum declaration.
400 final int ordinal; 398 final int ordinal;
401 ErrorProperty(this.name, this.ordinal) { 399 ErrorProperty(this.name, this.ordinal) {
402 } 400 }
403 int compareTo(ErrorProperty other) => ordinal - other.ordinal; 401 int compareTo(ErrorProperty other) => ordinal - other.ordinal;
404 String toString() => name; 402 String toString() => name;
405 } 403 }
406
407 /** 404 /**
408 * The interface {@code ErrorCode} defines the behavior common to objects repres enting error codes 405 * The interface {@code ErrorCode} defines the behavior common to objects repres enting error codes
409 * associated with {@link AnalysisError analysis errors}. 406 * associated with {@link AnalysisError analysis errors}.
410 * @coverage dart.engine.error 407 * @coverage dart.engine.error
411 */ 408 */
412 abstract class ErrorCode { 409 abstract class ErrorCode {
413 410
414 /** 411 /**
415 * Return the severity of this error. 412 * Return the severity of this error.
416 * @return the severity of this error 413 * @return the severity of this error
417 */ 414 */
418 ErrorSeverity get errorSeverity; 415 ErrorSeverity get errorSeverity;
419 416
420 /** 417 /**
421 * Return the message template used to create the message to be displayed for this error. 418 * Return the message template used to create the message to be displayed for this error.
422 * @return the message template used to create the message to be displayed for this error 419 * @return the message template used to create the message to be displayed for this error
423 */ 420 */
424 String get message; 421 String get message;
425 422
426 /** 423 /**
427 * Return the type of the error. 424 * Return the type of the error.
428 * @return the type of the error 425 * @return the type of the error
429 */ 426 */
430 ErrorType get type; 427 ErrorType get type;
431 } 428 }
432
433 /** 429 /**
434 * Instances of the enumeration {@code ErrorType} represent the type of an {@lin k ErrorCode}. 430 * Instances of the enumeration {@code ErrorType} represent the type of an {@lin k ErrorCode}.
435 * @coverage dart.engine.error 431 * @coverage dart.engine.error
436 */ 432 */
437 class ErrorType implements Comparable<ErrorType> { 433 class ErrorType implements Comparable<ErrorType> {
438 434
439 /** 435 /**
440 * Compile-time errors are errors that preclude execution. A compile time erro r must be reported 436 * Compile-time errors are errors that preclude execution. A compile time erro r must be reported
441 * by a Dart compiler before the erroneous code is executed. 437 * by a Dart compiler before the erroneous code is executed.
442 */ 438 */
443 static final ErrorType COMPILE_TIME_ERROR = new ErrorType('COMPILE_TIME_ERROR' , 0, ErrorSeverity.ERROR); 439 static final ErrorType COMPILE_TIME_ERROR = new ErrorType('COMPILE_TIME_ERROR' , 0, ErrorSeverity.ERROR);
444 440
445 /** 441 /**
442 * Suggestions made in situations where the user has deviated from recommended pub programming
443 * practices.
444 */
445 static final ErrorType PUB_SUGGESTION = new ErrorType('PUB_SUGGESTION', 1, Err orSeverity.SUGGESTION);
446
447 /**
446 * Static warnings are those warnings reported by the static checker. They hav e no effect on 448 * Static warnings are those warnings reported by the static checker. They hav e no effect on
447 * execution. Static warnings must be provided by Dart compilers used during d evelopment. 449 * execution. Static warnings must be provided by Dart compilers used during d evelopment.
448 */ 450 */
449 static final ErrorType STATIC_WARNING = new ErrorType('STATIC_WARNING', 1, Err orSeverity.WARNING); 451 static final ErrorType STATIC_WARNING = new ErrorType('STATIC_WARNING', 2, Err orSeverity.WARNING);
450 452
451 /** 453 /**
452 * Many, but not all, static warnings relate to types, in which case they are known as static type 454 * Many, but not all, static warnings relate to types, in which case they are known as static type
453 * warnings. 455 * warnings.
454 */ 456 */
455 static final ErrorType STATIC_TYPE_WARNING = new ErrorType('STATIC_TYPE_WARNIN G', 2, ErrorSeverity.WARNING); 457 static final ErrorType STATIC_TYPE_WARNING = new ErrorType('STATIC_TYPE_WARNIN G', 3, ErrorSeverity.WARNING);
456 458
457 /** 459 /**
458 * Syntactic errors are errors produced as a result of input that does not con form to the grammar. 460 * Syntactic errors are errors produced as a result of input that does not con form to the grammar.
459 */ 461 */
460 static final ErrorType SYNTACTIC_ERROR = new ErrorType('SYNTACTIC_ERROR', 3, E rrorSeverity.ERROR); 462 static final ErrorType SYNTACTIC_ERROR = new ErrorType('SYNTACTIC_ERROR', 4, E rrorSeverity.ERROR);
461 static final List<ErrorType> values = [COMPILE_TIME_ERROR, STATIC_WARNING, STA TIC_TYPE_WARNING, SYNTACTIC_ERROR]; 463 static final List<ErrorType> values = [COMPILE_TIME_ERROR, PUB_SUGGESTION, STA TIC_WARNING, STATIC_TYPE_WARNING, SYNTACTIC_ERROR];
462 464
463 /// The name of this enum constant, as declared in the enum declaration. 465 /// The name of this enum constant, as declared in the enum declaration.
464 final String name; 466 final String name;
465 467
466 /// The position in the enum declaration. 468 /// The position in the enum declaration.
467 final int ordinal; 469 final int ordinal;
468 470
469 /** 471 /**
470 * The severity of this type of error. 472 * The severity of this type of error.
471 */ 473 */
472 ErrorSeverity _severity; 474 ErrorSeverity _severity;
473 475
474 /** 476 /**
475 * Initialize a newly created error type to have the given severity. 477 * Initialize a newly created error type to have the given severity.
476 * @param severity the severity of this type of error 478 * @param severity the severity of this type of error
477 */ 479 */
478 ErrorType(this.name, this.ordinal, ErrorSeverity severity) { 480 ErrorType(this.name, this.ordinal, ErrorSeverity severity) {
479 this._severity = severity; 481 this._severity = severity;
480 } 482 }
481 483
482 /** 484 /**
483 * Return the severity of this type of error. 485 * Return the severity of this type of error.
484 * @return the severity of this type of error 486 * @return the severity of this type of error
485 */ 487 */
486 ErrorSeverity get severity => _severity; 488 ErrorSeverity get severity => _severity;
487 int compareTo(ErrorType other) => ordinal - other.ordinal; 489 int compareTo(ErrorType other) => ordinal - other.ordinal;
488 String toString() => name; 490 String toString() => name;
489 } 491 }
490
491 /** 492 /**
492 * The enumeration {@code CompileTimeErrorCode} defines the error codes used for compile time 493 * The enumeration {@code CompileTimeErrorCode} defines the error codes used for compile time
493 * errors. The convention for this class is for the name of the error code to in dicate the problem 494 * errors. The convention for this class is for the name of the error code to in dicate the problem
494 * that caused the error to be generated and for the error message to explain wh at is wrong and, 495 * that caused the error to be generated and for the error message to explain wh at is wrong and,
495 * when appropriate, how the problem can be corrected. 496 * when appropriate, how the problem can be corrected.
496 * @coverage dart.engine.error 497 * @coverage dart.engine.error
497 */ 498 */
498 class CompileTimeErrorCode implements Comparable<CompileTimeErrorCode>, ErrorCod e { 499 class CompileTimeErrorCode implements Comparable<CompileTimeErrorCode>, ErrorCod e {
499 500
500 /** 501 /**
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 static final CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = new CompileTimeErro rCode('MEMBER_WITH_CLASS_NAME', 76, "Class members cannot have the same name as the enclosing class"); 1104 static final CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = new CompileTimeErro rCode('MEMBER_WITH_CLASS_NAME', 76, "Class members cannot have the same name as the enclosing class");
1104 1105
1105 /** 1106 /**
1106 * 7.2 Getters: It is a compile-time error if a class has both a getter and a method with the same 1107 * 7.2 Getters: It is a compile-time error if a class has both a getter and a method with the same
1107 * name. 1108 * name.
1108 * @param name the conflicting name of the getter and method 1109 * @param name the conflicting name of the getter and method
1109 */ 1110 */
1110 static final CompileTimeErrorCode METHOD_AND_GETTER_WITH_SAME_NAME = new Compi leTimeErrorCode('METHOD_AND_GETTER_WITH_SAME_NAME', 77, "'%s' cannot be used to name a method, there is already a getter with the same name"); 1111 static final CompileTimeErrorCode METHOD_AND_GETTER_WITH_SAME_NAME = new Compi leTimeErrorCode('METHOD_AND_GETTER_WITH_SAME_NAME', 77, "'%s' cannot be used to name a method, there is already a getter with the same name");
1111 1112
1112 /** 1113 /**
1114 * 12.1 Constants: A constant expression is ... a constant list literal.
1115 */
1116 static final CompileTimeErrorCode MISSING_CONST_IN_LIST_LITERAL = new CompileT imeErrorCode('MISSING_CONST_IN_LIST_LITERAL', 78, "List literals must be prefixe d with 'const' when used as a constant expression");
1117
1118 /**
1119 * 12.1 Constants: A constant expression is ... a constant map literal.
1120 */
1121 static final CompileTimeErrorCode MISSING_CONST_IN_MAP_LITERAL = new CompileTi meErrorCode('MISSING_CONST_IN_MAP_LITERAL', 79, "Map literals must be prefixed w ith 'const' when used as a constant expression");
1122
1123 /**
1113 * 9 Mixins: It is a compile-time error if a declared or derived mixin explici tly declares a 1124 * 9 Mixins: It is a compile-time error if a declared or derived mixin explici tly declares a
1114 * constructor. 1125 * constructor.
1115 * @param typeName the name of the mixin that is invalid 1126 * @param typeName the name of the mixin that is invalid
1116 */ 1127 */
1117 static final CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = new CompileTime ErrorCode('MIXIN_DECLARES_CONSTRUCTOR', 78, "The class '%s' cannot be used as a mixin because it declares a constructor"); 1128 static final CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = new CompileTime ErrorCode('MIXIN_DECLARES_CONSTRUCTOR', 80, "The class '%s' cannot be used as a mixin because it declares a constructor");
1118 1129
1119 /** 1130 /**
1120 * 9 Mixins: It is a compile-time error if a mixin is derived from a class who se superclass is not 1131 * 9 Mixins: It is a compile-time error if a mixin is derived from a class who se superclass is not
1121 * Object. 1132 * Object.
1122 * @param typeName the name of the mixin that is invalid 1133 * @param typeName the name of the mixin that is invalid
1123 */ 1134 */
1124 static final CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = new Compile TimeErrorCode('MIXIN_INHERITS_FROM_NOT_OBJECT', 79, "The class '%s' cannot be us ed as a mixin because it extends a class other than Object"); 1135 static final CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = new Compile TimeErrorCode('MIXIN_INHERITS_FROM_NOT_OBJECT', 81, "The class '%s' cannot be us ed as a mixin because it extends a class other than Object");
1125 1136
1126 /** 1137 /**
1127 * 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not deno te a class or mixin 1138 * 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not deno te a class or mixin
1128 * available in the immediately enclosing scope. 1139 * available in the immediately enclosing scope.
1129 */ 1140 */
1130 static final CompileTimeErrorCode MIXIN_OF_NON_CLASS = new CompileTimeErrorCod e('MIXIN_OF_NON_CLASS', 80, "Classes can only mixin other classes"); 1141 static final CompileTimeErrorCode MIXIN_OF_NON_CLASS = new CompileTimeErrorCod e('MIXIN_OF_NON_CLASS', 82, "Classes can only mixin other classes");
1131 1142
1132 /** 1143 /**
1133 * 9 Mixins: It is a compile-time error if a declared or derived mixin refers to super. 1144 * 9 Mixins: It is a compile-time error if a declared or derived mixin refers to super.
1134 */ 1145 */
1135 static final CompileTimeErrorCode MIXIN_REFERENCES_SUPER = new CompileTimeErro rCode('MIXIN_REFERENCES_SUPER', 81, "The class '%s' cannot be used as a mixin be cause it references 'super'"); 1146 static final CompileTimeErrorCode MIXIN_REFERENCES_SUPER = new CompileTimeErro rCode('MIXIN_REFERENCES_SUPER', 83, "The class '%s' cannot be used as a mixin be cause it references 'super'");
1136 1147
1137 /** 1148 /**
1138 * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not deno te a class available 1149 * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not deno te a class available
1139 * in the immediately enclosing scope. 1150 * in the immediately enclosing scope.
1140 */ 1151 */
1141 static final CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = new Compil eTimeErrorCode('MIXIN_WITH_NON_CLASS_SUPERCLASS', 82, "Mixin can only be applied to class"); 1152 static final CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = new Compil eTimeErrorCode('MIXIN_WITH_NON_CLASS_SUPERCLASS', 84, "Mixin can only be applied to class");
1142 1153
1143 /** 1154 /**
1144 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its 1155 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its
1145 * only action is to invoke another generative constructor. 1156 * only action is to invoke another generative constructor.
1146 */ 1157 */
1147 static final CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS = new CompileTimeErrorCode('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS', 83, "Constructor may have at most one 'this' redirection"); 1158 static final CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS = new CompileTimeErrorCode('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS', 85, "Constructor may have at most one 'this' redirection");
1148 1159
1149 /** 1160 /**
1150 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Th en <i>k</i> may 1161 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Th en <i>k</i> may
1151 * include at most one superinitializer in its initializer list or a compile t ime error occurs. 1162 * include at most one superinitializer in its initializer list or a compile t ime error occurs.
1152 */ 1163 */
1153 static final CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = new CompileTim eErrorCode('MULTIPLE_SUPER_INITIALIZERS', 84, "Constructor may have at most one 'super' initializer"); 1164 static final CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = new CompileTim eErrorCode('MULTIPLE_SUPER_INITIALIZERS', 86, "Constructor may have at most one 'super' initializer");
1154 1165
1155 /** 1166 /**
1156 * 12.11.1 New: It is a compile time error if <i>S</i> is not a generic type w ith <i>m</i> type 1167 * 12.11.1 New: It is a compile time error if <i>S</i> is not a generic type w ith <i>m</i> type
1157 * parameters. 1168 * parameters.
1158 * @param typeName the name of the type being referenced (<i>S</i>) 1169 * @param typeName the name of the type being referenced (<i>S</i>)
1159 * @param parameterCount the number of type parameters that were declared 1170 * @param parameterCount the number of type parameters that were declared
1160 * @param argumentCount the number of type arguments provided 1171 * @param argumentCount the number of type arguments provided
1161 */ 1172 */
1162 static final CompileTimeErrorCode NEW_WITH_INVALID_TYPE_PARAMETERS = new Compi leTimeErrorCode('NEW_WITH_INVALID_TYPE_PARAMETERS', 85, "The type '%s' is declar ed with %d type parameters, but %d type arguments were given"); 1173 static final CompileTimeErrorCode NEW_WITH_INVALID_TYPE_PARAMETERS = new Compi leTimeErrorCode('NEW_WITH_INVALID_TYPE_PARAMETERS', 87, "The type '%s' is declar ed with %d type parameters, but %d type arguments were given");
1163 1174
1164 /** 1175 /**
1165 * 13.2 Expression Statements: It is a compile-time error if a non-constant ma p literal that has 1176 * 13.2 Expression Statements: It is a compile-time error if a non-constant ma p literal that has
1166 * no explicit type arguments appears in a place where a statement is expected . 1177 * no explicit type arguments appears in a place where a statement is expected .
1167 */ 1178 */
1168 static final CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = new CompileTimeErrorCode('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 86, "A non-constan t map literal without type arguments cannot be used as an expression statement") ; 1179 static final CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = new CompileTimeErrorCode('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 88, "A non-constan t map literal without type arguments cannot be used as an expression statement") ;
1169 1180
1170 /** 1181 /**
1171 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub >11</sub> &hellip; 1182 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub >11</sub> &hellip;
1172 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> &hellip; label<sub>n1 </sub> &hellip; 1183 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> &hellip; label<sub>n1 </sub> &hellip;
1173 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s ub>}</i> or the form 1184 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s ub>}</i> or the form
1174 * <i>switch (e) { label<sub>11</sub> &hellip; label<sub>1j1</sub> case e<sub> 1</sub>: 1185 * <i>switch (e) { label<sub>11</sub> &hellip; label<sub>1j1</sub> case e<sub> 1</sub>:
1175 * s<sub>1</sub> &hellip; label<sub>n1</sub> &hellip; label<sub>njn</sub> case e<sub>n</sub>: 1186 * s<sub>1</sub> &hellip; label<sub>n1</sub> &hellip; label<sub>njn</sub> case e<sub>n</sub>:
1176 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub> k</sub></i> are not 1187 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub> k</sub></i> are not
1177 * compile-time constants, for all <i>1 &lt;= k &lt;= n</i>. 1188 * compile-time constants, for all <i>1 &lt;= k &lt;= n</i>.
1178 */ 1189 */
1179 static final CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = new CompileTi meErrorCode('NON_CONSTANT_CASE_EXPRESSION', 87, "Case expressions must be consta nt"); 1190 static final CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = new CompileTi meErrorCode('NON_CONSTANT_CASE_EXPRESSION', 89, "Case expressions must be consta nt");
1180 1191
1181 /** 1192 /**
1182 * 6.2.2 Optional Formals: It is a compile-time error if the default value of an optional 1193 * 6.2.2 Optional Formals: It is a compile-time error if the default value of an optional
1183 * parameter is not a compile-time constant. 1194 * parameter is not a compile-time constant.
1184 */ 1195 */
1185 static final CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = new CompileTime ErrorCode('NON_CONSTANT_DEFAULT_VALUE', 88, "Default values of an optional param eter must be constant"); 1196 static final CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = new CompileTime ErrorCode('NON_CONSTANT_DEFAULT_VALUE', 90, "Default values of an optional param eter must be constant");
1186 1197
1187 /** 1198 /**
1188 * 12.6 Lists: It is a compile time error if an element of a constant list lit eral is not a 1199 * 12.6 Lists: It is a compile time error if an element of a constant list lit eral is not a
1189 * compile-time constant. 1200 * compile-time constant.
1190 */ 1201 */
1191 static final CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = new CompileTimeE rrorCode('NON_CONSTANT_LIST_ELEMENT', 89, "'const' lists must have all constant values"); 1202 static final CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = new CompileTimeE rrorCode('NON_CONSTANT_LIST_ELEMENT', 91, "'const' lists must have all constant values");
1192 1203
1193 /** 1204 /**
1194 * 12.7 Maps: It is a compile time error if either a key or a value of an entr y in a constant map 1205 * 12.7 Maps: It is a compile time error if either a key or a value of an entr y in a constant map
1195 * literal is not a compile-time constant. 1206 * literal is not a compile-time constant.
1196 */ 1207 */
1197 static final CompileTimeErrorCode NON_CONSTANT_MAP_KEY = new CompileTimeErrorC ode('NON_CONSTANT_MAP_KEY', 90, "The keys in a map must be constant"); 1208 static final CompileTimeErrorCode NON_CONSTANT_MAP_KEY = new CompileTimeErrorC ode('NON_CONSTANT_MAP_KEY', 92, "The keys in a map must be constant");
1198 1209
1199 /** 1210 /**
1200 * 12.7 Maps: It is a compile time error if either a key or a value of an entr y in a constant map 1211 * 12.7 Maps: It is a compile time error if either a key or a value of an entr y in a constant map
1201 * literal is not a compile-time constant. 1212 * literal is not a compile-time constant.
1202 */ 1213 */
1203 static final CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = new CompileTimeErro rCode('NON_CONSTANT_MAP_VALUE', 91, "The values in a 'const' map must be constan t"); 1214 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");
1204 1215
1205 /** 1216 /**
1206 * 7.6.3 Constant Constructors: Any expression that appears within the initial izer list of a 1217 * 7.6.3 Constant Constructors: Any expression that appears within the initial izer list of a
1207 * constant constructor must be a potentially constant expression, or a compil e-time error occurs. 1218 * constant constructor must be a potentially constant expression, or a compil e-time error occurs.
1208 */ 1219 */
1209 static final CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = new Comp ileTimeErrorCode('NON_CONSTANT_VALUE_IN_INITIALIZER', 92, "Initializer expressio ns in constant constructors must be constants"); 1220 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");
1210 1221
1211 /** 1222 /**
1212 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i> or if <i>m > n</i>. 1223 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i> or if <i>m > n</i>.
1213 * <p> 1224 * <p>
1214 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an 1225 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an
1215 * uncaught exception being thrown. 1226 * uncaught exception being thrown.
1216 * @param requiredCount the expected number of required arguments 1227 * @param requiredCount the expected number of required arguments
1217 * @param argumentCount the actual number of positional arguments given 1228 * @param argumentCount the actual number of positional arguments given
1218 */ 1229 */
1219 static final CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new CompileT imeErrorCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', 93, "%d required argument(s) expec ted, but %d found"); 1230 static final CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new CompileT imeErrorCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', 95, "%d required argument(s) expec ted, but %d found");
1220 1231
1221 /** 1232 /**
1222 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super initializer appears 1233 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super initializer appears
1223 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ e constructor. It is 1234 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ e constructor. It is
1224 * a compile-time error if class <i>S</i> does not declare a generative constr uctor named <i>S</i> 1235 * a compile-time error if class <i>S</i> does not declare a generative constr uctor named <i>S</i>
1225 * (respectively <i>S.id</i>) 1236 * (respectively <i>S.id</i>)
1226 */ 1237 */
1227 static final CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR = new CompileTime ErrorCode('NON_GENERATIVE_CONSTRUCTOR', 94, "The generative constructor '%s' exp ected, but factory found"); 1238 static final CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR = new CompileTime ErrorCode('NON_GENERATIVE_CONSTRUCTOR', 96, "The generative constructor '%s' exp ected, but factory found");
1228 1239
1229 /** 1240 /**
1230 * 7.9 Superclasses: It is a compile-time error to specify an extends clause f or class Object. 1241 * 7.9 Superclasses: It is a compile-time error to specify an extends clause f or class Object.
1231 */ 1242 */
1232 static final CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = new Com pileTimeErrorCode('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 95, ""); 1243 static final CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = new Com pileTimeErrorCode('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 97, "");
1233 1244
1234 /** 1245 /**
1235 * 7.1.1 Operators: It is a compile-time error to declare an optional paramete r in an operator. 1246 * 7.1.1 Operators: It is a compile-time error to declare an optional paramete r in an operator.
1236 */ 1247 */
1237 static final CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = new Compile TimeErrorCode('OPTIONAL_PARAMETER_IN_OPERATOR', 96, "Optional parameters are not allowed when defining an operator"); 1248 static final CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = new Compile TimeErrorCode('OPTIONAL_PARAMETER_IN_OPERATOR', 98, "Optional parameters are not allowed when defining an operator");
1238 1249
1239 /** 1250 /**
1240 * 14.3 Parts: It is a compile time error if the contents of the URI are not a valid part 1251 * 14.3 Parts: It is a compile time error if the contents of the URI are not a valid part
1241 * declaration. 1252 * declaration.
1242 * @param uri the uri pointing to a non-library declaration 1253 * @param uri the uri pointing to a non-library declaration
1243 */ 1254 */
1244 static final CompileTimeErrorCode PART_OF_NON_PART = new CompileTimeErrorCode( 'PART_OF_NON_PART', 97, "The included part '%s' must have a part-of directive"); 1255 static final CompileTimeErrorCode PART_OF_NON_PART = new CompileTimeErrorCode( 'PART_OF_NON_PART', 99, "The included part '%s' must have a part-of directive");
1245 1256
1246 /** 1257 /**
1247 * 14.1 Imports: It is a compile-time error if the current library declares a top-level member 1258 * 14.1 Imports: It is a compile-time error if the current library declares a top-level member
1248 * named <i>p</i>. 1259 * named <i>p</i>.
1249 */ 1260 */
1250 static final CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = new CompileTimeErrorCode('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 98, "The name '%s' is already used as an import prefix and cannot be used to name a top-level elem ent"); 1261 static final CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = new CompileTimeErrorCode('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 100, "The name '%s ' is already used as an import prefix and cannot be used to name a top-level ele ment");
1251 1262
1252 /** 1263 /**
1253 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named o ptional parameter 1264 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named o ptional parameter
1254 * begins with an '_' character. 1265 * begins with an '_' character.
1255 */ 1266 */
1256 static final CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = new CompileTime ErrorCode('PRIVATE_OPTIONAL_PARAMETER', 99, "Named optional parameters cannot st art with an underscore"); 1267 static final CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = new CompileTime ErrorCode('PRIVATE_OPTIONAL_PARAMETER', 101, "Named optional parameters cannot s tart with an underscore");
1257 1268
1258 /** 1269 /**
1259 * 12.1 Constants: It is a compile-time error if the value of a compile-time c onstant expression 1270 * 12.1 Constants: It is a compile-time error if the value of a compile-time c onstant expression
1260 * depends on itself. 1271 * depends on itself.
1261 */ 1272 */
1262 static final CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = new Compil eTimeErrorCode('RECURSIVE_COMPILE_TIME_CONSTANT', 100, ""); 1273 static final CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = new Compil eTimeErrorCode('RECURSIVE_COMPILE_TIME_CONSTANT', 102, "");
1263 1274
1264 /** 1275 /**
1265 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its 1276 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its
1266 * only action is to invoke another generative constructor. 1277 * only action is to invoke another generative constructor.
1267 * <p> 1278 * <p>
1268 * TODO(scheglov) review this later, there are no explicit "it is a compile-ti me error" in 1279 * TODO(scheglov) review this later, there are no explicit "it is a compile-ti me error" in
1269 * specification. But it was added to the co19 and there is same error for fac tories. 1280 * specification. But it was added to the co19 and there is same error for fac tories.
1270 * <p> 1281 * <p>
1271 * https://code.google.com/p/dart/issues/detail?id=954 1282 * https://code.google.com/p/dart/issues/detail?id=954
1272 */ 1283 */
1273 static final CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = new Compile TimeErrorCode('RECURSIVE_CONSTRUCTOR_REDIRECT', 101, "Cycle in redirecting gener ative constructors"); 1284 static final CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = new Compile TimeErrorCode('RECURSIVE_CONSTRUCTOR_REDIRECT', 103, "Cycle in redirecting gener ative constructors");
1274 1285
1275 /** 1286 /**
1276 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr uctor redirects to 1287 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr uctor redirects to
1277 * itself, either directly or indirectly via a sequence of redirections. 1288 * itself, either directly or indirectly via a sequence of redirections.
1278 */ 1289 */
1279 static final CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = new CompileTime ErrorCode('RECURSIVE_FACTORY_REDIRECT', 102, "Cycle in redirecting factory const ructors"); 1290 static final CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = new CompileTime ErrorCode('RECURSIVE_FACTORY_REDIRECT', 104, "Cycle in redirecting factory const ructors");
1280 1291
1281 /** 1292 /**
1282 * 15.3.1 Typedef: It is a compile-time error if a typedef refers to itself vi a a chain of 1293 * 15.3.1 Typedef: It is a compile-time error if a typedef refers to itself vi a a chain of
1283 * references that does not include a class type. 1294 * references that does not include a class type.
1284 */ 1295 */
1285 static final CompileTimeErrorCode RECURSIVE_FUNCTION_TYPE_ALIAS = new CompileT imeErrorCode('RECURSIVE_FUNCTION_TYPE_ALIAS', 103, ""); 1296 static final CompileTimeErrorCode RECURSIVE_FUNCTION_TYPE_ALIAS = new CompileT imeErrorCode('RECURSIVE_FUNCTION_TYPE_ALIAS', 105, "");
1286 1297
1287 /** 1298 /**
1288 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas s <i>C</i> is a 1299 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas s <i>C</i> is a
1289 * superinterface of itself. 1300 * superinterface of itself.
1290 * <p> 1301 * <p>
1291 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself. 1302 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself.
1292 * <p> 1303 * <p>
1293 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super class of itself. 1304 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super class of itself.
1294 * @param className the name of the class that implements itself recursively 1305 * @param className the name of the class that implements itself recursively
1295 * @param strImplementsPath a string representation of the implements loop 1306 * @param strImplementsPath a string representation of the implements loop
1296 */ 1307 */
1297 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = new Compil eTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE', 104, "'%s' cannot be a superin terface of itself: %s"); 1308 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = new Compil eTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE', 106, "'%s' cannot be a superin terface of itself: %s");
1298 1309
1299 /** 1310 /**
1300 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas s <i>C</i> is a 1311 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas s <i>C</i> is a
1301 * superinterface of itself. 1312 * superinterface of itself.
1302 * <p> 1313 * <p>
1303 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself. 1314 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself.
1304 * <p> 1315 * <p>
1305 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super class of itself. 1316 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super class of itself.
1306 * @param className the name of the class that implements itself recursively 1317 * @param className the name of the class that implements itself recursively
1307 */ 1318 */
1308 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EX TENDS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTE NDS', 105, "'%s' cannot extend itself"); 1319 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EX TENDS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTE NDS', 107, "'%s' cannot extend itself");
1309 1320
1310 /** 1321 /**
1311 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas s <i>C</i> is a 1322 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas s <i>C</i> is a
1312 * superinterface of itself. 1323 * superinterface of itself.
1313 * <p> 1324 * <p>
1314 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself. 1325 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself.
1315 * <p> 1326 * <p>
1316 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super class of itself. 1327 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super class of itself.
1317 * @param className the name of the class that implements itself recursively 1328 * @param className the name of the class that implements itself recursively
1318 */ 1329 */
1319 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IM PLEMENTS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_I MPLEMENTS', 106, "'%s' cannot implement itself"); 1330 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IM PLEMENTS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_I MPLEMENTS', 108, "'%s' cannot implement itself");
1320 1331
1321 /** 1332 /**
1322 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th e const modifier but 1333 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th e const modifier but
1323 * <i>k'</i> is not a constant constructor. 1334 * <i>k'</i> is not a constant constructor.
1324 */ 1335 */
1325 static final CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = new Comp ileTimeErrorCode('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 107, "Constant factory con structor cannot delegate to a non-constant constructor"); 1336 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");
1326 1337
1327 /** 1338 /**
1328 * 13.3 Local Variable Declaration: It is a compile-time error if <i>e</i> ref ers to the name 1339 * 13.3 Local Variable Declaration: It is a compile-time error if <i>e</i> ref ers to the name
1329 * <i>v</i> or the name <i>v=</i>. 1340 * <i>v</i> or the name <i>v=</i>.
1330 */ 1341 */
1331 static final CompileTimeErrorCode REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZE R = new CompileTimeErrorCode('REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER', 10 8, "The name '%s' cannot be referenced in the initializer of a variable with the same name"); 1342 static final CompileTimeErrorCode REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZE R = new CompileTimeErrorCode('REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER', 11 0, "The name '%s' cannot be referenced in the initializer of a variable with the same name");
1332 1343
1333 /** 1344 /**
1334 * 16.1.1 Reserved Words: A reserved word may not be used as an identifier; it is a compile-time 1345 * 16.1.1 Reserved Words: A reserved word may not be used as an identifier; it is a compile-time
1335 * error if a reserved word is used where an identifier is expected. 1346 * error if a reserved word is used where an identifier is expected.
1336 */ 1347 */
1337 static final CompileTimeErrorCode RESERVED_WORD_AS_IDENTIFIER = new CompileTim eErrorCode('RESERVED_WORD_AS_IDENTIFIER', 109, ""); 1348 static final CompileTimeErrorCode RESERVED_WORD_AS_IDENTIFIER = new CompileTim eErrorCode('RESERVED_WORD_AS_IDENTIFIER', 111, "");
1338 1349
1339 /** 1350 /**
1340 * 12.8.1 Rethrow: It is a compile-time error if an expression of the form <i> rethrow;</i> is not 1351 * 12.8.1 Rethrow: It is a compile-time error if an expression of the form <i> rethrow;</i> is not
1341 * enclosed within a on-catch clause. 1352 * enclosed within a on-catch clause.
1342 */ 1353 */
1343 static final CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = new CompileTimeError Code('RETHROW_OUTSIDE_CATCH', 110, "rethrow must be inside of a catch clause"); 1354 static final CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = new CompileTimeError Code('RETHROW_OUTSIDE_CATCH', 112, "rethrow must be inside of a catch clause");
1344 1355
1345 /** 1356 /**
1346 * 13.11 Return: It is a compile-time error if a return statement of the form <i>return e;</i> 1357 * 13.11 Return: It is a compile-time error if a return statement of the form <i>return e;</i>
1347 * appears in a generative constructor. 1358 * appears in a generative constructor.
1348 */ 1359 */
1349 static final CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = new Compi leTimeErrorCode('RETURN_IN_GENERATIVE_CONSTRUCTOR', 111, "Constructors cannot re turn a value"); 1360 static final CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = new Compi leTimeErrorCode('RETURN_IN_GENERATIVE_CONSTRUCTOR', 113, "Constructors cannot re turn a value");
1350 1361
1351 /** 1362 /**
1352 * 6.1 Function Declarations: It is a compile-time error to preface a function declaration with 1363 * 6.1 Function Declarations: It is a compile-time error to preface a function declaration with
1353 * the built-in identifier static. 1364 * the built-in identifier static.
1354 */ 1365 */
1355 static final CompileTimeErrorCode STATIC_TOP_LEVEL_FUNCTION = new CompileTimeE rrorCode('STATIC_TOP_LEVEL_FUNCTION', 112, ""); 1366 static final CompileTimeErrorCode STATIC_TOP_LEVEL_FUNCTION = new CompileTimeE rrorCode('STATIC_TOP_LEVEL_FUNCTION', 114, "");
1356 1367
1357 /** 1368 /**
1358 * 5 Variables: It is a compile-time error to preface a top level variable dec laration with the 1369 * 5 Variables: It is a compile-time error to preface a top level variable dec laration with the
1359 * built-in identifier static. 1370 * built-in identifier static.
1360 */ 1371 */
1361 static final CompileTimeErrorCode STATIC_TOP_LEVEL_VARIABLE = new CompileTimeE rrorCode('STATIC_TOP_LEVEL_VARIABLE', 113, ""); 1372 static final CompileTimeErrorCode STATIC_TOP_LEVEL_VARIABLE = new CompileTimeE rrorCode('STATIC_TOP_LEVEL_VARIABLE', 115, "");
1362 1373
1363 /** 1374 /**
1364 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form 1375 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form
1365 * <i>super.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n +1</sub>, &hellip; 1376 * <i>super.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n +1</sub>, &hellip;
1366 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe r method invocation 1377 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe r method invocation
1367 * occurs in a top-level function or variable initializer, in an instance vari able initializer or 1378 * occurs in a top-level function or variable initializer, in an instance vari able initializer or
1368 * initializer list, in class Object, in a factory constructor, or in a static method or variable 1379 * initializer list, in class Object, in a factory constructor, or in a static method or variable
1369 * initializer. 1380 * initializer.
1370 */ 1381 */
1371 static final CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = new CompileTimeEr rorCode('SUPER_IN_INVALID_CONTEXT', 114, "Invalid context for 'super' invocation "); 1382 static final CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = new CompileTimeEr rorCode('SUPER_IN_INVALID_CONTEXT', 116, "Invalid context for 'super' invocation ");
1372 1383
1373 /** 1384 /**
1374 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its 1385 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its
1375 * only action is to invoke another generative constructor. 1386 * only action is to invoke another generative constructor.
1376 */ 1387 */
1377 static final CompileTimeErrorCode SUPER_IN_REDIRECTING_CONSTRUCTOR = new Compi leTimeErrorCode('SUPER_IN_REDIRECTING_CONSTRUCTOR', 115, "The redirecting constr uctor cannot have a 'super' initializer"); 1388 static final CompileTimeErrorCode SUPER_IN_REDIRECTING_CONSTRUCTOR = new Compi leTimeErrorCode('SUPER_IN_REDIRECTING_CONSTRUCTOR', 117, "The redirecting constr uctor cannot have a 'super' initializer");
1378 1389
1379 /** 1390 /**
1380 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile-time 1391 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile-time
1381 * error if a generative constructor of class Object includes a superinitializ er. 1392 * error if a generative constructor of class Object includes a superinitializ er.
1382 */ 1393 */
1383 static final CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = new CompileTim eErrorCode('SUPER_INITIALIZER_IN_OBJECT', 116, ""); 1394 static final CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = new CompileTim eErrorCode('SUPER_INITIALIZER_IN_OBJECT', 118, "");
1384 1395
1385 /** 1396 /**
1386 * 12.11 Instance Creation: It is a compile-time error if a constructor of a n on-generic type 1397 * 12.11 Instance Creation: It is a compile-time error if a constructor of a n on-generic type
1387 * invoked by a new expression or a constant object expression is passed any t ype arguments. 1398 * invoked by a new expression or a constant object expression is passed any t ype arguments.
1388 * <p> 1399 * <p>
1389 * 12.32 Type Cast: It is a compile-time error if <i>T</i> is a parameterized type of the form 1400 * 12.32 Type Cast: It is a compile-time error if <i>T</i> is a parameterized type of the form
1390 * <i>G&lt;T<sub>1</sub>, &hellip;, T<sub>n</sub>&gt;</i> and <i>G</i> is not a generic type with 1401 * <i>G&lt;T<sub>1</sub>, &hellip;, T<sub>n</sub>&gt;</i> and <i>G</i> is not a generic type with
1391 * <i>n</i> type parameters. 1402 * <i>n</i> type parameters.
1392 */ 1403 */
1393 static final CompileTimeErrorCode TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS = new C ompileTimeErrorCode('TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS', 117, ""); 1404 static final CompileTimeErrorCode TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS = new C ompileTimeErrorCode('TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS', 119, "");
1394 1405
1395 /** 1406 /**
1396 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access ible in the current 1407 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access ible in the current
1397 * scope, optionally followed by type arguments. 1408 * scope, optionally followed by type arguments.
1398 */ 1409 */
1399 static final CompileTimeErrorCode UNDEFINED_CLASS = new CompileTimeErrorCode(' UNDEFINED_CLASS', 118, "Undefined class '%s'"); 1410 static final CompileTimeErrorCode UNDEFINED_CLASS = new CompileTimeErrorCode(' UNDEFINED_CLASS', 120, "Undefined class '%s'");
1400 1411
1401 /** 1412 /**
1402 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super initializer appears 1413 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super initializer appears
1403 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ e constructor. It is 1414 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ e constructor. It is
1404 * a compile-time error if class <i>S</i> does not declare a generative constr uctor named <i>S</i> 1415 * a compile-time error if class <i>S</i> does not declare a generative constr uctor named <i>S</i>
1405 * (respectively <i>S.id</i>) 1416 * (respectively <i>S.id</i>)
1406 */ 1417 */
1407 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = new C ompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 119, "The class '%s' does not have a generative constructor '%s'"); 1418 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = new C ompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 121, "The class '%s' does not have a generative constructor '%s'");
1408 1419
1409 /** 1420 /**
1410 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super initializer appears 1421 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super initializer appears
1411 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ e constructor. It is 1422 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ e constructor. It is
1412 * a compile-time error if class <i>S</i> does not declare a generative constr uctor named <i>S</i> 1423 * a compile-time error if class <i>S</i> does not declare a generative constr uctor named <i>S</i>
1413 * (respectively <i>S.id</i>) 1424 * (respectively <i>S.id</i>)
1414 */ 1425 */
1415 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT = new CompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT', 120, "The class '%s' does not have a default generative constructor"); 1426 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");
1416 1427
1417 /** 1428 /**
1418 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Ea ch final instance 1429 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Ea ch final instance
1419 * variable <i>f</i> declared in the immediately enclosing class must have an initializer in 1430 * variable <i>f</i> declared in the immediately enclosing class must have an initializer in
1420 * <i>k</i>'s initializer list unless it has already been initialized by one o f the following 1431 * <i>k</i>'s initializer list unless it has already been initialized by one o f the following
1421 * means: 1432 * means:
1422 * <ol> 1433 * <ol>
1423 * <li>Initialization at the declaration of <i>f</i>. 1434 * <li>Initialization at the declaration of <i>f</i>.
1424 * <li>Initialization by means of an initializing formal of <i>k</i>. 1435 * <li>Initialization by means of an initializing formal of <i>k</i>.
1425 * </ol> 1436 * </ol>
1426 * or a compile-time error occurs. 1437 * or a compile-time error occurs.
1427 */ 1438 */
1428 static final CompileTimeErrorCode UNINITIALIZED_FINAL_FIELD = new CompileTimeE rrorCode('UNINITIALIZED_FINAL_FIELD', 121, ""); 1439 static final CompileTimeErrorCode UNINITIALIZED_FINAL_FIELD = new CompileTimeE rrorCode('UNINITIALIZED_FINAL_FIELD', 123, "");
1429 1440
1430 /** 1441 /**
1431 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>, <i>1<=i<=l</i>, 1442 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>, <i>1<=i<=l</i>,
1432 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i > ... 1443 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i > ...
1433 * <i>p<sub>n+k</sub></i>} or a static warning occurs. 1444 * <i>p<sub>n+k</sub></i>} or a static warning occurs.
1434 * <p> 1445 * <p>
1435 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an 1446 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an
1436 * uncaught exception being thrown. 1447 * uncaught exception being thrown.
1437 * @param name the name of the requested named parameter 1448 * @param name the name of the requested named parameter
1438 */ 1449 */
1439 static final CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER = new CompileTimeE rrorCode('UNDEFINED_NAMED_PARAMETER', 122, "The named parameter '%s' is not defi ned"); 1450 static final CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER = new CompileTimeE rrorCode('UNDEFINED_NAMED_PARAMETER', 124, "The named parameter '%s' is not defi ned");
1440 1451
1441 /** 1452 /**
1442 * 14.2 Exports: It is a compile-time error if the compilation unit found at t he specified URI is 1453 * 14.2 Exports: It is a compile-time error if the compilation unit found at t he specified URI is
1443 * not a library declaration. 1454 * not a library declaration.
1444 * <p> 1455 * <p>
1445 * 14.1 Imports: It is a compile-time error if the compilation unit found at t he specified URI is 1456 * 14.1 Imports: It is a compile-time error if the compilation unit found at t he specified URI is
1446 * not a library declaration. 1457 * not a library declaration.
1447 * <p> 1458 * <p>
1448 * 14.3 Parts: It is a compile time error if the contents of the URI are not a valid part 1459 * 14.3 Parts: It is a compile time error if the contents of the URI are not a valid part
1449 * declaration. 1460 * declaration.
1450 * @param uri the URI pointing to a non-existent file 1461 * @param uri the URI pointing to a non-existent file
1451 * @see #INVALID_URI 1462 * @see #INVALID_URI
1452 */ 1463 */
1453 static final CompileTimeErrorCode URI_DOES_NOT_EXIST = new CompileTimeErrorCod e('URI_DOES_NOT_EXIST', 123, "Target of URI does not exist: '%s'"); 1464 static final CompileTimeErrorCode URI_DOES_NOT_EXIST = new CompileTimeErrorCod e('URI_DOES_NOT_EXIST', 125, "Target of URI does not exist: '%s'");
1454 1465
1455 /** 1466 /**
1456 * 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time constant, or if 1467 * 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time constant, or if
1457 * <i>x</i> involves string interpolation. 1468 * <i>x</i> involves string interpolation.
1458 * <p> 1469 * <p>
1459 * 14.3 Parts: It is a compile-time error if <i>s</i> is not a compile-time co nstant, or if 1470 * 14.3 Parts: It is a compile-time error if <i>s</i> is not a compile-time co nstant, or if
1460 * <i>s</i> involves string interpolation. 1471 * <i>s</i> involves string interpolation.
1461 * <p> 1472 * <p>
1462 * 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that d escribes a URI is 1473 * 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that d escribes a URI is
1463 * not a compile-time constant, or if <i>x</i> involves string interpolation. 1474 * not a compile-time constant, or if <i>x</i> involves string interpolation.
1464 */ 1475 */
1465 static final CompileTimeErrorCode URI_WITH_INTERPOLATION = new CompileTimeErro rCode('URI_WITH_INTERPOLATION', 124, "URIs cannot use string interpolation"); 1476 static final CompileTimeErrorCode URI_WITH_INTERPOLATION = new CompileTimeErro rCode('URI_WITH_INTERPOLATION', 126, "URIs cannot use string interpolation");
1466 1477
1467 /** 1478 /**
1468 * 7.1.1 Operators: It is a compile-time error if the arity of the user-declar ed operator \[\]= is 1479 * 7.1.1 Operators: It is a compile-time error if the arity of the user-declar ed operator \[\]= is
1469 * not 2. It is a compile time error if the arity of a user-declared operator with one of the 1480 * not 2. It is a compile time error if the arity of a user-declared operator with one of the
1470 * names: &lt;, &gt;, &lt;=, &gt;=, ==, +, /, ~/, *, %, |, ^, &, &lt;&lt;, &gt ;&gt;, \[\] is not 1. 1481 * names: &lt;, &gt;, &lt;=, &gt;=, ==, +, /, ~/, *, %, |, ^, &, &lt;&lt;, &gt ;&gt;, \[\] is not 1.
1471 * It is a compile time error if the arity of the user-declared operator - is not 0 or 1. It is a 1482 * It is a compile time error if the arity of the user-declared operator - is not 0 or 1. It is a
1472 * compile time error if the arity of the user-declared operator ~ is not 0. 1483 * compile time error if the arity of the user-declared operator ~ is not 0.
1473 * @param operatorName the name of the declared operator 1484 * @param operatorName the name of the declared operator
1474 * @param expectedNumberOfParameters the number of parameters expected 1485 * @param expectedNumberOfParameters the number of parameters expected
1475 * @param actualNumberOfParameters the number of parameters found in the opera tor declaration 1486 * @param actualNumberOfParameters the number of parameters found in the opera tor declaration
1476 */ 1487 */
1477 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = ne w CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 125, "Operator '%s' should declare exactly %d parameter(s), but %d found"); 1488 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = ne w CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 127, "Operator '%s' should declare exactly %d parameter(s), but %d found");
1478 1489
1479 /** 1490 /**
1480 * 7.1.1 Operators: It is a compile time error if the arity of the user-declar ed operator - is not 1491 * 7.1.1 Operators: It is a compile time error if the arity of the user-declar ed operator - is not
1481 * 0 or 1. 1492 * 0 or 1.
1482 * @param actualNumberOfParameters the number of parameters found in the opera tor declaration 1493 * @param actualNumberOfParameters the number of parameters found in the opera tor declaration
1483 */ 1494 */
1484 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINU S = new CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS', 12 6, "Operator '-' should declare 0 or 1 parameter, but %d found"); 1495 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINU S = new CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS', 12 8, "Operator '-' should declare 0 or 1 parameter, but %d found");
1485 1496
1486 /** 1497 /**
1487 * 7.3 Setters: It is a compile-time error if a setter's formal parameter list does not include 1498 * 7.3 Setters: It is a compile-time error if a setter's formal parameter list does not include
1488 * exactly one required formal parameter <i>p</i>. 1499 * exactly one required formal parameter <i>p</i>.
1489 * @param numberOfParameters the number of parameters found in the setter 1500 * @param numberOfParameters the number of parameters found in the setter
1490 */ 1501 */
1491 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = new CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 127, "Setters shou ld declare exactly one parameter, %d found"); 1502 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");
1492 1503
1493 /** 1504 /**
1494 * 12.11 Instance Creation: It is a compile-time error if a constructor of a g eneric type with 1505 * 12.11 Instance Creation: It is a compile-time error if a constructor of a g eneric type with
1495 * <i>n</i> type parameters invoked by a new expression or a constant object e xpression is passed 1506 * <i>n</i> type parameters invoked by a new expression or a constant object e xpression is passed
1496 * <i>m</i> type arguments where <i>m != n</i>. 1507 * <i>m</i> type arguments where <i>m != n</i>.
1497 * <p> 1508 * <p>
1498 * 12.31 Type Test: It is a compile-time error if <i>T</i> is a parameterized type of the form 1509 * 12.31 Type Test: It is a compile-time error if <i>T</i> is a parameterized type of the form
1499 * <i>G&lt;T<sub>1</sub>, &hellip;, T<sub>n</sub>&gt;</i> and <i>G</i> is not a generic type with 1510 * <i>G&lt;T<sub>1</sub>, &hellip;, T<sub>n</sub>&gt;</i> and <i>G</i> is not a generic type with
1500 * <i>n</i> type parameters. 1511 * <i>n</i> type parameters.
1501 */ 1512 */
1502 static final CompileTimeErrorCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = new Compile TimeErrorCode('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 128, ""); 1513 static final CompileTimeErrorCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = new Compile TimeErrorCode('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 130, "");
1503 static final List<CompileTimeErrorCode> values = [AMBIGUOUS_EXPORT, AMBIGUOUS_ IMPORT, ARGUMENT_DEFINITION_TEST_NON_PARAMETER, BUILT_IN_IDENTIFIER_AS_TYPE, BUI LT_IN_IDENTIFIER_AS_TYPE_NAME, BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, BUILT_IN_IDE NTIFIER_AS_TYPE_VARIABLE_NAME, CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, COMPILE_T IME_CONSTANT_RAISES_EXCEPTION, CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, CONFLICTI NG_CONSTRUCTOR_NAME_AND_METHOD, CONST_CONSTRUCTOR_THROWS_EXCEPTION, CONST_CONSTR UCTOR_WITH_NON_FINAL_FIELD, CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE, CONST_FORMAL _PARAMETER, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, CONST_EVAL_TYPE_BOOL, CON ST_EVAL_TYPE_BOOL_NUM_STRING, CONST_EVAL_TYPE_INT, CONST_EVAL_TYPE_NUM, CONST_EV AL_THROWS_EXCEPTION, CONST_WITH_INVALID_TYPE_PARAMETERS, CONST_WITH_NON_CONST, C ONST_WITH_NON_CONSTANT_ARGUMENT, CONST_WITH_NON_TYPE, CONST_WITH_TYPE_PARAMETERS , CONST_WITH_UNDEFINED_CONSTRUCTOR, CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT, DE FAULT_VALUE_IN_FUNCTION_TYPE_ALIAS, DUPLICATE_CONSTRUCTOR_DEFAULT, DUPLICATE_CON STRUCTOR_NAME, DUPLICATE_DEFINITION, DUPLICATE_MEMBER_NAME, DUPLICATE_MEMBER_NAM E_INSTANCE_STATIC, DUPLICATE_NAMED_ARGUMENT, EXPORT_INTERNAL_LIBRARY, EXPORT_OF_ NON_LIBRARY, EXTENDS_NON_CLASS, EXTENDS_DISALLOWED_CLASS, EXTRA_POSITIONAL_ARGUM ENTS, IMPLEMENTS_DISALLOWED_CLASS, FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS, F IELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION, FIELD_INITIALIZED_IN_PARAMETER_ AND_INITIALIZER, FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR, FINAL_INITIAL IZED_MULTIPLE_TIMES, FIELD_INITIALIZER_FACTORY_CONSTRUCTOR, FIELD_INITIALIZER_OU TSIDE_CONSTRUCTOR, FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR, FINAL_NOT_INITIALI ZED, GETTER_AND_METHOD_WITH_SAME_NAME, IMPLEMENTS_DYNAMIC, IMPLEMENTS_NON_CLASS, IMPLEMENTS_REPEATED, IMPLICIT_THIS_REFERENCE_IN_INITIALIZER, IMPORT_INTERNAL_LI BRARY, IMPORT_OF_NON_LIBRARY, INCONSISTENT_CASE_EXPRESSION_TYPES, INITIALIZER_FO R_NON_EXISTANT_FIELD, INITIALIZER_FOR_STATIC_FIELD, INITIALIZING_FORMAL_FOR_NON_ EXISTANT_FIELD, INITIALIZING_FORMAL_FOR_STATIC_FIELD, INVALID_CONSTANT, INVALID_ CONSTRUCTOR_NAME, INVALID_FACTORY_NAME_NOT_A_CLASS, INVALID_OVERRIDE_DEFAULT_VAL UE, INVALID_OVERRIDE_NAMED, INVALID_OVERRIDE_POSITIONAL, INVALID_OVERRIDE_REQUIR ED, INVALID_REFERENCE_TO_THIS, INVALID_TYPE_ARGUMENT_FOR_KEY, INVALID_TYPE_ARGUM ENT_IN_CONST_LIST, INVALID_TYPE_ARGUMENT_IN_CONST_MAP, INVALID_URI, LABEL_IN_OUT ER_SCOPE, LABEL_UNDEFINED, MEMBER_WITH_CLASS_NAME, METHOD_AND_GETTER_WITH_SAME_N AME, MIXIN_DECLARES_CONSTRUCTOR, MIXIN_INHERITS_FROM_NOT_OBJECT, MIXIN_OF_NON_CL ASS, MIXIN_REFERENCES_SUPER, MIXIN_WITH_NON_CLASS_SUPERCLASS, MULTIPLE_REDIRECTI NG_CONSTRUCTOR_INVOCATIONS, MULTIPLE_SUPER_INITIALIZERS, NEW_WITH_INVALID_TYPE_P ARAMETERS, NON_CONST_MAP_AS_EXPRESSION_STATEMENT, NON_CONSTANT_CASE_EXPRESSION, NON_CONSTANT_DEFAULT_VALUE, NON_CONSTANT_LIST_ELEMENT, NON_CONSTANT_MAP_KEY, NON _CONSTANT_MAP_VALUE, NON_CONSTANT_VALUE_IN_INITIALIZER, NOT_ENOUGH_REQUIRED_ARGU MENTS, NON_GENERATIVE_CONSTRUCTOR, OBJECT_CANNOT_EXTEND_ANOTHER_CLASS, OPTIONAL_ PARAMETER_IN_OPERATOR, PART_OF_NON_PART, PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER, PRIVATE_OPTIONAL_PARAMETER, RECURSIVE_COMPILE_TIME_CONSTANT, RECURSIVE_CONSTRUCT OR_REDIRECT, RECURSIVE_FACTORY_REDIRECT, RECURSIVE_FUNCTION_TYPE_ALIAS, RECURSIV E_INTERFACE_INHERITANCE, RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS, RECU RSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS, REDIRECT_TO_NON_CONST_CONSTRUC TOR, REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER, RESERVED_WORD_AS_IDENTIFIER, RETHROW_OUTSIDE_CATCH, RETURN_IN_GENERATIVE_CONSTRUCTOR, STATIC_TOP_LEVEL_FUNCT ION, STATIC_TOP_LEVEL_VARIABLE, SUPER_IN_INVALID_CONTEXT, SUPER_IN_REDIRECTING_C ONSTRUCTOR, SUPER_INITIALIZER_IN_OBJECT, TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS, U NDEFINED_CLASS, UNDEFINED_CONSTRUCTOR_IN_INITIALIZER, UNDEFINED_CONSTRUCTOR_IN_I NITIALIZER_DEFAULT, UNINITIALIZED_FINAL_FIELD, UNDEFINED_NAMED_PARAMETER, URI_DO ES_NOT_EXIST, URI_WITH_INTERPOLATION, WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR, W RONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS, WRONG_NUMBER_OF_PARAMETERS_FOR_SET TER, WRONG_NUMBER_OF_TYPE_ARGUMENTS]; 1514 static final List<CompileTimeErrorCode> values = [AMBIGUOUS_EXPORT, AMBIGUOUS_ IMPORT, ARGUMENT_DEFINITION_TEST_NON_PARAMETER, BUILT_IN_IDENTIFIER_AS_TYPE, BUI LT_IN_IDENTIFIER_AS_TYPE_NAME, BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, BUILT_IN_IDE NTIFIER_AS_TYPE_VARIABLE_NAME, CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, COMPILE_T IME_CONSTANT_RAISES_EXCEPTION, CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, CONFLICTI NG_CONSTRUCTOR_NAME_AND_METHOD, CONST_CONSTRUCTOR_THROWS_EXCEPTION, CONST_CONSTR UCTOR_WITH_NON_FINAL_FIELD, CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE, CONST_FORMAL _PARAMETER, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, CONST_EVAL_TYPE_BOOL, CON ST_EVAL_TYPE_BOOL_NUM_STRING, CONST_EVAL_TYPE_INT, CONST_EVAL_TYPE_NUM, CONST_EV AL_THROWS_EXCEPTION, CONST_WITH_INVALID_TYPE_PARAMETERS, CONST_WITH_NON_CONST, C ONST_WITH_NON_CONSTANT_ARGUMENT, CONST_WITH_NON_TYPE, CONST_WITH_TYPE_PARAMETERS , CONST_WITH_UNDEFINED_CONSTRUCTOR, CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT, DE FAULT_VALUE_IN_FUNCTION_TYPE_ALIAS, DUPLICATE_CONSTRUCTOR_DEFAULT, DUPLICATE_CON STRUCTOR_NAME, DUPLICATE_DEFINITION, DUPLICATE_MEMBER_NAME, DUPLICATE_MEMBER_NAM E_INSTANCE_STATIC, DUPLICATE_NAMED_ARGUMENT, EXPORT_INTERNAL_LIBRARY, EXPORT_OF_ NON_LIBRARY, EXTENDS_NON_CLASS, EXTENDS_DISALLOWED_CLASS, EXTRA_POSITIONAL_ARGUM ENTS, IMPLEMENTS_DISALLOWED_CLASS, FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS, F IELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION, FIELD_INITIALIZED_IN_PARAMETER_ AND_INITIALIZER, FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR, FINAL_INITIAL IZED_MULTIPLE_TIMES, FIELD_INITIALIZER_FACTORY_CONSTRUCTOR, FIELD_INITIALIZER_OU TSIDE_CONSTRUCTOR, FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR, FINAL_NOT_INITIALI ZED, GETTER_AND_METHOD_WITH_SAME_NAME, IMPLEMENTS_DYNAMIC, IMPLEMENTS_NON_CLASS, IMPLEMENTS_REPEATED, IMPLICIT_THIS_REFERENCE_IN_INITIALIZER, IMPORT_INTERNAL_LI BRARY, IMPORT_OF_NON_LIBRARY, INCONSISTENT_CASE_EXPRESSION_TYPES, INITIALIZER_FO R_NON_EXISTANT_FIELD, INITIALIZER_FOR_STATIC_FIELD, INITIALIZING_FORMAL_FOR_NON_ EXISTANT_FIELD, INITIALIZING_FORMAL_FOR_STATIC_FIELD, INVALID_CONSTANT, INVALID_ CONSTRUCTOR_NAME, INVALID_FACTORY_NAME_NOT_A_CLASS, INVALID_OVERRIDE_DEFAULT_VAL UE, INVALID_OVERRIDE_NAMED, INVALID_OVERRIDE_POSITIONAL, INVALID_OVERRIDE_REQUIR ED, INVALID_REFERENCE_TO_THIS, INVALID_TYPE_ARGUMENT_FOR_KEY, INVALID_TYPE_ARGUM ENT_IN_CONST_LIST, INVALID_TYPE_ARGUMENT_IN_CONST_MAP, INVALID_URI, LABEL_IN_OUT ER_SCOPE, LABEL_UNDEFINED, MEMBER_WITH_CLASS_NAME, METHOD_AND_GETTER_WITH_SAME_N AME, MISSING_CONST_IN_LIST_LITERAL, MISSING_CONST_IN_MAP_LITERAL, MIXIN_DECLARES _CONSTRUCTOR, MIXIN_INHERITS_FROM_NOT_OBJECT, MIXIN_OF_NON_CLASS, MIXIN_REFERENC ES_SUPER, MIXIN_WITH_NON_CLASS_SUPERCLASS, MULTIPLE_REDIRECTING_CONSTRUCTOR_INVO CATIONS, MULTIPLE_SUPER_INITIALIZERS, NEW_WITH_INVALID_TYPE_PARAMETERS, NON_CONS T_MAP_AS_EXPRESSION_STATEMENT, NON_CONSTANT_CASE_EXPRESSION, NON_CONSTANT_DEFAUL T_VALUE, NON_CONSTANT_LIST_ELEMENT, NON_CONSTANT_MAP_KEY, NON_CONSTANT_MAP_VALUE , NON_CONSTANT_VALUE_IN_INITIALIZER, NOT_ENOUGH_REQUIRED_ARGUMENTS, NON_GENERATI VE_CONSTRUCTOR, OBJECT_CANNOT_EXTEND_ANOTHER_CLASS, OPTIONAL_PARAMETER_IN_OPERAT OR, PART_OF_NON_PART, PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER, PRIVATE_OPTIONAL_PA RAMETER, RECURSIVE_COMPILE_TIME_CONSTANT, RECURSIVE_CONSTRUCTOR_REDIRECT, RECURS IVE_FACTORY_REDIRECT, RECURSIVE_FUNCTION_TYPE_ALIAS, RECURSIVE_INTERFACE_INHERIT ANCE, RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS, RECURSIVE_INTERFACE_INH ERITANCE_BASE_CASE_IMPLEMENTS, REDIRECT_TO_NON_CONST_CONSTRUCTOR, REFERENCE_TO_D ECLARED_VARIABLE_IN_INITIALIZER, RESERVED_WORD_AS_IDENTIFIER, RETHROW_OUTSIDE_CA TCH, RETURN_IN_GENERATIVE_CONSTRUCTOR, STATIC_TOP_LEVEL_FUNCTION, STATIC_TOP_LEV EL_VARIABLE, SUPER_IN_INVALID_CONTEXT, SUPER_IN_REDIRECTING_CONSTRUCTOR, SUPER_I NITIALIZER_IN_OBJECT, TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS, UNDEFINED_CLASS, UND EFINED_CONSTRUCTOR_IN_INITIALIZER, UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT, UNINITIALIZED_FINAL_FIELD, UNDEFINED_NAMED_PARAMETER, URI_DOES_NOT_EXIST, URI_W ITH_INTERPOLATION, WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR, WRONG_NUMBER_OF_PARA METERS_FOR_OPERATOR_MINUS, WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER, WRONG_NUMBER_O F_TYPE_ARGUMENTS];
1504 1515
1505 /// The name of this enum constant, as declared in the enum declaration. 1516 /// The name of this enum constant, as declared in the enum declaration.
1506 final String name; 1517 final String name;
1507 1518
1508 /// The position in the enum declaration. 1519 /// The position in the enum declaration.
1509 final int ordinal; 1520 final int ordinal;
1510 1521
1511 /** 1522 /**
1512 * The message template used to create the message to be displayed for this er ror. 1523 * The message template used to create the message to be displayed for this er ror.
1513 */ 1524 */
1514 String _message; 1525 String _message;
1515 1526
1516 /** 1527 /**
1517 * Initialize a newly created error code to have the given message. 1528 * Initialize a newly created error code to have the given message.
1518 * @param message the message template used to create the message to be displa yed for the error 1529 * @param message the message template used to create the message to be displa yed for the error
1519 */ 1530 */
1520 CompileTimeErrorCode(this.name, this.ordinal, String message) { 1531 CompileTimeErrorCode(this.name, this.ordinal, String message) {
1521 this._message = message; 1532 this._message = message;
1522 } 1533 }
1523 ErrorSeverity get errorSeverity => ErrorType.COMPILE_TIME_ERROR.severity; 1534 ErrorSeverity get errorSeverity => ErrorType.COMPILE_TIME_ERROR.severity;
1524 String get message => _message; 1535 String get message => _message;
1525 ErrorType get type => ErrorType.COMPILE_TIME_ERROR; 1536 ErrorType get type => ErrorType.COMPILE_TIME_ERROR;
1526 int compareTo(CompileTimeErrorCode other) => ordinal - other.ordinal; 1537 int compareTo(CompileTimeErrorCode other) => ordinal - other.ordinal;
1527 String toString() => name; 1538 String toString() => name;
1528 } 1539 }
1540 /**
1541 * The enumeration {@code PubSuggestionCode} defines the suggestions used for re porting deviations
1542 * from pub best practices. The convention for this class is for the name of the bad practice to
1543 * indicate the problem that caused the suggestion to be generated and for the m essage to explain
1544 * what is wrong and, when appropriate, how the situation can be corrected.
1545 */
1546 class PubSuggestionCode implements Comparable<PubSuggestionCode>, ErrorCode {
1529 1547
1548 /**
1549 * It is a bad practice for a source file in a package "lib" directory hierarc hy to traverse
1550 * outside that directory hierarchy. For example, a source file in the "lib" d irectory should not
1551 * contain a directive such as {@code import '../web/some.dart'} which referen ces a file outside
1552 * the lib directory.
1553 */
1554 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");
1555
1556 /**
1557 * It is a bad practice for a source file ouside a package "lib" directory hie rarchy to traverse
1558 * into that directory hierarchy. For example, a source file in the "web" dire ctory should not
1559 * contain a directive such as {@code import '../lib/some.dart'} which referen ces a file inside
1560 * the lib directory.
1561 */
1562 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.");
1563
1564 /**
1565 * It is a bad practice for a package import to reference anything outside the given package, or
1566 * more generally, it is bad practice for a package import to contain a "..". For example, a
1567 * source file should not contain a directive such as {@code import 'package:f oo/../some.dart'}.
1568 */
1569 static final PubSuggestionCode PACKAGE_IMPORT_CONTAINS_DOT_DOT = new PubSugges tionCode('PACKAGE_IMPORT_CONTAINS_DOT_DOT', 2, "A package import should not cont ain '..'");
1570 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];
1571
1572 /// The name of this enum constant, as declared in the enum declaration.
1573 final String name;
1574
1575 /// The position in the enum declaration.
1576 final int ordinal;
1577
1578 /**
1579 * The message template used to create the message to be displayed for this er ror.
1580 */
1581 String _message;
1582
1583 /**
1584 * Initialize a newly created error code to have the given message.
1585 * @param message the message template used to create the message to be displa yed for the error
1586 */
1587 PubSuggestionCode(this.name, this.ordinal, String message) {
1588 this._message = message;
1589 }
1590 ErrorSeverity get errorSeverity => ErrorType.PUB_SUGGESTION.severity;
1591 String get message => _message;
1592 ErrorType get type => ErrorType.PUB_SUGGESTION;
1593 int compareTo(PubSuggestionCode other) => ordinal - other.ordinal;
1594 String toString() => name;
1595 }
1530 /** 1596 /**
1531 * The enumeration {@code StaticWarningCode} defines the error codes used for st atic warnings. The 1597 * The enumeration {@code StaticWarningCode} defines the error codes used for st atic warnings. The
1532 * convention for this class is for the name of the error code to indicate the p roblem that caused 1598 * convention for this class is for the name of the error code to indicate the p roblem that caused
1533 * the error to be generated and for the error message to explain what is wrong and, when 1599 * the error to be generated and for the error message to explain what is wrong and, when
1534 * appropriate, how the problem can be corrected. 1600 * appropriate, how the problem can be corrected.
1535 * @coverage dart.engine.error 1601 * @coverage dart.engine.error
1536 */ 1602 */
1537 class StaticWarningCode implements Comparable<StaticWarningCode>, ErrorCode { 1603 class StaticWarningCode implements Comparable<StaticWarningCode>, ErrorCode {
1538 1604
1539 /** 1605 /**
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
2140 */ 2206 */
2141 StaticWarningCode(this.name, this.ordinal, String message) { 2207 StaticWarningCode(this.name, this.ordinal, String message) {
2142 this._message = message; 2208 this._message = message;
2143 } 2209 }
2144 ErrorSeverity get errorSeverity => ErrorType.STATIC_WARNING.severity; 2210 ErrorSeverity get errorSeverity => ErrorType.STATIC_WARNING.severity;
2145 String get message => _message; 2211 String get message => _message;
2146 ErrorType get type => ErrorType.STATIC_WARNING; 2212 ErrorType get type => ErrorType.STATIC_WARNING;
2147 int compareTo(StaticWarningCode other) => ordinal - other.ordinal; 2213 int compareTo(StaticWarningCode other) => ordinal - other.ordinal;
2148 String toString() => name; 2214 String toString() => name;
2149 } 2215 }
2150
2151 /** 2216 /**
2152 * The interface {@code AnalysisErrorListener} defines the behavior of objects t hat listen for{@link AnalysisError analysis errors} being produced by the analys is engine. 2217 * The interface {@code AnalysisErrorListener} defines the behavior of objects t hat listen for{@link AnalysisError analysis errors} being produced by the analys is engine.
2153 * @coverage dart.engine.error 2218 * @coverage dart.engine.error
2154 */ 2219 */
2155 abstract class AnalysisErrorListener { 2220 abstract class AnalysisErrorListener {
2156 2221
2157 /** 2222 /**
2158 * An error listener that ignores errors that are reported to it. 2223 * An error listener that ignores errors that are reported to it.
2159 */ 2224 */
2160 static AnalysisErrorListener _NULL_LISTENER = new AnalysisErrorListener_5(); 2225 static AnalysisErrorListener _NULL_LISTENER = new AnalysisErrorListener_5();
2161 2226
2162 /** 2227 /**
2163 * This method is invoked when an error has been found by the analysis engine. 2228 * This method is invoked when an error has been found by the analysis engine.
2164 * @param error the error that was just found (not {@code null}) 2229 * @param error the error that was just found (not {@code null})
2165 */ 2230 */
2166 void onError(AnalysisError error); 2231 void onError(AnalysisError error);
2167 } 2232 }
2168 class AnalysisErrorListener_5 implements AnalysisErrorListener { 2233 class AnalysisErrorListener_5 implements AnalysisErrorListener {
2169 void onError(AnalysisError event) { 2234 void onError(AnalysisError event) {
2170 } 2235 }
2171 } 2236 }
2172
2173 /** 2237 /**
2174 * The enumeration {@code HtmlWarningCode} defines the error codes used for warn ings in HTML files. 2238 * The enumeration {@code HtmlWarningCode} defines the error codes used for warn ings in HTML files.
2175 * The convention for this class is for the name of the error code to indicate t he problem that 2239 * The convention for this class is for the name of the error code to indicate t he problem that
2176 * caused the error to be generated and for the error message to explain what is wrong and, when 2240 * caused the error to be generated and for the error message to explain what is wrong and, when
2177 * appropriate, how the problem can be corrected. 2241 * appropriate, how the problem can be corrected.
2178 * @coverage dart.engine.error 2242 * @coverage dart.engine.error
2179 */ 2243 */
2180 class HtmlWarningCode implements Comparable<HtmlWarningCode>, ErrorCode { 2244 class HtmlWarningCode implements Comparable<HtmlWarningCode>, ErrorCode {
2181 2245
2182 /** 2246 /**
(...skipping 28 matching lines...) Expand all
2211 */ 2275 */
2212 HtmlWarningCode(this.name, this.ordinal, String message) { 2276 HtmlWarningCode(this.name, this.ordinal, String message) {
2213 this._message = message; 2277 this._message = message;
2214 } 2278 }
2215 ErrorSeverity get errorSeverity => ErrorSeverity.WARNING; 2279 ErrorSeverity get errorSeverity => ErrorSeverity.WARNING;
2216 String get message => _message; 2280 String get message => _message;
2217 ErrorType get type => ErrorType.STATIC_WARNING; 2281 ErrorType get type => ErrorType.STATIC_WARNING;
2218 int compareTo(HtmlWarningCode other) => ordinal - other.ordinal; 2282 int compareTo(HtmlWarningCode other) => ordinal - other.ordinal;
2219 String toString() => name; 2283 String toString() => name;
2220 } 2284 }
2221
2222 /** 2285 /**
2223 * The enumeration {@code StaticTypeWarningCode} defines the error codes used fo r static type 2286 * The enumeration {@code StaticTypeWarningCode} defines the error codes used fo r static type
2224 * warnings. The convention for this class is for the name of the error code to indicate the problem 2287 * warnings. The convention for this class is for the name of the error code to indicate the problem
2225 * that caused the error to be generated and for the error message to explain wh at is wrong and, 2288 * that caused the error to be generated and for the error message to explain wh at is wrong and,
2226 * when appropriate, how the problem can be corrected. 2289 * when appropriate, how the problem can be corrected.
2227 * @coverage dart.engine.error 2290 * @coverage dart.engine.error
2228 */ 2291 */
2229 class StaticTypeWarningCode implements Comparable<StaticTypeWarningCode>, ErrorC ode { 2292 class StaticTypeWarningCode implements Comparable<StaticTypeWarningCode>, ErrorC ode {
2230 2293
2231 /** 2294 /**
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
2446 */ 2509 */
2447 StaticTypeWarningCode(this.name, this.ordinal, String message) { 2510 StaticTypeWarningCode(this.name, this.ordinal, String message) {
2448 this._message = message; 2511 this._message = message;
2449 } 2512 }
2450 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; 2513 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity;
2451 String get message => _message; 2514 String get message => _message;
2452 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; 2515 ErrorType get type => ErrorType.STATIC_TYPE_WARNING;
2453 int compareTo(StaticTypeWarningCode other) => ordinal - other.ordinal; 2516 int compareTo(StaticTypeWarningCode other) => ordinal - other.ordinal;
2454 String toString() => name; 2517 String toString() => name;
2455 } 2518 }
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