| OLD | NEW |
| 1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
| 2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
| 3 | 3 |
| 4 library engine.error; | 4 library engine.error; |
| 5 | 5 |
| 6 import 'java_core.dart'; | 6 import 'java_core.dart'; |
| 7 import 'source.dart'; | 7 import 'source.dart'; |
| 8 import 'ast.dart' show ASTNode; | 8 import 'ast.dart' show ASTNode; |
| 9 import 'scanner.dart' show Token; | 9 import 'scanner.dart' show Token; |
| 10 | 10 |
| 11 /** | 11 /** |
| 12 * Instances of the enumeration {@code ErrorSeverity} represent the severity of
an {@link ErrorCode}. | 12 * Instances of the enumeration {@code ErrorSeverity} represent the severity of
an {@link ErrorCode}. |
| 13 * @coverage dart.engine.error |
| 13 */ | 14 */ |
| 14 class ErrorSeverity { | 15 class ErrorSeverity { |
| 15 /** | 16 /** |
| 16 * The severity representing an error. | 17 * The severity representing a non-error. This is never used for any error cod
e, but is useful for |
| 18 * clients. |
| 17 */ | 19 */ |
| 18 static final ErrorSeverity ERROR = new ErrorSeverity('ERROR', 0, "E"); | 20 static final ErrorSeverity NONE = new ErrorSeverity('NONE', 0, " ", "none"); |
| 19 /** | 21 /** |
| 20 * The severity representing a warning. Warnings can become errors if the {@co
de -Werror} command | 22 * The severity representing a warning. Warnings can become errors if the {@co
de -Werror} command |
| 21 * line flag is specified. | 23 * line flag is specified. |
| 22 */ | 24 */ |
| 23 static final ErrorSeverity WARNING = new ErrorSeverity('WARNING', 1, "W"); | 25 static final ErrorSeverity WARNING = new ErrorSeverity('WARNING', 1, "W", "war
ning"); |
| 24 static final List<ErrorSeverity> values = [ERROR, WARNING]; | 26 /** |
| 27 * The severity representing an error. |
| 28 */ |
| 29 static final ErrorSeverity ERROR = new ErrorSeverity('ERROR', 2, "E", "error")
; |
| 30 static final List<ErrorSeverity> values = [NONE, WARNING, ERROR]; |
| 25 final String __name; | 31 final String __name; |
| 26 final int __ordinal; | 32 final int __ordinal; |
| 27 String _name; | 33 int get ordinal => __ordinal; |
| 28 ErrorSeverity(this.__name, this.__ordinal, String name) { | 34 /** |
| 29 this._name = name; | 35 * The name of the severity used when producing machine output. |
| 36 */ |
| 37 String _machineCode; |
| 38 /** |
| 39 * The name of the severity used when producing readable output. |
| 40 */ |
| 41 String _displayName; |
| 42 /** |
| 43 * Initialize a newly created severity with the given names. |
| 44 * @param machineCode the name of the severity used when producing machine out
put |
| 45 * @param displayName the name of the severity used when producing readable ou
tput |
| 46 */ |
| 47 ErrorSeverity(this.__name, this.__ordinal, String machineCode, String displayN
ame) { |
| 48 this._machineCode = machineCode; |
| 49 this._displayName = displayName; |
| 30 } | 50 } |
| 31 String get name => _name; | 51 /** |
| 52 * Return the name of the severity used when producing readable output. |
| 53 * @return the name of the severity used when producing readable output |
| 54 */ |
| 55 String get displayName => _displayName; |
| 56 /** |
| 57 * Return the name of the severity used when producing machine output. |
| 58 * @return the name of the severity used when producing machine output |
| 59 */ |
| 60 String get machineCode => _machineCode; |
| 61 /** |
| 62 * Return the severity constant that represents the greatest severity. |
| 63 * @param severity the severity being compared against |
| 64 * @return the most sever of this or the given severity |
| 65 */ |
| 66 ErrorSeverity max(ErrorSeverity severity) => this.ordinal >= severity.ordinal
? this : severity; |
| 32 String toString() => __name; | 67 String toString() => __name; |
| 33 } | 68 } |
| 34 /** | 69 /** |
| 35 * Instances of the class {@code ErrorReporter} wrap an error listener with util
ity methods used to | 70 * Instances of the class {@code ErrorReporter} wrap an error listener with util
ity methods used to |
| 36 * create the errors being reported. | 71 * create the errors being reported. |
| 72 * @coverage dart.engine.error |
| 37 */ | 73 */ |
| 38 class ErrorReporter { | 74 class ErrorReporter { |
| 39 /** | 75 /** |
| 40 * The error listener to which errors will be reported. | 76 * The error listener to which errors will be reported. |
| 41 */ | 77 */ |
| 42 AnalysisErrorListener _errorListener; | 78 AnalysisErrorListener _errorListener; |
| 43 /** | 79 /** |
| 44 * The default source to be used when reporting errors. | 80 * The default source to be used when reporting errors. |
| 45 */ | 81 */ |
| 46 Source _defaultSource; | 82 Source _defaultSource; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 * @param source the source to be used when reporting errors | 123 * @param source the source to be used when reporting errors |
| 88 */ | 124 */ |
| 89 void set source(Source source7) { | 125 void set source(Source source7) { |
| 90 this._source = source7 == null ? _defaultSource : source7; | 126 this._source = source7 == null ? _defaultSource : source7; |
| 91 } | 127 } |
| 92 } | 128 } |
| 93 /** | 129 /** |
| 94 * Instances of the class {@code AnalysisError} represent an error discovered du
ring the analysis of | 130 * Instances of the class {@code AnalysisError} represent an error discovered du
ring the analysis of |
| 95 * some Dart code. | 131 * some Dart code. |
| 96 * @see AnalysisErrorListener | 132 * @see AnalysisErrorListener |
| 133 * @coverage dart.engine.error |
| 97 */ | 134 */ |
| 98 class AnalysisError { | 135 class AnalysisError { |
| 99 /** | 136 /** |
| 100 * An empty array of errors used when no errors are expected. | 137 * An empty array of errors used when no errors are expected. |
| 101 */ | 138 */ |
| 102 static List<AnalysisError> NO_ERRORS = new List<AnalysisError>(0); | 139 static List<AnalysisError> NO_ERRORS = new List<AnalysisError>(0); |
| 103 /** | 140 /** |
| 104 * The error code associated with the error. | 141 * The error code associated with the error. |
| 105 */ | 142 */ |
| 106 ErrorCode _errorCode; | 143 ErrorCode _errorCode; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 122 */ | 159 */ |
| 123 int _length = 0; | 160 int _length = 0; |
| 124 /** | 161 /** |
| 125 * Initialize a newly created analysis error for the specified source. The err
or has no location | 162 * Initialize a newly created analysis error for the specified source. The err
or has no location |
| 126 * information. | 163 * information. |
| 127 * @param source the source for which the exception occurred | 164 * @param source the source for which the exception occurred |
| 128 * @param errorCode the error code to be associated with this error | 165 * @param errorCode the error code to be associated with this error |
| 129 * @param arguments the arguments used to build the error message | 166 * @param arguments the arguments used to build the error message |
| 130 */ | 167 */ |
| 131 AnalysisError.con1(Source source2, ErrorCode errorCode2, List<Object> argument
s) { | 168 AnalysisError.con1(Source source2, ErrorCode errorCode2, List<Object> argument
s) { |
| 132 _jtd_constructor_125_impl(source2, errorCode2, arguments); | 169 _jtd_constructor_127_impl(source2, errorCode2, arguments); |
| 133 } | 170 } |
| 134 _jtd_constructor_125_impl(Source source2, ErrorCode errorCode2, List<Object> a
rguments) { | 171 _jtd_constructor_127_impl(Source source2, ErrorCode errorCode2, List<Object> a
rguments) { |
| 135 this._source = source2; | 172 this._source = source2; |
| 136 this._errorCode = errorCode2; | 173 this._errorCode = errorCode2; |
| 137 this._message = JavaString.format(errorCode2.message, arguments); | 174 this._message = JavaString.format(errorCode2.message, arguments); |
| 138 } | 175 } |
| 139 /** | 176 /** |
| 140 * Initialize a newly created analysis error for the specified source at the g
iven location. | 177 * Initialize a newly created analysis error for the specified source at the g
iven location. |
| 141 * @param source the source for which the exception occurred | 178 * @param source the source for which the exception occurred |
| 142 * @param offset the offset of the location of the error | 179 * @param offset the offset of the location of the error |
| 143 * @param length the length of the location of the error | 180 * @param length the length of the location of the error |
| 144 * @param errorCode the error code to be associated with this error | 181 * @param errorCode the error code to be associated with this error |
| 145 * @param arguments the arguments used to build the error message | 182 * @param arguments the arguments used to build the error message |
| 146 */ | 183 */ |
| 147 AnalysisError.con2(Source source3, int offset2, int length11, ErrorCode errorC
ode3, List<Object> arguments) { | 184 AnalysisError.con2(Source source3, int offset2, int length11, ErrorCode errorC
ode3, List<Object> arguments) { |
| 148 _jtd_constructor_126_impl(source3, offset2, length11, errorCode3, arguments)
; | 185 _jtd_constructor_128_impl(source3, offset2, length11, errorCode3, arguments)
; |
| 149 } | 186 } |
| 150 _jtd_constructor_126_impl(Source source3, int offset2, int length11, ErrorCode
errorCode3, List<Object> arguments) { | 187 _jtd_constructor_128_impl(Source source3, int offset2, int length11, ErrorCode
errorCode3, List<Object> arguments) { |
| 151 this._source = source3; | 188 this._source = source3; |
| 152 this._offset = offset2; | 189 this._offset = offset2; |
| 153 this._length = length11; | 190 this._length = length11; |
| 154 this._errorCode = errorCode3; | 191 this._errorCode = errorCode3; |
| 155 this._message = JavaString.format(errorCode3.message, arguments); | 192 this._message = JavaString.format(errorCode3.message, arguments); |
| 156 } | 193 } |
| 157 /** | 194 /** |
| 158 * Return the error code associated with the error. | 195 * Return the error code associated with the error. |
| 159 * @return the error code associated with the error | 196 * @return the error code associated with the error |
| 160 */ | 197 */ |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 builder.append(".."); | 239 builder.append(".."); |
| 203 builder.append(_offset + _length - 1); | 240 builder.append(_offset + _length - 1); |
| 204 builder.append("): "); | 241 builder.append("): "); |
| 205 builder.append(_message); | 242 builder.append(_message); |
| 206 return builder.toString(); | 243 return builder.toString(); |
| 207 } | 244 } |
| 208 } | 245 } |
| 209 /** | 246 /** |
| 210 * The interface {@code ErrorCode} defines the behavior common to objects repres
enting error codes | 247 * The interface {@code ErrorCode} defines the behavior common to objects repres
enting error codes |
| 211 * associated with {@link AnalysisError analysis errors}. | 248 * associated with {@link AnalysisError analysis errors}. |
| 249 * @coverage dart.engine.error |
| 212 */ | 250 */ |
| 213 abstract class ErrorCode { | 251 abstract class ErrorCode { |
| 214 /** | 252 /** |
| 215 * Return the severity of this error. | 253 * Return the severity of this error. |
| 216 * @return the severity of this error | 254 * @return the severity of this error |
| 217 */ | 255 */ |
| 218 ErrorSeverity get errorSeverity; | 256 ErrorSeverity get errorSeverity; |
| 219 /** | 257 /** |
| 220 * Return the message template used to create the message to be displayed for
this error. | 258 * Return the message template used to create the message to be displayed for
this error. |
| 221 * @return the message template used to create the message to be displayed for
this error | 259 * @return the message template used to create the message to be displayed for
this error |
| 222 */ | 260 */ |
| 223 String get message; | 261 String get message; |
| 224 /** | 262 /** |
| 225 * Return the type of the error. | 263 * Return the type of the error. |
| 226 * @return the type of the error | 264 * @return the type of the error |
| 227 */ | 265 */ |
| 228 ErrorType get type; | 266 ErrorType get type; |
| 229 /** | 267 /** |
| 230 * Return {@code true} if this error should cause recompilation of the source
during the next | 268 * Return {@code true} if this error should cause recompilation of the source
during the next |
| 231 * incremental compilation. | 269 * incremental compilation. |
| 232 * @return {@code true} if this error should cause recompilation of the source
during the next | 270 * @return {@code true} if this error should cause recompilation of the source
during the next |
| 233 * incremental compilation | 271 * incremental compilation |
| 234 */ | 272 */ |
| 235 bool needsRecompilation(); | 273 bool needsRecompilation(); |
| 236 } | 274 } |
| 237 /** | 275 /** |
| 238 * Instances of the enumeration {@code ErrorType} represent the type of an {@lin
k ErrorCode}. | 276 * Instances of the enumeration {@code ErrorType} represent the type of an {@lin
k ErrorCode}. |
| 277 * @coverage dart.engine.error |
| 239 */ | 278 */ |
| 240 class ErrorType { | 279 class ErrorType { |
| 241 /** | 280 /** |
| 242 * Compile-time errors are errors that preclude execution. A compile time erro
r must be reported | 281 * Compile-time errors are errors that preclude execution. A compile time erro
r must be reported |
| 243 * by a Dart compiler before the erroneous code is executed. | 282 * by a Dart compiler before the erroneous code is executed. |
| 244 */ | 283 */ |
| 245 static final ErrorType COMPILE_TIME_ERROR = new ErrorType('COMPILE_TIME_ERROR'
, 0, ErrorSeverity.ERROR); | 284 static final ErrorType COMPILE_TIME_ERROR = new ErrorType('COMPILE_TIME_ERROR'
, 0, ErrorSeverity.ERROR); |
| 246 /** | 285 /** |
| 247 * Static warnings are those warnings reported by the static checker. They hav
e no effect on | 286 * Static warnings are those warnings reported by the static checker. They hav
e no effect on |
| 248 * execution. Static warnings must be provided by Dart compilers used during d
evelopment. | 287 * execution. Static warnings must be provided by Dart compilers used during d
evelopment. |
| 249 */ | 288 */ |
| 250 static final ErrorType STATIC_WARNING = new ErrorType('STATIC_WARNING', 1, Err
orSeverity.WARNING); | 289 static final ErrorType STATIC_WARNING = new ErrorType('STATIC_WARNING', 1, Err
orSeverity.WARNING); |
| 251 /** | 290 /** |
| 252 * Many, but not all, static warnings relate to types, in which case they are
known as static type | 291 * Many, but not all, static warnings relate to types, in which case they are
known as static type |
| 253 * warnings. | 292 * warnings. |
| 254 */ | 293 */ |
| 255 static final ErrorType STATIC_TYPE_WARNING = new ErrorType('STATIC_TYPE_WARNIN
G', 2, ErrorSeverity.WARNING); | 294 static final ErrorType STATIC_TYPE_WARNING = new ErrorType('STATIC_TYPE_WARNIN
G', 2, ErrorSeverity.WARNING); |
| 256 /** | 295 /** |
| 257 * Syntactic errors are errors produced as a result of input that does not con
form to the grammar. | 296 * Syntactic errors are errors produced as a result of input that does not con
form to the grammar. |
| 258 */ | 297 */ |
| 259 static final ErrorType SYNTACTIC_ERROR = new ErrorType('SYNTACTIC_ERROR', 3, E
rrorSeverity.ERROR); | 298 static final ErrorType SYNTACTIC_ERROR = new ErrorType('SYNTACTIC_ERROR', 3, E
rrorSeverity.ERROR); |
| 260 static final List<ErrorType> values = [COMPILE_TIME_ERROR, STATIC_WARNING, STA
TIC_TYPE_WARNING, SYNTACTIC_ERROR]; | 299 static final List<ErrorType> values = [COMPILE_TIME_ERROR, STATIC_WARNING, STA
TIC_TYPE_WARNING, SYNTACTIC_ERROR]; |
| 261 final String __name; | 300 final String __name; |
| 262 final int __ordinal; | 301 final int __ordinal; |
| 302 int get ordinal => __ordinal; |
| 263 /** | 303 /** |
| 264 * The severity of this type of error. | 304 * The severity of this type of error. |
| 265 */ | 305 */ |
| 266 ErrorSeverity _severity; | 306 ErrorSeverity _severity; |
| 267 /** | 307 /** |
| 268 * Initialize a newly created error type to have the given severity. | 308 * Initialize a newly created error type to have the given severity. |
| 269 * @param severity the severity of this type of error | 309 * @param severity the severity of this type of error |
| 270 */ | 310 */ |
| 271 ErrorType(this.__name, this.__ordinal, ErrorSeverity severity) { | 311 ErrorType(this.__name, this.__ordinal, ErrorSeverity severity) { |
| 272 this._severity = severity; | 312 this._severity = severity; |
| 273 } | 313 } |
| 274 /** | 314 /** |
| 275 * Return the severity of this type of error. | 315 * Return the severity of this type of error. |
| 276 * @return the severity of this type of error | 316 * @return the severity of this type of error |
| 277 */ | 317 */ |
| 278 ErrorSeverity get severity => _severity; | 318 ErrorSeverity get severity => _severity; |
| 279 String toString() => __name; | 319 String toString() => __name; |
| 280 } | 320 } |
| 281 /** | 321 /** |
| 282 * The enumeration {@code CompileTimeErrorCode} defines the error codes used for
compile time | 322 * The enumeration {@code CompileTimeErrorCode} defines the error codes used for
compile time |
| 283 * errors. The convention for this class is for the name of the error code to in
dicate the problem | 323 * errors. The convention for this class is for the name of the error code to in
dicate the problem |
| 284 * that caused the error to be generated and for the error message to explain wh
at is wrong and, | 324 * that caused the error to be generated and for the error message to explain wh
at is wrong and, |
| 285 * when appropriate, how the problem can be corrected. | 325 * when appropriate, how the problem can be corrected. |
| 326 * @coverage dart.engine.error |
| 286 */ | 327 */ |
| 287 class CompileTimeErrorCode implements ErrorCode { | 328 class CompileTimeErrorCode implements ErrorCode { |
| 288 /** | 329 /** |
| 289 * 14.2 Exports: It is a compile-time error if a name <i>N</i> is re-exported
by a library | 330 * 14.2 Exports: It is a compile-time error if a name <i>N</i> is re-exported
by a library |
| 290 * <i>L</i> and <i>N</i> is introduced into the export namespace of <i>L</i> b
y more than one | 331 * <i>L</i> and <i>N</i> is introduced into the export namespace of <i>L</i> b
y more than one |
| 291 * export. | 332 * export. |
| 292 */ | 333 */ |
| 293 static final CompileTimeErrorCode AMBIGUOUS_EXPORT = new CompileTimeErrorCode(
'AMBIGUOUS_EXPORT', 0, ""); | 334 static final CompileTimeErrorCode AMBIGUOUS_EXPORT = new CompileTimeErrorCode(
'AMBIGUOUS_EXPORT', 0, ""); |
| 294 /** | 335 /** |
| 295 * 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i
>N</i> is introduced | 336 * 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i
>N</i> is introduced |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 * 13.9 Switch: It is a compile-time error if the class <i>C</i> implements th
e operator | 373 * 13.9 Switch: It is a compile-time error if the class <i>C</i> implements th
e operator |
| 333 * <i>==</i>. | 374 * <i>==</i>. |
| 334 */ | 375 */ |
| 335 static final CompileTimeErrorCode CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS = new
CompileTimeErrorCode('CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS', 7, "The switch c
ase expression type '%s' cannot override the == operator"); | 376 static final CompileTimeErrorCode CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS = new
CompileTimeErrorCode('CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS', 7, "The switch c
ase expression type '%s' cannot override the == operator"); |
| 336 /** | 377 /** |
| 337 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time
constant would raise | 378 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time
constant would raise |
| 338 * an exception. | 379 * an exception. |
| 339 */ | 380 */ |
| 340 static final CompileTimeErrorCode COMPILE_TIME_CONSTANT_RAISES_EXCEPTION = new
CompileTimeErrorCode('COMPILE_TIME_CONSTANT_RAISES_EXCEPTION', 8, ""); | 381 static final CompileTimeErrorCode COMPILE_TIME_CONSTANT_RAISES_EXCEPTION = new
CompileTimeErrorCode('COMPILE_TIME_CONSTANT_RAISES_EXCEPTION', 8, ""); |
| 341 /** | 382 /** |
| 383 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time
constant would raise |
| 384 * an exception. |
| 385 */ |
| 386 static final CompileTimeErrorCode COMPILE_TIME_CONSTANT_RAISES_EXCEPTION_DIVID
E_BY_ZERO = new CompileTimeErrorCode('COMPILE_TIME_CONSTANT_RAISES_EXCEPTION_DIV
IDE_BY_ZERO', 9, "Cannot divide by zero"); |
| 387 /** |
| 342 * 7.6 Constructors: A constructor name always begins with the name of its imm
ediately enclosing | 388 * 7.6 Constructors: A constructor name always begins with the name of its imm
ediately enclosing |
| 343 * class, and may optionally be followed by a dot and an identifier <i>id</i>.
It is a | 389 * class, and may optionally be followed by a dot and an identifier <i>id</i>.
It is a |
| 344 * compile-time error if <i>id</i> is the name of a member declared in the imm
ediately enclosing | 390 * compile-time error if <i>id</i> is the name of a member declared in the imm
ediately enclosing |
| 345 * class. | 391 * class. |
| 346 */ | 392 */ |
| 347 static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_MEMBER = ne
w CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_NAME_AND_MEMBER', 9, ""); | 393 static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD = new
CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD', 10, "'%s' cannot
be used to name a constructor and a method in this class"); |
| 394 /** |
| 395 * 7.6 Constructors: A constructor name always begins with the name of its imm
ediately enclosing |
| 396 * class, and may optionally be followed by a dot and an identifier <i>id</i>.
It is a |
| 397 * compile-time error if <i>id</i> is the name of a member declared in the imm
ediately enclosing |
| 398 * class. |
| 399 */ |
| 400 static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD = ne
w CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD', 11, "'%s' cann
ot be used to name a constructor and a field in this class"); |
| 348 /** | 401 /** |
| 349 * 7.6.3 Constant Constructors: It is a compile-time error if a constant const
ructor is declared | 402 * 7.6.3 Constant Constructors: It is a compile-time error if a constant const
ructor is declared |
| 350 * by a class that has a non-final instance variable. | 403 * by a class that has a non-final instance variable. |
| 351 */ | 404 */ |
| 352 static final CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD = new
CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD', 10, ""); | 405 static final CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD = new
CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD', 12, "Classes wit
h non-final fields cannot define 'const' constructors"); |
| 353 /** | 406 /** |
| 354 * 6.2 Formal Parameters: It is a compile-time error if a formal parameter is
declared as a | 407 * 6.2 Formal Parameters: It is a compile-time error if a formal parameter is
declared as a |
| 355 * constant variable. | 408 * constant variable. |
| 356 */ | 409 */ |
| 357 static final CompileTimeErrorCode CONST_FORMAL_PARAMETER = new CompileTimeErro
rCode('CONST_FORMAL_PARAMETER', 11, ""); | 410 static final CompileTimeErrorCode CONST_FORMAL_PARAMETER = new CompileTimeErro
rCode('CONST_FORMAL_PARAMETER', 13, "Parameters cannot be 'const'"); |
| 358 /** | 411 /** |
| 359 * 5 Variables: A constant variable must be initialized to a compile-time cons
tant or a | 412 * 5 Variables: A constant variable must be initialized to a compile-time cons
tant or a |
| 360 * compile-time error occurs. | 413 * compile-time error occurs. |
| 361 */ | 414 */ |
| 362 static final CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE =
new CompileTimeErrorCode('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', 12, ""); | 415 static final CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE =
new CompileTimeErrorCode('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', 14, ""); |
| 363 /** | 416 /** |
| 364 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 417 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 365 * uncaught exception being thrown. | 418 * uncaught exception being thrown. |
| 366 */ | 419 */ |
| 367 static final CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = new CompileTim
eErrorCode('CONST_EVAL_THROWS_EXCEPTION', 13, ""); | 420 static final CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = new CompileTim
eErrorCode('CONST_EVAL_THROWS_EXCEPTION', 15, ""); |
| 368 /** | 421 /** |
| 369 * 12.11.2 Const: If <i>T</i> is a parameterized type <i>S<U<sub>1</sub>, &
hellip;, | 422 * 12.11.2 Const: If <i>T</i> is a parameterized type <i>S<U<sub>1</sub>, &
hellip;, |
| 370 * U<sub>m</sub>></i>, let <i>R = S</i>; It is a compile time error if <i>S
</i> is not a | 423 * U<sub>m</sub>></i>, let <i>R = S</i>; It is a compile time error if <i>S
</i> is not a |
| 371 * generic type with <i>m</i> type parameters. | 424 * generic type with <i>m</i> type parameters. |
| 372 * @param typeName the name of the type being referenced (<i>S</i>) | 425 * @param typeName the name of the type being referenced (<i>S</i>) |
| 373 * @param argumentCount the number of type arguments provided | 426 * @param argumentCount the number of type arguments provided |
| 374 * @param parameterCount the number of type parameters that were declared | 427 * @param parameterCount the number of type parameters that were declared |
| 375 */ | 428 */ |
| 376 static final CompileTimeErrorCode CONST_WITH_INVALID_TYPE_PARAMETERS = new Com
pileTimeErrorCode('CONST_WITH_INVALID_TYPE_PARAMETERS', 14, "The type '%s' is de
clared with %d type parameters, but %d type arguments were given"); | 429 static final CompileTimeErrorCode CONST_WITH_INVALID_TYPE_PARAMETERS = new Com
pileTimeErrorCode('CONST_WITH_INVALID_TYPE_PARAMETERS', 16, "The type '%s' is de
clared with %d type parameters, but %d type arguments were given"); |
| 377 /** | 430 /** |
| 378 * 12.11.2 Const: If <i>e</i> is of the form <i>const T(a<sub>1</sub>, &hellip
;, a<sub>n</sub>, | 431 * 12.11.2 Const: If <i>e</i> is of the form <i>const T(a<sub>1</sub>, &hellip
;, a<sub>n</sub>, |
| 379 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a | 432 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a |
| 380 * compile-time error if the type <i>T</i> does not declare a constant constru
ctor with the same | 433 * compile-time error if the type <i>T</i> does not declare a constant constru
ctor with the same |
| 381 * name as the declaration of <i>T</i>. | 434 * name as the declaration of <i>T</i>. |
| 382 */ | 435 */ |
| 383 static final CompileTimeErrorCode CONST_WITH_NON_CONST = new CompileTimeErrorC
ode('CONST_WITH_NON_CONST', 15, ""); | 436 static final CompileTimeErrorCode CONST_WITH_NON_CONST = new CompileTimeErrorC
ode('CONST_WITH_NON_CONST', 17, ""); |
| 384 /** | 437 /** |
| 385 * 12.11.2 Const: In all of the above cases, it is a compile-time error if <i>
a<sub>i</sub>, 1 | 438 * 12.11.2 Const: In all of the above cases, it is a compile-time error if <i>
a<sub>i</sub>, 1 |
| 386 * <= i <= n + k</i>, is not a compile-time constant expression. | 439 * <= i <= n + k</i>, is not a compile-time constant expression. |
| 387 */ | 440 */ |
| 388 static final CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = new Compi
leTimeErrorCode('CONST_WITH_NON_CONSTANT_ARGUMENT', 16, ""); | 441 static final CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = new Compi
leTimeErrorCode('CONST_WITH_NON_CONSTANT_ARGUMENT', 18, ""); |
| 389 /** | 442 /** |
| 390 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current | 443 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current |
| 391 * scope, optionally followed by type arguments. | 444 * scope, optionally followed by type arguments. |
| 392 * <p> | 445 * <p> |
| 393 * 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>, | 446 * 12.11.2 Const: If <i>e</i> is of the form <i>const T.id(a<sub>1</sub>, &hel
lip;, a<sub>n</sub>, |
| 394 * x<sub>n+1</sub>: a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+k</sub>
)</i> it is a | 447 * x<sub>n+1</sub>: a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+k</sub>
)</i> it is a |
| 395 * compile-time error if <i>T</i> is not a class accessible in the current sco
pe, optionally | 448 * compile-time error if <i>T</i> is not a class accessible in the current sco
pe, optionally |
| 396 * followed by type arguments. | 449 * followed by type arguments. |
| 397 */ | 450 */ |
| 398 static final CompileTimeErrorCode CONST_WITH_NON_TYPE = new CompileTimeErrorCo
de('CONST_WITH_NON_TYPE', 17, ""); | 451 static final CompileTimeErrorCode CONST_WITH_NON_TYPE = new CompileTimeErrorCo
de('CONST_WITH_NON_TYPE', 19, ""); |
| 399 /** | 452 /** |
| 400 * 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type par
ameters. | 453 * 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type par
ameters. |
| 401 */ | 454 */ |
| 402 static final CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = new CompileTime
ErrorCode('CONST_WITH_TYPE_PARAMETERS', 18, ""); | 455 static final CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = new CompileTime
ErrorCode('CONST_WITH_TYPE_PARAMETERS', 20, ""); |
| 403 /** | 456 /** |
| 404 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant | 457 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant |
| 405 * constructor declared by the type <i>T</i>. | 458 * constructor declared by the type <i>T</i>. |
| 406 */ | 459 */ |
| 407 static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR = new Compi
leTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR', 19, ""); | 460 static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR = new Compi
leTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR', 21, ""); |
| 408 /** | 461 /** |
| 409 * 15.3.1 Typedef: It is a compile-time error if any default values are specif
ied in the signature | 462 * 15.3.1 Typedef: It is a compile-time error if any default values are specif
ied in the signature |
| 410 * of a function type alias. | 463 * of a function type alias. |
| 411 */ | 464 */ |
| 412 static final CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS = new C
ompileTimeErrorCode('DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS', 20, ""); | 465 static final CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS = new C
ompileTimeErrorCode('DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS', 22, ""); |
| 413 /** | 466 /** |
| 414 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name | 467 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name |
| 415 * declared in the same scope. | 468 * declared in the same scope. |
| 416 * @param duplicateName the name of the duplicate entity | 469 * @param duplicateName the name of the duplicate entity |
| 417 */ | 470 */ |
| 418 static final CompileTimeErrorCode DUPLICATE_DEFINITION = new CompileTimeErrorC
ode('DUPLICATE_DEFINITION', 21, "The name '%s' is already defined"); | 471 static final CompileTimeErrorCode DUPLICATE_DEFINITION = new CompileTimeErrorC
ode('DUPLICATE_DEFINITION', 23, "The name '%s' is already defined"); |
| 419 /** | 472 /** |
| 420 * 7 Classes: It is a compile-time error if a class declares two members of th
e same name. | 473 * 7 Classes: It is a compile-time error if a class declares two members of th
e same name. |
| 421 */ | 474 */ |
| 422 static final CompileTimeErrorCode DUPLICATE_MEMBER_NAME = new CompileTimeError
Code('DUPLICATE_MEMBER_NAME', 22, ""); | 475 static final CompileTimeErrorCode DUPLICATE_MEMBER_NAME = new CompileTimeError
Code('DUPLICATE_MEMBER_NAME', 24, ""); |
| 423 /** | 476 /** |
| 424 * 7 Classes: It is a compile-time error if a class has an instance member and
a static member | 477 * 7 Classes: It is a compile-time error if a class has an instance member and
a static member |
| 425 * with the same name. | 478 * with the same name. |
| 426 */ | 479 */ |
| 427 static final CompileTimeErrorCode DUPLICATE_MEMBER_NAME_INSTANCE_STATIC = new
CompileTimeErrorCode('DUPLICATE_MEMBER_NAME_INSTANCE_STATIC', 23, ""); | 480 static final CompileTimeErrorCode DUPLICATE_MEMBER_NAME_INSTANCE_STATIC = new
CompileTimeErrorCode('DUPLICATE_MEMBER_NAME_INSTANCE_STATIC', 25, ""); |
| 428 /** | 481 /** |
| 429 * 12.14.2 Binding Actuals to Formals: It is a compile-time error if <i>q<sub>
i</sub> = | 482 * 12.14.2 Binding Actuals to Formals: It is a compile-time error if <i>q<sub>
i</sub> = |
| 430 * q<sub>j</sub></i> for any <i>i != j</i> [where <i>q<sub>i</sub></i> is the
label for a named | 483 * q<sub>j</sub></i> for any <i>i != j</i> [where <i>q<sub>i</sub></i> is the
label for a named |
| 431 * argument]. | 484 * argument]. |
| 432 */ | 485 */ |
| 433 static final CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = new CompileTimeEr
rorCode('DUPLICATE_NAMED_ARGUMENT', 24, ""); | 486 static final CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = new CompileTimeEr
rorCode('DUPLICATE_NAMED_ARGUMENT', 26, ""); |
| 434 /** | 487 /** |
| 435 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is | 488 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 436 * not a library declaration. | 489 * not a library declaration. |
| 437 */ | 490 */ |
| 438 static final CompileTimeErrorCode EXPORT_OF_NON_LIBRARY = new CompileTimeError
Code('EXPORT_OF_NON_LIBRARY', 25, ""); | 491 static final CompileTimeErrorCode EXPORT_OF_NON_LIBRARY = new CompileTimeError
Code('EXPORT_OF_NON_LIBRARY', 27, ""); |
| 439 /** | 492 /** |
| 440 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla
ss <i>C</i> includes | 493 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla
ss <i>C</i> includes |
| 441 * a type expression that does not denote a class available in the lexical sco
pe of <i>C</i>. | 494 * a type expression that does not denote a class available in the lexical sco
pe of <i>C</i>. |
| 442 */ | 495 */ |
| 443 static final CompileTimeErrorCode EXTENDS_NON_CLASS = new CompileTimeErrorCode
('EXTENDS_NON_CLASS', 26, ""); | 496 static final CompileTimeErrorCode EXTENDS_NON_CLASS = new CompileTimeErrorCode
('EXTENDS_NON_CLASS', 28, ""); |
| 444 /** | 497 /** |
| 445 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. | 498 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. |
| 446 * <p> | 499 * <p> |
| 447 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. | 500 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. |
| 448 * <p> | 501 * <p> |
| 449 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. | 502 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. |
| 450 * <p> | 503 * <p> |
| 451 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to | 504 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to |
| 452 * attempt to extend or implement num. | 505 * attempt to extend or implement num. |
| 453 * <p> | 506 * <p> |
| 454 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. | 507 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. |
| 455 * <p> | 508 * <p> |
| 456 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. | 509 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. |
| 457 */ | 510 */ |
| 458 static final CompileTimeErrorCode EXTENDS_OR_IMPLEMENTS_DISALLOWED_CLASS = new
CompileTimeErrorCode('EXTENDS_OR_IMPLEMENTS_DISALLOWED_CLASS', 27, ""); | 511 static final CompileTimeErrorCode EXTENDS_OR_IMPLEMENTS_DISALLOWED_CLASS = new
CompileTimeErrorCode('EXTENDS_OR_IMPLEMENTS_DISALLOWED_CLASS', 29, ""); |
| 459 /** | 512 /** |
| 460 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time | 513 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time |
| 461 * error if more than one initializer corresponding to a given instance variab
le appears in | 514 * error if more than one initializer corresponding to a given instance variab
le appears in |
| 462 * <i>k</i>’s list. | 515 * <i>k</i>’s list. |
| 463 */ | 516 */ |
| 464 static final CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS =
new CompileTimeErrorCode('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 28, ""); | 517 static final CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS =
new CompileTimeErrorCode('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 30, ""); |
| 465 /** | 518 /** |
| 466 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time | 519 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time |
| 467 * error if <i>k</i>’s initializer list contains an initializer for a final
variable <i>f</i> | 520 * error if <i>k</i>’s initializer list contains an initializer for a final
variable <i>f</i> |
| 468 * whose declaration includes an initialization expression. | 521 * whose declaration includes an initialization expression. |
| 469 */ | 522 */ |
| 470 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARA
TION = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATIO
N', 29, ""); | 523 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARA
TION = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATIO
N', 31, ""); |
| 471 /** | 524 /** |
| 472 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time | 525 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time |
| 473 * error if <i>k</i>’s initializer list contains an initializer for a variab
le that is initialized | 526 * error if <i>k</i>’s initializer list contains an initializer for a variab
le that is initialized |
| 474 * by means of an initializing formal of <i>k</i>. | 527 * by means of an initializing formal of <i>k</i>. |
| 475 */ | 528 */ |
| 476 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ
ER = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER',
30, ""); | 529 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ
ER = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER',
32, ""); |
| 477 /** | 530 /** |
| 478 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by | 531 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by |
| 479 * a function other than a non-redirecting generative constructor. | 532 * a function other than a non-redirecting generative constructor. |
| 480 */ | 533 */ |
| 481 static final CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new
CompileTimeErrorCode('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 31, ""); | 534 static final CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new
CompileTimeErrorCode('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 33, ""); |
| 482 /** | 535 /** |
| 483 * 5 Variables: It is a compile-time error if a final instance variable that h
as been initialized | 536 * 5 Variables: It is a compile-time error if a final instance variable that h
as been initialized |
| 484 * at its point of declaration is also initialized in a constructor. | 537 * at its point of declaration is also initialized in a constructor. |
| 485 */ | 538 */ |
| 486 static final CompileTimeErrorCode FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRU
CTOR = new CompileTimeErrorCode('FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTO
R', 32, ""); | 539 static final CompileTimeErrorCode FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRU
CTOR = new CompileTimeErrorCode('FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTO
R', 34, ""); |
| 487 /** | 540 /** |
| 488 * 5 Variables: It is a compile-time error if a final instance variable that h
as is initialized by | 541 * 5 Variables: It is a compile-time error if a final instance variable that h
as is initialized by |
| 489 * means of an initializing formal of a constructor is also initialized elsewh
ere in the same | 542 * means of an initializing formal of a constructor is also initialized elsewh
ere in the same |
| 490 * constructor. | 543 * constructor. |
| 491 */ | 544 */ |
| 492 static final CompileTimeErrorCode FINAL_INITIALIZED_MULTIPLE_TIMES = new Compi
leTimeErrorCode('FINAL_INITIALIZED_MULTIPLE_TIMES', 33, ""); | 545 static final CompileTimeErrorCode FINAL_INITIALIZED_MULTIPLE_TIMES = new Compi
leTimeErrorCode('FINAL_INITIALIZED_MULTIPLE_TIMES', 35, ""); |
| 493 /** | 546 /** |
| 494 * 5 Variables: It is a compile-time error if a library, static or local varia
ble <i>v</i> is | 547 * 5 Variables: It is a compile-time error if a library, static or local varia
ble <i>v</i> is |
| 495 * final and <i>v</i> is not initialized at its point of declaration. | 548 * final and <i>v</i> is not initialized at its point of declaration. |
| 496 */ | 549 */ |
| 497 static final CompileTimeErrorCode FINAL_NOT_INITIALIZED = new CompileTimeError
Code('FINAL_NOT_INITIALIZED', 34, ""); | 550 static final CompileTimeErrorCode FINAL_NOT_INITIALIZED = new CompileTimeError
Code('FINAL_NOT_INITIALIZED', 36, ""); |
| 498 /** | 551 /** |
| 499 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same | 552 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same |
| 500 * name. | 553 * name. |
| 501 */ | 554 */ |
| 502 static final CompileTimeErrorCode GETTER_AND_METHOD_WITH_SAME_NAME = new Compi
leTimeErrorCode('GETTER_AND_METHOD_WITH_SAME_NAME', 35, ""); | 555 static final CompileTimeErrorCode GETTER_AND_METHOD_WITH_SAME_NAME = new Compi
leTimeErrorCode('GETTER_AND_METHOD_WITH_SAME_NAME', 37, ""); |
| 503 /** | 556 /** |
| 504 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class includes | 557 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class includes |
| 505 * type dynamic. | 558 * type dynamic. |
| 506 */ | 559 */ |
| 507 static final CompileTimeErrorCode IMPLEMENTS_DYNAMIC = new CompileTimeErrorCod
e('IMPLEMENTS_DYNAMIC', 36, ""); | 560 static final CompileTimeErrorCode IMPLEMENTS_DYNAMIC = new CompileTimeErrorCod
e('IMPLEMENTS_DYNAMIC', 38, ""); |
| 508 /** | 561 /** |
| 509 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class <i>C</i> | 562 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class <i>C</i> |
| 510 * includes a type expression that does not denote a class available in the le
xical scope of | 563 * includes a type expression that does not denote a class available in the le
xical scope of |
| 511 * <i>C</i>. | 564 * <i>C</i>. |
| 512 */ | 565 */ |
| 513 static final CompileTimeErrorCode IMPLEMENTS_NON_CLASS = new CompileTimeErrorC
ode('IMPLEMENTS_NON_CLASS', 37, ""); | 566 static final CompileTimeErrorCode IMPLEMENTS_NON_CLASS = new CompileTimeErrorC
ode('IMPLEMENTS_NON_CLASS', 39, ""); |
| 514 /** | 567 /** |
| 515 * 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears
more than once in | 568 * 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears
more than once in |
| 516 * the implements clause of a class. | 569 * the implements clause of a class. |
| 517 */ | 570 */ |
| 518 static final CompileTimeErrorCode IMPLEMENTS_REPEATED = new CompileTimeErrorCo
de('IMPLEMENTS_REPEATED', 38, ""); | 571 static final CompileTimeErrorCode IMPLEMENTS_REPEATED = new CompileTimeErrorCo
de('IMPLEMENTS_REPEATED', 40, ""); |
| 519 /** | 572 /** |
| 520 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a | 573 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a |
| 521 * superinterface of itself. | 574 * superinterface of itself. |
| 522 */ | 575 */ |
| 523 static final CompileTimeErrorCode IMPLEMENTS_SELF = new CompileTimeErrorCode('
IMPLEMENTS_SELF', 39, ""); | 576 static final CompileTimeErrorCode IMPLEMENTS_SELF = new CompileTimeErrorCode('
IMPLEMENTS_SELF', 41, ""); |
| 524 /** | 577 /** |
| 525 * 14.1 Imports: It is a compile-time error to import two different libraries
with the same name. | 578 * 14.1 Imports: It is a compile-time error to import two different libraries
with the same name. |
| 526 */ | 579 */ |
| 527 static final CompileTimeErrorCode IMPORT_DUPLICATED_LIBRARY_NAME = new Compile
TimeErrorCode('IMPORT_DUPLICATED_LIBRARY_NAME', 40, ""); | 580 static final CompileTimeErrorCode IMPORT_DUPLICATED_LIBRARY_NAME = new Compile
TimeErrorCode('IMPORT_DUPLICATED_LIBRARY_NAME', 42, ""); |
| 528 /** | 581 /** |
| 529 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is | 582 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 530 * not a library declaration. | 583 * not a library declaration. |
| 531 */ | 584 */ |
| 532 static final CompileTimeErrorCode IMPORT_OF_NON_LIBRARY = new CompileTimeError
Code('IMPORT_OF_NON_LIBRARY', 41, ""); | 585 static final CompileTimeErrorCode IMPORT_OF_NON_LIBRARY = new CompileTimeError
Code('IMPORT_OF_NON_LIBRARY', 43, ""); |
| 533 /** | 586 /** |
| 534 * 13.9 Switch: It is a compile-time error if values of the expressions <i>e<s
ub>k</sub></i> are | 587 * 13.9 Switch: It is a compile-time error if values of the expressions <i>e<s
ub>k</sub></i> are |
| 535 * not instances of the same class <i>C</i>, for all <i>1 <= k <= n</i>. | 588 * not instances of the same class <i>C</i>, for all <i>1 <= k <= n</i>. |
| 536 */ | 589 */ |
| 537 static final CompileTimeErrorCode INCONSITENT_CASE_EXPRESSION_TYPES = new Comp
ileTimeErrorCode('INCONSITENT_CASE_EXPRESSION_TYPES', 42, ""); | 590 static final CompileTimeErrorCode INCONSITENT_CASE_EXPRESSION_TYPES = new Comp
ileTimeErrorCode('INCONSITENT_CASE_EXPRESSION_TYPES', 44, ""); |
| 538 /** | 591 /** |
| 539 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a | 592 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a |
| 540 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately | 593 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately |
| 541 * enclosing class. | 594 * enclosing class. |
| 542 */ | 595 */ |
| 543 static final CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTANT_FIELD = new Com
pileTimeErrorCode('INITIALIZER_FOR_NON_EXISTANT_FIELD', 43, ""); | 596 static final CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTANT_FIELD = new Com
pileTimeErrorCode('INITIALIZER_FOR_NON_EXISTANT_FIELD', 45, ""); |
| 544 /** | 597 /** |
| 545 * 7.6 Constructors: It is a compile-time error if the name of a constructor i
s not a constructor | 598 * 7.6 Constructors: It is a compile-time error if the name of a constructor i
s not a constructor |
| 546 * name. | 599 * name. |
| 547 */ | 600 */ |
| 548 static final CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = new CompileTimeEr
rorCode('INVALID_CONSTRUCTOR_NAME', 44, ""); | 601 static final CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = new CompileTimeEr
rorCode('INVALID_CONSTRUCTOR_NAME', 46, ""); |
| 549 /** | 602 /** |
| 550 * 7.6.2 Factories: It is a compile-time error if <i>M</i> is not the name of
the immediately | 603 * 7.6.2 Factories: It is a compile-time error if <i>M</i> is not the name of
the immediately |
| 551 * enclosing class. | 604 * enclosing class. |
| 552 */ | 605 */ |
| 553 static final CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS = new Compi
leTimeErrorCode('INVALID_FACTORY_NAME_NOT_A_CLASS', 45, ""); | 606 static final CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS = new Compi
leTimeErrorCode('INVALID_FACTORY_NAME_NOT_A_CLASS', 47, ""); |
| 554 /** | 607 /** |
| 555 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 608 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
| 556 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies
a default value for | 609 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies
a default value for |
| 557 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff
erent default value | 610 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff
erent default value |
| 558 * for <i>p</i>. | 611 * for <i>p</i>. |
| 559 */ | 612 */ |
| 560 static final CompileTimeErrorCode INVALID_OVERRIDE_DEFAULT_VALUE = new Compile
TimeErrorCode('INVALID_OVERRIDE_DEFAULT_VALUE', 46, ""); | 613 static final CompileTimeErrorCode INVALID_OVERRIDE_DEFAULT_VALUE = new Compile
TimeErrorCode('INVALID_OVERRIDE_DEFAULT_VALUE', 48, ""); |
| 561 /** | 614 /** |
| 562 * 7.1: It is a compile-time error if an instance method <i>m1</i> overrides a
n instance member | 615 * 7.1: It is a compile-time error if an instance method <i>m1</i> overrides a
n instance member |
| 563 * <i>m2</i> and <i>m1</i> does not declare all the named parameters declared
by <i>m2</i>. | 616 * <i>m2</i> and <i>m1</i> does not declare all the named parameters declared
by <i>m2</i>. |
| 564 */ | 617 */ |
| 565 static final CompileTimeErrorCode INVALID_OVERRIDE_NAMED = new CompileTimeErro
rCode('INVALID_OVERRIDE_NAMED', 47, ""); | 618 static final CompileTimeErrorCode INVALID_OVERRIDE_NAMED = new CompileTimeErro
rCode('INVALID_OVERRIDE_NAMED', 49, ""); |
| 566 /** | 619 /** |
| 567 * 7.1 Instance Methods: It is a compile-time error if an instance method m1 o
verrides an instance | 620 * 7.1 Instance Methods: It is a compile-time error if an instance method m1 o
verrides an instance |
| 568 * member <i>m2</i> and <i>m1</i> has fewer optional positional parameters tha
n <i>m2</i>. | 621 * member <i>m2</i> and <i>m1</i> has fewer optional positional parameters tha
n <i>m2</i>. |
| 569 */ | 622 */ |
| 570 static final CompileTimeErrorCode INVALID_OVERRIDE_POSITIONAL = new CompileTim
eErrorCode('INVALID_OVERRIDE_POSITIONAL', 48, ""); | 623 static final CompileTimeErrorCode INVALID_OVERRIDE_POSITIONAL = new CompileTim
eErrorCode('INVALID_OVERRIDE_POSITIONAL', 50, ""); |
| 571 /** | 624 /** |
| 572 * 7.1 Instance Methods: It is a compile-time error if an instance method <i>m
1</i> overrides an | 625 * 7.1 Instance Methods: It is a compile-time error if an instance method <i>m
1</i> overrides an |
| 573 * instance member <i>m2</i> and <i>m1</i> has a different number of required
parameters than | 626 * instance member <i>m2</i> and <i>m1</i> has a different number of required
parameters than |
| 574 * <i>m2</i>. | 627 * <i>m2</i>. |
| 575 */ | 628 */ |
| 576 static final CompileTimeErrorCode INVALID_OVERRIDE_REQUIRED = new CompileTimeE
rrorCode('INVALID_OVERRIDE_REQUIRED', 49, ""); | 629 static final CompileTimeErrorCode INVALID_OVERRIDE_REQUIRED = new CompileTimeE
rrorCode('INVALID_OVERRIDE_REQUIRED', 51, ""); |
| 577 /** | 630 /** |
| 578 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable | 631 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable |
| 579 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the | 632 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the |
| 580 * initializer of an instance variable. | 633 * initializer of an instance variable. |
| 581 */ | 634 */ |
| 582 static final CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = new CompileTimeE
rrorCode('INVALID_REFERENCE_TO_THIS', 50, ""); | 635 static final CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = new CompileTimeE
rrorCode('INVALID_REFERENCE_TO_THIS', 52, ""); |
| 583 /** | 636 /** |
| 584 * 12.7 Maps: It is a compile-time error if the first type argument to a map l
iteral is not | 637 * 12.7 Maps: It is a compile-time error if the first type argument to a map l
iteral is not |
| 585 * String. | 638 * String. |
| 586 */ | 639 */ |
| 587 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_FOR_KEY = new CompileT
imeErrorCode('INVALID_TYPE_ARGUMENT_FOR_KEY', 51, ""); | 640 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_FOR_KEY = new CompileT
imeErrorCode('INVALID_TYPE_ARGUMENT_FOR_KEY', 53, ""); |
| 588 /** | 641 /** |
| 589 * 12.6 Lists: It is a compile time error if the type argument of a constant l
ist literal includes | 642 * 12.6 Lists: It is a compile time error if the type argument of a constant l
ist literal includes |
| 590 * a type parameter. | 643 * a type parameter. |
| 591 */ | 644 */ |
| 592 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST = new Co
mpileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_LIST', 52, ""); | 645 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST = new Co
mpileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_LIST', 54, ""); |
| 593 /** | 646 /** |
| 594 * 12.7 Maps: It is a compile time error if the type arguments of a constant m
ap literal include a | 647 * 12.7 Maps: It is a compile time error if the type arguments of a constant m
ap literal include a |
| 595 * type parameter. | 648 * type parameter. |
| 596 */ | 649 */ |
| 597 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = new Com
pileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 53, ""); | 650 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = new Com
pileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 55, ""); |
| 598 /** | 651 /** |
| 599 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time | 652 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time |
| 600 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an | 653 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an |
| 601 * instance variable declared in the immediately surrounding class. | 654 * instance variable declared in the immediately surrounding class. |
| 602 */ | 655 */ |
| 603 static final CompileTimeErrorCode INVALID_VARIABLE_IN_INITIALIZER = new Compil
eTimeErrorCode('INVALID_VARIABLE_IN_INITIALIZER', 54, ""); | 656 static final CompileTimeErrorCode INVALID_VARIABLE_IN_INITIALIZER = new Compil
eTimeErrorCode('INVALID_VARIABLE_IN_INITIALIZER', 56, ""); |
| 604 /** | 657 /** |
| 605 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within | 658 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within |
| 606 * the innermost function in which <i>s<sub>b</sub></i> occurs. | 659 * the innermost function in which <i>s<sub>b</sub></i> occurs. |
| 607 * <p> | 660 * <p> |
| 608 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use | 661 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use |
| 609 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. | 662 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. |
| 610 * @param labelName the name of the unresolvable label | 663 * @param labelName the name of the unresolvable label |
| 611 */ | 664 */ |
| 612 static final CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = new CompileTimeErrorC
ode('LABEL_IN_OUTER_SCOPE', 55, "Cannot reference label '%s' declared in an oute
r method or function"); | 665 static final CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = new CompileTimeErrorC
ode('LABEL_IN_OUTER_SCOPE', 57, "Cannot reference label '%s' declared in an oute
r method or function"); |
| 613 /** | 666 /** |
| 614 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within | 667 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within |
| 615 * the innermost function in which <i>s<sub>b</sub></i> occurs. | 668 * the innermost function in which <i>s<sub>b</sub></i> occurs. |
| 616 * <p> | 669 * <p> |
| 617 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use | 670 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use |
| 618 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. | 671 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. |
| 619 * @param labelName the name of the unresolvable label | 672 * @param labelName the name of the unresolvable label |
| 620 */ | 673 */ |
| 621 static final CompileTimeErrorCode LABEL_UNDEFINED = new CompileTimeErrorCode('
LABEL_UNDEFINED', 56, "Cannot reference undefined label '%s'"); | 674 static final CompileTimeErrorCode LABEL_UNDEFINED = new CompileTimeErrorCode('
LABEL_UNDEFINED', 58, "Cannot reference undefined label '%s'"); |
| 622 /** | 675 /** |
| 623 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member
with the same name | 676 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member
with the same name |
| 624 * as <i>C</i>. | 677 * as <i>C</i>. |
| 625 */ | 678 */ |
| 626 static final CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = new CompileTimeErro
rCode('MEMBER_WITH_CLASS_NAME', 57, ""); | 679 static final CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = new CompileTimeErro
rCode('MEMBER_WITH_CLASS_NAME', 59, ""); |
| 627 /** | 680 /** |
| 628 * 9 Mixins: It is a compile-time error if a declared or derived mixin explici
tly declares a | 681 * 9 Mixins: It is a compile-time error if a declared or derived mixin explici
tly declares a |
| 629 * constructor. | 682 * constructor. |
| 630 */ | 683 */ |
| 631 static final CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = new CompileTime
ErrorCode('MIXIN_DECLARES_CONSTRUCTOR', 58, ""); | 684 static final CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = new CompileTime
ErrorCode('MIXIN_DECLARES_CONSTRUCTOR', 60, ""); |
| 632 /** | 685 /** |
| 633 * 9 Mixins: It is a compile-time error if a mixin is derived from a class who
se superclass is not | 686 * 9 Mixins: It is a compile-time error if a mixin is derived from a class who
se superclass is not |
| 634 * Object. | 687 * Object. |
| 635 */ | 688 */ |
| 636 static final CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = new Compile
TimeErrorCode('MIXIN_INHERITS_FROM_NOT_OBJECT', 59, ""); | 689 static final CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = new Compile
TimeErrorCode('MIXIN_INHERITS_FROM_NOT_OBJECT', 61, ""); |
| 637 /** | 690 /** |
| 638 * 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not deno
te a class or mixin | 691 * 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not deno
te a class or mixin |
| 639 * available in the immediately enclosing scope. | 692 * available in the immediately enclosing scope. |
| 640 */ | 693 */ |
| 641 static final CompileTimeErrorCode MIXIN_OF_NON_CLASS = new CompileTimeErrorCod
e('MIXIN_OF_NON_CLASS', 60, ""); | 694 static final CompileTimeErrorCode MIXIN_OF_NON_CLASS = new CompileTimeErrorCod
e('MIXIN_OF_NON_CLASS', 62, ""); |
| 642 /** | 695 /** |
| 643 * 9.1 Mixin Application: If <i>M</i> is a class, it is a compile time error i
f a well formed | 696 * 9.1 Mixin Application: If <i>M</i> is a class, it is a compile time error i
f a well formed |
| 644 * mixin cannot be derived from <i>M</i>. | 697 * mixin cannot be derived from <i>M</i>. |
| 645 */ | 698 */ |
| 646 static final CompileTimeErrorCode MIXIN_OF_NON_MIXIN = new CompileTimeErrorCod
e('MIXIN_OF_NON_MIXIN', 61, ""); | 699 static final CompileTimeErrorCode MIXIN_OF_NON_MIXIN = new CompileTimeErrorCod
e('MIXIN_OF_NON_MIXIN', 63, ""); |
| 647 /** | 700 /** |
| 648 * 9 Mixins: It is a compile-time error if a declared or derived mixin refers
to super. | 701 * 9 Mixins: It is a compile-time error if a declared or derived mixin refers
to super. |
| 649 */ | 702 */ |
| 650 static final CompileTimeErrorCode MIXIN_REFERENCES_SUPER = new CompileTimeErro
rCode('MIXIN_REFERENCES_SUPER', 62, ""); | 703 static final CompileTimeErrorCode MIXIN_REFERENCES_SUPER = new CompileTimeErro
rCode('MIXIN_REFERENCES_SUPER', 64, ""); |
| 651 /** | 704 /** |
| 652 * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not deno
te a class available | 705 * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not deno
te a class available |
| 653 * in the immediately enclosing scope. | 706 * in the immediately enclosing scope. |
| 654 */ | 707 */ |
| 655 static final CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = new Compil
eTimeErrorCode('MIXIN_WITH_NON_CLASS_SUPERCLASS', 63, ""); | 708 static final CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = new Compil
eTimeErrorCode('MIXIN_WITH_NON_CLASS_SUPERCLASS', 65, ""); |
| 656 /** | 709 /** |
| 657 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Th
en <i>k</i> may | 710 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Th
en <i>k</i> may |
| 658 * include at most one superinitializer in its initializer list or a compile t
ime error occurs. | 711 * include at most one superinitializer in its initializer list or a compile t
ime error occurs. |
| 659 */ | 712 */ |
| 660 static final CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = new CompileTim
eErrorCode('MULTIPLE_SUPER_INITIALIZERS', 64, ""); | 713 static final CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = new CompileTim
eErrorCode('MULTIPLE_SUPER_INITIALIZERS', 66, ""); |
| 661 /** | 714 /** |
| 662 * 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 | 715 * 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 |
| 663 * parameters. | 716 * parameters. |
| 664 * @param typeName the name of the type being referenced (<i>S</i>) | 717 * @param typeName the name of the type being referenced (<i>S</i>) |
| 665 * @param argumentCount the number of type arguments provided | 718 * @param argumentCount the number of type arguments provided |
| 666 * @param parameterCount the number of type parameters that were declared | 719 * @param parameterCount the number of type parameters that were declared |
| 667 */ | 720 */ |
| 668 static final CompileTimeErrorCode NEW_WITH_INVALID_TYPE_PARAMETERS = new Compi
leTimeErrorCode('NEW_WITH_INVALID_TYPE_PARAMETERS', 65, "The type '%s' is declar
ed with %d type parameters, but %d type arguments were given"); | 721 static final CompileTimeErrorCode NEW_WITH_INVALID_TYPE_PARAMETERS = new Compi
leTimeErrorCode('NEW_WITH_INVALID_TYPE_PARAMETERS', 67, "The type '%s' is declar
ed with %d type parameters, but %d type arguments were given"); |
| 669 /** | 722 /** |
| 670 * 13.2 Expression Statements: It is a compile-time error if a non-constant ma
p literal that has | 723 * 13.2 Expression Statements: It is a compile-time error if a non-constant ma
p literal that has |
| 671 * no explicit type arguments appears in a place where a statement is expected
. | 724 * no explicit type arguments appears in a place where a statement is expected
. |
| 672 */ | 725 */ |
| 673 static final CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = new
CompileTimeErrorCode('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 66, ""); | 726 static final CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = new
CompileTimeErrorCode('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 68, ""); |
| 674 /** | 727 /** |
| 675 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub
>11</sub> … | 728 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub
>11</sub> … |
| 676 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> … label<sub>n1
</sub> … | 729 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> … label<sub>n1
</sub> … |
| 677 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s
ub>}</i> or the form | 730 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s
ub>}</i> or the form |
| 678 * <i>switch (e) { label<sub>11</sub> … label<sub>1j1</sub> case e<sub>
1</sub>: | 731 * <i>switch (e) { label<sub>11</sub> … label<sub>1j1</sub> case e<sub>
1</sub>: |
| 679 * s<sub>1</sub> … label<sub>n1</sub> … label<sub>njn</sub> case
e<sub>n</sub>: | 732 * s<sub>1</sub> … label<sub>n1</sub> … label<sub>njn</sub> case
e<sub>n</sub>: |
| 680 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub>
k</sub></i> are not | 733 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub>
k</sub></i> are not |
| 681 * compile-time constants, for all <i>1 <= k <= n</i>. | 734 * compile-time constants, for all <i>1 <= k <= n</i>. |
| 682 */ | 735 */ |
| 683 static final CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = new CompileTi
meErrorCode('NON_CONSTANT_CASE_EXPRESSION', 67, ""); | 736 static final CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = new CompileTi
meErrorCode('NON_CONSTANT_CASE_EXPRESSION', 69, ""); |
| 684 /** | 737 /** |
| 685 * 6.2.2 Optional Formals: It is a compile-time error if the default value of
an optional | 738 * 6.2.2 Optional Formals: It is a compile-time error if the default value of
an optional |
| 686 * parameter is not a compile-time constant. | 739 * parameter is not a compile-time constant. |
| 687 */ | 740 */ |
| 688 static final CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = new CompileTime
ErrorCode('NON_CONSTANT_DEFAULT_VALUE', 68, ""); | 741 static final CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = new CompileTime
ErrorCode('NON_CONSTANT_DEFAULT_VALUE', 70, ""); |
| 689 /** | 742 /** |
| 690 * 12.6 Lists: It is a compile time error if an element of a constant list lit
eral is not a | 743 * 12.6 Lists: It is a compile time error if an element of a constant list lit
eral is not a |
| 691 * compile-time constant. | 744 * compile-time constant. |
| 692 */ | 745 */ |
| 693 static final CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = new CompileTimeE
rrorCode('NON_CONSTANT_LIST_ELEMENT', 69, ""); | 746 static final CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = new CompileTimeE
rrorCode('NON_CONSTANT_LIST_ELEMENT', 71, ""); |
| 694 /** | 747 /** |
| 695 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map | 748 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map |
| 696 * literal is not a compile-time constant. | 749 * literal is not a compile-time constant. |
| 697 */ | 750 */ |
| 698 static final CompileTimeErrorCode NON_CONSTANT_MAP_KEY = new CompileTimeErrorC
ode('NON_CONSTANT_MAP_KEY', 70, ""); | 751 static final CompileTimeErrorCode NON_CONSTANT_MAP_KEY = new CompileTimeErrorC
ode('NON_CONSTANT_MAP_KEY', 72, ""); |
| 699 /** | 752 /** |
| 700 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map | 753 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map |
| 701 * literal is not a compile-time constant. | 754 * literal is not a compile-time constant. |
| 702 */ | 755 */ |
| 703 static final CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = new CompileTimeErro
rCode('NON_CONSTANT_MAP_VALUE', 71, ""); | 756 static final CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = new CompileTimeErro
rCode('NON_CONSTANT_MAP_VALUE', 73, ""); |
| 704 /** | 757 /** |
| 705 * 7.6.3 Constant Constructors: Any expression that appears within the initial
izer list of a | 758 * 7.6.3 Constant Constructors: Any expression that appears within the initial
izer list of a |
| 706 * constant constructor must be a potentially constant expression, or a compil
e-time error occurs. | 759 * constant constructor must be a potentially constant expression, or a compil
e-time error occurs. |
| 707 */ | 760 */ |
| 708 static final CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = new Comp
ileTimeErrorCode('NON_CONSTANT_VALUE_IN_INITIALIZER', 72, ""); | 761 static final CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = new Comp
ileTimeErrorCode('NON_CONSTANT_VALUE_IN_INITIALIZER', 74, ""); |
| 709 /** | 762 /** |
| 710 * 7.9 Superclasses: It is a compile-time error to specify an extends clause f
or class Object. | 763 * 7.9 Superclasses: It is a compile-time error to specify an extends clause f
or class Object. |
| 711 */ | 764 */ |
| 712 static final CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = new Com
pileTimeErrorCode('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 73, ""); | 765 static final CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = new Com
pileTimeErrorCode('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 75, ""); |
| 713 /** | 766 /** |
| 714 * 7.1.1 Operators: It is a compile-time error to declare an optional paramete
r in an operator. | 767 * 7.1.1 Operators: It is a compile-time error to declare an optional paramete
r in an operator. |
| 715 */ | 768 */ |
| 716 static final CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = new Compile
TimeErrorCode('OPTIONAL_PARAMETER_IN_OPERATOR', 74, ""); | 769 static final CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = new Compile
TimeErrorCode('OPTIONAL_PARAMETER_IN_OPERATOR', 76, ""); |
| 717 /** | 770 /** |
| 718 * 8 Interfaces: It is a compile-time error if an interface member <i>m1</i> o
verrides an | 771 * 8 Interfaces: It is a compile-time error if an interface member <i>m1</i> o
verrides an |
| 719 * interface member <i>m2</i> and <i>m1</i> does not declare all the named par
ameters declared by | 772 * interface member <i>m2</i> and <i>m1</i> does not declare all the named par
ameters declared by |
| 720 * <i>m2</i> in the same order. | 773 * <i>m2</i> in the same order. |
| 721 */ | 774 */ |
| 722 static final CompileTimeErrorCode OVERRIDE_MISSING_NAMED_PARAMETERS = new Comp
ileTimeErrorCode('OVERRIDE_MISSING_NAMED_PARAMETERS', 75, ""); | 775 static final CompileTimeErrorCode OVERRIDE_MISSING_NAMED_PARAMETERS = new Comp
ileTimeErrorCode('OVERRIDE_MISSING_NAMED_PARAMETERS', 77, ""); |
| 723 /** | 776 /** |
| 724 * 8 Interfaces: It is a compile-time error if an interface member <i>m1</i> o
verrides an | 777 * 8 Interfaces: It is a compile-time error if an interface member <i>m1</i> o
verrides an |
| 725 * interface member <i>m2</i> and <i>m1</i> has a different number of required
parameters than | 778 * interface member <i>m2</i> and <i>m1</i> has a different number of required
parameters than |
| 726 * <i>m2</i>. | 779 * <i>m2</i>. |
| 727 */ | 780 */ |
| 728 static final CompileTimeErrorCode OVERRIDE_MISSING_REQUIRED_PARAMETERS = new C
ompileTimeErrorCode('OVERRIDE_MISSING_REQUIRED_PARAMETERS', 76, ""); | 781 static final CompileTimeErrorCode OVERRIDE_MISSING_REQUIRED_PARAMETERS = new C
ompileTimeErrorCode('OVERRIDE_MISSING_REQUIRED_PARAMETERS', 78, ""); |
| 729 /** | 782 /** |
| 730 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part | 783 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part |
| 731 * declaration. | 784 * declaration. |
| 732 */ | 785 */ |
| 733 static final CompileTimeErrorCode PART_OF_NON_PART = new CompileTimeErrorCode(
'PART_OF_NON_PART', 77, ""); | 786 static final CompileTimeErrorCode PART_OF_NON_PART = new CompileTimeErrorCode(
'PART_OF_NON_PART', 79, ""); |
| 734 /** | 787 /** |
| 735 * 14.1 Imports: It is a compile-time error if the current library declares a
top-level member | 788 * 14.1 Imports: It is a compile-time error if the current library declares a
top-level member |
| 736 * named <i>p</i>. | 789 * named <i>p</i>. |
| 737 */ | 790 */ |
| 738 static final CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = new
CompileTimeErrorCode('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 78, ""); | 791 static final CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = new
CompileTimeErrorCode('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 80, ""); |
| 739 /** | 792 /** |
| 740 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named o
ptional parameter | 793 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named o
ptional parameter |
| 741 * begins with an ‘_’ character. | 794 * begins with an ‘_’ character. |
| 742 */ | 795 */ |
| 743 static final CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = new CompileTime
ErrorCode('PRIVATE_OPTIONAL_PARAMETER', 79, ""); | 796 static final CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = new CompileTime
ErrorCode('PRIVATE_OPTIONAL_PARAMETER', 81, ""); |
| 744 /** | 797 /** |
| 745 * 12.1 Constants: It is a compile-time error if the value of a compile-time c
onstant expression | 798 * 12.1 Constants: It is a compile-time error if the value of a compile-time c
onstant expression |
| 746 * depends on itself. | 799 * depends on itself. |
| 747 */ | 800 */ |
| 748 static final CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = new Compil
eTimeErrorCode('RECURSIVE_COMPILE_TIME_CONSTANT', 80, ""); | 801 static final CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = new Compil
eTimeErrorCode('RECURSIVE_COMPILE_TIME_CONSTANT', 82, ""); |
| 749 /** | 802 /** |
| 750 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr
uctor redirects to | 803 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr
uctor redirects to |
| 751 * itself, either directly or indirectly via a sequence of redirections. | 804 * itself, either directly or indirectly via a sequence of redirections. |
| 752 */ | 805 */ |
| 753 static final CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = new CompileTime
ErrorCode('RECURSIVE_FACTORY_REDIRECT', 81, ""); | 806 static final CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = new CompileTime
ErrorCode('RECURSIVE_FACTORY_REDIRECT', 83, ""); |
| 754 /** | 807 /** |
| 755 * 15.3.1 Typedef: It is a compile-time error if a typedef refers to itself vi
a a chain of | 808 * 15.3.1 Typedef: It is a compile-time error if a typedef refers to itself vi
a a chain of |
| 756 * references that does not include a class type. | 809 * references that does not include a class type. |
| 757 */ | 810 */ |
| 758 static final CompileTimeErrorCode RECURSIVE_FUNCTION_TYPE_ALIAS = new CompileT
imeErrorCode('RECURSIVE_FUNCTION_TYPE_ALIAS', 82, ""); | 811 static final CompileTimeErrorCode RECURSIVE_FUNCTION_TYPE_ALIAS = new CompileT
imeErrorCode('RECURSIVE_FUNCTION_TYPE_ALIAS', 84, ""); |
| 759 /** | 812 /** |
| 760 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. | 813 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. |
| 761 */ | 814 */ |
| 762 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = new Compil
eTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE', 83, ""); | 815 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = new Compil
eTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE', 85, ""); |
| 763 /** | 816 /** |
| 764 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th
e const modifier but | 817 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th
e const modifier but |
| 765 * <i>k’</i> is not a constant constructor. | 818 * <i>k’</i> is not a constant constructor. |
| 766 */ | 819 */ |
| 767 static final CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = new Comp
ileTimeErrorCode('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 84, ""); | 820 static final CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = new Comp
ileTimeErrorCode('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 86, ""); |
| 768 /** | 821 /** |
| 769 * 13.3 Local Variable Declaration: It is a compile-time error if <i>e</i> ref
ers to the name | 822 * 13.3 Local Variable Declaration: It is a compile-time error if <i>e</i> ref
ers to the name |
| 770 * <i>v</i> or the name <i>v=</i>. | 823 * <i>v</i> or the name <i>v=</i>. |
| 771 */ | 824 */ |
| 772 static final CompileTimeErrorCode REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZE
R = new CompileTimeErrorCode('REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER', 85
, ""); | 825 static final CompileTimeErrorCode REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZE
R = new CompileTimeErrorCode('REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER', 87
, ""); |
| 773 /** | 826 /** |
| 774 * 16.1.1 Reserved Words: A reserved word may not be used as an identifier; it
is a compile-time | 827 * 16.1.1 Reserved Words: A reserved word may not be used as an identifier; it
is a compile-time |
| 775 * error if a reserved word is used where an identifier is expected. | 828 * error if a reserved word is used where an identifier is expected. |
| 776 */ | 829 */ |
| 777 static final CompileTimeErrorCode RESERVED_WORD_AS_IDENTIFIER = new CompileTim
eErrorCode('RESERVED_WORD_AS_IDENTIFIER', 86, ""); | 830 static final CompileTimeErrorCode RESERVED_WORD_AS_IDENTIFIER = new CompileTim
eErrorCode('RESERVED_WORD_AS_IDENTIFIER', 88, ""); |
| 778 /** | 831 /** |
| 779 * 13.11 Return: It is a compile-time error if a return statement of the form
<i>return e;</i> | 832 * 13.11 Return: It is a compile-time error if a return statement of the form
<i>return e;</i> |
| 780 * appears in a generative constructor. | 833 * appears in a generative constructor. |
| 781 */ | 834 */ |
| 782 static final CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = new Compi
leTimeErrorCode('RETURN_IN_GENERATIVE_CONSTRUCTOR', 87, ""); | 835 static final CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = new Compi
leTimeErrorCode('RETURN_IN_GENERATIVE_CONSTRUCTOR', 89, ""); |
| 783 /** | 836 /** |
| 784 * 6.1 Function Declarations: It is a compile-time error to preface a function
declaration with | 837 * 6.1 Function Declarations: It is a compile-time error to preface a function
declaration with |
| 785 * the built-in identifier static. | 838 * the built-in identifier static. |
| 786 */ | 839 */ |
| 787 static final CompileTimeErrorCode STATIC_TOP_LEVEL_FUNCTION = new CompileTimeE
rrorCode('STATIC_TOP_LEVEL_FUNCTION', 88, ""); | 840 static final CompileTimeErrorCode STATIC_TOP_LEVEL_FUNCTION = new CompileTimeE
rrorCode('STATIC_TOP_LEVEL_FUNCTION', 90, ""); |
| 788 /** | 841 /** |
| 789 * 5 Variables: It is a compile-time error to preface a top level variable dec
laration with the | 842 * 5 Variables: It is a compile-time error to preface a top level variable dec
laration with the |
| 790 * built-in identifier static. | 843 * built-in identifier static. |
| 791 */ | 844 */ |
| 792 static final CompileTimeErrorCode STATIC_TOP_LEVEL_VARIABLE = new CompileTimeE
rrorCode('STATIC_TOP_LEVEL_VARIABLE', 89, ""); | 845 static final CompileTimeErrorCode STATIC_TOP_LEVEL_VARIABLE = new CompileTimeE
rrorCode('STATIC_TOP_LEVEL_VARIABLE', 91, ""); |
| 793 /** | 846 /** |
| 794 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form | 847 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form |
| 795 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … | 848 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … |
| 796 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe
r method invocation | 849 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe
r method invocation |
| 797 * occurs in a top-level function or variable initializer, in an instance vari
able initializer or | 850 * occurs in a top-level function or variable initializer, in an instance vari
able initializer or |
| 798 * initializer list, in class Object, in a factory constructor, or in a static
method or variable | 851 * initializer list, in class Object, in a factory constructor, or in a static
method or variable |
| 799 * initializer. | 852 * initializer. |
| 800 */ | 853 */ |
| 801 static final CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = new CompileTimeEr
rorCode('SUPER_IN_INVALID_CONTEXT', 90, ""); | 854 static final CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = new CompileTimeEr
rorCode('SUPER_IN_INVALID_CONTEXT', 92, ""); |
| 802 /** | 855 /** |
| 803 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time | 856 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time |
| 804 * error if a generative constructor of class Object includes a superinitializ
er. | 857 * error if a generative constructor of class Object includes a superinitializ
er. |
| 805 */ | 858 */ |
| 806 static final CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = new CompileTim
eErrorCode('SUPER_INITIALIZER_IN_OBJECT', 91, ""); | 859 static final CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = new CompileTim
eErrorCode('SUPER_INITIALIZER_IN_OBJECT', 93, ""); |
| 807 /** | 860 /** |
| 808 * 12.8 Throw: It is a compile-time error if an expression of the form throw;
is not enclosed | 861 * 12.8 Throw: It is a compile-time error if an expression of the form throw;
is not enclosed |
| 809 * within a on-catch clause. | 862 * within a on-catch clause. |
| 810 */ | 863 */ |
| 811 static final CompileTimeErrorCode THROW_WITHOUT_VALUE_OUTSIDE_ON = new Compile
TimeErrorCode('THROW_WITHOUT_VALUE_OUTSIDE_ON', 92, ""); | 864 static final CompileTimeErrorCode THROW_WITHOUT_VALUE_OUTSIDE_ON = new Compile
TimeErrorCode('THROW_WITHOUT_VALUE_OUTSIDE_ON', 94, ""); |
| 812 /** | 865 /** |
| 813 * 12.11 Instance Creation: It is a compile-time error if a constructor of a n
on-generic type | 866 * 12.11 Instance Creation: It is a compile-time error if a constructor of a n
on-generic type |
| 814 * invoked by a new expression or a constant object expression is passed any t
ype arguments. | 867 * invoked by a new expression or a constant object expression is passed any t
ype arguments. |
| 815 * <p> | 868 * <p> |
| 816 * 12.32 Type Cast: It is a compile-time error if <i>T</i> is a parameterized
type of the form | 869 * 12.32 Type Cast: It is a compile-time error if <i>T</i> is a parameterized
type of the form |
| 817 * <i>G<T<sub>1</sub>, …, T<sub>n</sub>></i> and <i>G</i> is not
a generic type with | 870 * <i>G<T<sub>1</sub>, …, T<sub>n</sub>></i> and <i>G</i> is not
a generic type with |
| 818 * <i>n</i> type parameters. | 871 * <i>n</i> type parameters. |
| 819 */ | 872 */ |
| 820 static final CompileTimeErrorCode TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS = new C
ompileTimeErrorCode('TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS', 93, ""); | 873 static final CompileTimeErrorCode TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS = new C
ompileTimeErrorCode('TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS', 95, ""); |
| 821 /** | 874 /** |
| 822 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears | 875 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears |
| 823 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is | 876 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is |
| 824 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> | 877 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> |
| 825 * (respectively <i>S.id</i>) | 878 * (respectively <i>S.id</i>) |
| 826 */ | 879 */ |
| 827 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = new C
ompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 94, ""); | 880 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = new C
ompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 96, ""); |
| 828 /** | 881 /** |
| 829 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Ea
ch final instance | 882 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Ea
ch final instance |
| 830 * variable <i>f</i> declared in the immediately enclosing class must have an
initializer in | 883 * variable <i>f</i> declared in the immediately enclosing class must have an
initializer in |
| 831 * <i>k</i>'s initializer list unless it has already been initialized by one o
f the following | 884 * <i>k</i>'s initializer list unless it has already been initialized by one o
f the following |
| 832 * means: | 885 * means: |
| 833 * <ol> | 886 * <ol> |
| 834 * <li>Initialization at the declaration of <i>f</i>. | 887 * <li>Initialization at the declaration of <i>f</i>. |
| 835 * <li>Initialization by means of an initializing formal of <i>k</i>. | 888 * <li>Initialization by means of an initializing formal of <i>k</i>. |
| 836 * </ol> | 889 * </ol> |
| 837 * or a compile-time error occurs. | 890 * or a compile-time error occurs. |
| 838 */ | 891 */ |
| 839 static final CompileTimeErrorCode UNINITIALIZED_FINAL_FIELD = new CompileTimeE
rrorCode('UNINITIALIZED_FINAL_FIELD', 95, ""); | 892 static final CompileTimeErrorCode UNINITIALIZED_FINAL_FIELD = new CompileTimeE
rrorCode('UNINITIALIZED_FINAL_FIELD', 97, ""); |
| 840 /** | 893 /** |
| 841 * 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time
constant, or if | 894 * 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time
constant, or if |
| 842 * <i>x</i> involves string interpolation. | 895 * <i>x</i> involves string interpolation. |
| 843 * <p> | 896 * <p> |
| 844 * 14.3 Parts: It is a compile-time error if <i>s</i> is not a compile-time co
nstant, or if | 897 * 14.3 Parts: It is a compile-time error if <i>s</i> is not a compile-time co
nstant, or if |
| 845 * <i>s</i> involves string interpolation. | 898 * <i>s</i> involves string interpolation. |
| 846 * <p> | 899 * <p> |
| 847 * 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that d
escribes a URI is | 900 * 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that d
escribes a URI is |
| 848 * not a compile-time constant, or if <i>x</i> involves string interpolation. | 901 * not a compile-time constant, or if <i>x</i> involves string interpolation. |
| 849 */ | 902 */ |
| 850 static final CompileTimeErrorCode URI_WITH_INTERPOLATION = new CompileTimeErro
rCode('URI_WITH_INTERPOLATION', 96, "URIs cannot use string interpolation"); | 903 static final CompileTimeErrorCode URI_WITH_INTERPOLATION = new CompileTimeErro
rCode('URI_WITH_INTERPOLATION', 98, "URIs cannot use string interpolation"); |
| 851 /** | 904 /** |
| 852 * 7.1.1 Operators: It is a compile-time error if the arity of the user-declar
ed operator []= is | 905 * 7.1.1 Operators: It is a compile-time error if the arity of the user-declar
ed operator []= is |
| 853 * not 2. It is a compile time error if the arity of a user-declared operator
with one of the | 906 * not 2. It is a compile time error if the arity of a user-declared operator
with one of the |
| 854 * names: <, >, <=, >=, ==, +, /, ~/, *, %, |, ^, &, <<, >
;>, [] is not 1. | 907 * names: <, >, <=, >=, ==, +, /, ~/, *, %, |, ^, &, <<, >
;>, [] is not 1. |
| 855 * It is a compile time error if the arity of the user-declared operator - is
not 0 or 1. It is a | 908 * It is a compile time error if the arity of the user-declared operator - is
not 0 or 1. It is a |
| 856 * compile time error if the arity of the user-declared operator ~ is not 0. | 909 * compile time error if the arity of the user-declared operator ~ is not 0. |
| 857 */ | 910 */ |
| 858 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = ne
w CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 97, ""); | 911 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = ne
w CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 99, ""); |
| 859 /** | 912 /** |
| 860 * 7.3 Setters: It is a compile-time error if a setter’s formal parameter li
st does not include | 913 * 7.3 Setters: It is a compile-time error if a setter’s formal parameter li
st does not include |
| 861 * exactly one required formal parameter <i>p</i>. | 914 * exactly one required formal parameter <i>p</i>. |
| 862 */ | 915 */ |
| 863 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = new
CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 98, ""); | 916 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = new
CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 100, ""); |
| 864 /** | 917 /** |
| 865 * 12.11 Instance Creation: It is a compile-time error if a constructor of a g
eneric type with | 918 * 12.11 Instance Creation: It is a compile-time error if a constructor of a g
eneric type with |
| 866 * <i>n</i> type parameters invoked by a new expression or a constant object e
xpression is passed | 919 * <i>n</i> type parameters invoked by a new expression or a constant object e
xpression is passed |
| 867 * <i>m</i> type arguments where <i>m != n</i>. | 920 * <i>m</i> type arguments where <i>m != n</i>. |
| 868 * <p> | 921 * <p> |
| 869 * 12.31 Type Test: It is a compile-time error if <i>T</i> is a parameterized
type of the form | 922 * 12.31 Type Test: It is a compile-time error if <i>T</i> is a parameterized
type of the form |
| 870 * <i>G<T<sub>1</sub>, …, T<sub>n</sub>></i> and <i>G</i> is not
a generic type with | 923 * <i>G<T<sub>1</sub>, …, T<sub>n</sub>></i> and <i>G</i> is not
a generic type with |
| 871 * <i>n</i> type parameters. | 924 * <i>n</i> type parameters. |
| 872 */ | 925 */ |
| 873 static final CompileTimeErrorCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = new Compile
TimeErrorCode('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 99, ""); | 926 static final CompileTimeErrorCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = new Compile
TimeErrorCode('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 101, ""); |
| 874 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_MEMBER, CONST_CO
NSTRUCTOR_WITH_NON_FINAL_FIELD, CONST_FORMAL_PARAMETER, CONST_INITIALIZED_WITH_N
ON_CONSTANT_VALUE, CONST_EVAL_THROWS_EXCEPTION, CONST_WITH_INVALID_TYPE_PARAMETE
RS, CONST_WITH_NON_CONST, CONST_WITH_NON_CONSTANT_ARGUMENT, CONST_WITH_NON_TYPE,
CONST_WITH_TYPE_PARAMETERS, CONST_WITH_UNDEFINED_CONSTRUCTOR, DEFAULT_VALUE_IN_
FUNCTION_TYPE_ALIAS, DUPLICATE_DEFINITION, DUPLICATE_MEMBER_NAME, DUPLICATE_MEMB
ER_NAME_INSTANCE_STATIC, DUPLICATE_NAMED_ARGUMENT, EXPORT_OF_NON_LIBRARY, EXTEND
S_NON_CLASS, EXTENDS_OR_IMPLEMENTS_DISALLOWED_CLASS, FIELD_INITIALIZED_BY_MULTIP
LE_INITIALIZERS, FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION, FIELD_INITIAL
IZED_IN_PARAMETER_AND_INITIALIZER, FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR, FINAL_
INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR, FINAL_INITIALIZED_MULTIPLE_TIMES, FI
NAL_NOT_INITIALIZED, GETTER_AND_METHOD_WITH_SAME_NAME, IMPLEMENTS_DYNAMIC, IMPLE
MENTS_NON_CLASS, IMPLEMENTS_REPEATED, IMPLEMENTS_SELF, IMPORT_DUPLICATED_LIBRARY
_NAME, IMPORT_OF_NON_LIBRARY, INCONSITENT_CASE_EXPRESSION_TYPES, INITIALIZER_FOR
_NON_EXISTANT_FIELD, INVALID_CONSTRUCTOR_NAME, INVALID_FACTORY_NAME_NOT_A_CLASS,
INVALID_OVERRIDE_DEFAULT_VALUE, INVALID_OVERRIDE_NAMED, INVALID_OVERRIDE_POSITI
ONAL, INVALID_OVERRIDE_REQUIRED, INVALID_REFERENCE_TO_THIS, INVALID_TYPE_ARGUMEN
T_FOR_KEY, INVALID_TYPE_ARGUMENT_IN_CONST_LIST, INVALID_TYPE_ARGUMENT_IN_CONST_M
AP, INVALID_VARIABLE_IN_INITIALIZER, LABEL_IN_OUTER_SCOPE, LABEL_UNDEFINED, MEMB
ER_WITH_CLASS_NAME, MIXIN_DECLARES_CONSTRUCTOR, MIXIN_INHERITS_FROM_NOT_OBJECT,
MIXIN_OF_NON_CLASS, MIXIN_OF_NON_MIXIN, MIXIN_REFERENCES_SUPER, MIXIN_WITH_NON_C
LASS_SUPERCLASS, MULTIPLE_SUPER_INITIALIZERS, NEW_WITH_INVALID_TYPE_PARAMETERS,
NON_CONST_MAP_AS_EXPRESSION_STATEMENT, NON_CONSTANT_CASE_EXPRESSION, NON_CONSTAN
T_DEFAULT_VALUE, NON_CONSTANT_LIST_ELEMENT, NON_CONSTANT_MAP_KEY, NON_CONSTANT_M
AP_VALUE, NON_CONSTANT_VALUE_IN_INITIALIZER, OBJECT_CANNOT_EXTEND_ANOTHER_CLASS,
OPTIONAL_PARAMETER_IN_OPERATOR, OVERRIDE_MISSING_NAMED_PARAMETERS, OVERRIDE_MIS
SING_REQUIRED_PARAMETERS, PART_OF_NON_PART, PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBE
R, PRIVATE_OPTIONAL_PARAMETER, RECURSIVE_COMPILE_TIME_CONSTANT, RECURSIVE_FACTOR
Y_REDIRECT, RECURSIVE_FUNCTION_TYPE_ALIAS, RECURSIVE_INTERFACE_INHERITANCE, REDI
RECT_TO_NON_CONST_CONSTRUCTOR, REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER, RE
SERVED_WORD_AS_IDENTIFIER, RETURN_IN_GENERATIVE_CONSTRUCTOR, STATIC_TOP_LEVEL_FU
NCTION, STATIC_TOP_LEVEL_VARIABLE, SUPER_IN_INVALID_CONTEXT, SUPER_INITIALIZER_I
N_OBJECT, THROW_WITHOUT_VALUE_OUTSIDE_ON, TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS,
UNDEFINED_CONSTRUCTOR_IN_INITIALIZER, UNINITIALIZED_FINAL_FIELD, URI_WITH_INTERP
OLATION, WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR, WRONG_NUMBER_OF_PARAMETERS_FOR
_SETTER, WRONG_NUMBER_OF_TYPE_ARGUMENTS]; | 927 static final List<CompileTimeErrorCode> values = [AMBIGUOUS_EXPORT, AMBIGUOUS_
IMPORT, ARGUMENT_DEFINITION_TEST_NON_PARAMETER, BUILT_IN_IDENTIFIER_AS_TYPE, BUI
LT_IN_IDENTIFIER_AS_TYPE_NAME, BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, BUILT_IN_IDE
NTIFIER_AS_TYPE_VARIABLE_NAME, CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, COMPILE_T
IME_CONSTANT_RAISES_EXCEPTION, COMPILE_TIME_CONSTANT_RAISES_EXCEPTION_DIVIDE_BY_
ZERO, CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, CONFLICTING_CONSTRUCTOR_NAME_AND_M
ETHOD, CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, CONST_FORMAL_PARAMETER, CONST_INI
TIALIZED_WITH_NON_CONSTANT_VALUE, CONST_EVAL_THROWS_EXCEPTION, CONST_WITH_INVALI
D_TYPE_PARAMETERS, CONST_WITH_NON_CONST, CONST_WITH_NON_CONSTANT_ARGUMENT, CONST
_WITH_NON_TYPE, CONST_WITH_TYPE_PARAMETERS, CONST_WITH_UNDEFINED_CONSTRUCTOR, DE
FAULT_VALUE_IN_FUNCTION_TYPE_ALIAS, DUPLICATE_DEFINITION, DUPLICATE_MEMBER_NAME,
DUPLICATE_MEMBER_NAME_INSTANCE_STATIC, DUPLICATE_NAMED_ARGUMENT, EXPORT_OF_NON_
LIBRARY, EXTENDS_NON_CLASS, EXTENDS_OR_IMPLEMENTS_DISALLOWED_CLASS, FIELD_INITIA
LIZED_BY_MULTIPLE_INITIALIZERS, FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION
, FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER, FIELD_INITIALIZER_OUTSIDE_CONS
TRUCTOR, FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR, FINAL_INITIALIZED_MUL
TIPLE_TIMES, FINAL_NOT_INITIALIZED, GETTER_AND_METHOD_WITH_SAME_NAME, IMPLEMENTS
_DYNAMIC, IMPLEMENTS_NON_CLASS, IMPLEMENTS_REPEATED, IMPLEMENTS_SELF, IMPORT_DUP
LICATED_LIBRARY_NAME, IMPORT_OF_NON_LIBRARY, INCONSITENT_CASE_EXPRESSION_TYPES,
INITIALIZER_FOR_NON_EXISTANT_FIELD, INVALID_CONSTRUCTOR_NAME, INVALID_FACTORY_NA
ME_NOT_A_CLASS, INVALID_OVERRIDE_DEFAULT_VALUE, INVALID_OVERRIDE_NAMED, INVALID_
OVERRIDE_POSITIONAL, INVALID_OVERRIDE_REQUIRED, INVALID_REFERENCE_TO_THIS, INVAL
ID_TYPE_ARGUMENT_FOR_KEY, INVALID_TYPE_ARGUMENT_IN_CONST_LIST, INVALID_TYPE_ARGU
MENT_IN_CONST_MAP, INVALID_VARIABLE_IN_INITIALIZER, LABEL_IN_OUTER_SCOPE, LABEL_
UNDEFINED, MEMBER_WITH_CLASS_NAME, MIXIN_DECLARES_CONSTRUCTOR, MIXIN_INHERITS_FR
OM_NOT_OBJECT, MIXIN_OF_NON_CLASS, MIXIN_OF_NON_MIXIN, MIXIN_REFERENCES_SUPER, M
IXIN_WITH_NON_CLASS_SUPERCLASS, MULTIPLE_SUPER_INITIALIZERS, NEW_WITH_INVALID_TY
PE_PARAMETERS, NON_CONST_MAP_AS_EXPRESSION_STATEMENT, NON_CONSTANT_CASE_EXPRESSI
ON, NON_CONSTANT_DEFAULT_VALUE, NON_CONSTANT_LIST_ELEMENT, NON_CONSTANT_MAP_KEY,
NON_CONSTANT_MAP_VALUE, NON_CONSTANT_VALUE_IN_INITIALIZER, OBJECT_CANNOT_EXTEND
_ANOTHER_CLASS, OPTIONAL_PARAMETER_IN_OPERATOR, OVERRIDE_MISSING_NAMED_PARAMETER
S, OVERRIDE_MISSING_REQUIRED_PARAMETERS, PART_OF_NON_PART, PREFIX_COLLIDES_WITH_
TOP_LEVEL_MEMBER, PRIVATE_OPTIONAL_PARAMETER, RECURSIVE_COMPILE_TIME_CONSTANT, R
ECURSIVE_FACTORY_REDIRECT, RECURSIVE_FUNCTION_TYPE_ALIAS, RECURSIVE_INTERFACE_IN
HERITANCE, REDIRECT_TO_NON_CONST_CONSTRUCTOR, REFERENCE_TO_DECLARED_VARIABLE_IN_
INITIALIZER, RESERVED_WORD_AS_IDENTIFIER, RETURN_IN_GENERATIVE_CONSTRUCTOR, STAT
IC_TOP_LEVEL_FUNCTION, STATIC_TOP_LEVEL_VARIABLE, SUPER_IN_INVALID_CONTEXT, SUPE
R_INITIALIZER_IN_OBJECT, THROW_WITHOUT_VALUE_OUTSIDE_ON, TYPE_ARGUMENTS_FOR_NON_
GENERIC_CLASS, UNDEFINED_CONSTRUCTOR_IN_INITIALIZER, UNINITIALIZED_FINAL_FIELD,
URI_WITH_INTERPOLATION, WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR, WRONG_NUMBER_OF
_PARAMETERS_FOR_SETTER, WRONG_NUMBER_OF_TYPE_ARGUMENTS]; |
| 875 final String __name; | 928 final String __name; |
| 876 final int __ordinal; | 929 final int __ordinal; |
| 930 int get ordinal => __ordinal; |
| 877 /** | 931 /** |
| 878 * The message template used to create the message to be displayed for this er
ror. | 932 * The message template used to create the message to be displayed for this er
ror. |
| 879 */ | 933 */ |
| 880 String _message; | 934 String _message; |
| 881 /** | 935 /** |
| 882 * Initialize a newly created error code to have the given message. | 936 * Initialize a newly created error code to have the given message. |
| 883 * @param message the message template used to create the message to be displa
yed for the error | 937 * @param message the message template used to create the message to be displa
yed for the error |
| 884 */ | 938 */ |
| 885 CompileTimeErrorCode(this.__name, this.__ordinal, String message) { | 939 CompileTimeErrorCode(this.__name, this.__ordinal, String message) { |
| 886 this._message = message; | 940 this._message = message; |
| 887 } | 941 } |
| 888 ErrorSeverity get errorSeverity => ErrorType.COMPILE_TIME_ERROR.severity; | 942 ErrorSeverity get errorSeverity => ErrorType.COMPILE_TIME_ERROR.severity; |
| 889 String get message => _message; | 943 String get message => _message; |
| 890 ErrorType get type => ErrorType.COMPILE_TIME_ERROR; | 944 ErrorType get type => ErrorType.COMPILE_TIME_ERROR; |
| 891 bool needsRecompilation() => true; | 945 bool needsRecompilation() => true; |
| 892 String toString() => __name; | 946 String toString() => __name; |
| 893 } | 947 } |
| 894 /** | 948 /** |
| 895 * The enumeration {@code StaticWarningCode} defines the error codes used for st
atic warnings. The | 949 * The enumeration {@code StaticWarningCode} defines the error codes used for st
atic warnings. The |
| 896 * convention for this class is for the name of the error code to indicate the p
roblem that caused | 950 * convention for this class is for the name of the error code to indicate the p
roblem that caused |
| 897 * the error to be generated and for the error message to explain what is wrong
and, when | 951 * the error to be generated and for the error message to explain what is wrong
and, when |
| 898 * appropriate, how the problem can be corrected. | 952 * appropriate, how the problem can be corrected. |
| 953 * @coverage dart.engine.error |
| 899 */ | 954 */ |
| 900 class StaticWarningCode implements ErrorCode { | 955 class StaticWarningCode implements ErrorCode { |
| 901 /** | 956 /** |
| 902 * 12.11.1 New: It is a static warning if the static type of <i>a<sub>i</sub>,
1 <= i <= n+ | 957 * 12.11.1 New: It is a static warning if the static type of <i>a<sub>i</sub>,
1 <= i <= n+ |
| 903 * k</i> may not be assigned to the type of the corresponding formal parameter
of the constructor | 958 * k</i> may not be assigned to the type of the corresponding formal parameter
of the constructor |
| 904 * <i>T.id</i> (respectively <i>T</i>). | 959 * <i>T.id</i> (respectively <i>T</i>). |
| 905 * <p> | 960 * <p> |
| 906 * 12.11.2 Const: It is a static warning if the static type of <i>a<sub>i</sub
>, 1 <= i <= | 961 * 12.11.2 Const: It is a static warning if the static type of <i>a<sub>i</sub
>, 1 <= i <= |
| 907 * n+ k</i> may not be assigned to the type of the corresponding formal parame
ter of the | 962 * n+ k</i> may not be assigned to the type of the corresponding formal parame
ter of the |
| 908 * constructor <i>T.id</i> (respectively <i>T</i>). | 963 * constructor <i>T.id</i> (respectively <i>T</i>). |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1187 */ | 1242 */ |
| 1188 static final StaticWarningCode UNDEFINED_SETTER = new StaticWarningCode('UNDEF
INED_SETTER', 45, ""); | 1243 static final StaticWarningCode UNDEFINED_SETTER = new StaticWarningCode('UNDEF
INED_SETTER', 45, ""); |
| 1189 /** | 1244 /** |
| 1190 * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not decl
are a static method | 1245 * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not decl
are a static method |
| 1191 * or getter <i>m</i>. | 1246 * or getter <i>m</i>. |
| 1192 */ | 1247 */ |
| 1193 static final StaticWarningCode UNDEFINED_STATIC_METHOD_OR_GETTER = new StaticW
arningCode('UNDEFINED_STATIC_METHOD_OR_GETTER', 46, ""); | 1248 static final StaticWarningCode UNDEFINED_STATIC_METHOD_OR_GETTER = new StaticW
arningCode('UNDEFINED_STATIC_METHOD_OR_GETTER', 46, ""); |
| 1194 static final List<StaticWarningCode> values = [ARGUMENT_TYPE_NOT_ASSIGNABLE, A
SSIGNMENT_TO_FINAL, CASE_BLOCK_NOT_TERMINATED, CAST_TO_NON_TYPE, COMMENT_REFEREN
CE_CONSTRUCTOR_NOT_VISIBLE, COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE, COMMENT_RE
FERENCE_UNDECLARED_CONSTRUCTOR, COMMENT_REFERENCE_UNDECLARED_IDENTIFIER, COMMENT
_REFERENCE_URI_NOT_LIBRARY, CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, CONFLICTING_INS
TANCE_GETTER_AND_SUPERCLASS_MEMBER, CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_M
EMBER, CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER, CONFLICTING_STATIC_SETTER_
AND_INSTANCE_GETTER, CONST_WITH_ABSTRACT_CLASS, EQUAL_KEYS_IN_MAP, FIELD_INITIAL
IZER_WITH_INVALID_TYPE, INCORRECT_NUMBER_OF_ARGUMENTS, INSTANCE_METHOD_NAME_COLL
IDES_WITH_SUPERCLASS_STATIC, INVALID_FACTORY_NAME, INVALID_OVERRIDE_GETTER_TYPE,
INVALID_OVERRIDE_RETURN_TYPE, INVALID_OVERRIDE_SETTER_RETURN_TYPE, INVOCATION_O
F_NON_FUNCTION, MISMATCHED_GETTER_AND_SETTER_TYPES, NEW_WITH_ABSTRACT_CLASS, NEW
_WITH_NON_TYPE, NEW_WITH_UNDEFINED_CONSTRUCTOR, NON_ABSTRACT_CLASS_INHERITS_ABST
RACT_MEMBER, NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_METHOD, NON_TYPE, NON_TYPE_IN_
CATCH_CLAUSE, NON_VOID_RETURN_FOR_OPERATOR, NON_VOID_RETURN_FOR_SETTER, OVERRIDE
_NOT_SUBTYPE, OVERRIDE_WITH_DIFFERENT_DEFAULT, PART_OF_DIFFERENT_LIBRARY, REDIRE
CT_TO_INVALID_RETURN_TYPE, REDIRECT_TO_MISSING_CONSTRUCTOR, REDIRECT_TO_NON_CLAS
S, RETURN_WITHOUT_VALUE, SWITCH_EXPRESSION_NOT_ASSIGNABLE, UNDEFINED_CLASS, UNDE
FINED_GETTER, UNDEFINED_IDENTIFIER, UNDEFINED_SETTER, UNDEFINED_STATIC_METHOD_OR
_GETTER]; | 1249 static final List<StaticWarningCode> values = [ARGUMENT_TYPE_NOT_ASSIGNABLE, A
SSIGNMENT_TO_FINAL, CASE_BLOCK_NOT_TERMINATED, CAST_TO_NON_TYPE, COMMENT_REFEREN
CE_CONSTRUCTOR_NOT_VISIBLE, COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE, COMMENT_RE
FERENCE_UNDECLARED_CONSTRUCTOR, COMMENT_REFERENCE_UNDECLARED_IDENTIFIER, COMMENT
_REFERENCE_URI_NOT_LIBRARY, CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, CONFLICTING_INS
TANCE_GETTER_AND_SUPERCLASS_MEMBER, CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_M
EMBER, CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER, CONFLICTING_STATIC_SETTER_
AND_INSTANCE_GETTER, CONST_WITH_ABSTRACT_CLASS, EQUAL_KEYS_IN_MAP, FIELD_INITIAL
IZER_WITH_INVALID_TYPE, INCORRECT_NUMBER_OF_ARGUMENTS, INSTANCE_METHOD_NAME_COLL
IDES_WITH_SUPERCLASS_STATIC, INVALID_FACTORY_NAME, INVALID_OVERRIDE_GETTER_TYPE,
INVALID_OVERRIDE_RETURN_TYPE, INVALID_OVERRIDE_SETTER_RETURN_TYPE, INVOCATION_O
F_NON_FUNCTION, MISMATCHED_GETTER_AND_SETTER_TYPES, NEW_WITH_ABSTRACT_CLASS, NEW
_WITH_NON_TYPE, NEW_WITH_UNDEFINED_CONSTRUCTOR, NON_ABSTRACT_CLASS_INHERITS_ABST
RACT_MEMBER, NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_METHOD, NON_TYPE, NON_TYPE_IN_
CATCH_CLAUSE, NON_VOID_RETURN_FOR_OPERATOR, NON_VOID_RETURN_FOR_SETTER, OVERRIDE
_NOT_SUBTYPE, OVERRIDE_WITH_DIFFERENT_DEFAULT, PART_OF_DIFFERENT_LIBRARY, REDIRE
CT_TO_INVALID_RETURN_TYPE, REDIRECT_TO_MISSING_CONSTRUCTOR, REDIRECT_TO_NON_CLAS
S, RETURN_WITHOUT_VALUE, SWITCH_EXPRESSION_NOT_ASSIGNABLE, UNDEFINED_CLASS, UNDE
FINED_GETTER, UNDEFINED_IDENTIFIER, UNDEFINED_SETTER, UNDEFINED_STATIC_METHOD_OR
_GETTER]; |
| 1195 final String __name; | 1250 final String __name; |
| 1196 final int __ordinal; | 1251 final int __ordinal; |
| 1252 int get ordinal => __ordinal; |
| 1197 /** | 1253 /** |
| 1198 * The message template used to create the message to be displayed for this er
ror. | 1254 * The message template used to create the message to be displayed for this er
ror. |
| 1199 */ | 1255 */ |
| 1200 String _message; | 1256 String _message; |
| 1201 /** | 1257 /** |
| 1202 * Initialize a newly created error code to have the given type and message. | 1258 * Initialize a newly created error code to have the given type and message. |
| 1203 * @param message the message template used to create the message to be displa
yed for the error | 1259 * @param message the message template used to create the message to be displa
yed for the error |
| 1204 */ | 1260 */ |
| 1205 StaticWarningCode(this.__name, this.__ordinal, String message) { | 1261 StaticWarningCode(this.__name, this.__ordinal, String message) { |
| 1206 this._message = message; | 1262 this._message = message; |
| 1207 } | 1263 } |
| 1208 ErrorSeverity get errorSeverity => ErrorType.STATIC_WARNING.severity; | 1264 ErrorSeverity get errorSeverity => ErrorType.STATIC_WARNING.severity; |
| 1209 String get message => _message; | 1265 String get message => _message; |
| 1210 ErrorType get type => ErrorType.STATIC_WARNING; | 1266 ErrorType get type => ErrorType.STATIC_WARNING; |
| 1211 bool needsRecompilation() => true; | 1267 bool needsRecompilation() => true; |
| 1212 String toString() => __name; | 1268 String toString() => __name; |
| 1213 } | 1269 } |
| 1214 /** | 1270 /** |
| 1215 * The interface {@code AnalysisErrorListener} defines the behavior of objects t
hat listen for{@link AnalysisError analysis errors} being produced by the analys
is engine. | 1271 * The interface {@code AnalysisErrorListener} defines the behavior of objects t
hat listen for{@link AnalysisError analysis errors} being produced by the analys
is engine. |
| 1272 * @coverage dart.engine.error |
| 1216 */ | 1273 */ |
| 1217 abstract class AnalysisErrorListener { | 1274 abstract class AnalysisErrorListener { |
| 1218 /** | 1275 /** |
| 1219 * This method is invoked when an error has been found by the analysis engine. | 1276 * This method is invoked when an error has been found by the analysis engine. |
| 1220 * @param error the error that was just found (not {@code null}) | 1277 * @param error the error that was just found (not {@code null}) |
| 1221 */ | 1278 */ |
| 1222 void onError(AnalysisError error); | 1279 void onError(AnalysisError error); |
| 1223 } | 1280 } |
| 1224 /** | 1281 /** |
| 1225 * The enumeration {@code StaticTypeWarningCode} defines the error codes used fo
r static type | 1282 * The enumeration {@code StaticTypeWarningCode} defines the error codes used fo
r static type |
| 1226 * warnings. The convention for this class is for the name of the error code to
indicate the problem | 1283 * warnings. The convention for this class is for the name of the error code to
indicate the problem |
| 1227 * that caused the error to be generated and for the error message to explain wh
at is wrong and, | 1284 * that caused the error to be generated and for the error message to explain wh
at is wrong and, |
| 1228 * when appropriate, how the problem can be corrected. | 1285 * when appropriate, how the problem can be corrected. |
| 1286 * @coverage dart.engine.error |
| 1229 */ | 1287 */ |
| 1230 class StaticTypeWarningCode implements ErrorCode { | 1288 class StaticTypeWarningCode implements ErrorCode { |
| 1231 /** | 1289 /** |
| 1232 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
It is a static type | 1290 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
It is a static type |
| 1233 * warning if <i>T</i> does not have an accessible instance setter named <i>v=
</i>. | 1291 * warning if <i>T</i> does not have an accessible instance setter named <i>v=
</i>. |
| 1234 * @see #UNDEFINED_SETTER | 1292 * @see #UNDEFINED_SETTER |
| 1235 */ | 1293 */ |
| 1236 static final StaticTypeWarningCode INACCESSIBLE_SETTER = new StaticTypeWarning
Code('INACCESSIBLE_SETTER', 0, ""); | 1294 static final StaticTypeWarningCode INACCESSIBLE_SETTER = new StaticTypeWarning
Code('INACCESSIBLE_SETTER', 0, ""); |
| 1237 /** | 1295 /** |
| 1238 * 8.1.1 Inheritance and Overriding: However, if there are multiple members <i
>m<sub>1</sub>, | 1296 * 8.1.1 Inheritance and Overriding: However, if there are multiple members <i
>m<sub>1</sub>, |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1368 * 15.8 Parameterized Types: It is a static type warning if <i>G</i> is not an
accessible generic | 1426 * 15.8 Parameterized Types: It is a static type warning if <i>G</i> is not an
accessible generic |
| 1369 * type declaration with <i>n</i> type parameters. | 1427 * type declaration with <i>n</i> type parameters. |
| 1370 * @param typeName the name of the type being referenced (<i>G</i>) | 1428 * @param typeName the name of the type being referenced (<i>G</i>) |
| 1371 * @param argumentCount the number of type arguments provided | 1429 * @param argumentCount the number of type arguments provided |
| 1372 * @param parameterCount the number of type parameters that were declared | 1430 * @param parameterCount the number of type parameters that were declared |
| 1373 */ | 1431 */ |
| 1374 static final StaticTypeWarningCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = new Static
TypeWarningCode('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 14, "The type '%s' is declared
with %d type parameters, but %d type arguments were given"); | 1432 static final StaticTypeWarningCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = new Static
TypeWarningCode('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 14, "The type '%s' is declared
with %d type parameters, but %d type arguments were given"); |
| 1375 static final List<StaticTypeWarningCode> values = [INACCESSIBLE_SETTER, INCONS
ISTENT_METHOD_INHERITANCE, INVALID_ASSIGNMENT, INVOCATION_OF_NON_FUNCTION, NON_B
OOL_CONDITION, NON_BOOL_EXPRESSION, NON_TYPE_AS_TYPE_ARGUMENT, REDIRECT_WITH_INV
ALID_TYPE_PARAMETERS, RETURN_OF_INVALID_TYPE, TYPE_ARGUMENT_NOT_MATCHING_BOUNDS,
TYPE_ARGUMENT_VIOLATES_BOUNDS, UNDEFINED_GETTER, UNDEFINED_SETTER, UNDEFINED_SU
PER_METHOD, WRONG_NUMBER_OF_TYPE_ARGUMENTS]; | 1433 static final List<StaticTypeWarningCode> values = [INACCESSIBLE_SETTER, INCONS
ISTENT_METHOD_INHERITANCE, INVALID_ASSIGNMENT, INVOCATION_OF_NON_FUNCTION, NON_B
OOL_CONDITION, NON_BOOL_EXPRESSION, NON_TYPE_AS_TYPE_ARGUMENT, REDIRECT_WITH_INV
ALID_TYPE_PARAMETERS, RETURN_OF_INVALID_TYPE, TYPE_ARGUMENT_NOT_MATCHING_BOUNDS,
TYPE_ARGUMENT_VIOLATES_BOUNDS, UNDEFINED_GETTER, UNDEFINED_SETTER, UNDEFINED_SU
PER_METHOD, WRONG_NUMBER_OF_TYPE_ARGUMENTS]; |
| 1376 final String __name; | 1434 final String __name; |
| 1377 final int __ordinal; | 1435 final int __ordinal; |
| 1436 int get ordinal => __ordinal; |
| 1378 /** | 1437 /** |
| 1379 * The message template used to create the message to be displayed for this er
ror. | 1438 * The message template used to create the message to be displayed for this er
ror. |
| 1380 */ | 1439 */ |
| 1381 String _message; | 1440 String _message; |
| 1382 /** | 1441 /** |
| 1383 * Initialize a newly created error code to have the given type and message. | 1442 * Initialize a newly created error code to have the given type and message. |
| 1384 * @param message the message template used to create the message to be displa
yed for the error | 1443 * @param message the message template used to create the message to be displa
yed for the error |
| 1385 */ | 1444 */ |
| 1386 StaticTypeWarningCode(this.__name, this.__ordinal, String message) { | 1445 StaticTypeWarningCode(this.__name, this.__ordinal, String message) { |
| 1387 this._message = message; | 1446 this._message = message; |
| 1388 } | 1447 } |
| 1389 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; | 1448 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; |
| 1390 String get message => _message; | 1449 String get message => _message; |
| 1391 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; | 1450 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; |
| 1392 bool needsRecompilation() => true; | 1451 bool needsRecompilation() => true; |
| 1393 String toString() => __name; | 1452 String toString() => __name; |
| 1394 } | 1453 } |
| OLD | NEW |