| OLD | NEW |
| 1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
| 2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
| 3 library engine.error; | 3 library engine.error; |
| 4 import 'java_core.dart'; | 4 import 'java_core.dart'; |
| 5 import 'source.dart'; | 5 import 'source.dart'; |
| 6 import 'ast.dart' show ASTNode; | 6 import 'ast.dart' show ASTNode; |
| 7 import 'scanner.dart' show Token; | 7 import 'scanner.dart' show Token; |
| 8 /** | 8 /** |
| 9 * Instances of the enumeration `ErrorSeverity` represent the severity of an [Er
rorCode] | 9 * Instances of the enumeration `ErrorSeverity` represent the severity of an [Er
rorCode] |
| 10 * . | 10 * . |
| 11 * | 11 * |
| 12 * @coverage dart.engine.error | 12 * @coverage dart.engine.error |
| 13 */ | 13 */ |
| 14 class ErrorSeverity extends Enum<ErrorSeverity> { | 14 class ErrorSeverity extends Enum<ErrorSeverity> { |
| 15 | 15 |
| 16 /** | 16 /** |
| 17 * The severity representing a non-error. This is never used for any error cod
e, but is useful for | 17 * The severity representing a non-error. This is never used for any error cod
e, but is useful for |
| 18 * clients. | 18 * clients. |
| 19 */ | 19 */ |
| 20 static final ErrorSeverity NONE = new ErrorSeverity('NONE', 0, " ", "none"); | 20 static final ErrorSeverity NONE = new ErrorSeverity('NONE', 0, " ", "none"); |
| 21 | 21 |
| 22 /** | 22 /** |
| 23 * The severity representing a suggestion. Suggestions are not specified in th
e Dart language | 23 * The severity representing an informational level analysis issue. |
| 24 * specification, but provide information about best practices. | |
| 25 */ | 24 */ |
| 26 static final ErrorSeverity SUGGESTION = new ErrorSeverity('SUGGESTION', 1, "S"
, "suggestion"); | 25 static final ErrorSeverity INFO = new ErrorSeverity('INFO', 1, "I", "info"); |
| 27 | 26 |
| 28 /** | 27 /** |
| 29 * The severity representing a warning. Warnings can become errors if the `-We
rror` command | 28 * The severity representing a warning. Warnings can become errors if the `-We
rror` command |
| 30 * line flag is specified. | 29 * line flag is specified. |
| 31 */ | 30 */ |
| 32 static final ErrorSeverity WARNING = new ErrorSeverity('WARNING', 2, "W", "war
ning"); | 31 static final ErrorSeverity WARNING = new ErrorSeverity('WARNING', 2, "W", "war
ning"); |
| 33 | 32 |
| 34 /** | 33 /** |
| 35 * The severity representing an error. | 34 * The severity representing an error. |
| 36 */ | 35 */ |
| 37 static final ErrorSeverity ERROR = new ErrorSeverity('ERROR', 3, "E", "error")
; | 36 static final ErrorSeverity ERROR = new ErrorSeverity('ERROR', 3, "E", "error")
; |
| 38 static final List<ErrorSeverity> values = [NONE, SUGGESTION, WARNING, ERROR]; | 37 static final List<ErrorSeverity> values = [NONE, INFO, WARNING, ERROR]; |
| 39 | 38 |
| 40 /** | 39 /** |
| 41 * The name of the severity used when producing machine output. | 40 * The name of the severity used when producing machine output. |
| 42 */ | 41 */ |
| 43 String machineCode; | 42 String machineCode; |
| 44 | 43 |
| 45 /** | 44 /** |
| 46 * The name of the severity used when producing readable output. | 45 * The name of the severity used when producing readable output. |
| 47 */ | 46 */ |
| 48 String displayName; | 47 String displayName; |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 | 355 |
| 357 /** | 356 /** |
| 358 * A property whose value is an array of [ExecutableElement] that should | 357 * A property whose value is an array of [ExecutableElement] that should |
| 359 * be but are not implemented by a concrete class. | 358 * be but are not implemented by a concrete class. |
| 360 */ | 359 */ |
| 361 static final ErrorProperty UNIMPLEMENTED_METHODS = new ErrorProperty('UNIMPLEM
ENTED_METHODS', 0); | 360 static final ErrorProperty UNIMPLEMENTED_METHODS = new ErrorProperty('UNIMPLEM
ENTED_METHODS', 0); |
| 362 static final List<ErrorProperty> values = [UNIMPLEMENTED_METHODS]; | 361 static final List<ErrorProperty> values = [UNIMPLEMENTED_METHODS]; |
| 363 ErrorProperty(String name, int ordinal) : super(name, ordinal); | 362 ErrorProperty(String name, int ordinal) : super(name, ordinal); |
| 364 } | 363 } |
| 365 /** | 364 /** |
| 365 * The enumeration `TodoCode` defines the single TODO `ErrorCode`. |
| 366 */ |
| 367 class TodoCode extends Enum<TodoCode> implements ErrorCode { |
| 368 |
| 369 /** |
| 370 * The single enum of TodoCode. |
| 371 */ |
| 372 static final TodoCode TODO = new TodoCode('TODO', 0); |
| 373 static final List<TodoCode> values = [TODO]; |
| 374 |
| 375 /** |
| 376 * This matches the two common Dart task styles |
| 377 * |
| 378 * * TODO: |
| 379 * * TODO(username): |
| 380 * |
| 381 * As well as |
| 382 * * TODO |
| 383 * |
| 384 * But not |
| 385 * * todo |
| 386 * * TODOS |
| 387 */ |
| 388 static RegExp TODO_REGEX = new RegExp("([\\s/\\*])((TODO[^\\w\\d][^\\r\\n]*)|(
TODO:?\$))"); |
| 389 TodoCode(String name, int ordinal) : super(name, ordinal); |
| 390 String get correction => null; |
| 391 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; |
| 392 String get message => "%s"; |
| 393 ErrorType get type => ErrorType.TODO; |
| 394 } |
| 395 /** |
| 366 * The enumeration `HintCode` defines the hints and coding recommendations for b
est practices | 396 * The enumeration `HintCode` defines the hints and coding recommendations for b
est practices |
| 367 * which are not mentioned in the Dart Language Specification. | 397 * which are not mentioned in the Dart Language Specification. |
| 368 */ | 398 */ |
| 369 class HintCode extends Enum<HintCode> implements ErrorCode { | 399 class HintCode extends Enum<HintCode> implements ErrorCode { |
| 370 | 400 |
| 371 /** | 401 /** |
| 372 * Dead code is code that is never reached, this can happen for instance if a
statement follows a | 402 * Dead code is code that is never reached, this can happen for instance if a
statement follows a |
| 373 * return statement. | 403 * return statement. |
| 374 */ | 404 */ |
| 375 static final HintCode DEAD_CODE = new HintCode.con1('DEAD_CODE', 0, "Dead code
"); | 405 static final HintCode DEAD_CODE = new HintCode.con1('DEAD_CODE', 0, "Dead code
"); |
| 376 | 406 |
| 377 /** | 407 /** |
| 378 * Dead code is code that is never reached. This case covers cases where the u
ser has catch | 408 * Dead code is code that is never reached. This case covers cases where the u
ser has catch |
| 379 * clauses after `catch (e)` or `on Object catch (e)`. | 409 * clauses after `catch (e)` or `on Object catch (e)`. |
| 380 */ | 410 */ |
| 381 static final HintCode DEAD_CODE_CATCH_FOLLOWING_CATCH = new HintCode.con1('DEA
D_CODE_CATCH_FOLLOWING_CATCH', 1, "Dead code, catch clauses after a 'catch (e)'
or an 'on Object catch (e)' are never reached"); | 411 static final HintCode DEAD_CODE_CATCH_FOLLOWING_CATCH = new HintCode.con1('DEA
D_CODE_CATCH_FOLLOWING_CATCH', 1, "Dead code, catch clauses after a 'catch (e)'
or an 'on Object catch (e)' are never reached"); |
| 382 | 412 |
| 383 /** | 413 /** |
| 384 * Dead code is code that is never reached. This case covers cases where the u
ser has an on-catch | 414 * Dead code is code that is never reached. This case covers cases where the u
ser has an on-catch |
| 385 * clause such as `on A catch (e)`, where a supertype of `A` was already caugh
t. | 415 * clause such as `on A catch (e)`, where a supertype of `A` was already caugh
t. |
| 386 * | 416 * |
| 387 * @param subtypeName name of the subtype | 417 * @param subtypeName name of the subtype |
| 388 * @param supertypeName name of the supertype | 418 * @param supertypeName name of the supertype |
| 389 */ | 419 */ |
| 390 static final HintCode DEAD_CODE_ON_CATCH_SUBTYPE = new HintCode.con1('DEAD_COD
E_ON_CATCH_SUBTYPE', 2, "Dead code, this on-catch block will never be executed s
ince '%s' is a subtype of '%s'"); | 420 static final HintCode DEAD_CODE_ON_CATCH_SUBTYPE = new HintCode.con1('DEAD_COD
E_ON_CATCH_SUBTYPE', 2, "Dead code, this on-catch block will never be executed s
ince '%s' is a subtype of '%s'"); |
| 391 | 421 |
| 392 /** | 422 /** |
| 423 * Duplicate imports. |
| 424 */ |
| 425 static final HintCode DUPLICATE_IMPORT = new HintCode.con1('DUPLICATE_IMPORT',
3, "Duplicate import"); |
| 426 |
| 427 /** |
| 428 * Hint to use the ~/ operator. |
| 429 */ |
| 430 static final HintCode DIVISION_OPTIMIZATION = new HintCode.con1('DIVISION_OPTI
MIZATION', 4, "The operator x ~/ y is more efficient than (x / y).toInt()"); |
| 431 |
| 432 /** |
| 433 * Hint for the `x is double` type checks. |
| 434 */ |
| 435 static final HintCode IS_DOUBLE = new HintCode.con1('IS_DOUBLE', 5, "When comp
iled to JS, this test might return true when the left hand side is an int"); |
| 436 |
| 437 /** |
| 438 * Hint for the `x is int` type checks. |
| 439 */ |
| 440 static final HintCode IS_INT = new HintCode.con1('IS_INT', 6, "When compiled t
o JS, this test might return true when the left hand side is a double"); |
| 441 |
| 442 /** |
| 443 * Hint for the `x is! double` type checks. |
| 444 */ |
| 445 static final HintCode IS_NOT_DOUBLE = new HintCode.con1('IS_NOT_DOUBLE', 7, "W
hen compiled to JS, this test might return false when the left hand side is an i
nt"); |
| 446 |
| 447 /** |
| 448 * Hint for the `x is! int` type checks. |
| 449 */ |
| 450 static final HintCode IS_NOT_INT = new HintCode.con1('IS_NOT_INT', 8, "When co
mpiled to JS, this test might return false when the left hand side is a double")
; |
| 451 |
| 452 /** |
| 453 * It is not in best practice to declare a private method that happens to over
ride the method in a |
| 454 * superclass- depending on where the superclass is (either in the same librar
y, or out of the |
| 455 * same library), behavior can be different. |
| 456 * |
| 457 * @param memberType this is either "method", "getter" or "setter" |
| 458 * @param memberName some private member name |
| 459 * @param className the class name where the member is overriding the function
ality |
| 460 */ |
| 461 static final HintCode OVERRIDDING_PRIVATE_MEMBER = new HintCode.con1('OVERRIDD
ING_PRIVATE_MEMBER', 9, "The %s '%s' does not override the definition from '%s'
because it is private and in a different library"); |
| 462 |
| 463 /** |
| 464 * Hint for classes that override equals, but not hashCode. |
| 465 * |
| 466 * @param className the name of the current class |
| 467 */ |
| 468 static final HintCode OVERRIDE_EQUALS_BUT_NOT_HASH_CODE = new HintCode.con1('O
VERRIDE_EQUALS_BUT_NOT_HASH_CODE', 10, "The class '%s' overrides 'operator==', b
ut not 'get hashCode'"); |
| 469 |
| 470 /** |
| 471 * Type checks of the type `x is! Null` should be done with `x != null`. |
| 472 */ |
| 473 static final HintCode TYPE_CHECK_IS_NOT_NULL = new HintCode.con1('TYPE_CHECK_I
S_NOT_NULL', 11, "Tests for non-null should be done with '!= null'"); |
| 474 |
| 475 /** |
| 476 * Type checks of the type `x is Null` should be done with `x == null`. |
| 477 */ |
| 478 static final HintCode TYPE_CHECK_IS_NULL = new HintCode.con1('TYPE_CHECK_IS_NU
LL', 12, "Tests for null should be done with '== null'"); |
| 479 |
| 480 /** |
| 481 * Unnecessary cast. |
| 482 */ |
| 483 static final HintCode UNNECESSARY_CAST = new HintCode.con1('UNNECESSARY_CAST',
13, "Unnecessary cast"); |
| 484 |
| 485 /** |
| 486 * Unnecessary type checks, the result is always true. |
| 487 */ |
| 488 static final HintCode UNNECESSARY_TYPE_CHECK_FALSE = new HintCode.con1('UNNECE
SSARY_TYPE_CHECK_FALSE', 14, "Unnecessary type check, the result is always false
"); |
| 489 |
| 490 /** |
| 491 * Unnecessary type checks, the result is always false. |
| 492 */ |
| 493 static final HintCode UNNECESSARY_TYPE_CHECK_TRUE = new HintCode.con1('UNNECES
SARY_TYPE_CHECK_TRUE', 15, "Unnecessary type check, the result is always true"); |
| 494 |
| 495 /** |
| 393 * Unused imports are imports which are never not used. | 496 * Unused imports are imports which are never not used. |
| 394 */ | 497 */ |
| 395 static final HintCode UNUSED_IMPORT = new HintCode.con1('UNUSED_IMPORT', 3, "U
nused import"); | 498 static final HintCode UNUSED_IMPORT = new HintCode.con1('UNUSED_IMPORT', 16, "
Unused import"); |
| 396 static final List<HintCode> values = [ | 499 static final List<HintCode> values = [ |
| 397 DEAD_CODE, | 500 DEAD_CODE, |
| 398 DEAD_CODE_CATCH_FOLLOWING_CATCH, | 501 DEAD_CODE_CATCH_FOLLOWING_CATCH, |
| 399 DEAD_CODE_ON_CATCH_SUBTYPE, | 502 DEAD_CODE_ON_CATCH_SUBTYPE, |
| 503 DUPLICATE_IMPORT, |
| 504 DIVISION_OPTIMIZATION, |
| 505 IS_DOUBLE, |
| 506 IS_INT, |
| 507 IS_NOT_DOUBLE, |
| 508 IS_NOT_INT, |
| 509 OVERRIDDING_PRIVATE_MEMBER, |
| 510 OVERRIDE_EQUALS_BUT_NOT_HASH_CODE, |
| 511 TYPE_CHECK_IS_NOT_NULL, |
| 512 TYPE_CHECK_IS_NULL, |
| 513 UNNECESSARY_CAST, |
| 514 UNNECESSARY_TYPE_CHECK_FALSE, |
| 515 UNNECESSARY_TYPE_CHECK_TRUE, |
| 400 UNUSED_IMPORT]; | 516 UNUSED_IMPORT]; |
| 401 | 517 |
| 402 /** | 518 /** |
| 403 * The template used to create the message to be displayed for this error. | 519 * The template used to create the message to be displayed for this error. |
| 404 */ | 520 */ |
| 405 String _message; | 521 String _message; |
| 406 | 522 |
| 407 /** | 523 /** |
| 408 * The template used to create the correction to be displayed for this error,
or `null` if | 524 * The template used to create the correction to be displayed for this error,
or `null` if |
| 409 * there is no correction information for this error. | 525 * there is no correction information for this error. |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 ErrorType get type; | 594 ErrorType get type; |
| 479 } | 595 } |
| 480 /** | 596 /** |
| 481 * Instances of the enumeration `ErrorType` represent the type of an [ErrorCode]
. | 597 * Instances of the enumeration `ErrorType` represent the type of an [ErrorCode]
. |
| 482 * | 598 * |
| 483 * @coverage dart.engine.error | 599 * @coverage dart.engine.error |
| 484 */ | 600 */ |
| 485 class ErrorType extends Enum<ErrorType> { | 601 class ErrorType extends Enum<ErrorType> { |
| 486 | 602 |
| 487 /** | 603 /** |
| 604 * Task (todo) comments in user code. |
| 605 */ |
| 606 static final ErrorType TODO = new ErrorType('TODO', 0, ErrorSeverity.INFO); |
| 607 |
| 608 /** |
| 488 * Extra analysis run over the code to follow best practices, which are not in
the Dart Language | 609 * Extra analysis run over the code to follow best practices, which are not in
the Dart Language |
| 489 * Specification. | 610 * Specification. |
| 490 */ | 611 */ |
| 491 static final ErrorType HINT = new ErrorType('HINT', 0, ErrorSeverity.SUGGESTIO
N); | 612 static final ErrorType HINT = new ErrorType('HINT', 1, ErrorSeverity.WARNING); |
| 492 | 613 |
| 493 /** | 614 /** |
| 494 * Compile-time errors are errors that preclude execution. A compile time erro
r must be reported | 615 * Compile-time errors are errors that preclude execution. A compile time erro
r must be reported |
| 495 * by a Dart compiler before the erroneous code is executed. | 616 * by a Dart compiler before the erroneous code is executed. |
| 496 */ | 617 */ |
| 497 static final ErrorType COMPILE_TIME_ERROR = new ErrorType('COMPILE_TIME_ERROR'
, 1, ErrorSeverity.ERROR); | 618 static final ErrorType COMPILE_TIME_ERROR = new ErrorType('COMPILE_TIME_ERROR'
, 2, ErrorSeverity.ERROR); |
| 498 | 619 |
| 499 /** | 620 /** |
| 500 * Suggestions made in situations where the user has deviated from recommended
pub programming | 621 * Suggestions made in situations where the user has deviated from recommended
pub programming |
| 501 * practices. | 622 * practices. |
| 502 */ | 623 */ |
| 503 static final ErrorType PUB_SUGGESTION = new ErrorType('PUB_SUGGESTION', 2, Err
orSeverity.SUGGESTION); | 624 static final ErrorType PUB_SUGGESTION = new ErrorType('PUB_SUGGESTION', 3, Err
orSeverity.WARNING); |
| 504 | 625 |
| 505 /** | 626 /** |
| 506 * Static warnings are those warnings reported by the static checker. They hav
e no effect on | 627 * Static warnings are those warnings reported by the static checker. They hav
e no effect on |
| 507 * execution. Static warnings must be provided by Dart compilers used during d
evelopment. | 628 * execution. Static warnings must be provided by Dart compilers used during d
evelopment. |
| 508 */ | 629 */ |
| 509 static final ErrorType STATIC_WARNING = new ErrorType('STATIC_WARNING', 3, Err
orSeverity.WARNING); | 630 static final ErrorType STATIC_WARNING = new ErrorType('STATIC_WARNING', 4, Err
orSeverity.WARNING); |
| 510 | 631 |
| 511 /** | 632 /** |
| 512 * Many, but not all, static warnings relate to types, in which case they are
known as static type | 633 * Many, but not all, static warnings relate to types, in which case they are
known as static type |
| 513 * warnings. | 634 * warnings. |
| 514 */ | 635 */ |
| 515 static final ErrorType STATIC_TYPE_WARNING = new ErrorType('STATIC_TYPE_WARNIN
G', 4, ErrorSeverity.WARNING); | 636 static final ErrorType STATIC_TYPE_WARNING = new ErrorType('STATIC_TYPE_WARNIN
G', 5, ErrorSeverity.WARNING); |
| 516 | 637 |
| 517 /** | 638 /** |
| 518 * Syntactic errors are errors produced as a result of input that does not con
form to the grammar. | 639 * Syntactic errors are errors produced as a result of input that does not con
form to the grammar. |
| 519 */ | 640 */ |
| 520 static final ErrorType SYNTACTIC_ERROR = new ErrorType('SYNTACTIC_ERROR', 5, E
rrorSeverity.ERROR); | 641 static final ErrorType SYNTACTIC_ERROR = new ErrorType('SYNTACTIC_ERROR', 6, E
rrorSeverity.ERROR); |
| 521 static final List<ErrorType> values = [ | 642 static final List<ErrorType> values = [ |
| 643 TODO, |
| 522 HINT, | 644 HINT, |
| 523 COMPILE_TIME_ERROR, | 645 COMPILE_TIME_ERROR, |
| 524 PUB_SUGGESTION, | 646 PUB_SUGGESTION, |
| 525 STATIC_WARNING, | 647 STATIC_WARNING, |
| 526 STATIC_TYPE_WARNING, | 648 STATIC_TYPE_WARNING, |
| 527 SYNTACTIC_ERROR]; | 649 SYNTACTIC_ERROR]; |
| 528 | 650 |
| 529 /** | 651 /** |
| 530 * The severity of this type of error. | 652 * The severity of this type of error. |
| 531 */ | 653 */ |
| 532 ErrorSeverity severity; | 654 ErrorSeverity severity; |
| 533 | 655 |
| 534 /** | 656 /** |
| 535 * Initialize a newly created error type to have the given severity. | 657 * Initialize a newly created error type to have the given severity. |
| 536 * | 658 * |
| 537 * @param severity the severity of this type of error | 659 * @param severity the severity of this type of error |
| 538 */ | 660 */ |
| 539 ErrorType(String name, int ordinal, ErrorSeverity severity) : super(name, ordi
nal) { | 661 ErrorType(String name, int ordinal, ErrorSeverity severity) : super(name, ordi
nal) { |
| 540 this.severity = severity; | 662 this.severity = severity; |
| 541 } | 663 } |
| 664 String get displayName => name.toLowerCase().replaceAll('_', ' '); |
| 542 } | 665 } |
| 543 /** | 666 /** |
| 544 * The enumeration `CompileTimeErrorCode` defines the error codes used for compi
le time | 667 * The enumeration `CompileTimeErrorCode` defines the error codes used for compi
le time |
| 545 * errors. The convention for this class is for the name of the error code to in
dicate the problem | 668 * errors. The convention for this class is for the name of the error code to in
dicate the problem |
| 546 * that caused the error to be generated and for the error message to explain wh
at is wrong and, | 669 * that caused the error to be generated and for the error message to explain wh
at is wrong and, |
| 547 * when appropriate, how the problem can be corrected. | 670 * when appropriate, how the problem can be corrected. |
| 548 * | 671 * |
| 549 * @coverage dart.engine.error | 672 * @coverage dart.engine.error |
| 550 */ | 673 */ |
| 551 class CompileTimeErrorCode extends Enum<CompileTimeErrorCode> implements ErrorCo
de { | 674 class CompileTimeErrorCode extends Enum<CompileTimeErrorCode> implements ErrorCo
de { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 /** | 720 /** |
| 598 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the | 721 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the |
| 599 * declared name of a class, type parameter or type alias. | 722 * declared name of a class, type parameter or type alias. |
| 600 */ | 723 */ |
| 601 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME = new Co
mpileTimeErrorCode.con1('BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME', 5, "The built-in
identifier '%s' cannot be used as a type alias name"); | 724 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME = new Co
mpileTimeErrorCode.con1('BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME', 5, "The built-in
identifier '%s' cannot be used as a type alias name"); |
| 602 | 725 |
| 603 /** | 726 /** |
| 604 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the | 727 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the |
| 605 * declared name of a class, type parameter or type alias. | 728 * declared name of a class, type parameter or type alias. |
| 606 */ | 729 */ |
| 607 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME =
new CompileTimeErrorCode.con1('BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME', 6, "T
he built-in identifier '%s' cannot be used as a type variable name"); | 730 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME =
new CompileTimeErrorCode.con1('BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME', 6,
"The built-in identifier '%s' cannot be used as a type parameter name"); |
| 608 | 731 |
| 609 /** | 732 /** |
| 610 * 13.9 Switch: It is a compile-time error if the class <i>C</i> implements th
e operator | 733 * 13.9 Switch: It is a compile-time error if the class <i>C</i> implements th
e operator |
| 611 * <i>==</i>. | 734 * <i>==</i>. |
| 612 */ | 735 */ |
| 613 static final CompileTimeErrorCode CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS = new
CompileTimeErrorCode.con1('CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS', 7, "The swi
tch case expression type '%s' cannot override the == operator"); | 736 static final CompileTimeErrorCode CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS = new
CompileTimeErrorCode.con1('CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS', 7, "The swi
tch case expression type '%s' cannot override the == operator"); |
| 614 | 737 |
| 615 /** | 738 /** |
| 616 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time
constant would raise | 739 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time
constant would raise |
| 617 * an exception. | 740 * an exception. |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 */ | 817 */ |
| 695 static final CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE =
new CompileTimeErrorCode.con1('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', 18, "
'const' variables must be constant value"); | 818 static final CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE =
new CompileTimeErrorCode.con1('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', 18, "
'const' variables must be constant value"); |
| 696 | 819 |
| 697 /** | 820 /** |
| 698 * 7.5 Instance Variables: It is a compile-time error if an instance variable
is declared to be | 821 * 7.5 Instance Variables: It is a compile-time error if an instance variable
is declared to be |
| 699 * constant. | 822 * constant. |
| 700 */ | 823 */ |
| 701 static final CompileTimeErrorCode CONST_INSTANCE_FIELD = new CompileTimeErrorC
ode.con1('CONST_INSTANCE_FIELD', 19, "Only static fields can be declared as 'con
st'"); | 824 static final CompileTimeErrorCode CONST_INSTANCE_FIELD = new CompileTimeErrorC
ode.con1('CONST_INSTANCE_FIELD', 19, "Only static fields can be declared as 'con
st'"); |
| 702 | 825 |
| 703 /** | 826 /** |
| 827 * 5 Variables: A constant variable must be initialized to a compile-time cons
tant (12.1) or a |
| 828 * compile-time error occurs. |
| 829 * |
| 830 * @param name the name of the uninitialized final variable |
| 831 */ |
| 832 static final CompileTimeErrorCode CONST_NOT_INITIALIZED = new CompileTimeError
Code.con1('CONST_NOT_INITIALIZED', 20, "The const variable '%s' must be initiali
zed"); |
| 833 |
| 834 /** |
| 704 * 12.11.2 Const: An expression of one of the forms !e, e1 && e2 or e1 || e2,
where e, e1 and e2 | 835 * 12.11.2 Const: An expression of one of the forms !e, e1 && e2 or e1 || e2,
where e, e1 and e2 |
| 705 * are constant expressions that evaluate to a boolean value. | 836 * are constant expressions that evaluate to a boolean value. |
| 706 */ | 837 */ |
| 707 static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = new CompileTimeErrorC
ode.con1('CONST_EVAL_TYPE_BOOL', 20, "An expression of type 'bool' was expected"
); | 838 static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = new CompileTimeErrorC
ode.con1('CONST_EVAL_TYPE_BOOL', 21, "An expression of type 'bool' was expected"
); |
| 708 | 839 |
| 709 /** | 840 /** |
| 710 * 12.11.2 Const: An expression of one of the forms e1 == e2 or e1 != e2 where
e1 and e2 are | 841 * 12.11.2 Const: An expression of one of the forms e1 == e2 or e1 != e2 where
e1 and e2 are |
| 711 * constant expressions that evaluate to a numeric, string or boolean value or
to null. | 842 * constant expressions that evaluate to a numeric, string or boolean value or
to null. |
| 712 */ | 843 */ |
| 713 static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_NUM_STRING = new Compil
eTimeErrorCode.con1('CONST_EVAL_TYPE_BOOL_NUM_STRING', 21, "An expression of typ
e 'bool', 'num', 'String' or 'null' was expected"); | 844 static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_NUM_STRING = new Compil
eTimeErrorCode.con1('CONST_EVAL_TYPE_BOOL_NUM_STRING', 22, "An expression of typ
e 'bool', 'num', 'String' or 'null' was expected"); |
| 714 | 845 |
| 715 /** | 846 /** |
| 716 * 12.11.2 Const: An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 |
e2, e1 >> e2 or e1 | 847 * 12.11.2 Const: An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 |
e2, e1 >> e2 or e1 |
| 717 * << e2, where e, e1 and e2 are constant expressions that evaluate to an inte
ger value or to | 848 * << e2, where e, e1 and e2 are constant expressions that evaluate to an inte
ger value or to |
| 718 * null. | 849 * null. |
| 719 */ | 850 */ |
| 720 static final CompileTimeErrorCode CONST_EVAL_TYPE_INT = new CompileTimeErrorCo
de.con1('CONST_EVAL_TYPE_INT', 22, "An expression of type 'int' was expected"); | 851 static final CompileTimeErrorCode CONST_EVAL_TYPE_INT = new CompileTimeErrorCo
de.con1('CONST_EVAL_TYPE_INT', 23, "An expression of type 'int' was expected"); |
| 721 | 852 |
| 722 /** | 853 /** |
| 723 * 12.11.2 Const: An expression of one of the forms e, e1 + e2, e1 - e2, e1 *
e2, e1 / e2, e1 ~/ | 854 * 12.11.2 Const: An expression of one of the forms e, e1 + e2, e1 - e2, e1 *
e2, e1 / e2, e1 ~/ |
| 724 * e2, e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are
constant | 855 * e2, e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are
constant |
| 725 * expressions that evaluate to a numeric value or to null.. | 856 * expressions that evaluate to a numeric value or to null.. |
| 726 */ | 857 */ |
| 727 static final CompileTimeErrorCode CONST_EVAL_TYPE_NUM = new CompileTimeErrorCo
de.con1('CONST_EVAL_TYPE_NUM', 23, "An expression of type 'num' was expected"); | 858 static final CompileTimeErrorCode CONST_EVAL_TYPE_NUM = new CompileTimeErrorCo
de.con1('CONST_EVAL_TYPE_NUM', 24, "An expression of type 'num' was expected"); |
| 728 | 859 |
| 729 /** | 860 /** |
| 730 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 861 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 731 * uncaught exception being thrown. | 862 * uncaught exception being thrown. |
| 732 */ | 863 */ |
| 733 static final CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = new CompileTim
eErrorCode.con1('CONST_EVAL_THROWS_EXCEPTION', 24, "Evaluation of this constant
expression causes exception"); | 864 static final CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = new CompileTim
eErrorCode.con1('CONST_EVAL_THROWS_EXCEPTION', 25, "Evaluation of this constant
expression causes exception"); |
| 734 | 865 |
| 735 /** | 866 /** |
| 736 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 867 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 737 * uncaught exception being thrown. | 868 * uncaught exception being thrown. |
| 738 */ | 869 */ |
| 739 static final CompileTimeErrorCode CONST_EVAL_THROWS_IDBZE = new CompileTimeErr
orCode.con1('CONST_EVAL_THROWS_IDBZE', 25, "Evaluation of this constant expressi
on throws IntegerDivisionByZeroException"); | 870 static final CompileTimeErrorCode CONST_EVAL_THROWS_IDBZE = new CompileTimeErr
orCode.con1('CONST_EVAL_THROWS_IDBZE', 26, "Evaluation of this constant expressi
on throws IntegerDivisionByZeroException"); |
| 740 | 871 |
| 741 /** | 872 /** |
| 742 * 12.11.2 Const: If <i>T</i> is a parameterized type <i>S<U<sub>1</sub>, &
hellip;, | 873 * 12.11.2 Const: If <i>T</i> is a parameterized type <i>S<U<sub>1</sub>, &
hellip;, |
| 743 * U<sub>m</sub>></i>, let <i>R = S</i>; It is a compile time error if <i>S
</i> is not a | 874 * U<sub>m</sub>></i>, let <i>R = S</i>; It is a compile time error if <i>S
</i> is not a |
| 744 * generic type with <i>m</i> type parameters. | 875 * generic type with <i>m</i> type parameters. |
| 745 * | 876 * |
| 746 * @param typeName the name of the type being referenced (<i>S</i>) | 877 * @param typeName the name of the type being referenced (<i>S</i>) |
| 747 * @param parameterCount the number of type parameters that were declared | 878 * @param parameterCount the number of type parameters that were declared |
| 748 * @param argumentCount the number of type arguments provided | 879 * @param argumentCount the number of type arguments provided |
| 749 * @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS | 880 * @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS |
| 750 * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS | 881 * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS |
| 751 */ | 882 */ |
| 752 static final CompileTimeErrorCode CONST_WITH_INVALID_TYPE_PARAMETERS = new Com
pileTimeErrorCode.con1('CONST_WITH_INVALID_TYPE_PARAMETERS', 26, "The type '%s'
is declared with %d type parameters, but %d type arguments were given"); | 883 static final CompileTimeErrorCode CONST_WITH_INVALID_TYPE_PARAMETERS = new Com
pileTimeErrorCode.con1('CONST_WITH_INVALID_TYPE_PARAMETERS', 27, "The type '%s'
is declared with %d type parameters, but %d type arguments were given"); |
| 753 | 884 |
| 754 /** | 885 /** |
| 755 * 12.11.2 Const: If <i>e</i> is of the form <i>const T(a<sub>1</sub>, &hellip
;, a<sub>n</sub>, | 886 * 12.11.2 Const: If <i>e</i> is of the form <i>const T(a<sub>1</sub>, &hellip
;, a<sub>n</sub>, |
| 756 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a | 887 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a |
| 757 * compile-time error if the type <i>T</i> does not declare a constant constru
ctor with the same | 888 * compile-time error if the type <i>T</i> does not declare a constant constru
ctor with the same |
| 758 * name as the declaration of <i>T</i>. | 889 * name as the declaration of <i>T</i>. |
| 759 */ | 890 */ |
| 760 static final CompileTimeErrorCode CONST_WITH_NON_CONST = new CompileTimeErrorC
ode.con1('CONST_WITH_NON_CONST', 27, "The constructor being called is not a 'con
st' constructor"); | 891 static final CompileTimeErrorCode CONST_WITH_NON_CONST = new CompileTimeErrorC
ode.con1('CONST_WITH_NON_CONST', 28, "The constructor being called is not a 'con
st' constructor"); |
| 761 | 892 |
| 762 /** | 893 /** |
| 763 * 12.11.2 Const: In all of the above cases, it is a compile-time error if <i>
a<sub>i</sub>, 1 | 894 * 12.11.2 Const: In all of the above cases, it is a compile-time error if <i>
a<sub>i</sub>, 1 |
| 764 * <= i <= n + k</i>, is not a compile-time constant expression. | 895 * <= i <= n + k</i>, is not a compile-time constant expression. |
| 765 */ | 896 */ |
| 766 static final CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = new Compi
leTimeErrorCode.con1('CONST_WITH_NON_CONSTANT_ARGUMENT', 28, "Arguments of a con
stant creation must be constant expressions"); | 897 static final CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = new Compi
leTimeErrorCode.con1('CONST_WITH_NON_CONSTANT_ARGUMENT', 29, "Arguments of a con
stant creation must be constant expressions"); |
| 767 | 898 |
| 768 /** | 899 /** |
| 769 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current | 900 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current |
| 770 * scope, optionally followed by type arguments. | 901 * scope, optionally followed by type arguments. |
| 771 * | 902 * |
| 772 * 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>, | 903 * 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>, |
| 773 * x<sub>n+1</sub>: a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+k</sub>
)</i> it is a | 904 * x<sub>n+1</sub>: a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+k</sub>
)</i> it is a |
| 774 * compile-time error if <i>T</i> is not a class accessible in the current sco
pe, optionally | 905 * compile-time error if <i>T</i> is not a class accessible in the current sco
pe, optionally |
| 775 * followed by type arguments. | 906 * followed by type arguments. |
| 776 * | 907 * |
| 777 * @param name the name of the non-type element | 908 * @param name the name of the non-type element |
| 778 */ | 909 */ |
| 779 static final CompileTimeErrorCode CONST_WITH_NON_TYPE = new CompileTimeErrorCo
de.con1('CONST_WITH_NON_TYPE', 29, "The name '%s' is not a class"); | 910 static final CompileTimeErrorCode CONST_WITH_NON_TYPE = new CompileTimeErrorCo
de.con1('CONST_WITH_NON_TYPE', 30, "The name '%s' is not a class"); |
| 780 | 911 |
| 781 /** | 912 /** |
| 782 * 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type par
ameters. | 913 * 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type par
ameters. |
| 783 */ | 914 */ |
| 784 static final CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = new CompileTime
ErrorCode.con1('CONST_WITH_TYPE_PARAMETERS', 30, "The constant creation cannot u
se a type parameter"); | 915 static final CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = new CompileTime
ErrorCode.con1('CONST_WITH_TYPE_PARAMETERS', 31, "The constant creation cannot u
se a type parameter"); |
| 785 | 916 |
| 786 /** | 917 /** |
| 787 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant | 918 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant |
| 788 * constructor declared by the type <i>T</i>. | 919 * constructor declared by the type <i>T</i>. |
| 789 * | 920 * |
| 790 * @param typeName the name of the type | 921 * @param typeName the name of the type |
| 791 * @param constructorName the name of the requested constant constructor | 922 * @param constructorName the name of the requested constant constructor |
| 792 */ | 923 */ |
| 793 static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR = new Compi
leTimeErrorCode.con1('CONST_WITH_UNDEFINED_CONSTRUCTOR', 31, "The class '%s' doe
s not have a constant constructor '%s'"); | 924 static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR = new Compi
leTimeErrorCode.con1('CONST_WITH_UNDEFINED_CONSTRUCTOR', 32, "The class '%s' doe
s not have a constant constructor '%s'"); |
| 794 | 925 |
| 795 /** | 926 /** |
| 796 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant | 927 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant |
| 797 * constructor declared by the type <i>T</i>. | 928 * constructor declared by the type <i>T</i>. |
| 798 * | 929 * |
| 799 * @param typeName the name of the type | 930 * @param typeName the name of the type |
| 800 */ | 931 */ |
| 801 static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = n
ew CompileTimeErrorCode.con1('CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 32, "Th
e class '%s' does not have a default constant constructor"); | 932 static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = n
ew CompileTimeErrorCode.con1('CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 33, "Th
e class '%s' does not have a default constant constructor"); |
| 802 | 933 |
| 803 /** | 934 /** |
| 804 * 15.3.1 Typedef: It is a compile-time error if any default values are specif
ied in the signature | 935 * 15.3.1 Typedef: It is a compile-time error if any default values are specif
ied in the signature |
| 805 * of a function type alias. | 936 * of a function type alias. |
| 806 */ | 937 */ |
| 807 static final CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS = new C
ompileTimeErrorCode.con1('DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS', 33, "Default va
lues aren't allowed in typedefs"); | 938 static final CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS = new C
ompileTimeErrorCode.con1('DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS', 34, "Default va
lues aren't allowed in typedefs"); |
| 808 | 939 |
| 809 /** | 940 /** |
| 810 * 6.2.1 Required Formals: By means of a function signature that names the par
ameter and describes | 941 * 6.2.1 Required Formals: By means of a function signature that names the par
ameter and describes |
| 811 * its type as a function type. It is a compile-time error if any default valu
es are specified in | 942 * its type as a function type. It is a compile-time error if any default valu
es are specified in |
| 812 * the signature of such a function type. | 943 * the signature of such a function type. |
| 813 */ | 944 */ |
| 814 static final CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER =
new CompileTimeErrorCode.con1('DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER', 34, "
Default values aren't allowed in function type parameters"); | 945 static final CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER =
new CompileTimeErrorCode.con1('DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER', 35, "
Default values aren't allowed in function type parameters"); |
| 815 | 946 |
| 816 /** | 947 /** |
| 817 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name | 948 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name |
| 818 * declared in the same scope. | 949 * declared in the same scope. |
| 819 */ | 950 */ |
| 820 static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT = new CompileT
imeErrorCode.con1('DUPLICATE_CONSTRUCTOR_DEFAULT', 35, "The default constructor
is already defined"); | 951 static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT = new CompileT
imeErrorCode.con1('DUPLICATE_CONSTRUCTOR_DEFAULT', 36, "The default constructor
is already defined"); |
| 821 | 952 |
| 822 /** | 953 /** |
| 823 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name | 954 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name |
| 824 * declared in the same scope. | 955 * declared in the same scope. |
| 825 * | 956 * |
| 826 * @param duplicateName the name of the duplicate entity | 957 * @param duplicateName the name of the duplicate entity |
| 827 */ | 958 */ |
| 828 static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME = new CompileTime
ErrorCode.con1('DUPLICATE_CONSTRUCTOR_NAME', 36, "The constructor with name '%s'
is already defined"); | 959 static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME = new CompileTime
ErrorCode.con1('DUPLICATE_CONSTRUCTOR_NAME', 37, "The constructor with name '%s'
is already defined"); |
| 829 | 960 |
| 830 /** | 961 /** |
| 831 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name | 962 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name |
| 832 * declared in the same scope. | 963 * declared in the same scope. |
| 833 * | 964 * |
| 834 * 7 Classes: It is a compile-time error if a class declares two members of th
e same name. | 965 * 7 Classes: It is a compile-time error if a class declares two members of th
e same name. |
| 835 * | 966 * |
| 836 * 7 Classes: It is a compile-time error if a class has an instance member and
a static member | 967 * 7 Classes: It is a compile-time error if a class has an instance member and
a static member |
| 837 * with the same name. | 968 * with the same name. |
| 838 * | 969 * |
| 839 * @param duplicateName the name of the duplicate entity | 970 * @param duplicateName the name of the duplicate entity |
| 840 */ | 971 */ |
| 841 static final CompileTimeErrorCode DUPLICATE_DEFINITION = new CompileTimeErrorC
ode.con1('DUPLICATE_DEFINITION', 37, "The name '%s' is already defined"); | 972 static final CompileTimeErrorCode DUPLICATE_DEFINITION = new CompileTimeErrorC
ode.con1('DUPLICATE_DEFINITION', 38, "The name '%s' is already defined"); |
| 842 | 973 |
| 843 /** | 974 /** |
| 844 * 7. Classes: It is a compile-time error if a class has an instance member an
d a static member | 975 * 7. Classes: It is a compile-time error if a class has an instance member an
d a static member |
| 845 * with the same name. | 976 * with the same name. |
| 846 * | 977 * |
| 847 * This covers the additional duplicate definition cases where inheritance has
to be considered. | 978 * This covers the additional duplicate definition cases where inheritance has
to be considered. |
| 848 * | 979 * |
| 849 * @param className the name of the class that has conflicting instance/static
members | 980 * @param className the name of the class that has conflicting instance/static
members |
| 850 * @param name the name of the conflicting members | 981 * @param name the name of the conflicting members |
| 851 * @see #DUPLICATE_DEFINITION | 982 * @see #DUPLICATE_DEFINITION |
| 852 */ | 983 */ |
| 853 static final CompileTimeErrorCode DUPLICATE_DEFINITION_INHERITANCE = new Compi
leTimeErrorCode.con1('DUPLICATE_DEFINITION_INHERITANCE', 38, "The name '%s' is a
lready defined in '%s'"); | 984 static final CompileTimeErrorCode DUPLICATE_DEFINITION_INHERITANCE = new Compi
leTimeErrorCode.con1('DUPLICATE_DEFINITION_INHERITANCE', 39, "The name '%s' is a
lready defined in '%s'"); |
| 854 | 985 |
| 855 /** | 986 /** |
| 856 * 12.14.2 Binding Actuals to Formals: It is a compile-time error if <i>q<sub>
i</sub> = | 987 * 12.14.2 Binding Actuals to Formals: It is a compile-time error if <i>q<sub>
i</sub> = |
| 857 * q<sub>j</sub></i> for any <i>i != j</i> [where <i>q<sub>i</sub></i> is the
label for a named | 988 * q<sub>j</sub></i> for any <i>i != j</i> [where <i>q<sub>i</sub></i> is the
label for a named |
| 858 * argument]. | 989 * argument]. |
| 859 */ | 990 */ |
| 860 static final CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = new CompileTimeEr
rorCode.con1('DUPLICATE_NAMED_ARGUMENT', 39, "The argument for the named paramet
er '%s' was already specified"); | 991 static final CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = new CompileTimeEr
rorCode.con1('DUPLICATE_NAMED_ARGUMENT', 40, "The argument for the named paramet
er '%s' was already specified"); |
| 861 | 992 |
| 862 /** | 993 /** |
| 863 * SDK implementation libraries can be exported only by other SDK libraries. | 994 * SDK implementation libraries can be exported only by other SDK libraries. |
| 864 * | 995 * |
| 865 * @param uri the uri pointing to a library | 996 * @param uri the uri pointing to a library |
| 866 */ | 997 */ |
| 867 static final CompileTimeErrorCode EXPORT_INTERNAL_LIBRARY = new CompileTimeErr
orCode.con1('EXPORT_INTERNAL_LIBRARY', 40, "The library '%s' is internal and can
not be exported"); | 998 static final CompileTimeErrorCode EXPORT_INTERNAL_LIBRARY = new CompileTimeErr
orCode.con1('EXPORT_INTERNAL_LIBRARY', 41, "The library '%s' is internal and can
not be exported"); |
| 868 | 999 |
| 869 /** | 1000 /** |
| 870 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1001 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 871 * not a library declaration. | 1002 * not a library declaration. |
| 872 * | 1003 * |
| 873 * @param uri the uri pointing to a non-library declaration | 1004 * @param uri the uri pointing to a non-library declaration |
| 874 */ | 1005 */ |
| 875 static final CompileTimeErrorCode EXPORT_OF_NON_LIBRARY = new CompileTimeError
Code.con1('EXPORT_OF_NON_LIBRARY', 41, "The exported library '%s' must not have
a part-of directive"); | 1006 static final CompileTimeErrorCode EXPORT_OF_NON_LIBRARY = new CompileTimeError
Code.con1('EXPORT_OF_NON_LIBRARY', 42, "The exported library '%s' must not have
a part-of directive"); |
| 876 | 1007 |
| 877 /** | 1008 /** |
| 878 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla
ss <i>C</i> includes | 1009 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla
ss <i>C</i> includes |
| 879 * a type expression that does not denote a class available in the lexical sco
pe of <i>C</i>. | 1010 * a type expression that does not denote a class available in the lexical sco
pe of <i>C</i>. |
| 880 * | 1011 * |
| 881 * @param typeName the name of the superclass that was not found | 1012 * @param typeName the name of the superclass that was not found |
| 882 */ | 1013 */ |
| 883 static final CompileTimeErrorCode EXTENDS_NON_CLASS = new CompileTimeErrorCode
.con1('EXTENDS_NON_CLASS', 42, "Classes can only extend other classes"); | 1014 static final CompileTimeErrorCode EXTENDS_NON_CLASS = new CompileTimeErrorCode
.con1('EXTENDS_NON_CLASS', 43, "Classes can only extend other classes"); |
| 884 | 1015 |
| 885 /** | 1016 /** |
| 886 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. | 1017 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. |
| 887 * | 1018 * |
| 888 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. | 1019 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. |
| 889 * | 1020 * |
| 890 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. | 1021 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. |
| 891 * | 1022 * |
| 892 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to | 1023 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to |
| 893 * attempt to extend or implement num. | 1024 * attempt to extend or implement num. |
| 894 * | 1025 * |
| 895 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. | 1026 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. |
| 896 * | 1027 * |
| 897 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. | 1028 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. |
| 898 * | 1029 * |
| 899 * @param typeName the name of the type that cannot be extended | 1030 * @param typeName the name of the type that cannot be extended |
| 900 * @see #IMPLEMENTS_DISALLOWED_CLASS | 1031 * @see #IMPLEMENTS_DISALLOWED_CLASS |
| 901 */ | 1032 */ |
| 902 static final CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = new CompileTimeEr
rorCode.con1('EXTENDS_DISALLOWED_CLASS', 43, "Classes cannot extend '%s'"); | 1033 static final CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = new CompileTimeEr
rorCode.con1('EXTENDS_DISALLOWED_CLASS', 44, "Classes cannot extend '%s'"); |
| 903 | 1034 |
| 904 /** | 1035 /** |
| 905 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > | 1036 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > |
| 906 * n</i>. | 1037 * n</i>. |
| 907 * | 1038 * |
| 908 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 1039 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 909 * uncaught exception being thrown. | 1040 * uncaught exception being thrown. |
| 910 * | 1041 * |
| 911 * @param requiredCount the maximum number of positional arguments | 1042 * @param requiredCount the maximum number of positional arguments |
| 912 * @param argumentCount the actual number of positional arguments given | 1043 * @param argumentCount the actual number of positional arguments given |
| 913 */ | 1044 */ |
| 914 static final CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS = new CompileTime
ErrorCode.con1('EXTRA_POSITIONAL_ARGUMENTS', 44, "%d positional arguments expect
ed, but %d found"); | 1045 static final CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS = new CompileTime
ErrorCode.con1('EXTRA_POSITIONAL_ARGUMENTS', 45, "%d positional arguments expect
ed, but %d found"); |
| 915 | 1046 |
| 916 /** | 1047 /** |
| 917 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time | 1048 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time |
| 918 * error if more than one initializer corresponding to a given instance variab
le appears in | 1049 * error if more than one initializer corresponding to a given instance variab
le appears in |
| 919 * <i>k</i>'s list. | 1050 * <i>k</i>'s list. |
| 920 */ | 1051 */ |
| 921 static final CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS =
new CompileTimeErrorCode.con1('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 45,
"The field '%s' cannot be initialized twice in the same constructor"); | 1052 static final CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS =
new CompileTimeErrorCode.con1('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 46,
"The field '%s' cannot be initialized twice in the same constructor"); |
| 922 | 1053 |
| 923 /** | 1054 /** |
| 924 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time | 1055 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time |
| 925 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is initialized | 1056 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is initialized |
| 926 * by means of an initializing formal of <i>k</i>. | 1057 * by means of an initializing formal of <i>k</i>. |
| 927 */ | 1058 */ |
| 928 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ
ER = new CompileTimeErrorCode.con1('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ
ER', 46, "Fields cannot be initialized in both the parameter list and the initia
lizers"); | 1059 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ
ER = new CompileTimeErrorCode.con1('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ
ER', 47, "Fields cannot be initialized in both the parameter list and the initia
lizers"); |
| 929 | 1060 |
| 930 /** | 1061 /** |
| 931 * 5 Variables: It is a compile-time error if a final instance variable that h
as is initialized by | 1062 * 5 Variables: It is a compile-time error if a final instance variable that h
as is initialized by |
| 932 * means of an initializing formal of a constructor is also initialized elsewh
ere in the same | 1063 * means of an initializing formal of a constructor is also initialized elsewh
ere in the same |
| 933 * constructor. | 1064 * constructor. |
| 934 * | 1065 * |
| 935 * @param name the name of the field in question | 1066 * @param name the name of the field in question |
| 936 */ | 1067 */ |
| 937 static final CompileTimeErrorCode FINAL_INITIALIZED_MULTIPLE_TIMES = new Compi
leTimeErrorCode.con1('FINAL_INITIALIZED_MULTIPLE_TIMES', 47, "'%s' is a final fi
eld and so can only be set once"); | 1068 static final CompileTimeErrorCode FINAL_INITIALIZED_MULTIPLE_TIMES = new Compi
leTimeErrorCode.con1('FINAL_INITIALIZED_MULTIPLE_TIMES', 48, "'%s' is a final fi
eld and so can only be set once"); |
| 938 | 1069 |
| 939 /** | 1070 /** |
| 940 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by | 1071 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by |
| 941 * a function other than a non-redirecting generative constructor. | 1072 * a function other than a non-redirecting generative constructor. |
| 942 */ | 1073 */ |
| 943 static final CompileTimeErrorCode FIELD_INITIALIZER_FACTORY_CONSTRUCTOR = new
CompileTimeErrorCode.con1('FIELD_INITIALIZER_FACTORY_CONSTRUCTOR', 48, "Initiali
zing formal fields cannot be used in factory constructors"); | 1074 static final CompileTimeErrorCode FIELD_INITIALIZER_FACTORY_CONSTRUCTOR = new
CompileTimeErrorCode.con1('FIELD_INITIALIZER_FACTORY_CONSTRUCTOR', 49, "Initiali
zing formal fields cannot be used in factory constructors"); |
| 944 | 1075 |
| 945 /** | 1076 /** |
| 946 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by | 1077 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by |
| 947 * a function other than a non-redirecting generative constructor. | 1078 * a function other than a non-redirecting generative constructor. |
| 948 */ | 1079 */ |
| 949 static final CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new
CompileTimeErrorCode.con1('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 49, "Initiali
zing formal fields can only be used in constructors"); | 1080 static final CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new
CompileTimeErrorCode.con1('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 50, "Initiali
zing formal fields can only be used in constructors"); |
| 950 | 1081 |
| 951 /** | 1082 /** |
| 952 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 1083 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
| 953 * only action is to invoke another generative constructor. | 1084 * only action is to invoke another generative constructor. |
| 954 * | 1085 * |
| 955 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by | 1086 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by |
| 956 * a function other than a non-redirecting generative constructor. | 1087 * a function other than a non-redirecting generative constructor. |
| 957 */ | 1088 */ |
| 958 static final CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR =
new CompileTimeErrorCode.con1('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', 50, "
The redirecting constructor cannot have a field initializer"); | 1089 static final CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR =
new CompileTimeErrorCode.con1('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', 51, "
The redirecting constructor cannot have a field initializer"); |
| 959 | 1090 |
| 960 /** | 1091 /** |
| 961 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same | 1092 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same |
| 962 * name. | 1093 * name. |
| 963 * | 1094 * |
| 964 * @param name the conflicting name of the getter and method | 1095 * @param name the conflicting name of the getter and method |
| 965 */ | 1096 */ |
| 966 static final CompileTimeErrorCode GETTER_AND_METHOD_WITH_SAME_NAME = new Compi
leTimeErrorCode.con1('GETTER_AND_METHOD_WITH_SAME_NAME', 51, "'%s' cannot be use
d to name a getter, there is already a method with the same name"); | 1097 static final CompileTimeErrorCode GETTER_AND_METHOD_WITH_SAME_NAME = new Compi
leTimeErrorCode.con1('GETTER_AND_METHOD_WITH_SAME_NAME', 52, "'%s' cannot be use
d to name a getter, there is already a method with the same name"); |
| 967 | 1098 |
| 968 /** | 1099 /** |
| 969 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. | 1100 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. |
| 970 * | 1101 * |
| 971 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. | 1102 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. |
| 972 * | 1103 * |
| 973 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. | 1104 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. |
| 974 * | 1105 * |
| 975 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to | 1106 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to |
| 976 * attempt to extend or implement num. | 1107 * attempt to extend or implement num. |
| 977 * | 1108 * |
| 978 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. | 1109 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. |
| 979 * | 1110 * |
| 980 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. | 1111 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. |
| 981 * | 1112 * |
| 982 * @param typeName the name of the type that cannot be implemented | 1113 * @param typeName the name of the type that cannot be implemented |
| 983 * @see #EXTENDS_DISALLOWED_CLASS | 1114 * @see #EXTENDS_DISALLOWED_CLASS |
| 984 */ | 1115 */ |
| 985 static final CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = new CompileTim
eErrorCode.con1('IMPLEMENTS_DISALLOWED_CLASS', 52, "Classes cannot implement '%s
'"); | 1116 static final CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = new CompileTim
eErrorCode.con1('IMPLEMENTS_DISALLOWED_CLASS', 53, "Classes cannot implement '%s
'"); |
| 986 | 1117 |
| 987 /** | 1118 /** |
| 988 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class includes | 1119 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class includes |
| 989 * type dynamic. | 1120 * type dynamic. |
| 990 */ | 1121 */ |
| 991 static final CompileTimeErrorCode IMPLEMENTS_DYNAMIC = new CompileTimeErrorCod
e.con1('IMPLEMENTS_DYNAMIC', 53, "Classes cannot implement 'dynamic'"); | 1122 static final CompileTimeErrorCode IMPLEMENTS_DYNAMIC = new CompileTimeErrorCod
e.con1('IMPLEMENTS_DYNAMIC', 54, "Classes cannot implement 'dynamic'"); |
| 992 | 1123 |
| 993 /** | 1124 /** |
| 994 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class <i>C</i> | 1125 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class <i>C</i> |
| 995 * includes a type expression that does not denote a class available in the le
xical scope of | 1126 * includes a type expression that does not denote a class available in the le
xical scope of |
| 996 * <i>C</i>. | 1127 * <i>C</i>. |
| 997 * | 1128 * |
| 998 * @param typeName the name of the interface that was not found | 1129 * @param typeName the name of the interface that was not found |
| 999 */ | 1130 */ |
| 1000 static final CompileTimeErrorCode IMPLEMENTS_NON_CLASS = new CompileTimeErrorC
ode.con1('IMPLEMENTS_NON_CLASS', 54, "Classes can only implement other classes")
; | 1131 static final CompileTimeErrorCode IMPLEMENTS_NON_CLASS = new CompileTimeErrorC
ode.con1('IMPLEMENTS_NON_CLASS', 55, "Classes can only implement other classes")
; |
| 1001 | 1132 |
| 1002 /** | 1133 /** |
| 1003 * 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears
more than once in | 1134 * 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears
more than once in |
| 1004 * the implements clause of a class. | 1135 * the implements clause of a class. |
| 1005 * | 1136 * |
| 1006 * @param className the name of the class that is implemented more than once | 1137 * @param className the name of the class that is implemented more than once |
| 1007 */ | 1138 */ |
| 1008 static final CompileTimeErrorCode IMPLEMENTS_REPEATED = new CompileTimeErrorCo
de.con1('IMPLEMENTS_REPEATED', 55, "'%s' can only be implemented once"); | 1139 static final CompileTimeErrorCode IMPLEMENTS_REPEATED = new CompileTimeErrorCo
de.con1('IMPLEMENTS_REPEATED', 56, "'%s' can only be implemented once"); |
| 1009 | 1140 |
| 1010 /** | 1141 /** |
| 1011 * 7.10 Superinterfaces: It is a compile-time error if the superclass of a cla
ss <i>C</i> appears | 1142 * 7.10 Superinterfaces: It is a compile-time error if the superclass of a cla
ss <i>C</i> appears |
| 1012 * in the implements clause of <i>C</i>. | 1143 * in the implements clause of <i>C</i>. |
| 1013 * | 1144 * |
| 1014 * @param className the name of the class that appears in both "extends" and "
implements" clauses | 1145 * @param className the name of the class that appears in both "extends" and "
implements" clauses |
| 1015 */ | 1146 */ |
| 1016 static final CompileTimeErrorCode IMPLEMENTS_SUPER_CLASS = new CompileTimeErro
rCode.con1('IMPLEMENTS_SUPER_CLASS', 56, "'%s' cannot be used in both 'extends'
and 'implements' clauses"); | 1147 static final CompileTimeErrorCode IMPLEMENTS_SUPER_CLASS = new CompileTimeErro
rCode.con1('IMPLEMENTS_SUPER_CLASS', 57, "'%s' cannot be used in both 'extends'
and 'implements' clauses"); |
| 1017 | 1148 |
| 1018 /** | 1149 /** |
| 1019 * 7.6.1 Generative Constructors: Note that <b>this</b> is not in scope on the
right hand side of | 1150 * 7.6.1 Generative Constructors: Note that <b>this</b> is not in scope on the
right hand side of |
| 1020 * an initializer. | 1151 * an initializer. |
| 1021 * | 1152 * |
| 1022 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable | 1153 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable |
| 1023 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the | 1154 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the |
| 1024 * initializer of an instance variable. | 1155 * initializer of an instance variable. |
| 1025 * | 1156 * |
| 1026 * @param name the name of the type in question | 1157 * @param name the name of the type in question |
| 1027 */ | 1158 */ |
| 1028 static final CompileTimeErrorCode IMPLICIT_THIS_REFERENCE_IN_INITIALIZER = new
CompileTimeErrorCode.con1('IMPLICIT_THIS_REFERENCE_IN_INITIALIZER', 57, "The 't
his' expression cannot be implicitly used in initializers"); | 1159 static final CompileTimeErrorCode IMPLICIT_THIS_REFERENCE_IN_INITIALIZER = new
CompileTimeErrorCode.con1('IMPLICIT_THIS_REFERENCE_IN_INITIALIZER', 58, "Only s
tatic members can be accessed in initializers"); |
| 1029 | 1160 |
| 1030 /** | 1161 /** |
| 1031 * SDK implementation libraries can be imported only by other SDK libraries. | 1162 * SDK implementation libraries can be imported only by other SDK libraries. |
| 1032 * | 1163 * |
| 1033 * @param uri the uri pointing to a library | 1164 * @param uri the uri pointing to a library |
| 1034 */ | 1165 */ |
| 1035 static final CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY = new CompileTimeErr
orCode.con1('IMPORT_INTERNAL_LIBRARY', 58, "The library '%s' is internal and can
not be imported"); | 1166 static final CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY = new CompileTimeErr
orCode.con1('IMPORT_INTERNAL_LIBRARY', 59, "The library '%s' is internal and can
not be imported"); |
| 1036 | 1167 |
| 1037 /** | 1168 /** |
| 1038 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1169 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 1039 * not a library declaration. | 1170 * not a library declaration. |
| 1040 * | 1171 * |
| 1041 * @param uri the uri pointing to a non-library declaration | 1172 * @param uri the uri pointing to a non-library declaration |
| 1042 */ | 1173 */ |
| 1043 static final CompileTimeErrorCode IMPORT_OF_NON_LIBRARY = new CompileTimeError
Code.con1('IMPORT_OF_NON_LIBRARY', 59, "The imported library '%s' must not have
a part-of directive"); | 1174 static final CompileTimeErrorCode IMPORT_OF_NON_LIBRARY = new CompileTimeError
Code.con1('IMPORT_OF_NON_LIBRARY', 60, "The imported library '%s' must not have
a part-of directive"); |
| 1044 | 1175 |
| 1045 /** | 1176 /** |
| 1046 * 13.9 Switch: It is a compile-time error if values of the expressions <i>e<s
ub>k</sub></i> are | 1177 * 13.9 Switch: It is a compile-time error if values of the expressions <i>e<s
ub>k</sub></i> are |
| 1047 * not instances of the same class <i>C</i>, for all <i>1 <= k <= n</i>. | 1178 * not instances of the same class <i>C</i>, for all <i>1 <= k <= n</i>. |
| 1048 * | 1179 * |
| 1049 * @param expressionSource the expression source code that is the unexpected t
ype | 1180 * @param expressionSource the expression source code that is the unexpected t
ype |
| 1050 * @param expectedType the name of the expected type | 1181 * @param expectedType the name of the expected type |
| 1051 */ | 1182 */ |
| 1052 static final CompileTimeErrorCode INCONSISTENT_CASE_EXPRESSION_TYPES = new Com
pileTimeErrorCode.con1('INCONSISTENT_CASE_EXPRESSION_TYPES', 60, "Case expressio
ns must have the same types, '%s' is not a %s'"); | 1183 static final CompileTimeErrorCode INCONSISTENT_CASE_EXPRESSION_TYPES = new Com
pileTimeErrorCode.con1('INCONSISTENT_CASE_EXPRESSION_TYPES', 61, "Case expressio
ns must have the same types, '%s' is not a %s'"); |
| 1053 | 1184 |
| 1054 /** | 1185 /** |
| 1055 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time | 1186 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time |
| 1056 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an | 1187 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an |
| 1057 * instance variable declared in the immediately surrounding class. | 1188 * instance variable declared in the immediately surrounding class. |
| 1058 * | 1189 * |
| 1059 * @param id the name of the initializing formal that is not an instance varia
ble in the | 1190 * @param id the name of the initializing formal that is not an instance varia
ble in the |
| 1060 * immediately enclosing class | 1191 * immediately enclosing class |
| 1061 * @see #INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD | 1192 * @see #INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD |
| 1062 */ | 1193 */ |
| 1063 static final CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTANT_FIELD = new Com
pileTimeErrorCode.con1('INITIALIZER_FOR_NON_EXISTANT_FIELD', 61, "'%s' is not a
variable in the enclosing class"); | 1194 static final CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTANT_FIELD = new Com
pileTimeErrorCode.con1('INITIALIZER_FOR_NON_EXISTANT_FIELD', 62, "'%s' is not a
variable in the enclosing class"); |
| 1064 | 1195 |
| 1065 /** | 1196 /** |
| 1066 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time | 1197 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time |
| 1067 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an | 1198 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an |
| 1068 * instance variable declared in the immediately surrounding class. | 1199 * instance variable declared in the immediately surrounding class. |
| 1069 * | 1200 * |
| 1070 * @param id the name of the initializing formal that is a static variable in
the immediately | 1201 * @param id the name of the initializing formal that is a static variable in
the immediately |
| 1071 * enclosing class | 1202 * enclosing class |
| 1072 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD | 1203 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD |
| 1073 */ | 1204 */ |
| 1074 static final CompileTimeErrorCode INITIALIZER_FOR_STATIC_FIELD = new CompileTi
meErrorCode.con1('INITIALIZER_FOR_STATIC_FIELD', 62, "'%s' is a static variable
in the enclosing class, variables initialized in a constructor cannot be static"
); | 1205 static final CompileTimeErrorCode INITIALIZER_FOR_STATIC_FIELD = new CompileTi
meErrorCode.con1('INITIALIZER_FOR_STATIC_FIELD', 63, "'%s' is a static variable
in the enclosing class, variables initialized in a constructor cannot be static"
); |
| 1075 | 1206 |
| 1076 /** | 1207 /** |
| 1077 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a | 1208 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a |
| 1078 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately | 1209 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately |
| 1079 * enclosing class. | 1210 * enclosing class. |
| 1080 * | 1211 * |
| 1081 * @param id the name of the initializing formal that is not an instance varia
ble in the | 1212 * @param id the name of the initializing formal that is not an instance varia
ble in the |
| 1082 * immediately enclosing class | 1213 * immediately enclosing class |
| 1083 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD | 1214 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD |
| 1084 * @see #INITIALIZER_FOR_NON_EXISTANT_FIELD | 1215 * @see #INITIALIZER_FOR_NON_EXISTANT_FIELD |
| 1085 */ | 1216 */ |
| 1086 static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD =
new CompileTimeErrorCode.con1('INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD', 63,
"'%s' is not a variable in the enclosing class"); | 1217 static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD =
new CompileTimeErrorCode.con1('INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD', 64,
"'%s' is not a variable in the enclosing class"); |
| 1087 | 1218 |
| 1088 /** | 1219 /** |
| 1089 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a | 1220 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a |
| 1090 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately | 1221 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately |
| 1091 * enclosing class. | 1222 * enclosing class. |
| 1092 * | 1223 * |
| 1093 * @param id the name of the initializing formal that is a static variable in
the immediately | 1224 * @param id the name of the initializing formal that is a static variable in
the immediately |
| 1094 * enclosing class | 1225 * enclosing class |
| 1095 * @see #INITIALIZER_FOR_STATIC_FIELD | 1226 * @see #INITIALIZER_FOR_STATIC_FIELD |
| 1096 */ | 1227 */ |
| 1097 static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_STATIC_FIELD = new C
ompileTimeErrorCode.con1('INITIALIZING_FORMAL_FOR_STATIC_FIELD', 64, "'%s' is a
static variable in the enclosing class, variables initialized in a constructor c
annot be static"); | 1228 static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_STATIC_FIELD = new C
ompileTimeErrorCode.con1('INITIALIZING_FORMAL_FOR_STATIC_FIELD', 65, "'%s' is a
static variable in the enclosing class, variables initialized in a constructor c
annot be static"); |
| 1098 | 1229 |
| 1099 /** | 1230 /** |
| 1100 * 12.30 Identifier Reference: Otherwise, e is equivalent to the property extr
action | 1231 * 12.30 Identifier Reference: Otherwise, e is equivalent to the property extr
action |
| 1101 * <b>this</b>.<i>id</i>. | 1232 * <b>this</b>.<i>id</i>. |
| 1102 */ | 1233 */ |
| 1103 static final CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_STATIC = new Com
pileTimeErrorCode.con1('INSTANCE_MEMBER_ACCESS_FROM_STATIC', 65, "Instance membe
r cannot be accessed from static method"); | 1234 static final CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_STATIC = new Com
pileTimeErrorCode.con1('INSTANCE_MEMBER_ACCESS_FROM_STATIC', 66, "Instance membe
r cannot be accessed from static method"); |
| 1104 | 1235 |
| 1105 /** | 1236 /** |
| 1106 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the | 1237 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the |
| 1107 * character @, followed by a constant expression that must be either a refere
nce to a | 1238 * character @, followed by a constant expression that must be either a refere
nce to a |
| 1108 * compile-time constant variable, or a call to a constant constructor. | 1239 * compile-time constant variable, or a call to a constant constructor. |
| 1109 */ | 1240 */ |
| 1110 static final CompileTimeErrorCode INVALID_ANNOTATION = new CompileTimeErrorCod
e.con1('INVALID_ANNOTATION', 66, "Annotation can be only constant variable or co
nstant constructor invocation"); | 1241 static final CompileTimeErrorCode INVALID_ANNOTATION = new CompileTimeErrorCod
e.con1('INVALID_ANNOTATION', 67, "Annotation can be only constant variable or co
nstant constructor invocation"); |
| 1111 | 1242 |
| 1112 /** | 1243 /** |
| 1113 * TODO(brianwilkerson) Remove this when we have decided on how to report erro
rs in compile-time | 1244 * TODO(brianwilkerson) Remove this when we have decided on how to report erro
rs in compile-time |
| 1114 * constants. Until then, this acts as a placeholder for more informative erro
rs. | 1245 * constants. Until then, this acts as a placeholder for more informative erro
rs. |
| 1115 * | 1246 * |
| 1116 * See TODOs in ConstantVisitor | 1247 * See TODOs in ConstantVisitor |
| 1117 */ | 1248 */ |
| 1118 static final CompileTimeErrorCode INVALID_CONSTANT = new CompileTimeErrorCode.
con1('INVALID_CONSTANT', 67, "Invalid constant value"); | 1249 static final CompileTimeErrorCode INVALID_CONSTANT = new CompileTimeErrorCode.
con1('INVALID_CONSTANT', 68, "Invalid constant value"); |
| 1119 | 1250 |
| 1120 /** | 1251 /** |
| 1121 * 7.6 Constructors: It is a compile-time error if the name of a constructor i
s not a constructor | 1252 * 7.6 Constructors: It is a compile-time error if the name of a constructor i
s not a constructor |
| 1122 * name. | 1253 * name. |
| 1123 */ | 1254 */ |
| 1124 static final CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = new CompileTimeEr
rorCode.con1('INVALID_CONSTRUCTOR_NAME', 68, "Invalid constructor name"); | 1255 static final CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = new CompileTimeEr
rorCode.con1('INVALID_CONSTRUCTOR_NAME', 69, "Invalid constructor name"); |
| 1125 | 1256 |
| 1126 /** | 1257 /** |
| 1127 * 7.6.2 Factories: It is a compile-time error if <i>M</i> is not the name of
the immediately | 1258 * 7.6.2 Factories: It is a compile-time error if <i>M</i> is not the name of
the immediately |
| 1128 * enclosing class. | 1259 * enclosing class. |
| 1129 */ | 1260 */ |
| 1130 static final CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS = new Compi
leTimeErrorCode.con1('INVALID_FACTORY_NAME_NOT_A_CLASS', 69, "The name of the im
mediately enclosing class expected"); | 1261 static final CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS = new Compi
leTimeErrorCode.con1('INVALID_FACTORY_NAME_NOT_A_CLASS', 70, "The name of the im
mediately enclosing class expected"); |
| 1131 | 1262 |
| 1132 /** | 1263 /** |
| 1133 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable | 1264 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable |
| 1134 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the | 1265 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the |
| 1135 * initializer of an instance variable. | 1266 * initializer of an instance variable. |
| 1136 */ | 1267 */ |
| 1137 static final CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = new CompileTimeE
rrorCode.con1('INVALID_REFERENCE_TO_THIS', 70, "Invalid reference to 'this' expr
ession"); | 1268 static final CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = new CompileTimeE
rrorCode.con1('INVALID_REFERENCE_TO_THIS', 71, "Invalid reference to 'this' expr
ession"); |
| 1138 | 1269 |
| 1139 /** | 1270 /** |
| 1140 * 12.6 Lists: It is a compile time error if the type argument of a constant l
ist literal includes | 1271 * 12.6 Lists: It is a compile time error if the type argument of a constant l
ist literal includes |
| 1141 * a type parameter. | 1272 * a type parameter. |
| 1142 * | 1273 * |
| 1143 * @name the name of the type parameter | 1274 * @name the name of the type parameter |
| 1144 */ | 1275 */ |
| 1145 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST = new Co
mpileTimeErrorCode.con1('INVALID_TYPE_ARGUMENT_IN_CONST_LIST', 71, "Constant lis
t literals cannot include a type parameter as a type argument, such as '%s'"); | 1276 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST = new Co
mpileTimeErrorCode.con1('INVALID_TYPE_ARGUMENT_IN_CONST_LIST', 72, "Constant lis
t literals cannot include a type parameter as a type argument, such as '%s'"); |
| 1146 | 1277 |
| 1147 /** | 1278 /** |
| 1148 * 12.7 Maps: It is a compile time error if the type arguments of a constant m
ap literal include a | 1279 * 12.7 Maps: It is a compile time error if the type arguments of a constant m
ap literal include a |
| 1149 * type parameter. | 1280 * type parameter. |
| 1150 * | 1281 * |
| 1151 * @name the name of the type parameter | 1282 * @name the name of the type parameter |
| 1152 */ | 1283 */ |
| 1153 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = new Com
pileTimeErrorCode.con1('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 72, "Constant map l
iterals cannot include a type parameter as a type argument, such as '%s'"); | 1284 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = new Com
pileTimeErrorCode.con1('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 73, "Constant map l
iterals cannot include a type parameter as a type argument, such as '%s'"); |
| 1154 | 1285 |
| 1155 /** | 1286 /** |
| 1156 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1287 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 1157 * not a library declaration. | 1288 * not a library declaration. |
| 1158 * | 1289 * |
| 1159 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1290 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 1160 * not a library declaration. | 1291 * not a library declaration. |
| 1161 * | 1292 * |
| 1162 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part | 1293 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part |
| 1163 * declaration. | 1294 * declaration. |
| 1164 * | 1295 * |
| 1165 * @param uri the URI that is invalid | 1296 * @param uri the URI that is invalid |
| 1166 * @see #URI_DOES_NOT_EXIST | 1297 * @see #URI_DOES_NOT_EXIST |
| 1167 */ | 1298 */ |
| 1168 static final CompileTimeErrorCode INVALID_URI = new CompileTimeErrorCode.con1(
'INVALID_URI', 73, "Invalid URI syntax: '%s'"); | 1299 static final CompileTimeErrorCode INVALID_URI = new CompileTimeErrorCode.con1(
'INVALID_URI', 74, "Invalid URI syntax: '%s'"); |
| 1169 | 1300 |
| 1170 /** | 1301 /** |
| 1171 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within | 1302 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within |
| 1172 * the innermost function in which <i>s<sub>b</sub></i> occurs. | 1303 * the innermost function in which <i>s<sub>b</sub></i> occurs. |
| 1173 * | 1304 * |
| 1174 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use | 1305 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use |
| 1175 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. | 1306 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. |
| 1176 * | 1307 * |
| 1177 * @param labelName the name of the unresolvable label | 1308 * @param labelName the name of the unresolvable label |
| 1178 */ | 1309 */ |
| 1179 static final CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = new CompileTimeErrorC
ode.con1('LABEL_IN_OUTER_SCOPE', 74, "Cannot reference label '%s' declared in an
outer method"); | 1310 static final CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = new CompileTimeErrorC
ode.con1('LABEL_IN_OUTER_SCOPE', 75, "Cannot reference label '%s' declared in an
outer method"); |
| 1180 | 1311 |
| 1181 /** | 1312 /** |
| 1182 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within | 1313 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within |
| 1183 * the innermost function in which <i>s<sub>b</sub></i> occurs. | 1314 * the innermost function in which <i>s<sub>b</sub></i> occurs. |
| 1184 * | 1315 * |
| 1185 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use | 1316 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use |
| 1186 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. | 1317 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. |
| 1187 * | 1318 * |
| 1188 * @param labelName the name of the unresolvable label | 1319 * @param labelName the name of the unresolvable label |
| 1189 */ | 1320 */ |
| 1190 static final CompileTimeErrorCode LABEL_UNDEFINED = new CompileTimeErrorCode.c
on1('LABEL_UNDEFINED', 75, "Cannot reference undefined label '%s'"); | 1321 static final CompileTimeErrorCode LABEL_UNDEFINED = new CompileTimeErrorCode.c
on1('LABEL_UNDEFINED', 76, "Cannot reference undefined label '%s'"); |
| 1191 | 1322 |
| 1192 /** | 1323 /** |
| 1193 * 12.6 Lists: A run-time list literal <<i>E</i>> [<i>e<sub>1</sub></i>
... | 1324 * 12.6 Lists: A run-time list literal <<i>E</i>> [<i>e<sub>1</sub></i>
... |
| 1194 * <i>e<sub>n</sub></i>] is evaluated as follows: | 1325 * <i>e<sub>n</sub></i>] is evaluated as follows: |
| 1195 * | 1326 * |
| 1196 * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and
second argument | 1327 * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and
second argument |
| 1197 * <i>o<sub>i+1</sub></i><i>, 1 <= i <= n</i> | 1328 * <i>o<sub>i+1</sub></i><i>, 1 <= i <= n</i> |
| 1198 * | 1329 * |
| 1199 * | 1330 * |
| 1200 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 1331 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
| 1201 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s
ub>, 1 <= i <= | 1332 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s
ub>, 1 <= i <= |
| 1202 * n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i>
q</i> of <i>f</i>. | 1333 * n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i>
q</i> of <i>f</i>. |
| 1203 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 1334 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
| 1204 * j <= m</i>. | 1335 * j <= m</i>. |
| 1205 */ | 1336 */ |
| 1206 static final CompileTimeErrorCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = new Compi
leTimeErrorCode.con1('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 76, "The element type '
%s' cannot be assigned to the list type '%s'"); | 1337 static final CompileTimeErrorCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = new Compi
leTimeErrorCode.con1('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 77, "The element type '
%s' cannot be assigned to the list type '%s'"); |
| 1207 | 1338 |
| 1208 /** | 1339 /** |
| 1209 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : | 1340 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : |
| 1210 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: | 1341 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: |
| 1211 * | 1342 * |
| 1212 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second | 1343 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second |
| 1213 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> | 1344 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> |
| 1214 * | 1345 * |
| 1215 * | 1346 * |
| 1216 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 1347 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
| 1217 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s
ub>, 1 <= i <= | 1348 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s
ub>, 1 <= i <= |
| 1218 * n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i>
q</i> of <i>f</i>. | 1349 * n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i>
q</i> of <i>f</i>. |
| 1219 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 1350 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
| 1220 * j <= m</i>. | 1351 * j <= m</i>. |
| 1221 */ | 1352 */ |
| 1222 static final CompileTimeErrorCode MAP_KEY_TYPE_NOT_ASSIGNABLE = new CompileTim
eErrorCode.con1('MAP_KEY_TYPE_NOT_ASSIGNABLE', 77, "The element type '%s' cannot
be assigned to the map key type '%s'"); | 1353 static final CompileTimeErrorCode MAP_KEY_TYPE_NOT_ASSIGNABLE = new CompileTim
eErrorCode.con1('MAP_KEY_TYPE_NOT_ASSIGNABLE', 78, "The element type '%s' cannot
be assigned to the map key type '%s'"); |
| 1223 | 1354 |
| 1224 /** | 1355 /** |
| 1225 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : | 1356 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : |
| 1226 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: | 1357 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: |
| 1227 * | 1358 * |
| 1228 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second | 1359 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second |
| 1229 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> | 1360 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> |
| 1230 * | 1361 * |
| 1231 * | 1362 * |
| 1232 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 1363 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
| 1233 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s
ub>, 1 <= i <= | 1364 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s
ub>, 1 <= i <= |
| 1234 * n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i>
q</i> of <i>f</i>. | 1365 * n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i>
q</i> of <i>f</i>. |
| 1235 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 1366 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
| 1236 * j <= m</i>. | 1367 * j <= m</i>. |
| 1237 */ | 1368 */ |
| 1238 static final CompileTimeErrorCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = new CompileT
imeErrorCode.con1('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 78, "The element type '%s' ca
nnot be assigned to the map value type '%s'"); | 1369 static final CompileTimeErrorCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = new CompileT
imeErrorCode.con1('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 79, "The element type '%s' ca
nnot be assigned to the map value type '%s'"); |
| 1239 | 1370 |
| 1240 /** | 1371 /** |
| 1241 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member
with the same name | 1372 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member
with the same name |
| 1242 * as <i>C</i>. | 1373 * as <i>C</i>. |
| 1243 */ | 1374 */ |
| 1244 static final CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = new CompileTimeErro
rCode.con1('MEMBER_WITH_CLASS_NAME', 79, "Class members cannot have the same nam
e as the enclosing class"); | 1375 static final CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = new CompileTimeErro
rCode.con1('MEMBER_WITH_CLASS_NAME', 80, "Class members cannot have the same nam
e as the enclosing class"); |
| 1245 | 1376 |
| 1246 /** | 1377 /** |
| 1247 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same | 1378 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same |
| 1248 * name. | 1379 * name. |
| 1249 * | 1380 * |
| 1250 * @param name the conflicting name of the getter and method | 1381 * @param name the conflicting name of the getter and method |
| 1251 */ | 1382 */ |
| 1252 static final CompileTimeErrorCode METHOD_AND_GETTER_WITH_SAME_NAME = new Compi
leTimeErrorCode.con1('METHOD_AND_GETTER_WITH_SAME_NAME', 80, "'%s' cannot be use
d to name a method, there is already a getter with the same name"); | 1383 static final CompileTimeErrorCode METHOD_AND_GETTER_WITH_SAME_NAME = new Compi
leTimeErrorCode.con1('METHOD_AND_GETTER_WITH_SAME_NAME', 81, "'%s' cannot be use
d to name a method, there is already a getter with the same name"); |
| 1253 | 1384 |
| 1254 /** | 1385 /** |
| 1255 * 12.1 Constants: A constant expression is ... a constant list literal. | 1386 * 12.1 Constants: A constant expression is ... a constant list literal. |
| 1256 */ | 1387 */ |
| 1257 static final CompileTimeErrorCode MISSING_CONST_IN_LIST_LITERAL = new CompileT
imeErrorCode.con1('MISSING_CONST_IN_LIST_LITERAL', 81, "List literals must be pr
efixed with 'const' when used as a constant expression"); | 1388 static final CompileTimeErrorCode MISSING_CONST_IN_LIST_LITERAL = new CompileT
imeErrorCode.con1('MISSING_CONST_IN_LIST_LITERAL', 82, "List literals must be pr
efixed with 'const' when used as a constant expression"); |
| 1258 | 1389 |
| 1259 /** | 1390 /** |
| 1260 * 12.1 Constants: A constant expression is ... a constant map literal. | 1391 * 12.1 Constants: A constant expression is ... a constant map literal. |
| 1261 */ | 1392 */ |
| 1262 static final CompileTimeErrorCode MISSING_CONST_IN_MAP_LITERAL = new CompileTi
meErrorCode.con1('MISSING_CONST_IN_MAP_LITERAL', 82, "Map literals must be prefi
xed with 'const' when used as a constant expression"); | 1393 static final CompileTimeErrorCode MISSING_CONST_IN_MAP_LITERAL = new CompileTi
meErrorCode.con1('MISSING_CONST_IN_MAP_LITERAL', 83, "Map literals must be prefi
xed with 'const' when used as a constant expression"); |
| 1263 | 1394 |
| 1264 /** | 1395 /** |
| 1265 * 9 Mixins: It is a compile-time error if a declared or derived mixin explici
tly declares a | 1396 * 9 Mixins: It is a compile-time error if a declared or derived mixin explici
tly declares a |
| 1266 * constructor. | 1397 * constructor. |
| 1267 * | 1398 * |
| 1268 * @param typeName the name of the mixin that is invalid | 1399 * @param typeName the name of the mixin that is invalid |
| 1269 */ | 1400 */ |
| 1270 static final CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = new CompileTime
ErrorCode.con1('MIXIN_DECLARES_CONSTRUCTOR', 83, "The class '%s' cannot be used
as a mixin because it declares a constructor"); | 1401 static final CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = new CompileTime
ErrorCode.con1('MIXIN_DECLARES_CONSTRUCTOR', 84, "The class '%s' cannot be used
as a mixin because it declares a constructor"); |
| 1271 | 1402 |
| 1272 /** | 1403 /** |
| 1273 * 9 Mixins: It is a compile-time error if a mixin is derived from a class who
se superclass is not | 1404 * 9 Mixins: It is a compile-time error if a mixin is derived from a class who
se superclass is not |
| 1274 * Object. | 1405 * Object. |
| 1275 * | 1406 * |
| 1276 * @param typeName the name of the mixin that is invalid | 1407 * @param typeName the name of the mixin that is invalid |
| 1277 */ | 1408 */ |
| 1278 static final CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = new Compile
TimeErrorCode.con1('MIXIN_INHERITS_FROM_NOT_OBJECT', 84, "The class '%s' cannot
be used as a mixin because it extends a class other than Object"); | 1409 static final CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = new Compile
TimeErrorCode.con1('MIXIN_INHERITS_FROM_NOT_OBJECT', 85, "The class '%s' cannot
be used as a mixin because it extends a class other than Object"); |
| 1279 | 1410 |
| 1280 /** | 1411 /** |
| 1281 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. | 1412 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. |
| 1282 * | 1413 * |
| 1283 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. | 1414 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. |
| 1284 * | 1415 * |
| 1285 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. | 1416 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. |
| 1286 * | 1417 * |
| 1287 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to | 1418 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to |
| 1288 * attempt to extend or implement num. | 1419 * attempt to extend or implement num. |
| 1289 * | 1420 * |
| 1290 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. | 1421 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. |
| 1291 * | 1422 * |
| 1292 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. | 1423 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. |
| 1293 * | 1424 * |
| 1294 * @param typeName the name of the type that cannot be extended | 1425 * @param typeName the name of the type that cannot be extended |
| 1295 * @see #IMPLEMENTS_DISALLOWED_CLASS | 1426 * @see #IMPLEMENTS_DISALLOWED_CLASS |
| 1296 */ | 1427 */ |
| 1297 static final CompileTimeErrorCode MIXIN_OF_DISALLOWED_CLASS = new CompileTimeE
rrorCode.con1('MIXIN_OF_DISALLOWED_CLASS', 85, "Classes cannot mixin '%s'"); | 1428 static final CompileTimeErrorCode MIXIN_OF_DISALLOWED_CLASS = new CompileTimeE
rrorCode.con1('MIXIN_OF_DISALLOWED_CLASS', 86, "Classes cannot mixin '%s'"); |
| 1298 | 1429 |
| 1299 /** | 1430 /** |
| 1300 * 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not deno
te a class or mixin | 1431 * 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not deno
te a class or mixin |
| 1301 * available in the immediately enclosing scope. | 1432 * available in the immediately enclosing scope. |
| 1302 */ | 1433 */ |
| 1303 static final CompileTimeErrorCode MIXIN_OF_NON_CLASS = new CompileTimeErrorCod
e.con1('MIXIN_OF_NON_CLASS', 86, "Classes can only mixin other classes"); | 1434 static final CompileTimeErrorCode MIXIN_OF_NON_CLASS = new CompileTimeErrorCod
e.con1('MIXIN_OF_NON_CLASS', 87, "Classes can only mixin other classes"); |
| 1304 | 1435 |
| 1305 /** | 1436 /** |
| 1306 * 9 Mixins: It is a compile-time error if a declared or derived mixin refers
to super. | 1437 * 9 Mixins: It is a compile-time error if a declared or derived mixin refers
to super. |
| 1307 */ | 1438 */ |
| 1308 static final CompileTimeErrorCode MIXIN_REFERENCES_SUPER = new CompileTimeErro
rCode.con1('MIXIN_REFERENCES_SUPER', 87, "The class '%s' cannot be used as a mix
in because it references 'super'"); | 1439 static final CompileTimeErrorCode MIXIN_REFERENCES_SUPER = new CompileTimeErro
rCode.con1('MIXIN_REFERENCES_SUPER', 88, "The class '%s' cannot be used as a mix
in because it references 'super'"); |
| 1309 | 1440 |
| 1310 /** | 1441 /** |
| 1311 * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not deno
te a class available | 1442 * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not deno
te a class available |
| 1312 * in the immediately enclosing scope. | 1443 * in the immediately enclosing scope. |
| 1313 */ | 1444 */ |
| 1314 static final CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = new Compil
eTimeErrorCode.con1('MIXIN_WITH_NON_CLASS_SUPERCLASS', 88, "Mixin can only be ap
plied to class"); | 1445 static final CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = new Compil
eTimeErrorCode.con1('MIXIN_WITH_NON_CLASS_SUPERCLASS', 89, "Mixin can only be ap
plied to class"); |
| 1315 | 1446 |
| 1316 /** | 1447 /** |
| 1317 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 1448 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
| 1318 * only action is to invoke another generative constructor. | 1449 * only action is to invoke another generative constructor. |
| 1319 */ | 1450 */ |
| 1320 static final CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS
= new CompileTimeErrorCode.con1('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS',
89, "Constructor may have at most one 'this' redirection"); | 1451 static final CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS
= new CompileTimeErrorCode.con1('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS',
90, "Constructor may have at most one 'this' redirection"); |
| 1321 | 1452 |
| 1322 /** | 1453 /** |
| 1323 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Th
en <i>k</i> may | 1454 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Th
en <i>k</i> may |
| 1324 * include at most one superinitializer in its initializer list or a compile t
ime error occurs. | 1455 * include at most one superinitializer in its initializer list or a compile t
ime error occurs. |
| 1325 */ | 1456 */ |
| 1326 static final CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = new CompileTim
eErrorCode.con1('MULTIPLE_SUPER_INITIALIZERS', 90, "Constructor may have at most
one 'super' initializer"); | 1457 static final CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = new CompileTim
eErrorCode.con1('MULTIPLE_SUPER_INITIALIZERS', 91, "Constructor may have at most
one 'super' initializer"); |
| 1327 | 1458 |
| 1328 /** | 1459 /** |
| 1329 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the | 1460 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the |
| 1330 * character @, followed by a constant expression that must be either a refere
nce to a | 1461 * character @, followed by a constant expression that must be either a refere
nce to a |
| 1331 * compile-time constant variable, or a call to a constant constructor. | 1462 * compile-time constant variable, or a call to a constant constructor. |
| 1332 */ | 1463 */ |
| 1333 static final CompileTimeErrorCode NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS = new Co
mpileTimeErrorCode.con1('NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS', 91, "Annotation c
reation must have arguments"); | 1464 static final CompileTimeErrorCode NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS = new Co
mpileTimeErrorCode.con1('NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS', 92, "Annotation c
reation must have arguments"); |
| 1334 | 1465 |
| 1335 /** | 1466 /** |
| 1336 * 7.6.1 Generative Constructors: If no superinitializer is provided, an impli
cit superinitializer | 1467 * 7.6.1 Generative Constructors: If no superinitializer is provided, an impli
cit superinitializer |
| 1337 * of the form <b>super</b>() is added at the end of <i>k</i>'s initializer li
st, unless the | 1468 * of the form <b>super</b>() is added at the end of <i>k</i>'s initializer li
st, unless the |
| 1338 * enclosing class is class <i>Object</i>. | 1469 * enclosing class is class <i>Object</i>. |
| 1339 * | 1470 * |
| 1340 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i>
does not declare a | 1471 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i>
does not declare a |
| 1341 * generative constructor named <i>S</i> (respectively <i>S.id</i>) | 1472 * generative constructor named <i>S</i> (respectively <i>S.id</i>) |
| 1342 */ | 1473 */ |
| 1343 static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT = new
CompileTimeErrorCode.con1('NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT', 92, "The clas
s '%s' does not have a default constructor"); | 1474 static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT = new
CompileTimeErrorCode.con1('NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT', 93, "The clas
s '%s' does not have a default constructor"); |
| 1344 | 1475 |
| 1345 /** | 1476 /** |
| 1346 * 7.6 Constructors: Iff no constructor is specified for a class <i>C</i>, it
implicitly has a | 1477 * 7.6 Constructors: Iff no constructor is specified for a class <i>C</i>, it
implicitly has a |
| 1347 * default constructor C() : <b>super<b>() {}, unless <i>C</i> is class <i>Obj
ect</i>. | 1478 * default constructor C() : <b>super<b>() {}, unless <i>C</i> is class <i>Obj
ect</i>. |
| 1348 * | 1479 * |
| 1349 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i>
does not declare a | 1480 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i>
does not declare a |
| 1350 * generative constructor named <i>S</i> (respectively <i>S.id</i>) | 1481 * generative constructor named <i>S</i> (respectively <i>S.id</i>) |
| 1351 */ | 1482 */ |
| 1352 static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT = new
CompileTimeErrorCode.con1('NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT', 93, "The clas
s '%s' does not have a default constructor"); | 1483 static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT = new
CompileTimeErrorCode.con1('NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT', 94, "The clas
s '%s' does not have a default constructor"); |
| 1353 | 1484 |
| 1354 /** | 1485 /** |
| 1355 * 13.2 Expression Statements: It is a compile-time error if a non-constant ma
p literal that has | 1486 * 13.2 Expression Statements: It is a compile-time error if a non-constant ma
p literal that has |
| 1356 * no explicit type arguments appears in a place where a statement is expected
. | 1487 * no explicit type arguments appears in a place where a statement is expected
. |
| 1357 */ | 1488 */ |
| 1358 static final CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = new
CompileTimeErrorCode.con1('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 94, "A non-co
nstant map literal without type arguments cannot be used as an expression statem
ent"); | 1489 static final CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = new
CompileTimeErrorCode.con1('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 95, "A non-co
nstant map literal without type arguments cannot be used as an expression statem
ent"); |
| 1359 | 1490 |
| 1360 /** | 1491 /** |
| 1361 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub
>11</sub> … | 1492 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub
>11</sub> … |
| 1362 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> … label<sub>n1
</sub> … | 1493 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> … label<sub>n1
</sub> … |
| 1363 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s
ub>}</i> or the form | 1494 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s
ub>}</i> or the form |
| 1364 * <i>switch (e) { label<sub>11</sub> … label<sub>1j1</sub> case e<sub>
1</sub>: | 1495 * <i>switch (e) { label<sub>11</sub> … label<sub>1j1</sub> case e<sub>
1</sub>: |
| 1365 * s<sub>1</sub> … label<sub>n1</sub> … label<sub>njn</sub> case
e<sub>n</sub>: | 1496 * s<sub>1</sub> … label<sub>n1</sub> … label<sub>njn</sub> case
e<sub>n</sub>: |
| 1366 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub>
k</sub></i> are not | 1497 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub>
k</sub></i> are not |
| 1367 * compile-time constants, for all <i>1 <= k <= n</i>. | 1498 * compile-time constants, for all <i>1 <= k <= n</i>. |
| 1368 */ | 1499 */ |
| 1369 static final CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = new CompileTi
meErrorCode.con1('NON_CONSTANT_CASE_EXPRESSION', 95, "Case expressions must be c
onstant"); | 1500 static final CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = new CompileTi
meErrorCode.con1('NON_CONSTANT_CASE_EXPRESSION', 96, "Case expressions must be c
onstant"); |
| 1370 | 1501 |
| 1371 /** | 1502 /** |
| 1372 * 6.2.2 Optional Formals: It is a compile-time error if the default value of
an optional | 1503 * 6.2.2 Optional Formals: It is a compile-time error if the default value of
an optional |
| 1373 * parameter is not a compile-time constant. | 1504 * parameter is not a compile-time constant. |
| 1374 */ | 1505 */ |
| 1375 static final CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = new CompileTime
ErrorCode.con1('NON_CONSTANT_DEFAULT_VALUE', 96, "Default values of an optional
parameter must be constant"); | 1506 static final CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = new CompileTime
ErrorCode.con1('NON_CONSTANT_DEFAULT_VALUE', 97, "Default values of an optional
parameter must be constant"); |
| 1376 | 1507 |
| 1377 /** | 1508 /** |
| 1378 * 12.6 Lists: It is a compile time error if an element of a constant list lit
eral is not a | 1509 * 12.6 Lists: It is a compile time error if an element of a constant list lit
eral is not a |
| 1379 * compile-time constant. | 1510 * compile-time constant. |
| 1380 */ | 1511 */ |
| 1381 static final CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = new CompileTimeE
rrorCode.con1('NON_CONSTANT_LIST_ELEMENT', 97, "'const' lists must have all cons
tant values"); | 1512 static final CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = new CompileTimeE
rrorCode.con1('NON_CONSTANT_LIST_ELEMENT', 98, "'const' lists must have all cons
tant values"); |
| 1382 | 1513 |
| 1383 /** | 1514 /** |
| 1384 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map | 1515 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map |
| 1385 * literal is not a compile-time constant. | 1516 * literal is not a compile-time constant. |
| 1386 */ | 1517 */ |
| 1387 static final CompileTimeErrorCode NON_CONSTANT_MAP_KEY = new CompileTimeErrorC
ode.con1('NON_CONSTANT_MAP_KEY', 98, "The keys in a map must be constant"); | 1518 static final CompileTimeErrorCode NON_CONSTANT_MAP_KEY = new CompileTimeErrorC
ode.con1('NON_CONSTANT_MAP_KEY', 99, "The keys in a map must be constant"); |
| 1388 | 1519 |
| 1389 /** | 1520 /** |
| 1390 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map | 1521 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map |
| 1391 * literal is not a compile-time constant. | 1522 * literal is not a compile-time constant. |
| 1392 */ | 1523 */ |
| 1393 static final CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = new CompileTimeErro
rCode.con1('NON_CONSTANT_MAP_VALUE', 99, "The values in a 'const' map must be co
nstant"); | 1524 static final CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = new CompileTimeErro
rCode.con1('NON_CONSTANT_MAP_VALUE', 100, "The values in a 'const' map must be c
onstant"); |
| 1394 | 1525 |
| 1395 /** | 1526 /** |
| 1396 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the | 1527 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the |
| 1397 * character @, followed by a constant expression that must be either a refere
nce to a | 1528 * character @, followed by a constant expression that must be either a refere
nce to a |
| 1398 * compile-time constant variable, or a call to a constant constructor. | 1529 * compile-time constant variable, or a call to a constant constructor. |
| 1399 */ | 1530 */ |
| 1400 static final CompileTimeErrorCode NON_CONSTANT_ANNOTATION_CONSTRUCTOR = new Co
mpileTimeErrorCode.con1('NON_CONSTANT_ANNOTATION_CONSTRUCTOR', 100, "Annotation
creation can use only 'const' constructor"); | 1531 static final CompileTimeErrorCode NON_CONSTANT_ANNOTATION_CONSTRUCTOR = new Co
mpileTimeErrorCode.con1('NON_CONSTANT_ANNOTATION_CONSTRUCTOR', 101, "Annotation
creation can use only 'const' constructor"); |
| 1401 | 1532 |
| 1402 /** | 1533 /** |
| 1403 * 7.6.3 Constant Constructors: Any expression that appears within the initial
izer list of a | 1534 * 7.6.3 Constant Constructors: Any expression that appears within the initial
izer list of a |
| 1404 * constant constructor must be a potentially constant expression, or a compil
e-time error occurs. | 1535 * constant constructor must be a potentially constant expression, or a compil
e-time error occurs. |
| 1405 */ | 1536 */ |
| 1406 static final CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = new Comp
ileTimeErrorCode.con1('NON_CONSTANT_VALUE_IN_INITIALIZER', 101, "Initializer exp
ressions in constant constructors must be constants"); | 1537 static final CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = new Comp
ileTimeErrorCode.con1('NON_CONSTANT_VALUE_IN_INITIALIZER', 102, "Initializer exp
ressions in constant constructors must be constants"); |
| 1407 | 1538 |
| 1408 /** | 1539 /** |
| 1409 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i>
or if <i>m > n</i>. | 1540 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i>
or if <i>m > n</i>. |
| 1410 * | 1541 * |
| 1411 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 1542 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 1412 * uncaught exception being thrown. | 1543 * uncaught exception being thrown. |
| 1413 * | 1544 * |
| 1414 * @param requiredCount the expected number of required arguments | 1545 * @param requiredCount the expected number of required arguments |
| 1415 * @param argumentCount the actual number of positional arguments given | 1546 * @param argumentCount the actual number of positional arguments given |
| 1416 */ | 1547 */ |
| 1417 static final CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new CompileT
imeErrorCode.con1('NOT_ENOUGH_REQUIRED_ARGUMENTS', 102, "%d required argument(s)
expected, but %d found"); | 1548 static final CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new CompileT
imeErrorCode.con1('NOT_ENOUGH_REQUIRED_ARGUMENTS', 103, "%d required argument(s)
expected, but %d found"); |
| 1418 | 1549 |
| 1419 /** | 1550 /** |
| 1420 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears | 1551 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears |
| 1421 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is | 1552 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is |
| 1422 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> | 1553 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> |
| 1423 * (respectively <i>S.id</i>) | 1554 * (respectively <i>S.id</i>) |
| 1424 */ | 1555 */ |
| 1425 static final CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR = new CompileTime
ErrorCode.con1('NON_GENERATIVE_CONSTRUCTOR', 103, "The generative constructor '%
s' expected, but factory found"); | 1556 static final CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR = new CompileTime
ErrorCode.con1('NON_GENERATIVE_CONSTRUCTOR', 104, "The generative constructor '%
s' expected, but factory found"); |
| 1426 | 1557 |
| 1427 /** | 1558 /** |
| 1428 * 7.9 Superclasses: It is a compile-time error to specify an extends clause f
or class Object. | 1559 * 7.9 Superclasses: It is a compile-time error to specify an extends clause f
or class Object. |
| 1429 */ | 1560 */ |
| 1430 static final CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = new Com
pileTimeErrorCode.con1('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 104, ""); | 1561 static final CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = new Com
pileTimeErrorCode.con1('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 105, ""); |
| 1431 | 1562 |
| 1432 /** | 1563 /** |
| 1433 * 7.1.1 Operators: It is a compile-time error to declare an optional paramete
r in an operator. | 1564 * 7.1.1 Operators: It is a compile-time error to declare an optional paramete
r in an operator. |
| 1434 */ | 1565 */ |
| 1435 static final CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = new Compile
TimeErrorCode.con1('OPTIONAL_PARAMETER_IN_OPERATOR', 105, "Optional parameters a
re not allowed when defining an operator"); | 1566 static final CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = new Compile
TimeErrorCode.con1('OPTIONAL_PARAMETER_IN_OPERATOR', 106, "Optional parameters a
re not allowed when defining an operator"); |
| 1436 | 1567 |
| 1437 /** | 1568 /** |
| 1438 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part | 1569 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part |
| 1439 * declaration. | 1570 * declaration. |
| 1440 * | 1571 * |
| 1441 * @param uri the uri pointing to a non-library declaration | 1572 * @param uri the uri pointing to a non-library declaration |
| 1442 */ | 1573 */ |
| 1443 static final CompileTimeErrorCode PART_OF_NON_PART = new CompileTimeErrorCode.
con1('PART_OF_NON_PART', 106, "The included part '%s' must have a part-of direct
ive"); | 1574 static final CompileTimeErrorCode PART_OF_NON_PART = new CompileTimeErrorCode.
con1('PART_OF_NON_PART', 107, "The included part '%s' must have a part-of direct
ive"); |
| 1444 | 1575 |
| 1445 /** | 1576 /** |
| 1446 * 14.1 Imports: It is a compile-time error if the current library declares a
top-level member | 1577 * 14.1 Imports: It is a compile-time error if the current library declares a
top-level member |
| 1447 * named <i>p</i>. | 1578 * named <i>p</i>. |
| 1448 */ | 1579 */ |
| 1449 static final CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = new
CompileTimeErrorCode.con1('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 107, "The nam
e '%s' is already used as an import prefix and cannot be used to name a top-leve
l element"); | 1580 static final CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = new
CompileTimeErrorCode.con1('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 108, "The nam
e '%s' is already used as an import prefix and cannot be used to name a top-leve
l element"); |
| 1450 | 1581 |
| 1451 /** | 1582 /** |
| 1452 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named o
ptional parameter | 1583 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named o
ptional parameter |
| 1453 * begins with an '_' character. | 1584 * begins with an '_' character. |
| 1454 */ | 1585 */ |
| 1455 static final CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = new CompileTime
ErrorCode.con1('PRIVATE_OPTIONAL_PARAMETER', 108, "Named optional parameters can
not start with an underscore"); | 1586 static final CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = new CompileTime
ErrorCode.con1('PRIVATE_OPTIONAL_PARAMETER', 109, "Named optional parameters can
not start with an underscore"); |
| 1456 | 1587 |
| 1457 /** | 1588 /** |
| 1458 * 12.1 Constants: It is a compile-time error if the value of a compile-time c
onstant expression | 1589 * 12.1 Constants: It is a compile-time error if the value of a compile-time c
onstant expression |
| 1459 * depends on itself. | 1590 * depends on itself. |
| 1460 */ | 1591 */ |
| 1461 static final CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = new Compil
eTimeErrorCode.con1('RECURSIVE_COMPILE_TIME_CONSTANT', 109, ""); | 1592 static final CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = new Compil
eTimeErrorCode.con1('RECURSIVE_COMPILE_TIME_CONSTANT', 110, ""); |
| 1462 | 1593 |
| 1463 /** | 1594 /** |
| 1464 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 1595 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
| 1465 * only action is to invoke another generative constructor. | 1596 * only action is to invoke another generative constructor. |
| 1466 * | 1597 * |
| 1467 * TODO(scheglov) review this later, there are no explicit "it is a compile-ti
me error" in | 1598 * TODO(scheglov) review this later, there are no explicit "it is a compile-ti
me error" in |
| 1468 * specification. But it was added to the co19 and there is same error for fac
tories. | 1599 * specification. But it was added to the co19 and there is same error for fac
tories. |
| 1469 * | 1600 * |
| 1470 * https://code.google.com/p/dart/issues/detail?id=954 | 1601 * https://code.google.com/p/dart/issues/detail?id=954 |
| 1471 */ | 1602 */ |
| 1472 static final CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = new Compile
TimeErrorCode.con1('RECURSIVE_CONSTRUCTOR_REDIRECT', 110, "Cycle in redirecting
generative constructors"); | 1603 static final CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = new Compile
TimeErrorCode.con1('RECURSIVE_CONSTRUCTOR_REDIRECT', 111, "Cycle in redirecting
generative constructors"); |
| 1473 | 1604 |
| 1474 /** | 1605 /** |
| 1475 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr
uctor redirects to | 1606 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr
uctor redirects to |
| 1476 * itself, either directly or indirectly via a sequence of redirections. | 1607 * itself, either directly or indirectly via a sequence of redirections. |
| 1477 */ | 1608 */ |
| 1478 static final CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = new CompileTime
ErrorCode.con1('RECURSIVE_FACTORY_REDIRECT', 111, "Cycle in redirecting factory
constructors"); | 1609 static final CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = new CompileTime
ErrorCode.con1('RECURSIVE_FACTORY_REDIRECT', 112, "Cycle in redirecting factory
constructors"); |
| 1479 | 1610 |
| 1480 /** | 1611 /** |
| 1481 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a | 1612 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a |
| 1482 * superinterface of itself. | 1613 * superinterface of itself. |
| 1483 * | 1614 * |
| 1484 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. | 1615 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. |
| 1485 * | 1616 * |
| 1486 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. | 1617 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. |
| 1487 * | 1618 * |
| 1488 * @param className the name of the class that implements itself recursively | 1619 * @param className the name of the class that implements itself recursively |
| 1489 * @param strImplementsPath a string representation of the implements loop | 1620 * @param strImplementsPath a string representation of the implements loop |
| 1490 */ | 1621 */ |
| 1491 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = new Compil
eTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE', 112, "'%s' cannot be a su
perinterface of itself: %s"); | 1622 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = new Compil
eTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE', 113, "'%s' cannot be a su
perinterface of itself: %s"); |
| 1492 | 1623 |
| 1493 /** | 1624 /** |
| 1494 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a | 1625 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a |
| 1495 * superinterface of itself. | 1626 * superinterface of itself. |
| 1496 * | 1627 * |
| 1497 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. | 1628 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. |
| 1498 * | 1629 * |
| 1499 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. | 1630 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. |
| 1500 * | 1631 * |
| 1501 * @param className the name of the class that implements itself recursively | 1632 * @param className the name of the class that implements itself recursively |
| 1502 */ | 1633 */ |
| 1503 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EX
TENDS = new CompileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE
_EXTENDS', 113, "'%s' cannot extend itself"); | 1634 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EX
TENDS = new CompileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE
_EXTENDS', 114, "'%s' cannot extend itself"); |
| 1504 | 1635 |
| 1505 /** | 1636 /** |
| 1506 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a | 1637 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a |
| 1507 * superinterface of itself. | 1638 * superinterface of itself. |
| 1508 * | 1639 * |
| 1509 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. | 1640 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. |
| 1510 * | 1641 * |
| 1511 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. | 1642 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. |
| 1512 * | 1643 * |
| 1513 * @param className the name of the class that implements itself recursively | 1644 * @param className the name of the class that implements itself recursively |
| 1514 */ | 1645 */ |
| 1515 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IM
PLEMENTS = new CompileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE_BASE_C
ASE_IMPLEMENTS', 114, "'%s' cannot implement itself"); | 1646 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IM
PLEMENTS = new CompileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE_BASE_C
ASE_IMPLEMENTS', 115, "'%s' cannot implement itself"); |
| 1516 | 1647 |
| 1517 /** | 1648 /** |
| 1518 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th
e const modifier but | 1649 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th
e const modifier but |
| 1519 * <i>k'</i> is not a constant constructor. | 1650 * <i>k'</i> is not a constant constructor. |
| 1520 */ | 1651 */ |
| 1521 static final CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = new Comp
ileTimeErrorCode.con1('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 115, "Constant factor
y constructor cannot delegate to a non-constant constructor"); | 1652 static final CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = new Comp
ileTimeErrorCode.con1('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 116, "Constant factor
y constructor cannot delegate to a non-constant constructor"); |
| 1522 | 1653 |
| 1523 /** | 1654 /** |
| 1524 * 13.3 Local Variable Declaration: It is a compile-time error if <i>e</i> ref
ers to the name | 1655 * 13.3 Local Variable Declaration: It is a compile-time error if <i>e</i> ref
ers to the name |
| 1525 * <i>v</i> or the name <i>v=</i>. | 1656 * <i>v</i> or the name <i>v=</i>. |
| 1526 */ | 1657 */ |
| 1527 static final CompileTimeErrorCode REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZE
R = new CompileTimeErrorCode.con1('REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER
', 116, "The name '%s' cannot be referenced in the initializer of a variable wit
h the same name"); | 1658 static final CompileTimeErrorCode REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZE
R = new CompileTimeErrorCode.con1('REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER
', 117, "The name '%s' cannot be referenced in the initializer of a variable wit
h the same name"); |
| 1528 | 1659 |
| 1529 /** | 1660 /** |
| 1530 * 12.8.1 Rethrow: It is a compile-time error if an expression of the form <i>
rethrow;</i> is not | 1661 * 12.8.1 Rethrow: It is a compile-time error if an expression of the form <i>
rethrow;</i> is not |
| 1531 * enclosed within a on-catch clause. | 1662 * enclosed within a on-catch clause. |
| 1532 */ | 1663 */ |
| 1533 static final CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = new CompileTimeError
Code.con1('RETHROW_OUTSIDE_CATCH', 117, "rethrow must be inside of a catch claus
e"); | 1664 static final CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = new CompileTimeError
Code.con1('RETHROW_OUTSIDE_CATCH', 118, "rethrow must be inside of a catch claus
e"); |
| 1534 | 1665 |
| 1535 /** | 1666 /** |
| 1536 * 13.11 Return: It is a compile-time error if a return statement of the form
<i>return e;</i> | 1667 * 13.11 Return: It is a compile-time error if a return statement of the form
<i>return e;</i> |
| 1537 * appears in a generative constructor. | 1668 * appears in a generative constructor. |
| 1538 */ | 1669 */ |
| 1539 static final CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = new Compi
leTimeErrorCode.con1('RETURN_IN_GENERATIVE_CONSTRUCTOR', 118, "Constructors cann
ot return a value"); | 1670 static final CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = new Compi
leTimeErrorCode.con1('RETURN_IN_GENERATIVE_CONSTRUCTOR', 119, "Constructors cann
ot return a value"); |
| 1540 | 1671 |
| 1541 /** | 1672 /** |
| 1542 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form | 1673 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form |
| 1543 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … | 1674 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … |
| 1544 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe
r method invocation | 1675 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe
r method invocation |
| 1545 * occurs in a top-level function or variable initializer, in an instance vari
able initializer or | 1676 * occurs in a top-level function or variable initializer, in an instance vari
able initializer or |
| 1546 * initializer list, in class Object, in a factory constructor, or in a static
method or variable | 1677 * initializer list, in class Object, in a factory constructor, or in a static
method or variable |
| 1547 * initializer. | 1678 * initializer. |
| 1548 */ | 1679 */ |
| 1549 static final CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = new CompileTimeEr
rorCode.con1('SUPER_IN_INVALID_CONTEXT', 119, "Invalid context for 'super' invoc
ation"); | 1680 static final CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = new CompileTimeEr
rorCode.con1('SUPER_IN_INVALID_CONTEXT', 120, "Invalid context for 'super' invoc
ation"); |
| 1550 | 1681 |
| 1551 /** | 1682 /** |
| 1552 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 1683 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
| 1553 * only action is to invoke another generative constructor. | 1684 * only action is to invoke another generative constructor. |
| 1554 */ | 1685 */ |
| 1555 static final CompileTimeErrorCode SUPER_IN_REDIRECTING_CONSTRUCTOR = new Compi
leTimeErrorCode.con1('SUPER_IN_REDIRECTING_CONSTRUCTOR', 120, "The redirecting c
onstructor cannot have a 'super' initializer"); | 1686 static final CompileTimeErrorCode SUPER_IN_REDIRECTING_CONSTRUCTOR = new Compi
leTimeErrorCode.con1('SUPER_IN_REDIRECTING_CONSTRUCTOR', 121, "The redirecting c
onstructor cannot have a 'super' initializer"); |
| 1556 | 1687 |
| 1557 /** | 1688 /** |
| 1558 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time | 1689 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time |
| 1559 * error if a generative constructor of class Object includes a superinitializ
er. | 1690 * error if a generative constructor of class Object includes a superinitializ
er. |
| 1560 */ | 1691 */ |
| 1561 static final CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = new CompileTim
eErrorCode.con1('SUPER_INITIALIZER_IN_OBJECT', 121, ""); | 1692 static final CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = new CompileTim
eErrorCode.con1('SUPER_INITIALIZER_IN_OBJECT', 122, ""); |
| 1562 | 1693 |
| 1563 /** | 1694 /** |
| 1564 * 12.11 Instance Creation: It is a static type warning if any of the type arg
uments to a | 1695 * 12.11 Instance Creation: It is a static type warning if any of the type arg
uments to a |
| 1565 * constructor of a generic type <i>G</i> invoked by a new expression or a con
stant object | 1696 * constructor of a generic type <i>G</i> invoked by a new expression or a con
stant object |
| 1566 * expression are not subtypes of the bounds of the corresponding formal type
parameters of | 1697 * expression are not subtypes of the bounds of the corresponding formal type
parameters of |
| 1567 * <i>G</i>. | 1698 * <i>G</i>. |
| 1568 * | 1699 * |
| 1569 * 12.11.1 New: If T is malformed a dynamic error occurs. In checked mode, if
T is mal-bounded a | 1700 * 12.11.1 New: If T is malformed a dynamic error occurs. In checked mode, if
T is mal-bounded a |
| 1570 * dynamic error occurs. | 1701 * dynamic error occurs. |
| 1571 * | 1702 * |
| 1572 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time
constant would raise | 1703 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time
constant would raise |
| 1573 * an exception. | 1704 * an exception. |
| 1574 * | 1705 * |
| 1575 * @param boundedTypeName the name of the type used in the instance creation t
hat should be | 1706 * @param boundedTypeName the name of the type used in the instance creation t
hat should be |
| 1576 * limited by the bound as specified in the class declaration | 1707 * limited by the bound as specified in the class declaration |
| 1577 * @param boundingTypeName the name of the bounding type | 1708 * @param boundingTypeName the name of the bounding type |
| 1578 * @see StaticTypeWarningCode#TYPE_ARGUMENT_NOT_MATCHING_BOUNDS | 1709 * @see StaticTypeWarningCode#TYPE_ARGUMENT_NOT_MATCHING_BOUNDS |
| 1579 */ | 1710 */ |
| 1580 static final CompileTimeErrorCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = new Comp
ileTimeErrorCode.con1('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 122, "'%s' does not e
xtend '%s'"); | 1711 static final CompileTimeErrorCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = new Comp
ileTimeErrorCode.con1('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 123, "'%s' does not e
xtend '%s'"); |
| 1581 | 1712 |
| 1582 /** | 1713 /** |
| 1583 * 15.3.1 Typedef: It is a compile-time error if a typedef refers to itself vi
a a chain of | 1714 * 15.3.1 Typedef: It is a compile-time error if a typedef refers to itself vi
a a chain of |
| 1584 * references that does not include a class declaration. | 1715 * references that does not include a class declaration. |
| 1585 */ | 1716 */ |
| 1586 static final CompileTimeErrorCode TYPE_ALIAS_CANNOT_REFERENCE_ITSELF = new Com
pileTimeErrorCode.con1('TYPE_ALIAS_CANNOT_REFERENCE_ITSELF', 123, "Type alias ca
n reference itself only via the bounds of its generic parameters"); | 1717 static final CompileTimeErrorCode TYPE_ALIAS_CANNOT_REFERENCE_ITSELF = new Com
pileTimeErrorCode.con1('TYPE_ALIAS_CANNOT_REFERENCE_ITSELF', 124, "Type alias ca
n reference itself only via the bounds of its generic parameters"); |
| 1587 | 1718 |
| 1588 /** | 1719 /** |
| 1589 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current | 1720 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current |
| 1590 * scope, optionally followed by type arguments. | 1721 * scope, optionally followed by type arguments. |
| 1591 */ | 1722 */ |
| 1592 static final CompileTimeErrorCode UNDEFINED_CLASS = new CompileTimeErrorCode.c
on1('UNDEFINED_CLASS', 124, "Undefined class '%s'"); | 1723 static final CompileTimeErrorCode UNDEFINED_CLASS = new CompileTimeErrorCode.c
on1('UNDEFINED_CLASS', 125, "Undefined class '%s'"); |
| 1593 | 1724 |
| 1594 /** | 1725 /** |
| 1595 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears | 1726 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears |
| 1596 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is | 1727 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is |
| 1597 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> | 1728 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> |
| 1598 * (respectively <i>S.id</i>) | 1729 * (respectively <i>S.id</i>) |
| 1599 */ | 1730 */ |
| 1600 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = new C
ompileTimeErrorCode.con1('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 125, "The class
'%s' does not have a generative constructor '%s'"); | 1731 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = new C
ompileTimeErrorCode.con1('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 126, "The class
'%s' does not have a generative constructor '%s'"); |
| 1601 | 1732 |
| 1602 /** | 1733 /** |
| 1603 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears | 1734 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears |
| 1604 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is | 1735 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is |
| 1605 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> | 1736 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> |
| 1606 * (respectively <i>S.id</i>) | 1737 * (respectively <i>S.id</i>) |
| 1607 */ | 1738 */ |
| 1608 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT
= new CompileTimeErrorCode.con1('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT',
126, "The class '%s' does not have a default generative constructor"); | 1739 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT
= new CompileTimeErrorCode.con1('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT',
127, "The class '%s' does not have a default generative constructor"); |
| 1609 | 1740 |
| 1610 /** | 1741 /** |
| 1611 * 12.14.3 Unqualified Invocation: If there exists a lexically visible declara
tion named | 1742 * 12.14.3 Unqualified Invocation: If there exists a lexically visible declara
tion named |
| 1612 * <i>id</i>, let <i>f<sub>id</sub></i> be the innermost such declaration. The
n: [skip]. | 1743 * <i>id</i>, let <i>f<sub>id</sub></i> be the innermost such declaration. The
n: [skip]. |
| 1613 * Otherwise, <i>i</i> is equivalent to <b>this</b>.<i>id</i>(<i>a<sub>1</sub>
</i>; ... | 1744 * Otherwise, <i>i</i> is equivalent to <b>this</b>.<i>id</i>(<i>a<sub>1</sub>
</i>; ... |
| 1614 * <i>x<sub>n+k</sub></i> : <i>a<sub>n+k</sub></i>). | 1745 * <i>x<sub>n+k</sub></i> : <i>a<sub>n+k</sub></i>). |
| 1615 * | 1746 * |
| 1616 * @param methodName the name of the method that is undefined | 1747 * @param methodName the name of the method that is undefined |
| 1617 */ | 1748 */ |
| 1618 static final CompileTimeErrorCode UNDEFINED_FUNCTION = new CompileTimeErrorCod
e.con1('UNDEFINED_FUNCTION', 127, "The function '%s' is not defined"); | 1749 static final CompileTimeErrorCode UNDEFINED_FUNCTION = new CompileTimeErrorCod
e.con1('UNDEFINED_FUNCTION', 128, "The function '%s' is not defined"); |
| 1619 | 1750 |
| 1620 /** | 1751 /** |
| 1621 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>,
<i>1<=i<=l</i>, | 1752 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>,
<i>1<=i<=l</i>, |
| 1622 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i
> ... | 1753 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i
> ... |
| 1623 * <i>p<sub>n+k</sub></i>} or a static warning occurs. | 1754 * <i>p<sub>n+k</sub></i>} or a static warning occurs. |
| 1624 * | 1755 * |
| 1625 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 1756 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 1626 * uncaught exception being thrown. | 1757 * uncaught exception being thrown. |
| 1627 * | 1758 * |
| 1628 * @param name the name of the requested named parameter | 1759 * @param name the name of the requested named parameter |
| 1629 */ | 1760 */ |
| 1630 static final CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER = new CompileTimeE
rrorCode.con1('UNDEFINED_NAMED_PARAMETER', 128, "The named parameter '%s' is not
defined"); | 1761 static final CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER = new CompileTimeE
rrorCode.con1('UNDEFINED_NAMED_PARAMETER', 129, "The named parameter '%s' is not
defined"); |
| 1631 | 1762 |
| 1632 /** | 1763 /** |
| 1633 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1764 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 1634 * not a library declaration. | 1765 * not a library declaration. |
| 1635 * | 1766 * |
| 1636 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1767 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 1637 * not a library declaration. | 1768 * not a library declaration. |
| 1638 * | 1769 * |
| 1639 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part | 1770 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part |
| 1640 * declaration. | 1771 * declaration. |
| 1641 * | 1772 * |
| 1642 * @param uri the URI pointing to a non-existent file | 1773 * @param uri the URI pointing to a non-existent file |
| 1643 * @see #INVALID_URI | 1774 * @see #INVALID_URI |
| 1644 */ | 1775 */ |
| 1645 static final CompileTimeErrorCode URI_DOES_NOT_EXIST = new CompileTimeErrorCod
e.con1('URI_DOES_NOT_EXIST', 129, "Target of URI does not exist: '%s'"); | 1776 static final CompileTimeErrorCode URI_DOES_NOT_EXIST = new CompileTimeErrorCod
e.con1('URI_DOES_NOT_EXIST', 130, "Target of URI does not exist: '%s'"); |
| 1646 | 1777 |
| 1647 /** | 1778 /** |
| 1648 * 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time
constant, or if | 1779 * 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time
constant, or if |
| 1649 * <i>x</i> involves string interpolation. | 1780 * <i>x</i> involves string interpolation. |
| 1650 * | 1781 * |
| 1651 * 14.3 Parts: It is a compile-time error if <i>s</i> is not a compile-time co
nstant, or if | 1782 * 14.3 Parts: It is a compile-time error if <i>s</i> is not a compile-time co
nstant, or if |
| 1652 * <i>s</i> involves string interpolation. | 1783 * <i>s</i> involves string interpolation. |
| 1653 * | 1784 * |
| 1654 * 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that d
escribes a URI is | 1785 * 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that d
escribes a URI is |
| 1655 * not a compile-time constant, or if <i>x</i> involves string interpolation. | 1786 * not a compile-time constant, or if <i>x</i> involves string interpolation. |
| 1656 */ | 1787 */ |
| 1657 static final CompileTimeErrorCode URI_WITH_INTERPOLATION = new CompileTimeErro
rCode.con1('URI_WITH_INTERPOLATION', 130, "URIs cannot use string interpolation"
); | 1788 static final CompileTimeErrorCode URI_WITH_INTERPOLATION = new CompileTimeErro
rCode.con1('URI_WITH_INTERPOLATION', 131, "URIs cannot use string interpolation"
); |
| 1658 | 1789 |
| 1659 /** | 1790 /** |
| 1660 * 7.1.1 Operators: It is a compile-time error if the arity of the user-declar
ed operator []= is | 1791 * 7.1.1 Operators: It is a compile-time error if the arity of the user-declar
ed operator []= is |
| 1661 * not 2. It is a compile time error if the arity of a user-declared operator
with one of the | 1792 * not 2. It is a compile time error if the arity of a user-declared operator
with one of the |
| 1662 * names: <, >, <=, >=, ==, +, /, ~/, *, %, |, ^, &, <<, >
;>, [] is not 1. | 1793 * names: <, >, <=, >=, ==, +, /, ~/, *, %, |, ^, &, <<, >
;>, [] is not 1. |
| 1663 * It is a compile time error if the arity of the user-declared operator - is
not 0 or 1. It is a | 1794 * It is a compile time error if the arity of the user-declared operator - is
not 0 or 1. It is a |
| 1664 * compile time error if the arity of the user-declared operator ~ is not 0. | 1795 * compile time error if the arity of the user-declared operator ~ is not 0. |
| 1665 * | 1796 * |
| 1666 * @param operatorName the name of the declared operator | 1797 * @param operatorName the name of the declared operator |
| 1667 * @param expectedNumberOfParameters the number of parameters expected | 1798 * @param expectedNumberOfParameters the number of parameters expected |
| 1668 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration | 1799 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration |
| 1669 */ | 1800 */ |
| 1670 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = ne
w CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 131, "Ope
rator '%s' should declare exactly %d parameter(s), but %d found"); | 1801 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = ne
w CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 132, "Ope
rator '%s' should declare exactly %d parameter(s), but %d found"); |
| 1671 | 1802 |
| 1672 /** | 1803 /** |
| 1673 * 7.1.1 Operators: It is a compile time error if the arity of the user-declar
ed operator - is not | 1804 * 7.1.1 Operators: It is a compile time error if the arity of the user-declar
ed operator - is not |
| 1674 * 0 or 1. | 1805 * 0 or 1. |
| 1675 * | 1806 * |
| 1676 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration | 1807 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration |
| 1677 */ | 1808 */ |
| 1678 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINU
S = new CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS
', 132, "Operator '-' should declare 0 or 1 parameter, but %d found"); | 1809 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINU
S = new CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS
', 133, "Operator '-' should declare 0 or 1 parameter, but %d found"); |
| 1679 | 1810 |
| 1680 /** | 1811 /** |
| 1681 * 7.3 Setters: It is a compile-time error if a setter's formal parameter list
does not include | 1812 * 7.3 Setters: It is a compile-time error if a setter's formal parameter list
does not include |
| 1682 * exactly one required formal parameter <i>p</i>. | 1813 * exactly one required formal parameter <i>p</i>. |
| 1683 */ | 1814 */ |
| 1684 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = new
CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 133, "Setters
should declare exactly one required parameter"); | 1815 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = new
CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 134, "Setters
should declare exactly one required parameter"); |
| 1685 static final List<CompileTimeErrorCode> values = [ | 1816 static final List<CompileTimeErrorCode> values = [ |
| 1686 AMBIGUOUS_EXPORT, | 1817 AMBIGUOUS_EXPORT, |
| 1687 ARGUMENT_DEFINITION_TEST_NON_PARAMETER, | 1818 ARGUMENT_DEFINITION_TEST_NON_PARAMETER, |
| 1688 ARGUMENT_TYPE_NOT_ASSIGNABLE, | 1819 ARGUMENT_TYPE_NOT_ASSIGNABLE, |
| 1689 BUILT_IN_IDENTIFIER_AS_TYPE, | 1820 BUILT_IN_IDENTIFIER_AS_TYPE, |
| 1690 BUILT_IN_IDENTIFIER_AS_TYPE_NAME, | 1821 BUILT_IN_IDENTIFIER_AS_TYPE_NAME, |
| 1691 BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, | 1822 BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, |
| 1692 BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME, | 1823 BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME, |
| 1693 CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, | 1824 CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, |
| 1694 COMPILE_TIME_CONSTANT_RAISES_EXCEPTION, | 1825 COMPILE_TIME_CONSTANT_RAISES_EXCEPTION, |
| 1695 CONFLICTING_GETTER_AND_METHOD, | 1826 CONFLICTING_GETTER_AND_METHOD, |
| 1696 CONFLICTING_METHOD_AND_GETTER, | 1827 CONFLICTING_METHOD_AND_GETTER, |
| 1697 CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, | 1828 CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, |
| 1698 CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD, | 1829 CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD, |
| 1699 CONST_CONSTRUCTOR_THROWS_EXCEPTION, | 1830 CONST_CONSTRUCTOR_THROWS_EXCEPTION, |
| 1700 CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER, | 1831 CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER, |
| 1701 CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, | 1832 CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, |
| 1702 CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE, | 1833 CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE, |
| 1703 CONST_FORMAL_PARAMETER, | 1834 CONST_FORMAL_PARAMETER, |
| 1704 CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, | 1835 CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, |
| 1705 CONST_INSTANCE_FIELD, | 1836 CONST_INSTANCE_FIELD, |
| 1837 CONST_NOT_INITIALIZED, |
| 1706 CONST_EVAL_TYPE_BOOL, | 1838 CONST_EVAL_TYPE_BOOL, |
| 1707 CONST_EVAL_TYPE_BOOL_NUM_STRING, | 1839 CONST_EVAL_TYPE_BOOL_NUM_STRING, |
| 1708 CONST_EVAL_TYPE_INT, | 1840 CONST_EVAL_TYPE_INT, |
| 1709 CONST_EVAL_TYPE_NUM, | 1841 CONST_EVAL_TYPE_NUM, |
| 1710 CONST_EVAL_THROWS_EXCEPTION, | 1842 CONST_EVAL_THROWS_EXCEPTION, |
| 1711 CONST_EVAL_THROWS_IDBZE, | 1843 CONST_EVAL_THROWS_IDBZE, |
| 1712 CONST_WITH_INVALID_TYPE_PARAMETERS, | 1844 CONST_WITH_INVALID_TYPE_PARAMETERS, |
| 1713 CONST_WITH_NON_CONST, | 1845 CONST_WITH_NON_CONST, |
| 1714 CONST_WITH_NON_CONSTANT_ARGUMENT, | 1846 CONST_WITH_NON_CONSTANT_ARGUMENT, |
| 1715 CONST_WITH_NON_TYPE, | 1847 CONST_WITH_NON_TYPE, |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2287 * instance member <i>m2</i> and <i>m1</i> has fewer optional positional param
eters than | 2419 * instance member <i>m2</i> and <i>m1</i> has fewer optional positional param
eters than |
| 2288 * <i>m2</i>. | 2420 * <i>m2</i>. |
| 2289 * | 2421 * |
| 2290 * @param paramCount the number of positional parameters in the overridden mem
ber | 2422 * @param paramCount the number of positional parameters in the overridden mem
ber |
| 2291 * @param className the name of the class from the overridden method | 2423 * @param className the name of the class from the overridden method |
| 2292 */ | 2424 */ |
| 2293 static final StaticWarningCode INVALID_OVERRIDE_POSITIONAL = new StaticWarning
Code.con1('INVALID_OVERRIDE_POSITIONAL', 37, "Must have at least %d optional par
ameters to match the overridden method from '%s'"); | 2425 static final StaticWarningCode INVALID_OVERRIDE_POSITIONAL = new StaticWarning
Code.con1('INVALID_OVERRIDE_POSITIONAL', 37, "Must have at least %d optional par
ameters to match the overridden method from '%s'"); |
| 2294 | 2426 |
| 2295 /** | 2427 /** |
| 2296 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 2428 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
| 2297 * instance member <i>m2</i> and <i>m1</i> has a different number of required
parameters than | 2429 * instance member <i>m2</i> and <i>m1</i> has a greater number of required pa
rameters than |
| 2298 * <i>m2</i>. | 2430 * <i>m2</i>. |
| 2299 * | 2431 * |
| 2300 * @param paramCount the number of required parameters in the overridden membe
r | 2432 * @param paramCount the number of required parameters in the overridden membe
r |
| 2301 * @param className the name of the class from the overridden method | 2433 * @param className the name of the class from the overridden method |
| 2302 */ | 2434 */ |
| 2303 static final StaticWarningCode INVALID_OVERRIDE_REQUIRED = new StaticWarningCo
de.con1('INVALID_OVERRIDE_REQUIRED', 38, "Must have exactly %d required paramete
rs to match the overridden method from '%s'"); | 2435 static final StaticWarningCode INVALID_OVERRIDE_REQUIRED = new StaticWarningCo
de.con1('INVALID_OVERRIDE_REQUIRED', 38, "Must have %d required parameters or le
ss to match the overridden method from '%s'"); |
| 2304 | 2436 |
| 2305 /** | 2437 /** |
| 2306 * 7.3 Setters: It is a static warning if a setter <i>m1</i> overrides a sette
r <i>m2</i> and the | 2438 * 7.3 Setters: It is a static warning if a setter <i>m1</i> overrides a sette
r <i>m2</i> and the |
| 2307 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>. | 2439 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>. |
| 2308 * | 2440 * |
| 2309 * @param actualParamTypeName the name of the expected parameter type | 2441 * @param actualParamTypeName the name of the expected parameter type |
| 2310 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the | 2442 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the |
| 2311 * actualParamTypeName | 2443 * actualParamTypeName |
| 2312 * @param className the name of the class where the overridden setter is decla
red | 2444 * @param className the name of the class where the overridden setter is decla
red |
| 2313 * @see #INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE | 2445 * @see #INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2523 static final StaticWarningCode NON_VOID_RETURN_FOR_OPERATOR = new StaticWarnin
gCode.con1('NON_VOID_RETURN_FOR_OPERATOR', 55, "The return type of the operator
[]= must be 'void'"); | 2655 static final StaticWarningCode NON_VOID_RETURN_FOR_OPERATOR = new StaticWarnin
gCode.con1('NON_VOID_RETURN_FOR_OPERATOR', 55, "The return type of the operator
[]= must be 'void'"); |
| 2524 | 2656 |
| 2525 /** | 2657 /** |
| 2526 * 7.3 Setters: It is a static warning if a setter declares a return type othe
r than void. | 2658 * 7.3 Setters: It is a static warning if a setter declares a return type othe
r than void. |
| 2527 */ | 2659 */ |
| 2528 static final StaticWarningCode NON_VOID_RETURN_FOR_SETTER = new StaticWarningC
ode.con1('NON_VOID_RETURN_FOR_SETTER', 56, "The return type of the setter must b
e 'void'"); | 2660 static final StaticWarningCode NON_VOID_RETURN_FOR_SETTER = new StaticWarningC
ode.con1('NON_VOID_RETURN_FOR_SETTER', 56, "The return type of the setter must b
e 'void'"); |
| 2529 | 2661 |
| 2530 /** | 2662 /** |
| 2531 * 15.1 Static Types: A type <i>T</i> is malformed iff: * <i>T</i> has the for
m <i>id</i> or the | 2663 * 15.1 Static Types: A type <i>T</i> is malformed iff: * <i>T</i> has the for
m <i>id</i> or the |
| 2532 * form <i>prefix.id</i>, and in the enclosing lexical scope, the name <i>id</
i> (respectively | 2664 * form <i>prefix.id</i>, and in the enclosing lexical scope, the name <i>id</
i> (respectively |
| 2533 * <i>prefix.id</i>) does not denote a type. * <i>T</i> denotes a type variabl
e in the | 2665 * <i>prefix.id</i>) does not denote a type. * <i>T</i> denotes a type paramet
er in the |
| 2534 * enclosing lexical scope, but occurs in the signature or body of a static me
mber. * | 2666 * enclosing lexical scope, but occurs in the signature or body of a static me
mber. * |
| 2535 * <i>T</i> is a parameterized type of the form <i>G<S<sub>1</sub>, .., S<s
ub>n</sub>></i>, | 2667 * <i>T</i> is a parameterized type of the form <i>G<S<sub>1</sub>, .., S<s
ub>n</sub>></i>, |
| 2536 * and <i>G</i> is malformed. | 2668 * and <i>G</i> is malformed. |
| 2537 * | 2669 * |
| 2538 * Any use of a malformed type gives rise to a static warning. | 2670 * Any use of a malformed type gives rise to a static warning. |
| 2539 * | 2671 * |
| 2540 * @param nonTypeName the name that is not a type | 2672 * @param nonTypeName the name that is not a type |
| 2541 */ | 2673 */ |
| 2542 static final StaticWarningCode NOT_A_TYPE = new StaticWarningCode.con1('NOT_A_
TYPE', 57, "%s is not a type"); | 2674 static final StaticWarningCode NOT_A_TYPE = new StaticWarningCode.con1('NOT_A_
TYPE', 57, "%s is not a type"); |
| 2543 | 2675 |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2813 * The interface `AnalysisErrorListener` defines the behavior of objects that li
sten for | 2945 * The interface `AnalysisErrorListener` defines the behavior of objects that li
sten for |
| 2814 * [AnalysisError] being produced by the analysis engine. | 2946 * [AnalysisError] being produced by the analysis engine. |
| 2815 * | 2947 * |
| 2816 * @coverage dart.engine.error | 2948 * @coverage dart.engine.error |
| 2817 */ | 2949 */ |
| 2818 abstract class AnalysisErrorListener { | 2950 abstract class AnalysisErrorListener { |
| 2819 | 2951 |
| 2820 /** | 2952 /** |
| 2821 * An error listener that ignores errors that are reported to it. | 2953 * An error listener that ignores errors that are reported to it. |
| 2822 */ | 2954 */ |
| 2823 static final AnalysisErrorListener _NULL_LISTENER = new AnalysisErrorListener_
5(); | 2955 static final AnalysisErrorListener _NULL_LISTENER = new AnalysisErrorListener_
6(); |
| 2824 | 2956 |
| 2825 /** | 2957 /** |
| 2826 * This method is invoked when an error has been found by the analysis engine. | 2958 * This method is invoked when an error has been found by the analysis engine. |
| 2827 * | 2959 * |
| 2828 * @param error the error that was just found (not `null`) | 2960 * @param error the error that was just found (not `null`) |
| 2829 */ | 2961 */ |
| 2830 void onError(AnalysisError error); | 2962 void onError(AnalysisError error); |
| 2831 } | 2963 } |
| 2832 class AnalysisErrorListener_5 implements AnalysisErrorListener { | 2964 class AnalysisErrorListener_6 implements AnalysisErrorListener { |
| 2833 void onError(AnalysisError event) { | 2965 void onError(AnalysisError event) { |
| 2834 } | 2966 } |
| 2835 } | 2967 } |
| 2836 /** | 2968 /** |
| 2837 * The enumeration `HtmlWarningCode` defines the error codes used for warnings i
n HTML files. | 2969 * The enumeration `HtmlWarningCode` defines the error codes used for warnings i
n HTML files. |
| 2838 * The convention for this class is for the name of the error code to indicate t
he problem that | 2970 * The convention for this class is for the name of the error code to indicate t
he problem that |
| 2839 * caused the error to be generated and for the error message to explain what is
wrong and, when | 2971 * caused the error to be generated and for the error message to explain what is
wrong and, when |
| 2840 * appropriate, how the problem can be corrected. | 2972 * appropriate, how the problem can be corrected. |
| 2841 * | 2973 * |
| 2842 * @coverage dart.engine.error | 2974 * @coverage dart.engine.error |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3179 */ | 3311 */ |
| 3180 StaticTypeWarningCode.con2(String name, int ordinal, String message, String co
rrection) : super(name, ordinal) { | 3312 StaticTypeWarningCode.con2(String name, int ordinal, String message, String co
rrection) : super(name, ordinal) { |
| 3181 this._message = message; | 3313 this._message = message; |
| 3182 this.correction6 = correction; | 3314 this.correction6 = correction; |
| 3183 } | 3315 } |
| 3184 String get correction => correction6; | 3316 String get correction => correction6; |
| 3185 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; | 3317 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; |
| 3186 String get message => _message; | 3318 String get message => _message; |
| 3187 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; | 3319 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; |
| 3188 } | 3320 } |
| OLD | NEW |