| 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 implements Comparable<ErrorSeverity> { | 14 class ErrorSeverity implements 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 a suggestion. Suggestions are not specified in th
e Dart language |
| 24 * specification, but provide information about best practices. | 24 * specification, but provide information about best practices. |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 builder.append(_offset + _length - 1); | 398 builder.append(_offset + _length - 1); |
| 399 builder.append("): "); | 399 builder.append("): "); |
| 400 builder.append(_message); | 400 builder.append(_message); |
| 401 return builder.toString(); | 401 return builder.toString(); |
| 402 } | 402 } |
| 403 } | 403 } |
| 404 /** | 404 /** |
| 405 * The enumeration `ErrorProperty` defines the properties that can be associated
with an | 405 * The enumeration `ErrorProperty` defines the properties that can be associated
with an |
| 406 * [AnalysisError]. | 406 * [AnalysisError]. |
| 407 */ | 407 */ |
| 408 class ErrorProperty implements Comparable<ErrorProperty> { | 408 class ErrorProperty implements Enum<ErrorProperty> { |
| 409 | 409 |
| 410 /** | 410 /** |
| 411 * A property whose value is an array of [ExecutableElement] that should | 411 * A property whose value is an array of [ExecutableElement] that should |
| 412 * be but are not implemented by a concrete class. | 412 * be but are not implemented by a concrete class. |
| 413 */ | 413 */ |
| 414 static final ErrorProperty UNIMPLEMENTED_METHODS = new ErrorProperty('UNIMPLEM
ENTED_METHODS', 0); | 414 static final ErrorProperty UNIMPLEMENTED_METHODS = new ErrorProperty('UNIMPLEM
ENTED_METHODS', 0); |
| 415 static final List<ErrorProperty> values = [UNIMPLEMENTED_METHODS]; | 415 static final List<ErrorProperty> values = [UNIMPLEMENTED_METHODS]; |
| 416 | 416 |
| 417 /// The name of this enum constant, as declared in the enum declaration. | 417 /// The name of this enum constant, as declared in the enum declaration. |
| 418 final String name; | 418 final String name; |
| 419 | 419 |
| 420 /// The position in the enum declaration. | 420 /// The position in the enum declaration. |
| 421 final int ordinal; | 421 final int ordinal; |
| 422 ErrorProperty(this.name, this.ordinal); | 422 ErrorProperty(this.name, this.ordinal); |
| 423 int compareTo(ErrorProperty other) => ordinal - other.ordinal; | 423 int compareTo(ErrorProperty other) => ordinal - other.ordinal; |
| 424 int get hashCode => ordinal; | 424 int get hashCode => ordinal; |
| 425 String toString() => name; | 425 String toString() => name; |
| 426 } | 426 } |
| 427 /** | 427 /** |
| 428 * The enumeration `HintCode` defines the hints and coding recommendations for b
est practices | 428 * The enumeration `HintCode` defines the hints and coding recommendations for b
est practices |
| 429 * which are not mentioned in the Dart Language Specification. | 429 * which are not mentioned in the Dart Language Specification. |
| 430 */ | 430 */ |
| 431 class HintCode implements Comparable<HintCode>, ErrorCode { | 431 class HintCode implements Enum<HintCode>, ErrorCode { |
| 432 | 432 |
| 433 /** | 433 /** |
| 434 * Dead code is code that is never reached, this can happen for instance if a
statement follows a | 434 * Dead code is code that is never reached, this can happen for instance if a
statement follows a |
| 435 * return statement. | 435 * return statement. |
| 436 */ | 436 */ |
| 437 static final HintCode DEAD_CODE = new HintCode('DEAD_CODE', 0, "Dead code"); | 437 static final HintCode DEAD_CODE = new HintCode('DEAD_CODE', 0, "Dead code"); |
| 438 | 438 |
| 439 /** | 439 /** |
| 440 * Dead code is code that is never reached. This case covers cases where the u
ser has catch | 440 * Dead code is code that is never reached. This case covers cases where the u
ser has catch |
| 441 * clauses after `catch (e)` or `on Object catch (e)`. | 441 * clauses after `catch (e)` or `on Object catch (e)`. |
| 442 */ | 442 */ |
| 443 static final HintCode DEAD_CODE_CATCH_FOLLOWING_CATCH = new HintCode('DEAD_COD
E_CATCH_FOLLOWING_CATCH', 1, "Dead code, catch clauses after a 'catch (e)' or an
'on Object catch (e)' are never reached"); | 443 static final HintCode DEAD_CODE_CATCH_FOLLOWING_CATCH = new HintCode('DEAD_COD
E_CATCH_FOLLOWING_CATCH', 1, "Dead code, catch clauses after a 'catch (e)' or an
'on Object catch (e)' are never reached"); |
| 444 | 444 |
| 445 /** | 445 /** |
| 446 * Dead code is code that is never reached. This case covers cases where the u
ser has an on-catch | 446 * Dead code is code that is never reached. This case covers cases where the u
ser has an on-catch |
| 447 * clause such as `on A catch (e)`, where a supertype of `A` was already caugh
t. | 447 * clause such as `on A catch (e)`, where a supertype of `A` was already caugh
t. |
| 448 * | 448 * |
| 449 * @param subtypeName name of the subtype | 449 * @param subtypeName name of the subtype |
| 450 * @param supertypeName name of the supertype | 450 * @param supertypeName name of the supertype |
| 451 */ | 451 */ |
| 452 static final HintCode DEAD_CODE_ON_CATCH_SUBTYPE = new HintCode('DEAD_CODE_ON_
CATCH_SUBTYPE', 2, "Dead code, this on-catch block will never be executed since
'%s' is a subtype of '%s'"); | 452 static final HintCode DEAD_CODE_ON_CATCH_SUBTYPE = new HintCode('DEAD_CODE_ON_
CATCH_SUBTYPE', 2, "Dead code, this on-catch block will never be executed since
'%s' is a subtype of '%s'"); |
| 453 |
| 454 /** |
| 455 * Unused imports are imports which are never not used. |
| 456 */ |
| 457 static final HintCode UNUSED_IMPORT = new HintCode('UNUSED_IMPORT', 3, "Unused
import"); |
| 453 static final List<HintCode> values = [ | 458 static final List<HintCode> values = [ |
| 454 DEAD_CODE, | 459 DEAD_CODE, |
| 455 DEAD_CODE_CATCH_FOLLOWING_CATCH, | 460 DEAD_CODE_CATCH_FOLLOWING_CATCH, |
| 456 DEAD_CODE_ON_CATCH_SUBTYPE]; | 461 DEAD_CODE_ON_CATCH_SUBTYPE, |
| 462 UNUSED_IMPORT]; |
| 457 | 463 |
| 458 /// The name of this enum constant, as declared in the enum declaration. | 464 /// The name of this enum constant, as declared in the enum declaration. |
| 459 final String name; | 465 final String name; |
| 460 | 466 |
| 461 /// The position in the enum declaration. | 467 /// The position in the enum declaration. |
| 462 final int ordinal; | 468 final int ordinal; |
| 463 | 469 |
| 464 /** | 470 /** |
| 465 * The message template used to create the message to be displayed for this er
ror. | 471 * The message template used to create the message to be displayed for this er
ror. |
| 466 */ | 472 */ |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 * | 514 * |
| 509 * @return the type of the error | 515 * @return the type of the error |
| 510 */ | 516 */ |
| 511 ErrorType get type; | 517 ErrorType get type; |
| 512 } | 518 } |
| 513 /** | 519 /** |
| 514 * Instances of the enumeration `ErrorType` represent the type of an [ErrorCode]
. | 520 * Instances of the enumeration `ErrorType` represent the type of an [ErrorCode]
. |
| 515 * | 521 * |
| 516 * @coverage dart.engine.error | 522 * @coverage dart.engine.error |
| 517 */ | 523 */ |
| 518 class ErrorType implements Comparable<ErrorType> { | 524 class ErrorType implements Enum<ErrorType> { |
| 519 | 525 |
| 520 /** | 526 /** |
| 521 * Extra analysis run over the code to follow best practices, which are not in
the Dart Language | 527 * Extra analysis run over the code to follow best practices, which are not in
the Dart Language |
| 522 * Specification. | 528 * Specification. |
| 523 */ | 529 */ |
| 524 static final ErrorType HINT = new ErrorType('HINT', 0, ErrorSeverity.SUGGESTIO
N); | 530 static final ErrorType HINT = new ErrorType('HINT', 0, ErrorSeverity.SUGGESTIO
N); |
| 525 | 531 |
| 526 /** | 532 /** |
| 527 * Compile-time errors are errors that preclude execution. A compile time erro
r must be reported | 533 * Compile-time errors are errors that preclude execution. A compile time erro
r must be reported |
| 528 * by a Dart compiler before the erroneous code is executed. | 534 * by a Dart compiler before the erroneous code is executed. |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 String toString() => name; | 596 String toString() => name; |
| 591 } | 597 } |
| 592 /** | 598 /** |
| 593 * The enumeration `CompileTimeErrorCode` defines the error codes used for compi
le time | 599 * The enumeration `CompileTimeErrorCode` defines the error codes used for compi
le time |
| 594 * errors. The convention for this class is for the name of the error code to in
dicate the problem | 600 * errors. The convention for this class is for the name of the error code to in
dicate the problem |
| 595 * that caused the error to be generated and for the error message to explain wh
at is wrong and, | 601 * that caused the error to be generated and for the error message to explain wh
at is wrong and, |
| 596 * when appropriate, how the problem can be corrected. | 602 * when appropriate, how the problem can be corrected. |
| 597 * | 603 * |
| 598 * @coverage dart.engine.error | 604 * @coverage dart.engine.error |
| 599 */ | 605 */ |
| 600 class CompileTimeErrorCode implements Comparable<CompileTimeErrorCode>, ErrorCod
e { | 606 class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
| 601 | 607 |
| 602 /** | 608 /** |
| 603 * 14.2 Exports: It is a compile-time error if a name <i>N</i> is re-exported
by a library | 609 * 14.2 Exports: It is a compile-time error if a name <i>N</i> is re-exported
by a library |
| 604 * <i>L</i> and <i>N</i> is introduced into the export namespace of <i>L</i> b
y more than one | 610 * <i>L</i> and <i>N</i> is introduced into the export namespace of <i>L</i> b
y more than one |
| 605 * export. | 611 * export. |
| 606 * | 612 * |
| 607 * @param ambiguousElementName the name of the ambiguous element | 613 * @param ambiguousElementName the name of the ambiguous element |
| 608 * @param firstLibraryName the name of the first library that the type is foun
d | 614 * @param firstLibraryName the name of the first library that the type is foun
d |
| 609 * @param secondLibraryName the name of the second library that the type is fo
und | 615 * @param secondLibraryName the name of the second library that the type is fo
und |
| 610 */ | 616 */ |
| 611 static final CompileTimeErrorCode AMBIGUOUS_EXPORT = new CompileTimeErrorCode(
'AMBIGUOUS_EXPORT', 0, "The element '%s' is defined in the libraries '%s' and '%
s'"); | 617 static final CompileTimeErrorCode AMBIGUOUS_EXPORT = new CompileTimeErrorCode(
'AMBIGUOUS_EXPORT', 0, "The element '%s' is defined in the libraries '%s' and '%
s'"); |
| 612 | 618 |
| 613 /** | 619 /** |
| 614 * 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i
>N</i> is introduced | |
| 615 * into the top level scope <i>L</i> by more than one import then: | |
| 616 * <ol> | |
| 617 * * It is a static warning if <i>N</i> is used as a type annotation. | |
| 618 * * In checked mode, it is a dynamic error if <i>N</i> is used as a type anno
tation and | |
| 619 * referenced during a subtype test. | |
| 620 * * Otherwise, it is a compile-time error. | |
| 621 * </ol> | |
| 622 * | |
| 623 * @param ambiguousElementName the name of the ambiguous element | |
| 624 * @param firstLibraryName the name of the first library that the type is foun
d | |
| 625 * @param secondLibraryName the name of the second library that the type is fo
und | |
| 626 */ | |
| 627 static final CompileTimeErrorCode AMBIGUOUS_IMPORT = new CompileTimeErrorCode(
'AMBIGUOUS_IMPORT', 1, "The element '%s' is defined in the libraries '%s' and '%
s'"); | |
| 628 | |
| 629 /** | |
| 630 * 12.33 Argument Definition Test: It is a compile time error if <i>v</i> does
not denote a formal | 620 * 12.33 Argument Definition Test: It is a compile time error if <i>v</i> does
not denote a formal |
| 631 * parameter. | 621 * parameter. |
| 632 * | 622 * |
| 633 * @param the name of the identifier in the argument definition test that is n
ot a parameter | 623 * @param the name of the identifier in the argument definition test that is n
ot a parameter |
| 634 */ | 624 */ |
| 635 static final CompileTimeErrorCode ARGUMENT_DEFINITION_TEST_NON_PARAMETER = new
CompileTimeErrorCode('ARGUMENT_DEFINITION_TEST_NON_PARAMETER', 2, "'%s' is not
a parameter"); | 625 static final CompileTimeErrorCode ARGUMENT_DEFINITION_TEST_NON_PARAMETER = new
CompileTimeErrorCode('ARGUMENT_DEFINITION_TEST_NON_PARAMETER', 1, "'%s' is not
a parameter"); |
| 636 | 626 |
| 637 /** | 627 /** |
| 638 * 12.14.2 Binding Actuals to Formals: In checked mode, it is a dynamic type e
rror if | 628 * 12.14.2 Binding Actuals to Formals: In checked mode, it is a dynamic type e
rror if |
| 639 * <i>o<sub>i</sub></i> is not <b>null</b> and the actual type of <i>p<sub>i</
sub></i> is not a | 629 * <i>o<sub>i</sub></i> is not <b>null</b> and the actual type of <i>p<sub>i</
sub></i> is not a |
| 640 * supertype of the type of <i>o<sub>i</sub></i>, i = 1..m. | 630 * supertype of the type of <i>o<sub>i</sub></i>, i = 1..m. |
| 641 * | 631 * |
| 642 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 632 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 643 * uncaught exception being thrown. | 633 * uncaught exception being thrown. |
| 644 * | 634 * |
| 645 * @param requiredCount the maximum number of positional arguments | 635 * @param requiredCount the maximum number of positional arguments |
| 646 * @param argumentCount the actual number of positional arguments given | 636 * @param argumentCount the actual number of positional arguments given |
| 647 */ | 637 */ |
| 648 static final CompileTimeErrorCode ARGUMENT_TYPE_NOT_ASSIGNABLE = new CompileTi
meErrorCode('ARGUMENT_TYPE_NOT_ASSIGNABLE', 3, "The argument type '%s' cannot be
assigned to the parameter type '%s'"); | 638 static final CompileTimeErrorCode ARGUMENT_TYPE_NOT_ASSIGNABLE = new CompileTi
meErrorCode('ARGUMENT_TYPE_NOT_ASSIGNABLE', 2, "The argument type '%s' cannot be
assigned to the parameter type '%s'"); |
| 649 | 639 |
| 650 /** | 640 /** |
| 651 * 12.30 Identifier Reference: It is a compile-time error to use a built-in id
entifier other than | 641 * 12.30 Identifier Reference: It is a compile-time error to use a built-in id
entifier other than |
| 652 * dynamic as a type annotation. | 642 * dynamic as a type annotation. |
| 653 */ | 643 */ |
| 654 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE = new CompileTim
eErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE', 4, "The built-in identifier '%s' canno
t be as a type"); | 644 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE = new CompileTim
eErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE', 3, "The built-in identifier '%s' canno
t be as a type"); |
| 655 | 645 |
| 656 /** | 646 /** |
| 657 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the | 647 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the |
| 658 * declared name of a class, type parameter or type alias. | 648 * declared name of a class, type parameter or type alias. |
| 659 */ | 649 */ |
| 660 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_NAME = new Compi
leTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE_NAME', 5, "The built-in identifier
'%s' cannot be used as a type name"); | 650 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_NAME = new Compi
leTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE_NAME', 4, "The built-in identifier
'%s' cannot be used as a type name"); |
| 661 | 651 |
| 662 /** | 652 /** |
| 663 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the | 653 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the |
| 664 * declared name of a class, type parameter or type alias. | 654 * declared name of a class, type parameter or type alias. |
| 665 */ | 655 */ |
| 666 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME = new Co
mpileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME', 6, "The built-in ident
ifier '%s' cannot be used as a type alias name"); | 656 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME = new Co
mpileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME', 5, "The built-in ident
ifier '%s' cannot be used as a type alias name"); |
| 667 | 657 |
| 668 /** | 658 /** |
| 669 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the | 659 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the |
| 670 * declared name of a class, type parameter or type alias. | 660 * declared name of a class, type parameter or type alias. |
| 671 */ | 661 */ |
| 672 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME =
new CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME', 7, "The bu
ilt-in identifier '%s' cannot be used as a type variable name"); | 662 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME =
new CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME', 6, "The bu
ilt-in identifier '%s' cannot be used as a type variable name"); |
| 673 | 663 |
| 674 /** | 664 /** |
| 675 * 13.9 Switch: It is a compile-time error if the class <i>C</i> implements th
e operator | 665 * 13.9 Switch: It is a compile-time error if the class <i>C</i> implements th
e operator |
| 676 * <i>==</i>. | 666 * <i>==</i>. |
| 677 */ | 667 */ |
| 678 static final CompileTimeErrorCode CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS = new
CompileTimeErrorCode('CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS', 8, "The switch c
ase expression type '%s' cannot override the == operator"); | 668 static final CompileTimeErrorCode CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS = new
CompileTimeErrorCode('CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS', 7, "The switch c
ase expression type '%s' cannot override the == operator"); |
| 679 | 669 |
| 680 /** | 670 /** |
| 681 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time
constant would raise | 671 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time
constant would raise |
| 682 * an exception. | 672 * an exception. |
| 683 */ | 673 */ |
| 684 static final CompileTimeErrorCode COMPILE_TIME_CONSTANT_RAISES_EXCEPTION = new
CompileTimeErrorCode('COMPILE_TIME_CONSTANT_RAISES_EXCEPTION', 9, ""); | 674 static final CompileTimeErrorCode COMPILE_TIME_CONSTANT_RAISES_EXCEPTION = new
CompileTimeErrorCode('COMPILE_TIME_CONSTANT_RAISES_EXCEPTION', 8, ""); |
| 685 | 675 |
| 686 /** | 676 /** |
| 687 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same | 677 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same |
| 688 * name. This restriction holds regardless of whether the getter is defined ex
plicitly or | 678 * name. This restriction holds regardless of whether the getter is defined ex
plicitly or |
| 689 * implicitly, or whether the getter or the method are inherited or not. | 679 * implicitly, or whether the getter or the method are inherited or not. |
| 690 */ | 680 */ |
| 691 static final CompileTimeErrorCode CONFLICTING_GETTER_AND_METHOD = new CompileT
imeErrorCode('CONFLICTING_GETTER_AND_METHOD', 10, "Class '%s' cannot have both g
etter '%s.%s' and method with the same name"); | 681 static final CompileTimeErrorCode CONFLICTING_GETTER_AND_METHOD = new CompileT
imeErrorCode('CONFLICTING_GETTER_AND_METHOD', 9, "Class '%s' cannot have both ge
tter '%s.%s' and method with the same name"); |
| 692 | 682 |
| 693 /** | 683 /** |
| 694 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same | 684 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same |
| 695 * name. This restriction holds regardless of whether the getter is defined ex
plicitly or | 685 * name. This restriction holds regardless of whether the getter is defined ex
plicitly or |
| 696 * implicitly, or whether the getter or the method are inherited or not. | 686 * implicitly, or whether the getter or the method are inherited or not. |
| 697 */ | 687 */ |
| 698 static final CompileTimeErrorCode CONFLICTING_METHOD_AND_GETTER = new CompileT
imeErrorCode('CONFLICTING_METHOD_AND_GETTER', 11, "Class '%s' cannot have both m
ethod '%s.%s' and getter with the same name"); | 688 static final CompileTimeErrorCode CONFLICTING_METHOD_AND_GETTER = new CompileT
imeErrorCode('CONFLICTING_METHOD_AND_GETTER', 10, "Class '%s' cannot have both m
ethod '%s.%s' and getter with the same name"); |
| 699 | 689 |
| 700 /** | 690 /** |
| 701 * 7.6 Constructors: A constructor name always begins with the name of its imm
ediately enclosing | 691 * 7.6 Constructors: A constructor name always begins with the name of its imm
ediately enclosing |
| 702 * class, and may optionally be followed by a dot and an identifier <i>id</i>.
It is a | 692 * class, and may optionally be followed by a dot and an identifier <i>id</i>.
It is a |
| 703 * compile-time error if <i>id</i> is the name of a member declared in the imm
ediately enclosing | 693 * compile-time error if <i>id</i> is the name of a member declared in the imm
ediately enclosing |
| 704 * class. | 694 * class. |
| 705 */ | 695 */ |
| 706 static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD = new
CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD', 12, "'%s' cannot
be used to name a constructor and a field in this class"); | 696 static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD = new
CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD', 11, "'%s' cannot
be used to name a constructor and a field in this class"); |
| 707 | 697 |
| 708 /** | 698 /** |
| 709 * 7.6 Constructors: A constructor name always begins with the name of its imm
ediately enclosing | 699 * 7.6 Constructors: A constructor name always begins with the name of its imm
ediately enclosing |
| 710 * class, and may optionally be followed by a dot and an identifier <i>id</i>.
It is a | 700 * class, and may optionally be followed by a dot and an identifier <i>id</i>.
It is a |
| 711 * compile-time error if <i>id</i> is the name of a member declared in the imm
ediately enclosing | 701 * compile-time error if <i>id</i> is the name of a member declared in the imm
ediately enclosing |
| 712 * class. | 702 * class. |
| 713 */ | 703 */ |
| 714 static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD = ne
w CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD', 13, "'%s' cann
ot be used to name a constructor and a method in this class"); | 704 static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD = ne
w CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD', 12, "'%s' cann
ot be used to name a constructor and a method in this class"); |
| 715 | 705 |
| 716 /** | 706 /** |
| 717 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 707 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 718 * uncaught exception being thrown. | 708 * uncaught exception being thrown. |
| 719 */ | 709 */ |
| 720 static final CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION = new Com
pileTimeErrorCode('CONST_CONSTRUCTOR_THROWS_EXCEPTION', 14, "'const' constructor
s cannot throw exceptions"); | 710 static final CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION = new Com
pileTimeErrorCode('CONST_CONSTRUCTOR_THROWS_EXCEPTION', 13, "'const' constructor
s cannot throw exceptions"); |
| 721 | 711 |
| 722 /** | 712 /** |
| 723 * 7.6.3 Constant Constructors: It is a compile-time error if a constant const
ructor is declared | 713 * 7.6.3 Constant Constructors: It is a compile-time error if a constant const
ructor is declared |
| 724 * by a class that has a non-final instance variable. | 714 * by a class that has a non-final instance variable. |
| 725 * | 715 * |
| 726 * The above refers to both locally declared and inherited instance variables. | 716 * The above refers to both locally declared and inherited instance variables. |
| 727 */ | 717 */ |
| 728 static final CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD = new
CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD', 15, "Cannot defi
ne the 'const' constructor for a class with non-final fields"); | 718 static final CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD = new
CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD', 14, "Cannot defi
ne the 'const' constructor for a class with non-final fields"); |
| 729 | 719 |
| 730 /** | 720 /** |
| 731 * 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error
if o is not | 721 * 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error
if o is not |
| 732 * <b>null</b> and the interface of the class of <i>o</i> is not a subtype of
the static type of | 722 * <b>null</b> and the interface of the class of <i>o</i> is not a subtype of
the static type of |
| 733 * the field <i>v</i>. | 723 * the field <i>v</i>. |
| 734 * | 724 * |
| 735 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 725 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 736 * uncaught exception being thrown. | 726 * uncaught exception being thrown. |
| 737 * | 727 * |
| 738 * @param initializerType the name of the type of the initializer expression | 728 * @param initializerType the name of the type of the initializer expression |
| 739 * @param fieldType the name of the type of the field | 729 * @param fieldType the name of the type of the field |
| 740 */ | 730 */ |
| 741 static final CompileTimeErrorCode CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE = new
CompileTimeErrorCode('CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE', 16, "The initial
izer type '%s' cannot be assigned to the field type '%s'"); | 731 static final CompileTimeErrorCode CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE = new
CompileTimeErrorCode('CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE', 15, "The initial
izer type '%s' cannot be assigned to the field type '%s'"); |
| 742 | 732 |
| 743 /** | 733 /** |
| 744 * 6.2 Formal Parameters: It is a compile-time error if a formal parameter is
declared as a | 734 * 6.2 Formal Parameters: It is a compile-time error if a formal parameter is
declared as a |
| 745 * constant variable. | 735 * constant variable. |
| 746 */ | 736 */ |
| 747 static final CompileTimeErrorCode CONST_FORMAL_PARAMETER = new CompileTimeErro
rCode('CONST_FORMAL_PARAMETER', 17, "Parameters cannot be 'const'"); | 737 static final CompileTimeErrorCode CONST_FORMAL_PARAMETER = new CompileTimeErro
rCode('CONST_FORMAL_PARAMETER', 16, "Parameters cannot be 'const'"); |
| 748 | 738 |
| 749 /** | 739 /** |
| 750 * 5 Variables: A constant variable must be initialized to a compile-time cons
tant or a | 740 * 5 Variables: A constant variable must be initialized to a compile-time cons
tant or a |
| 751 * compile-time error occurs. | 741 * compile-time error occurs. |
| 752 */ | 742 */ |
| 753 static final CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE =
new CompileTimeErrorCode('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', 18, "'cons
t' variables must be constant value"); | 743 static final CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE =
new CompileTimeErrorCode('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', 17, "'cons
t' variables must be constant value"); |
| 754 | 744 |
| 755 /** | 745 /** |
| 756 * 7.5 Instance Variables: It is a compile-time error if an instance variable
is declared to be | 746 * 7.5 Instance Variables: It is a compile-time error if an instance variable
is declared to be |
| 757 * constant. | 747 * constant. |
| 758 */ | 748 */ |
| 759 static final CompileTimeErrorCode CONST_INSTANCE_FIELD = new CompileTimeErrorC
ode('CONST_INSTANCE_FIELD', 19, "Only static fields can be declared as 'const'")
; | 749 static final CompileTimeErrorCode CONST_INSTANCE_FIELD = new CompileTimeErrorC
ode('CONST_INSTANCE_FIELD', 18, "Only static fields can be declared as 'const'")
; |
| 760 | 750 |
| 761 /** | 751 /** |
| 762 * 12.11.2 Const: An expression of one of the forms !e, e1 && e2 or e1 || e2,
where e, e1 and e2 | 752 * 12.11.2 Const: An expression of one of the forms !e, e1 && e2 or e1 || e2,
where e, e1 and e2 |
| 763 * are constant expressions that evaluate to a boolean value. | 753 * are constant expressions that evaluate to a boolean value. |
| 764 */ | 754 */ |
| 765 static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = new CompileTimeErrorC
ode('CONST_EVAL_TYPE_BOOL', 20, "An expression of type 'bool' was expected"); | 755 static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = new CompileTimeErrorC
ode('CONST_EVAL_TYPE_BOOL', 19, "An expression of type 'bool' was expected"); |
| 766 | 756 |
| 767 /** | 757 /** |
| 768 * 12.11.2 Const: An expression of one of the forms e1 == e2 or e1 != e2 where
e1 and e2 are | 758 * 12.11.2 Const: An expression of one of the forms e1 == e2 or e1 != e2 where
e1 and e2 are |
| 769 * constant expressions that evaluate to a numeric, string or boolean value or
to null. | 759 * constant expressions that evaluate to a numeric, string or boolean value or
to null. |
| 770 */ | 760 */ |
| 771 static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_NUM_STRING = new Compil
eTimeErrorCode('CONST_EVAL_TYPE_BOOL_NUM_STRING', 21, "An expression of type 'bo
ol', 'num', 'String' or 'null' was expected"); | 761 static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_NUM_STRING = new Compil
eTimeErrorCode('CONST_EVAL_TYPE_BOOL_NUM_STRING', 20, "An expression of type 'bo
ol', 'num', 'String' or 'null' was expected"); |
| 772 | 762 |
| 773 /** | 763 /** |
| 774 * 12.11.2 Const: An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 |
e2, e1 >> e2 or e1 | 764 * 12.11.2 Const: An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 |
e2, e1 >> e2 or e1 |
| 775 * << e2, where e, e1 and e2 are constant expressions that evaluate to an inte
ger value or to | 765 * << e2, where e, e1 and e2 are constant expressions that evaluate to an inte
ger value or to |
| 776 * null. | 766 * null. |
| 777 */ | 767 */ |
| 778 static final CompileTimeErrorCode CONST_EVAL_TYPE_INT = new CompileTimeErrorCo
de('CONST_EVAL_TYPE_INT', 22, "An expression of type 'int' was expected"); | 768 static final CompileTimeErrorCode CONST_EVAL_TYPE_INT = new CompileTimeErrorCo
de('CONST_EVAL_TYPE_INT', 21, "An expression of type 'int' was expected"); |
| 779 | 769 |
| 780 /** | 770 /** |
| 781 * 12.11.2 Const: An expression of one of the forms e, e1 + e2, e1 - e2, e1 *
e2, e1 / e2, e1 ~/ | 771 * 12.11.2 Const: An expression of one of the forms e, e1 + e2, e1 - e2, e1 *
e2, e1 / e2, e1 ~/ |
| 782 * e2, e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are
constant | 772 * e2, e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are
constant |
| 783 * expressions that evaluate to a numeric value or to null.. | 773 * expressions that evaluate to a numeric value or to null.. |
| 784 */ | 774 */ |
| 785 static final CompileTimeErrorCode CONST_EVAL_TYPE_NUM = new CompileTimeErrorCo
de('CONST_EVAL_TYPE_NUM', 23, "An expression of type 'num' was expected"); | 775 static final CompileTimeErrorCode CONST_EVAL_TYPE_NUM = new CompileTimeErrorCo
de('CONST_EVAL_TYPE_NUM', 22, "An expression of type 'num' was expected"); |
| 786 | 776 |
| 787 /** | 777 /** |
| 788 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 778 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 789 * uncaught exception being thrown. | 779 * uncaught exception being thrown. |
| 790 */ | 780 */ |
| 791 static final CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = new CompileTim
eErrorCode('CONST_EVAL_THROWS_EXCEPTION', 24, "Evaluation of this constant expre
ssion causes exception"); | 781 static final CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = new CompileTim
eErrorCode('CONST_EVAL_THROWS_EXCEPTION', 23, "Evaluation of this constant expre
ssion causes exception"); |
| 792 | 782 |
| 793 /** | 783 /** |
| 794 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 784 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 795 * uncaught exception being thrown. | 785 * uncaught exception being thrown. |
| 796 */ | 786 */ |
| 797 static final CompileTimeErrorCode CONST_EVAL_THROWS_IDBZE = new CompileTimeErr
orCode('CONST_EVAL_THROWS_IDBZE', 25, "Evaluation of this constant expression th
rows IntegerDivisionByZeroException"); | 787 static final CompileTimeErrorCode CONST_EVAL_THROWS_IDBZE = new CompileTimeErr
orCode('CONST_EVAL_THROWS_IDBZE', 24, "Evaluation of this constant expression th
rows IntegerDivisionByZeroException"); |
| 798 | 788 |
| 799 /** | 789 /** |
| 800 * 12.11.2 Const: If <i>T</i> is a parameterized type <i>S<U<sub>1</sub>, &
hellip;, | 790 * 12.11.2 Const: If <i>T</i> is a parameterized type <i>S<U<sub>1</sub>, &
hellip;, |
| 801 * U<sub>m</sub>></i>, let <i>R = S</i>; It is a compile time error if <i>S
</i> is not a | 791 * U<sub>m</sub>></i>, let <i>R = S</i>; It is a compile time error if <i>S
</i> is not a |
| 802 * generic type with <i>m</i> type parameters. | 792 * generic type with <i>m</i> type parameters. |
| 803 * | 793 * |
| 804 * @param typeName the name of the type being referenced (<i>S</i>) | 794 * @param typeName the name of the type being referenced (<i>S</i>) |
| 805 * @param parameterCount the number of type parameters that were declared | 795 * @param parameterCount the number of type parameters that were declared |
| 806 * @param argumentCount the number of type arguments provided | 796 * @param argumentCount the number of type arguments provided |
| 807 * @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS | 797 * @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS |
| 808 * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS | 798 * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS |
| 809 */ | 799 */ |
| 810 static final CompileTimeErrorCode CONST_WITH_INVALID_TYPE_PARAMETERS = new Com
pileTimeErrorCode('CONST_WITH_INVALID_TYPE_PARAMETERS', 26, "The type '%s' is de
clared with %d type parameters, but %d type arguments were given"); | 800 static final CompileTimeErrorCode CONST_WITH_INVALID_TYPE_PARAMETERS = new Com
pileTimeErrorCode('CONST_WITH_INVALID_TYPE_PARAMETERS', 25, "The type '%s' is de
clared with %d type parameters, but %d type arguments were given"); |
| 811 | 801 |
| 812 /** | 802 /** |
| 813 * 12.11.2 Const: If <i>e</i> is of the form <i>const T(a<sub>1</sub>, &hellip
;, a<sub>n</sub>, | 803 * 12.11.2 Const: If <i>e</i> is of the form <i>const T(a<sub>1</sub>, &hellip
;, a<sub>n</sub>, |
| 814 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a | 804 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a |
| 815 * compile-time error if the type <i>T</i> does not declare a constant constru
ctor with the same | 805 * compile-time error if the type <i>T</i> does not declare a constant constru
ctor with the same |
| 816 * name as the declaration of <i>T</i>. | 806 * name as the declaration of <i>T</i>. |
| 817 */ | 807 */ |
| 818 static final CompileTimeErrorCode CONST_WITH_NON_CONST = new CompileTimeErrorC
ode('CONST_WITH_NON_CONST', 27, "The constructor being called is not a 'const' c
onstructor"); | 808 static final CompileTimeErrorCode CONST_WITH_NON_CONST = new CompileTimeErrorC
ode('CONST_WITH_NON_CONST', 26, "The constructor being called is not a 'const' c
onstructor"); |
| 819 | 809 |
| 820 /** | 810 /** |
| 821 * 12.11.2 Const: In all of the above cases, it is a compile-time error if <i>
a<sub>i</sub>, 1 | 811 * 12.11.2 Const: In all of the above cases, it is a compile-time error if <i>
a<sub>i</sub>, 1 |
| 822 * <= i <= n + k</i>, is not a compile-time constant expression. | 812 * <= i <= n + k</i>, is not a compile-time constant expression. |
| 823 */ | 813 */ |
| 824 static final CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = new Compi
leTimeErrorCode('CONST_WITH_NON_CONSTANT_ARGUMENT', 28, "Arguments of a constant
creation must be constant expressions"); | 814 static final CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = new Compi
leTimeErrorCode('CONST_WITH_NON_CONSTANT_ARGUMENT', 27, "Arguments of a constant
creation must be constant expressions"); |
| 825 | 815 |
| 826 /** | 816 /** |
| 827 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current | 817 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current |
| 828 * scope, optionally followed by type arguments. | 818 * scope, optionally followed by type arguments. |
| 829 * | 819 * |
| 830 * 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>, | 820 * 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>, |
| 831 * x<sub>n+1</sub>: a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+k</sub>
)</i> it is a | 821 * x<sub>n+1</sub>: a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+k</sub>
)</i> it is a |
| 832 * compile-time error if <i>T</i> is not a class accessible in the current sco
pe, optionally | 822 * compile-time error if <i>T</i> is not a class accessible in the current sco
pe, optionally |
| 833 * followed by type arguments. | 823 * followed by type arguments. |
| 834 * | 824 * |
| 835 * @param name the name of the non-type element | 825 * @param name the name of the non-type element |
| 836 */ | 826 */ |
| 837 static final CompileTimeErrorCode CONST_WITH_NON_TYPE = new CompileTimeErrorCo
de('CONST_WITH_NON_TYPE', 29, "The name '%s' is not a class"); | 827 static final CompileTimeErrorCode CONST_WITH_NON_TYPE = new CompileTimeErrorCo
de('CONST_WITH_NON_TYPE', 28, "The name '%s' is not a class"); |
| 838 | 828 |
| 839 /** | 829 /** |
| 840 * 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type par
ameters. | 830 * 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type par
ameters. |
| 841 */ | 831 */ |
| 842 static final CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = new CompileTime
ErrorCode('CONST_WITH_TYPE_PARAMETERS', 30, "The constant creation cannot use a
type parameter"); | 832 static final CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = new CompileTime
ErrorCode('CONST_WITH_TYPE_PARAMETERS', 29, "The constant creation cannot use a
type parameter"); |
| 843 | 833 |
| 844 /** | 834 /** |
| 845 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant | 835 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant |
| 846 * constructor declared by the type <i>T</i>. | 836 * constructor declared by the type <i>T</i>. |
| 847 * | 837 * |
| 848 * @param typeName the name of the type | 838 * @param typeName the name of the type |
| 849 * @param constructorName the name of the requested constant constructor | 839 * @param constructorName the name of the requested constant constructor |
| 850 */ | 840 */ |
| 851 static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR = new Compi
leTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR', 31, "The class '%s' does not
have a constant constructor '%s'"); | 841 static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR = new Compi
leTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR', 30, "The class '%s' does not
have a constant constructor '%s'"); |
| 852 | 842 |
| 853 /** | 843 /** |
| 854 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant | 844 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant |
| 855 * constructor declared by the type <i>T</i>. | 845 * constructor declared by the type <i>T</i>. |
| 856 * | 846 * |
| 857 * @param typeName the name of the type | 847 * @param typeName the name of the type |
| 858 */ | 848 */ |
| 859 static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = n
ew CompileTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 32, "The cla
ss '%s' does not have a default constant constructor"); | 849 static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = n
ew CompileTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 31, "The cla
ss '%s' does not have a default constant constructor"); |
| 860 | 850 |
| 861 /** | 851 /** |
| 862 * 15.3.1 Typedef: It is a compile-time error if any default values are specif
ied in the signature | 852 * 15.3.1 Typedef: It is a compile-time error if any default values are specif
ied in the signature |
| 863 * of a function type alias. | 853 * of a function type alias. |
| 864 */ | 854 */ |
| 865 static final CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS = new C
ompileTimeErrorCode('DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS', 33, "Default values
aren't allowed in typedefs"); | 855 static final CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS = new C
ompileTimeErrorCode('DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS', 32, "Default values
aren't allowed in typedefs"); |
| 866 | 856 |
| 867 /** | 857 /** |
| 868 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name | 858 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name |
| 869 * declared in the same scope. | 859 * declared in the same scope. |
| 870 */ | 860 */ |
| 871 static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT = new CompileT
imeErrorCode('DUPLICATE_CONSTRUCTOR_DEFAULT', 34, "The default constructor is al
ready defined"); | 861 static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT = new CompileT
imeErrorCode('DUPLICATE_CONSTRUCTOR_DEFAULT', 33, "The default constructor is al
ready defined"); |
| 872 | 862 |
| 873 /** | 863 /** |
| 874 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name | 864 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name |
| 875 * declared in the same scope. | 865 * declared in the same scope. |
| 876 * | 866 * |
| 877 * @param duplicateName the name of the duplicate entity | 867 * @param duplicateName the name of the duplicate entity |
| 878 */ | 868 */ |
| 879 static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME = new CompileTime
ErrorCode('DUPLICATE_CONSTRUCTOR_NAME', 35, "The constructor with name '%s' is a
lready defined"); | 869 static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME = new CompileTime
ErrorCode('DUPLICATE_CONSTRUCTOR_NAME', 34, "The constructor with name '%s' is a
lready defined"); |
| 880 | 870 |
| 881 /** | 871 /** |
| 882 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name | 872 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name |
| 883 * declared in the same scope. | 873 * declared in the same scope. |
| 884 * | 874 * |
| 885 * 7 Classes: It is a compile-time error if a class declares two members of th
e same name. | 875 * 7 Classes: It is a compile-time error if a class declares two members of th
e same name. |
| 886 * | 876 * |
| 887 * 7 Classes: It is a compile-time error if a class has an instance member and
a static member | 877 * 7 Classes: It is a compile-time error if a class has an instance member and
a static member |
| 888 * with the same name. | 878 * with the same name. |
| 889 * | 879 * |
| 890 * @param duplicateName the name of the duplicate entity | 880 * @param duplicateName the name of the duplicate entity |
| 891 */ | 881 */ |
| 892 static final CompileTimeErrorCode DUPLICATE_DEFINITION = new CompileTimeErrorC
ode('DUPLICATE_DEFINITION', 36, "The name '%s' is already defined"); | 882 static final CompileTimeErrorCode DUPLICATE_DEFINITION = new CompileTimeErrorC
ode('DUPLICATE_DEFINITION', 35, "The name '%s' is already defined"); |
| 893 | 883 |
| 894 /** | 884 /** |
| 895 * 7. Classes: It is a compile-time error if a class has an instance member an
d a static member | 885 * 7. Classes: It is a compile-time error if a class has an instance member an
d a static member |
| 896 * with the same name. | 886 * with the same name. |
| 897 * | 887 * |
| 898 * This covers the additional duplicate definition cases where inheritance has
to be considered. | 888 * This covers the additional duplicate definition cases where inheritance has
to be considered. |
| 899 * | 889 * |
| 900 * @param className the name of the class that has conflicting instance/static
members | 890 * @param className the name of the class that has conflicting instance/static
members |
| 901 * @param name the name of the conflicting members | 891 * @param name the name of the conflicting members |
| 902 * @see #DUPLICATE_DEFINITION | 892 * @see #DUPLICATE_DEFINITION |
| 903 */ | 893 */ |
| 904 static final CompileTimeErrorCode DUPLICATE_DEFINITION_INHERITANCE = new Compi
leTimeErrorCode('DUPLICATE_DEFINITION_INHERITANCE', 37, "The name '%s' is alread
y defined in '%s'"); | 894 static final CompileTimeErrorCode DUPLICATE_DEFINITION_INHERITANCE = new Compi
leTimeErrorCode('DUPLICATE_DEFINITION_INHERITANCE', 36, "The name '%s' is alread
y defined in '%s'"); |
| 905 | 895 |
| 906 /** | 896 /** |
| 907 * 12.14.2 Binding Actuals to Formals: It is a compile-time error if <i>q<sub>
i</sub> = | 897 * 12.14.2 Binding Actuals to Formals: It is a compile-time error if <i>q<sub>
i</sub> = |
| 908 * q<sub>j</sub></i> for any <i>i != j</i> [where <i>q<sub>i</sub></i> is the
label for a named | 898 * q<sub>j</sub></i> for any <i>i != j</i> [where <i>q<sub>i</sub></i> is the
label for a named |
| 909 * argument]. | 899 * argument]. |
| 910 */ | 900 */ |
| 911 static final CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = new CompileTimeEr
rorCode('DUPLICATE_NAMED_ARGUMENT', 38, "The argument for the named parameter '%
s' was already specified"); | 901 static final CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = new CompileTimeEr
rorCode('DUPLICATE_NAMED_ARGUMENT', 37, "The argument for the named parameter '%
s' was already specified"); |
| 912 | 902 |
| 913 /** | 903 /** |
| 914 * SDK implementation libraries can be exported only by other SDK libraries. | 904 * SDK implementation libraries can be exported only by other SDK libraries. |
| 915 * | 905 * |
| 916 * @param uri the uri pointing to a library | 906 * @param uri the uri pointing to a library |
| 917 */ | 907 */ |
| 918 static final CompileTimeErrorCode EXPORT_INTERNAL_LIBRARY = new CompileTimeErr
orCode('EXPORT_INTERNAL_LIBRARY', 39, "The library %s is internal and cannot be
exported"); | 908 static final CompileTimeErrorCode EXPORT_INTERNAL_LIBRARY = new CompileTimeErr
orCode('EXPORT_INTERNAL_LIBRARY', 38, "The library %s is internal and cannot be
exported"); |
| 919 | 909 |
| 920 /** | 910 /** |
| 921 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is | 911 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 922 * not a library declaration. | 912 * not a library declaration. |
| 923 * | 913 * |
| 924 * @param uri the uri pointing to a non-library declaration | 914 * @param uri the uri pointing to a non-library declaration |
| 925 */ | 915 */ |
| 926 static final CompileTimeErrorCode EXPORT_OF_NON_LIBRARY = new CompileTimeError
Code('EXPORT_OF_NON_LIBRARY', 40, "The exported library '%s' must not have a par
t-of directive"); | 916 static final CompileTimeErrorCode EXPORT_OF_NON_LIBRARY = new CompileTimeError
Code('EXPORT_OF_NON_LIBRARY', 39, "The exported library '%s' must not have a par
t-of directive"); |
| 927 | 917 |
| 928 /** | 918 /** |
| 929 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla
ss <i>C</i> includes | 919 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla
ss <i>C</i> includes |
| 930 * a type expression that does not denote a class available in the lexical sco
pe of <i>C</i>. | 920 * a type expression that does not denote a class available in the lexical sco
pe of <i>C</i>. |
| 931 * | 921 * |
| 932 * @param typeName the name of the superclass that was not found | 922 * @param typeName the name of the superclass that was not found |
| 933 */ | 923 */ |
| 934 static final CompileTimeErrorCode EXTENDS_NON_CLASS = new CompileTimeErrorCode
('EXTENDS_NON_CLASS', 41, "Classes can only extend other classes"); | 924 static final CompileTimeErrorCode EXTENDS_NON_CLASS = new CompileTimeErrorCode
('EXTENDS_NON_CLASS', 40, "Classes can only extend other classes"); |
| 935 | 925 |
| 936 /** | 926 /** |
| 937 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. | 927 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. |
| 938 * | 928 * |
| 939 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. | 929 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. |
| 940 * | 930 * |
| 941 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. | 931 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. |
| 942 * | 932 * |
| 943 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to | 933 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to |
| 944 * attempt to extend or implement num. | 934 * attempt to extend or implement num. |
| 945 * | 935 * |
| 946 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. | 936 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. |
| 947 * | 937 * |
| 948 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. | 938 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. |
| 949 * | 939 * |
| 950 * @param typeName the name of the type that cannot be extended | 940 * @param typeName the name of the type that cannot be extended |
| 951 * @see #IMPLEMENTS_DISALLOWED_CLASS | 941 * @see #IMPLEMENTS_DISALLOWED_CLASS |
| 952 */ | 942 */ |
| 953 static final CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = new CompileTimeEr
rorCode('EXTENDS_DISALLOWED_CLASS', 42, "Classes cannot extend '%s'"); | 943 static final CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = new CompileTimeEr
rorCode('EXTENDS_DISALLOWED_CLASS', 41, "Classes cannot extend '%s'"); |
| 954 | 944 |
| 955 /** | 945 /** |
| 956 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > | 946 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > |
| 957 * n</i>. | 947 * n</i>. |
| 958 * | 948 * |
| 959 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 949 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 960 * uncaught exception being thrown. | 950 * uncaught exception being thrown. |
| 961 * | 951 * |
| 962 * @param requiredCount the maximum number of positional arguments | 952 * @param requiredCount the maximum number of positional arguments |
| 963 * @param argumentCount the actual number of positional arguments given | 953 * @param argumentCount the actual number of positional arguments given |
| 964 */ | 954 */ |
| 965 static final CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS = new CompileTime
ErrorCode('EXTRA_POSITIONAL_ARGUMENTS', 43, "%d positional arguments expected, b
ut %d found"); | 955 static final CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS = new CompileTime
ErrorCode('EXTRA_POSITIONAL_ARGUMENTS', 42, "%d positional arguments expected, b
ut %d found"); |
| 966 | 956 |
| 967 /** | 957 /** |
| 968 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time | 958 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time |
| 969 * error if more than one initializer corresponding to a given instance variab
le appears in | 959 * error if more than one initializer corresponding to a given instance variab
le appears in |
| 970 * <i>k</i>'s list. | 960 * <i>k</i>'s list. |
| 971 */ | 961 */ |
| 972 static final CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS =
new CompileTimeErrorCode('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 44, "The
field '%s' cannot be initialized twice in the same constructor"); | 962 static final CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS =
new CompileTimeErrorCode('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 43, "The
field '%s' cannot be initialized twice in the same constructor"); |
| 973 | 963 |
| 974 /** | 964 /** |
| 975 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time | 965 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time |
| 976 * error if <i>k</i>'s initializer list contains an initializer for a final va
riable <i>f</i> | 966 * error if <i>k</i>'s initializer list contains an initializer for a final va
riable <i>f</i> |
| 977 * whose declaration includes an initialization expression. | 967 * whose declaration includes an initialization expression. |
| 978 */ | 968 */ |
| 979 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARA
TION = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATIO
N', 45, "Values cannot be set in the constructor if they are final, and have alr
eady been set"); | 969 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARA
TION = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATIO
N', 44, "Values cannot be set in the constructor if they are final, and have alr
eady been set"); |
| 980 | 970 |
| 981 /** | 971 /** |
| 982 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time | 972 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time |
| 983 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is initialized | 973 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is initialized |
| 984 * by means of an initializing formal of <i>k</i>. | 974 * by means of an initializing formal of <i>k</i>. |
| 985 */ | 975 */ |
| 986 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ
ER = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER',
46, "Fields cannot be initialized in both the parameter list and the initializer
s"); | 976 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ
ER = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER',
45, "Fields cannot be initialized in both the parameter list and the initializer
s"); |
| 987 | 977 |
| 988 /** | 978 /** |
| 989 * 5 Variables: It is a compile-time error if a final instance variable that h
as been initialized | 979 * 5 Variables: It is a compile-time error if a final instance variable that h
as been initialized |
| 990 * at its point of declaration is also initialized in a constructor. | 980 * at its point of declaration is also initialized in a constructor. |
| 991 * | 981 * |
| 992 * @param name the name of the field in question | 982 * @param name the name of the field in question |
| 993 */ | 983 */ |
| 994 static final CompileTimeErrorCode FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRU
CTOR = new CompileTimeErrorCode('FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTO
R', 47, "'%s' is final and was given a value when it was declared, so it cannot
be set to a new value"); | 984 static final CompileTimeErrorCode FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRU
CTOR = new CompileTimeErrorCode('FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTO
R', 46, "'%s' is final and was given a value when it was declared, so it cannot
be set to a new value"); |
| 995 | 985 |
| 996 /** | 986 /** |
| 997 * 5 Variables: It is a compile-time error if a final instance variable that h
as is initialized by | 987 * 5 Variables: It is a compile-time error if a final instance variable that h
as is initialized by |
| 998 * means of an initializing formal of a constructor is also initialized elsewh
ere in the same | 988 * means of an initializing formal of a constructor is also initialized elsewh
ere in the same |
| 999 * constructor. | 989 * constructor. |
| 1000 * | 990 * |
| 1001 * @param name the name of the field in question | 991 * @param name the name of the field in question |
| 1002 */ | 992 */ |
| 1003 static final CompileTimeErrorCode FINAL_INITIALIZED_MULTIPLE_TIMES = new Compi
leTimeErrorCode('FINAL_INITIALIZED_MULTIPLE_TIMES', 48, "'%s' is a final field a
nd so can only be set once"); | 993 static final CompileTimeErrorCode FINAL_INITIALIZED_MULTIPLE_TIMES = new Compi
leTimeErrorCode('FINAL_INITIALIZED_MULTIPLE_TIMES', 47, "'%s' is a final field a
nd so can only be set once"); |
| 1004 | 994 |
| 1005 /** | 995 /** |
| 1006 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by | 996 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by |
| 1007 * a function other than a non-redirecting generative constructor. | 997 * a function other than a non-redirecting generative constructor. |
| 1008 */ | 998 */ |
| 1009 static final CompileTimeErrorCode FIELD_INITIALIZER_FACTORY_CONSTRUCTOR = new
CompileTimeErrorCode('FIELD_INITIALIZER_FACTORY_CONSTRUCTOR', 49, "Initializing
formal fields cannot be used in factory constructors"); | 999 static final CompileTimeErrorCode FIELD_INITIALIZER_FACTORY_CONSTRUCTOR = new
CompileTimeErrorCode('FIELD_INITIALIZER_FACTORY_CONSTRUCTOR', 48, "Initializing
formal fields cannot be used in factory constructors"); |
| 1010 | 1000 |
| 1011 /** | 1001 /** |
| 1012 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by | 1002 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by |
| 1013 * a function other than a non-redirecting generative constructor. | 1003 * a function other than a non-redirecting generative constructor. |
| 1014 */ | 1004 */ |
| 1015 static final CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new
CompileTimeErrorCode('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 50, "Initializing
formal fields can only be used in constructors"); | 1005 static final CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new
CompileTimeErrorCode('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 49, "Initializing
formal fields can only be used in constructors"); |
| 1016 | 1006 |
| 1017 /** | 1007 /** |
| 1018 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 1008 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
| 1019 * only action is to invoke another generative constructor. | 1009 * only action is to invoke another generative constructor. |
| 1020 * | 1010 * |
| 1021 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by | 1011 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by |
| 1022 * a function other than a non-redirecting generative constructor. | 1012 * a function other than a non-redirecting generative constructor. |
| 1023 */ | 1013 */ |
| 1024 static final CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR =
new CompileTimeErrorCode('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', 51, "The r
edirecting constructor cannot have a field initializer"); | 1014 static final CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR =
new CompileTimeErrorCode('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', 50, "The r
edirecting constructor cannot have a field initializer"); |
| 1025 | 1015 |
| 1026 /** | 1016 /** |
| 1027 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same | 1017 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same |
| 1028 * name. | 1018 * name. |
| 1029 * | 1019 * |
| 1030 * @param name the conflicting name of the getter and method | 1020 * @param name the conflicting name of the getter and method |
| 1031 */ | 1021 */ |
| 1032 static final CompileTimeErrorCode GETTER_AND_METHOD_WITH_SAME_NAME = new Compi
leTimeErrorCode('GETTER_AND_METHOD_WITH_SAME_NAME', 52, "'%s' cannot be used to
name a getter, there is already a method with the same name"); | 1022 static final CompileTimeErrorCode GETTER_AND_METHOD_WITH_SAME_NAME = new Compi
leTimeErrorCode('GETTER_AND_METHOD_WITH_SAME_NAME', 51, "'%s' cannot be used to
name a getter, there is already a method with the same name"); |
| 1033 | 1023 |
| 1034 /** | 1024 /** |
| 1035 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. | 1025 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. |
| 1036 * | 1026 * |
| 1037 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. | 1027 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. |
| 1038 * | 1028 * |
| 1039 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. | 1029 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. |
| 1040 * | 1030 * |
| 1041 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to | 1031 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to |
| 1042 * attempt to extend or implement num. | 1032 * attempt to extend or implement num. |
| 1043 * | 1033 * |
| 1044 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. | 1034 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. |
| 1045 * | 1035 * |
| 1046 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. | 1036 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. |
| 1047 * | 1037 * |
| 1048 * @param typeName the name of the type that cannot be implemented | 1038 * @param typeName the name of the type that cannot be implemented |
| 1049 * @see #EXTENDS_DISALLOWED_CLASS | 1039 * @see #EXTENDS_DISALLOWED_CLASS |
| 1050 */ | 1040 */ |
| 1051 static final CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = new CompileTim
eErrorCode('IMPLEMENTS_DISALLOWED_CLASS', 53, "Classes cannot implement '%s'"); | 1041 static final CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = new CompileTim
eErrorCode('IMPLEMENTS_DISALLOWED_CLASS', 52, "Classes cannot implement '%s'"); |
| 1052 | 1042 |
| 1053 /** | 1043 /** |
| 1054 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class includes | 1044 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class includes |
| 1055 * type dynamic. | 1045 * type dynamic. |
| 1056 */ | 1046 */ |
| 1057 static final CompileTimeErrorCode IMPLEMENTS_DYNAMIC = new CompileTimeErrorCod
e('IMPLEMENTS_DYNAMIC', 54, "Classes cannot implement 'dynamic'"); | 1047 static final CompileTimeErrorCode IMPLEMENTS_DYNAMIC = new CompileTimeErrorCod
e('IMPLEMENTS_DYNAMIC', 53, "Classes cannot implement 'dynamic'"); |
| 1058 | 1048 |
| 1059 /** | 1049 /** |
| 1060 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class <i>C</i> | 1050 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class <i>C</i> |
| 1061 * includes a type expression that does not denote a class available in the le
xical scope of | 1051 * includes a type expression that does not denote a class available in the le
xical scope of |
| 1062 * <i>C</i>. | 1052 * <i>C</i>. |
| 1063 * | 1053 * |
| 1064 * @param typeName the name of the interface that was not found | 1054 * @param typeName the name of the interface that was not found |
| 1065 */ | 1055 */ |
| 1066 static final CompileTimeErrorCode IMPLEMENTS_NON_CLASS = new CompileTimeErrorC
ode('IMPLEMENTS_NON_CLASS', 55, "Classes can only implement other classes"); | 1056 static final CompileTimeErrorCode IMPLEMENTS_NON_CLASS = new CompileTimeErrorC
ode('IMPLEMENTS_NON_CLASS', 54, "Classes can only implement other classes"); |
| 1067 | 1057 |
| 1068 /** | 1058 /** |
| 1069 * 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears
more than once in | 1059 * 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears
more than once in |
| 1070 * the implements clause of a class. | 1060 * the implements clause of a class. |
| 1071 * | 1061 * |
| 1072 * @param className the name of the class that is implemented more than once | 1062 * @param className the name of the class that is implemented more than once |
| 1073 */ | 1063 */ |
| 1074 static final CompileTimeErrorCode IMPLEMENTS_REPEATED = new CompileTimeErrorCo
de('IMPLEMENTS_REPEATED', 56, "'%s' can only be implemented once"); | 1064 static final CompileTimeErrorCode IMPLEMENTS_REPEATED = new CompileTimeErrorCo
de('IMPLEMENTS_REPEATED', 55, "'%s' can only be implemented once"); |
| 1075 | 1065 |
| 1076 /** | 1066 /** |
| 1077 * 7.10 Superinterfaces: It is a compile-time error if the superclass of a cla
ss <i>C</i> appears | 1067 * 7.10 Superinterfaces: It is a compile-time error if the superclass of a cla
ss <i>C</i> appears |
| 1078 * in the implements clause of <i>C</i>. | 1068 * in the implements clause of <i>C</i>. |
| 1079 * | 1069 * |
| 1080 * @param className the name of the class that appears in both "extends" and "
implements" clauses | 1070 * @param className the name of the class that appears in both "extends" and "
implements" clauses |
| 1081 */ | 1071 */ |
| 1082 static final CompileTimeErrorCode IMPLEMENTS_SUPER_CLASS = new CompileTimeErro
rCode('IMPLEMENTS_SUPER_CLASS', 57, "'%s' cannot be used in both 'extends' and '
implements' clauses"); | 1072 static final CompileTimeErrorCode IMPLEMENTS_SUPER_CLASS = new CompileTimeErro
rCode('IMPLEMENTS_SUPER_CLASS', 56, "'%s' cannot be used in both 'extends' and '
implements' clauses"); |
| 1083 | 1073 |
| 1084 /** | 1074 /** |
| 1085 * 7.6.1 Generative Constructors: Note that <b>this</b> is not in scope on the
right hand side of | 1075 * 7.6.1 Generative Constructors: Note that <b>this</b> is not in scope on the
right hand side of |
| 1086 * an initializer. | 1076 * an initializer. |
| 1087 * | 1077 * |
| 1088 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable | 1078 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable |
| 1089 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the | 1079 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the |
| 1090 * initializer of an instance variable. | 1080 * initializer of an instance variable. |
| 1091 * | 1081 * |
| 1092 * @param name the name of the type in question | 1082 * @param name the name of the type in question |
| 1093 */ | 1083 */ |
| 1094 static final CompileTimeErrorCode IMPLICIT_THIS_REFERENCE_IN_INITIALIZER = new
CompileTimeErrorCode('IMPLICIT_THIS_REFERENCE_IN_INITIALIZER', 58, "The 'this'
expression cannot be implicitly used in initializers"); | 1084 static final CompileTimeErrorCode IMPLICIT_THIS_REFERENCE_IN_INITIALIZER = new
CompileTimeErrorCode('IMPLICIT_THIS_REFERENCE_IN_INITIALIZER', 57, "The 'this'
expression cannot be implicitly used in initializers"); |
| 1095 | 1085 |
| 1096 /** | 1086 /** |
| 1097 * SDK implementation libraries can be imported only by other SDK libraries. | 1087 * SDK implementation libraries can be imported only by other SDK libraries. |
| 1098 * | 1088 * |
| 1099 * @param uri the uri pointing to a library | 1089 * @param uri the uri pointing to a library |
| 1100 */ | 1090 */ |
| 1101 static final CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY = new CompileTimeErr
orCode('IMPORT_INTERNAL_LIBRARY', 59, "The library %s is internal and cannot be
imported"); | 1091 static final CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY = new CompileTimeErr
orCode('IMPORT_INTERNAL_LIBRARY', 58, "The library %s is internal and cannot be
imported"); |
| 1102 | 1092 |
| 1103 /** | 1093 /** |
| 1104 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1094 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 1105 * not a library declaration. | 1095 * not a library declaration. |
| 1106 * | 1096 * |
| 1107 * @param uri the uri pointing to a non-library declaration | 1097 * @param uri the uri pointing to a non-library declaration |
| 1108 */ | 1098 */ |
| 1109 static final CompileTimeErrorCode IMPORT_OF_NON_LIBRARY = new CompileTimeError
Code('IMPORT_OF_NON_LIBRARY', 60, "The imported library '%s' must not have a par
t-of directive"); | 1099 static final CompileTimeErrorCode IMPORT_OF_NON_LIBRARY = new CompileTimeError
Code('IMPORT_OF_NON_LIBRARY', 59, "The imported library '%s' must not have a par
t-of directive"); |
| 1110 | 1100 |
| 1111 /** | 1101 /** |
| 1112 * 13.9 Switch: It is a compile-time error if values of the expressions <i>e<s
ub>k</sub></i> are | 1102 * 13.9 Switch: It is a compile-time error if values of the expressions <i>e<s
ub>k</sub></i> are |
| 1113 * not instances of the same class <i>C</i>, for all <i>1 <= k <= n</i>. | 1103 * not instances of the same class <i>C</i>, for all <i>1 <= k <= n</i>. |
| 1114 * | 1104 * |
| 1115 * @param expressionSource the expression source code that is the unexpected t
ype | 1105 * @param expressionSource the expression source code that is the unexpected t
ype |
| 1116 * @param expectedType the name of the expected type | 1106 * @param expectedType the name of the expected type |
| 1117 */ | 1107 */ |
| 1118 static final CompileTimeErrorCode INCONSISTENT_CASE_EXPRESSION_TYPES = new Com
pileTimeErrorCode('INCONSISTENT_CASE_EXPRESSION_TYPES', 61, "Case expressions mu
st have the same types, '%s' is not a %s'"); | 1108 static final CompileTimeErrorCode INCONSISTENT_CASE_EXPRESSION_TYPES = new Com
pileTimeErrorCode('INCONSISTENT_CASE_EXPRESSION_TYPES', 60, "Case expressions mu
st have the same types, '%s' is not a %s'"); |
| 1119 | 1109 |
| 1120 /** | 1110 /** |
| 1121 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time | 1111 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time |
| 1122 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an | 1112 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an |
| 1123 * instance variable declared in the immediately surrounding class. | 1113 * instance variable declared in the immediately surrounding class. |
| 1124 * | 1114 * |
| 1125 * @param id the name of the initializing formal that is not an instance varia
ble in the | 1115 * @param id the name of the initializing formal that is not an instance varia
ble in the |
| 1126 * immediately enclosing class | 1116 * immediately enclosing class |
| 1127 * @see #INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD | 1117 * @see #INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD |
| 1128 */ | 1118 */ |
| 1129 static final CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTANT_FIELD = new Com
pileTimeErrorCode('INITIALIZER_FOR_NON_EXISTANT_FIELD', 62, "'%s' is not a varia
ble in the enclosing class"); | 1119 static final CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTANT_FIELD = new Com
pileTimeErrorCode('INITIALIZER_FOR_NON_EXISTANT_FIELD', 61, "'%s' is not a varia
ble in the enclosing class"); |
| 1130 | 1120 |
| 1131 /** | 1121 /** |
| 1132 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time | 1122 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time |
| 1133 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an | 1123 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an |
| 1134 * instance variable declared in the immediately surrounding class. | 1124 * instance variable declared in the immediately surrounding class. |
| 1135 * | 1125 * |
| 1136 * @param id the name of the initializing formal that is a static variable in
the immediately | 1126 * @param id the name of the initializing formal that is a static variable in
the immediately |
| 1137 * enclosing class | 1127 * enclosing class |
| 1138 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD | 1128 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD |
| 1139 */ | 1129 */ |
| 1140 static final CompileTimeErrorCode INITIALIZER_FOR_STATIC_FIELD = new CompileTi
meErrorCode('INITIALIZER_FOR_STATIC_FIELD', 63, "'%s' is a static variable in th
e enclosing class, variables initialized in a constructor cannot be static"); | 1130 static final CompileTimeErrorCode INITIALIZER_FOR_STATIC_FIELD = new CompileTi
meErrorCode('INITIALIZER_FOR_STATIC_FIELD', 62, "'%s' is a static variable in th
e enclosing class, variables initialized in a constructor cannot be static"); |
| 1141 | 1131 |
| 1142 /** | 1132 /** |
| 1143 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a | 1133 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a |
| 1144 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately | 1134 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately |
| 1145 * enclosing class. | 1135 * enclosing class. |
| 1146 * | 1136 * |
| 1147 * @param id the name of the initializing formal that is not an instance varia
ble in the | 1137 * @param id the name of the initializing formal that is not an instance varia
ble in the |
| 1148 * immediately enclosing class | 1138 * immediately enclosing class |
| 1149 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD | 1139 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD |
| 1150 * @see #INITIALIZER_FOR_NON_EXISTANT_FIELD | 1140 * @see #INITIALIZER_FOR_NON_EXISTANT_FIELD |
| 1151 */ | 1141 */ |
| 1152 static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD =
new CompileTimeErrorCode('INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD', 64, "'%s
' is not a variable in the enclosing class"); | 1142 static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD =
new CompileTimeErrorCode('INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD', 63, "'%s
' is not a variable in the enclosing class"); |
| 1153 | 1143 |
| 1154 /** | 1144 /** |
| 1155 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a | 1145 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a |
| 1156 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately | 1146 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately |
| 1157 * enclosing class. | 1147 * enclosing class. |
| 1158 * | 1148 * |
| 1159 * @param id the name of the initializing formal that is a static variable in
the immediately | 1149 * @param id the name of the initializing formal that is a static variable in
the immediately |
| 1160 * enclosing class | 1150 * enclosing class |
| 1161 * @see #INITIALIZER_FOR_STATIC_FIELD | 1151 * @see #INITIALIZER_FOR_STATIC_FIELD |
| 1162 */ | 1152 */ |
| 1163 static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_STATIC_FIELD = new C
ompileTimeErrorCode('INITIALIZING_FORMAL_FOR_STATIC_FIELD', 65, "'%s' is a stati
c variable in the enclosing class, variables initialized in a constructor cannot
be static"); | 1153 static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_STATIC_FIELD = new C
ompileTimeErrorCode('INITIALIZING_FORMAL_FOR_STATIC_FIELD', 64, "'%s' is a stati
c variable in the enclosing class, variables initialized in a constructor cannot
be static"); |
| 1164 | 1154 |
| 1165 /** | 1155 /** |
| 1166 * 12.30 Identifier Reference: Otherwise, e is equivalent to the property extr
action | 1156 * 12.30 Identifier Reference: Otherwise, e is equivalent to the property extr
action |
| 1167 * <b>this</b>.<i>id</i>. | 1157 * <b>this</b>.<i>id</i>. |
| 1168 */ | 1158 */ |
| 1169 static final CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_STATIC = new Com
pileTimeErrorCode('INSTANCE_MEMBER_ACCESS_FROM_STATIC', 66, "Instance member can
not be accessed from static method"); | 1159 static final CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_STATIC = new Com
pileTimeErrorCode('INSTANCE_MEMBER_ACCESS_FROM_STATIC', 65, "Instance member can
not be accessed from static method"); |
| 1170 | 1160 |
| 1171 /** | 1161 /** |
| 1172 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the | 1162 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the |
| 1173 * character @, followed by a constant expression that must be either a refere
nce to a | 1163 * character @, followed by a constant expression that must be either a refere
nce to a |
| 1174 * compile-time constant variable, or a call to a constant constructor. | 1164 * compile-time constant variable, or a call to a constant constructor. |
| 1175 */ | 1165 */ |
| 1176 static final CompileTimeErrorCode INVALID_ANNOTATION = new CompileTimeErrorCod
e('INVALID_ANNOTATION', 67, "Annotation can be only constant variable or constan
t constructor invocation"); | 1166 static final CompileTimeErrorCode INVALID_ANNOTATION = new CompileTimeErrorCod
e('INVALID_ANNOTATION', 66, "Annotation can be only constant variable or constan
t constructor invocation"); |
| 1177 | 1167 |
| 1178 /** | 1168 /** |
| 1179 * TODO(brianwilkerson) Remove this when we have decided on how to report erro
rs in compile-time | 1169 * TODO(brianwilkerson) Remove this when we have decided on how to report erro
rs in compile-time |
| 1180 * constants. Until then, this acts as a placeholder for more informative erro
rs. | 1170 * constants. Until then, this acts as a placeholder for more informative erro
rs. |
| 1181 * | 1171 * |
| 1182 * See TODOs in ConstantVisitor | 1172 * See TODOs in ConstantVisitor |
| 1183 */ | 1173 */ |
| 1184 static final CompileTimeErrorCode INVALID_CONSTANT = new CompileTimeErrorCode(
'INVALID_CONSTANT', 68, "Invalid constant value"); | 1174 static final CompileTimeErrorCode INVALID_CONSTANT = new CompileTimeErrorCode(
'INVALID_CONSTANT', 67, "Invalid constant value"); |
| 1185 | 1175 |
| 1186 /** | 1176 /** |
| 1187 * 7.6 Constructors: It is a compile-time error if the name of a constructor i
s not a constructor | 1177 * 7.6 Constructors: It is a compile-time error if the name of a constructor i
s not a constructor |
| 1188 * name. | 1178 * name. |
| 1189 */ | 1179 */ |
| 1190 static final CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = new CompileTimeEr
rorCode('INVALID_CONSTRUCTOR_NAME', 69, "Invalid constructor name"); | 1180 static final CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = new CompileTimeEr
rorCode('INVALID_CONSTRUCTOR_NAME', 68, "Invalid constructor name"); |
| 1191 | 1181 |
| 1192 /** | 1182 /** |
| 1193 * 7.6.2 Factories: It is a compile-time error if <i>M</i> is not the name of
the immediately | 1183 * 7.6.2 Factories: It is a compile-time error if <i>M</i> is not the name of
the immediately |
| 1194 * enclosing class. | 1184 * enclosing class. |
| 1195 */ | 1185 */ |
| 1196 static final CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS = new Compi
leTimeErrorCode('INVALID_FACTORY_NAME_NOT_A_CLASS', 70, "The name of the immedia
tely enclosing class expected"); | 1186 static final CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS = new Compi
leTimeErrorCode('INVALID_FACTORY_NAME_NOT_A_CLASS', 69, "The name of the immedia
tely enclosing class expected"); |
| 1197 | 1187 |
| 1198 /** | 1188 /** |
| 1199 * 7.1 Instance Methods: It is a compile-time error if an instance method <i>m
1</i> overrides an | 1189 * 7.1 Instance Methods: It is a compile-time error if an instance method <i>m
1</i> overrides an |
| 1200 * instance member <i>m2</i> and <i>m1</i> does not declare all the named para
meters declared by | 1190 * instance member <i>m2</i> and <i>m1</i> does not declare all the named para
meters declared by |
| 1201 * <i>m2</i>. | 1191 * <i>m2</i>. |
| 1202 * | 1192 * |
| 1203 * @param paramCount the number of named parameters in the overridden member | 1193 * @param paramCount the number of named parameters in the overridden member |
| 1204 * @param className the name of the class from the overridden method | 1194 * @param className the name of the class from the overridden method |
| 1205 */ | 1195 */ |
| 1206 static final CompileTimeErrorCode INVALID_OVERRIDE_NAMED = new CompileTimeErro
rCode('INVALID_OVERRIDE_NAMED', 71, "Missing the named parameter '%s' to match t
he overridden method from '%s'"); | 1196 static final CompileTimeErrorCode INVALID_OVERRIDE_NAMED = new CompileTimeErro
rCode('INVALID_OVERRIDE_NAMED', 70, "Missing the named parameter '%s' to match t
he overridden method from '%s'"); |
| 1207 | 1197 |
| 1208 /** | 1198 /** |
| 1209 * 7.1 Instance Methods: It is a compile-time error if an instance method <i>m
1</i> overrides an | 1199 * 7.1 Instance Methods: It is a compile-time error if an instance method <i>m
1</i> overrides an |
| 1210 * instance member <i>m2</i> and <i>m1</i> has fewer optional positional param
eters than | 1200 * instance member <i>m2</i> and <i>m1</i> has fewer optional positional param
eters than |
| 1211 * <i>m2</i>. | 1201 * <i>m2</i>. |
| 1212 * | 1202 * |
| 1213 * @param paramCount the number of positional parameters in the overridden mem
ber | 1203 * @param paramCount the number of positional parameters in the overridden mem
ber |
| 1214 * @param className the name of the class from the overridden method | 1204 * @param className the name of the class from the overridden method |
| 1215 */ | 1205 */ |
| 1216 static final CompileTimeErrorCode INVALID_OVERRIDE_POSITIONAL = new CompileTim
eErrorCode('INVALID_OVERRIDE_POSITIONAL', 72, "Must have at least %d optional pa
rameters to match the overridden method from '%s'"); | 1206 static final CompileTimeErrorCode INVALID_OVERRIDE_POSITIONAL = new CompileTim
eErrorCode('INVALID_OVERRIDE_POSITIONAL', 71, "Must have at least %d optional pa
rameters to match the overridden method from '%s'"); |
| 1217 | 1207 |
| 1218 /** | 1208 /** |
| 1219 * 7.1 Instance Methods: It is a compile-time error if an instance method <i>m
1</i> overrides an | 1209 * 7.1 Instance Methods: It is a compile-time error if an instance method <i>m
1</i> overrides an |
| 1220 * instance member <i>m2</i> and <i>m1</i> has a different number of required
parameters than | 1210 * instance member <i>m2</i> and <i>m1</i> has a different number of required
parameters than |
| 1221 * <i>m2</i>. | 1211 * <i>m2</i>. |
| 1222 * | 1212 * |
| 1223 * @param paramCount the number of required parameters in the overridden membe
r | 1213 * @param paramCount the number of required parameters in the overridden membe
r |
| 1224 * @param className the name of the class from the overridden method | 1214 * @param className the name of the class from the overridden method |
| 1225 */ | 1215 */ |
| 1226 static final CompileTimeErrorCode INVALID_OVERRIDE_REQUIRED = new CompileTimeE
rrorCode('INVALID_OVERRIDE_REQUIRED', 73, "Must have at exactly %d required para
meters to match the overridden method from '%s'"); | 1216 static final CompileTimeErrorCode INVALID_OVERRIDE_REQUIRED = new CompileTimeE
rrorCode('INVALID_OVERRIDE_REQUIRED', 72, "Must have exactly %d required paramet
ers to match the overridden method from '%s'"); |
| 1227 | 1217 |
| 1228 /** | 1218 /** |
| 1229 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable | 1219 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable |
| 1230 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the | 1220 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the |
| 1231 * initializer of an instance variable. | 1221 * initializer of an instance variable. |
| 1232 */ | 1222 */ |
| 1233 static final CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = new CompileTimeE
rrorCode('INVALID_REFERENCE_TO_THIS', 74, "Invalid reference to 'this' expressio
n"); | 1223 static final CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = new CompileTimeE
rrorCode('INVALID_REFERENCE_TO_THIS', 73, "Invalid reference to 'this' expressio
n"); |
| 1234 | 1224 |
| 1235 /** | 1225 /** |
| 1236 * 12.7 Maps: It is a compile-time error if the first type argument to a map l
iteral is not | 1226 * 12.7 Maps: It is a compile-time error if the first type argument to a map l
iteral is not |
| 1237 * String. | 1227 * String. |
| 1238 */ | 1228 */ |
| 1239 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_FOR_KEY = new CompileT
imeErrorCode('INVALID_TYPE_ARGUMENT_FOR_KEY', 75, "The first type argument to a
map literal must be 'String'"); | 1229 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_FOR_KEY = new CompileT
imeErrorCode('INVALID_TYPE_ARGUMENT_FOR_KEY', 74, "The first type argument to a
map literal must be 'String'"); |
| 1240 | 1230 |
| 1241 /** | 1231 /** |
| 1242 * 12.6 Lists: It is a compile time error if the type argument of a constant l
ist literal includes | 1232 * 12.6 Lists: It is a compile time error if the type argument of a constant l
ist literal includes |
| 1243 * a type parameter. | 1233 * a type parameter. |
| 1244 * | 1234 * |
| 1245 * @name the name of the type parameter | 1235 * @name the name of the type parameter |
| 1246 */ | 1236 */ |
| 1247 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST = new Co
mpileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_LIST', 76, "Constant list lit
erals cannot include a type parameter as a type argument, such as '%s'"); | 1237 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST = new Co
mpileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_LIST', 75, "Constant list lit
erals cannot include a type parameter as a type argument, such as '%s'"); |
| 1248 | 1238 |
| 1249 /** | 1239 /** |
| 1250 * 12.7 Maps: It is a compile time error if the type arguments of a constant m
ap literal include a | 1240 * 12.7 Maps: It is a compile time error if the type arguments of a constant m
ap literal include a |
| 1251 * type parameter. | 1241 * type parameter. |
| 1252 * | 1242 * |
| 1253 * @name the name of the type parameter | 1243 * @name the name of the type parameter |
| 1254 */ | 1244 */ |
| 1255 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = new Com
pileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 77, "Constant map litera
ls cannot include a type parameter as a type argument, such as '%s'"); | 1245 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = new Com
pileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 76, "Constant map litera
ls cannot include a type parameter as a type argument, such as '%s'"); |
| 1256 | 1246 |
| 1257 /** | 1247 /** |
| 1258 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1248 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 1259 * not a library declaration. | 1249 * not a library declaration. |
| 1260 * | 1250 * |
| 1261 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1251 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 1262 * not a library declaration. | 1252 * not a library declaration. |
| 1263 * | 1253 * |
| 1264 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part | 1254 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part |
| 1265 * declaration. | 1255 * declaration. |
| 1266 * | 1256 * |
| 1267 * @param uri the URI that is invalid | 1257 * @param uri the URI that is invalid |
| 1268 * @see #URI_DOES_NOT_EXIST | 1258 * @see #URI_DOES_NOT_EXIST |
| 1269 */ | 1259 */ |
| 1270 static final CompileTimeErrorCode INVALID_URI = new CompileTimeErrorCode('INVA
LID_URI', 78, "Invalid URI syntax: '%s'"); | 1260 static final CompileTimeErrorCode INVALID_URI = new CompileTimeErrorCode('INVA
LID_URI', 77, "Invalid URI syntax: '%s'"); |
| 1271 | 1261 |
| 1272 /** | 1262 /** |
| 1273 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within | 1263 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within |
| 1274 * the innermost function in which <i>s<sub>b</sub></i> occurs. | 1264 * the innermost function in which <i>s<sub>b</sub></i> occurs. |
| 1275 * | 1265 * |
| 1276 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use | 1266 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use |
| 1277 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. | 1267 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. |
| 1278 * | 1268 * |
| 1279 * @param labelName the name of the unresolvable label | 1269 * @param labelName the name of the unresolvable label |
| 1280 */ | 1270 */ |
| 1281 static final CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = new CompileTimeErrorC
ode('LABEL_IN_OUTER_SCOPE', 79, "Cannot reference label '%s' declared in an oute
r method"); | 1271 static final CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = new CompileTimeErrorC
ode('LABEL_IN_OUTER_SCOPE', 78, "Cannot reference label '%s' declared in an oute
r method"); |
| 1282 | 1272 |
| 1283 /** | 1273 /** |
| 1284 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within | 1274 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within |
| 1285 * the innermost function in which <i>s<sub>b</sub></i> occurs. | 1275 * the innermost function in which <i>s<sub>b</sub></i> occurs. |
| 1286 * | 1276 * |
| 1287 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use | 1277 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use |
| 1288 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. | 1278 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. |
| 1289 * | 1279 * |
| 1290 * @param labelName the name of the unresolvable label | 1280 * @param labelName the name of the unresolvable label |
| 1291 */ | 1281 */ |
| 1292 static final CompileTimeErrorCode LABEL_UNDEFINED = new CompileTimeErrorCode('
LABEL_UNDEFINED', 80, "Cannot reference undefined label '%s'"); | 1282 static final CompileTimeErrorCode LABEL_UNDEFINED = new CompileTimeErrorCode('
LABEL_UNDEFINED', 79, "Cannot reference undefined label '%s'"); |
| 1293 | 1283 |
| 1294 /** | 1284 /** |
| 1295 * 12.6 Lists: A run-time list literal <<i>E</i>> [<i>e<sub>1</sub></i>
... | 1285 * 12.6 Lists: A run-time list literal <<i>E</i>> [<i>e<sub>1</sub></i>
... |
| 1296 * <i>e<sub>n</sub></i>] is evaluated as follows: | 1286 * <i>e<sub>n</sub></i>] is evaluated as follows: |
| 1297 * | 1287 * |
| 1298 * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and
second argument | 1288 * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and
second argument |
| 1299 * <i>o<sub>i+1</sub></i><i>, 1 <= i <= n</i> | 1289 * <i>o<sub>i+1</sub></i><i>, 1 <= i <= n</i> |
| 1300 * | 1290 * |
| 1301 * | 1291 * |
| 1302 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 1292 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
| 1303 * <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 <= | 1293 * <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 <= |
| 1304 * 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>. | 1294 * 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>. |
| 1305 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 1295 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
| 1306 * j <= m</i>. | 1296 * j <= m</i>. |
| 1307 */ | 1297 */ |
| 1308 static final CompileTimeErrorCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = new Compi
leTimeErrorCode('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 81, "The element type '%s' c
annot be assigned to the list type '%s'"); | 1298 static final CompileTimeErrorCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = new Compi
leTimeErrorCode('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 80, "The element type '%s' c
annot be assigned to the list type '%s'"); |
| 1309 | 1299 |
| 1310 /** | 1300 /** |
| 1311 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : | 1301 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : |
| 1312 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: | 1302 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: |
| 1313 * | 1303 * |
| 1314 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second | 1304 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second |
| 1315 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> | 1305 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> |
| 1316 * | 1306 * |
| 1317 * | 1307 * |
| 1318 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 1308 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
| 1319 * <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 <= | 1309 * <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 <= |
| 1320 * 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>. | 1310 * 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>. |
| 1321 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 1311 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
| 1322 * j <= m</i>. | 1312 * j <= m</i>. |
| 1323 */ | 1313 */ |
| 1324 static final CompileTimeErrorCode MAP_KEY_TYPE_NOT_ASSIGNABLE = new CompileTim
eErrorCode('MAP_KEY_TYPE_NOT_ASSIGNABLE', 82, "The element type '%s' cannot be a
ssigned to the map key type '%s'"); | 1314 static final CompileTimeErrorCode MAP_KEY_TYPE_NOT_ASSIGNABLE = new CompileTim
eErrorCode('MAP_KEY_TYPE_NOT_ASSIGNABLE', 81, "The element type '%s' cannot be a
ssigned to the map key type '%s'"); |
| 1325 | 1315 |
| 1326 /** | 1316 /** |
| 1327 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : | 1317 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : |
| 1328 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: | 1318 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: |
| 1329 * | 1319 * |
| 1330 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second | 1320 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second |
| 1331 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> | 1321 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> |
| 1332 * | 1322 * |
| 1333 * | 1323 * |
| 1334 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 1324 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
| 1335 * <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 <= | 1325 * <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 <= |
| 1336 * 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>. | 1326 * 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>. |
| 1337 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 1327 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
| 1338 * j <= m</i>. | 1328 * j <= m</i>. |
| 1339 */ | 1329 */ |
| 1340 static final CompileTimeErrorCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = new CompileT
imeErrorCode('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 83, "The element type '%s' cannot
be assigned to the map value type '%s'"); | 1330 static final CompileTimeErrorCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = new CompileT
imeErrorCode('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 82, "The element type '%s' cannot
be assigned to the map value type '%s'"); |
| 1341 | 1331 |
| 1342 /** | 1332 /** |
| 1343 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member
with the same name | 1333 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member
with the same name |
| 1344 * as <i>C</i>. | 1334 * as <i>C</i>. |
| 1345 */ | 1335 */ |
| 1346 static final CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = new CompileTimeErro
rCode('MEMBER_WITH_CLASS_NAME', 84, "Class members cannot have the same name as
the enclosing class"); | 1336 static final CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = new CompileTimeErro
rCode('MEMBER_WITH_CLASS_NAME', 83, "Class members cannot have the same name as
the enclosing class"); |
| 1347 | 1337 |
| 1348 /** | 1338 /** |
| 1349 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same | 1339 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same |
| 1350 * name. | 1340 * name. |
| 1351 * | 1341 * |
| 1352 * @param name the conflicting name of the getter and method | 1342 * @param name the conflicting name of the getter and method |
| 1353 */ | 1343 */ |
| 1354 static final CompileTimeErrorCode METHOD_AND_GETTER_WITH_SAME_NAME = new Compi
leTimeErrorCode('METHOD_AND_GETTER_WITH_SAME_NAME', 85, "'%s' cannot be used to
name a method, there is already a getter with the same name"); | 1344 static final CompileTimeErrorCode METHOD_AND_GETTER_WITH_SAME_NAME = new Compi
leTimeErrorCode('METHOD_AND_GETTER_WITH_SAME_NAME', 84, "'%s' cannot be used to
name a method, there is already a getter with the same name"); |
| 1355 | 1345 |
| 1356 /** | 1346 /** |
| 1357 * 12.1 Constants: A constant expression is ... a constant list literal. | 1347 * 12.1 Constants: A constant expression is ... a constant list literal. |
| 1358 */ | 1348 */ |
| 1359 static final CompileTimeErrorCode MISSING_CONST_IN_LIST_LITERAL = new CompileT
imeErrorCode('MISSING_CONST_IN_LIST_LITERAL', 86, "List literals must be prefixe
d with 'const' when used as a constant expression"); | 1349 static final CompileTimeErrorCode MISSING_CONST_IN_LIST_LITERAL = new CompileT
imeErrorCode('MISSING_CONST_IN_LIST_LITERAL', 85, "List literals must be prefixe
d with 'const' when used as a constant expression"); |
| 1360 | 1350 |
| 1361 /** | 1351 /** |
| 1362 * 12.1 Constants: A constant expression is ... a constant map literal. | 1352 * 12.1 Constants: A constant expression is ... a constant map literal. |
| 1363 */ | 1353 */ |
| 1364 static final CompileTimeErrorCode MISSING_CONST_IN_MAP_LITERAL = new CompileTi
meErrorCode('MISSING_CONST_IN_MAP_LITERAL', 87, "Map literals must be prefixed w
ith 'const' when used as a constant expression"); | 1354 static final CompileTimeErrorCode MISSING_CONST_IN_MAP_LITERAL = new CompileTi
meErrorCode('MISSING_CONST_IN_MAP_LITERAL', 86, "Map literals must be prefixed w
ith 'const' when used as a constant expression"); |
| 1365 | 1355 |
| 1366 /** | 1356 /** |
| 1367 * 9 Mixins: It is a compile-time error if a declared or derived mixin explici
tly declares a | 1357 * 9 Mixins: It is a compile-time error if a declared or derived mixin explici
tly declares a |
| 1368 * constructor. | 1358 * constructor. |
| 1369 * | 1359 * |
| 1370 * @param typeName the name of the mixin that is invalid | 1360 * @param typeName the name of the mixin that is invalid |
| 1371 */ | 1361 */ |
| 1372 static final CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = new CompileTime
ErrorCode('MIXIN_DECLARES_CONSTRUCTOR', 88, "The class '%s' cannot be used as a
mixin because it declares a constructor"); | 1362 static final CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = new CompileTime
ErrorCode('MIXIN_DECLARES_CONSTRUCTOR', 87, "The class '%s' cannot be used as a
mixin because it declares a constructor"); |
| 1373 | 1363 |
| 1374 /** | 1364 /** |
| 1375 * 9 Mixins: It is a compile-time error if a mixin is derived from a class who
se superclass is not | 1365 * 9 Mixins: It is a compile-time error if a mixin is derived from a class who
se superclass is not |
| 1376 * Object. | 1366 * Object. |
| 1377 * | 1367 * |
| 1378 * @param typeName the name of the mixin that is invalid | 1368 * @param typeName the name of the mixin that is invalid |
| 1379 */ | 1369 */ |
| 1380 static final CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = new Compile
TimeErrorCode('MIXIN_INHERITS_FROM_NOT_OBJECT', 89, "The class '%s' cannot be us
ed as a mixin because it extends a class other than Object"); | 1370 static final CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = new Compile
TimeErrorCode('MIXIN_INHERITS_FROM_NOT_OBJECT', 88, "The class '%s' cannot be us
ed as a mixin because it extends a class other than Object"); |
| 1381 | 1371 |
| 1382 /** | 1372 /** |
| 1383 * 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not deno
te a class or mixin | 1373 * 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not deno
te a class or mixin |
| 1384 * available in the immediately enclosing scope. | 1374 * available in the immediately enclosing scope. |
| 1385 */ | 1375 */ |
| 1386 static final CompileTimeErrorCode MIXIN_OF_NON_CLASS = new CompileTimeErrorCod
e('MIXIN_OF_NON_CLASS', 90, "Classes can only mixin other classes"); | 1376 static final CompileTimeErrorCode MIXIN_OF_NON_CLASS = new CompileTimeErrorCod
e('MIXIN_OF_NON_CLASS', 89, "Classes can only mixin other classes"); |
| 1387 | 1377 |
| 1388 /** | 1378 /** |
| 1389 * 9 Mixins: It is a compile-time error if a declared or derived mixin refers
to super. | 1379 * 9 Mixins: It is a compile-time error if a declared or derived mixin refers
to super. |
| 1390 */ | 1380 */ |
| 1391 static final CompileTimeErrorCode MIXIN_REFERENCES_SUPER = new CompileTimeErro
rCode('MIXIN_REFERENCES_SUPER', 91, "The class '%s' cannot be used as a mixin be
cause it references 'super'"); | 1381 static final CompileTimeErrorCode MIXIN_REFERENCES_SUPER = new CompileTimeErro
rCode('MIXIN_REFERENCES_SUPER', 90, "The class '%s' cannot be used as a mixin be
cause it references 'super'"); |
| 1392 | 1382 |
| 1393 /** | 1383 /** |
| 1394 * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not deno
te a class available | 1384 * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not deno
te a class available |
| 1395 * in the immediately enclosing scope. | 1385 * in the immediately enclosing scope. |
| 1396 */ | 1386 */ |
| 1397 static final CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = new Compil
eTimeErrorCode('MIXIN_WITH_NON_CLASS_SUPERCLASS', 92, "Mixin can only be applied
to class"); | 1387 static final CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = new Compil
eTimeErrorCode('MIXIN_WITH_NON_CLASS_SUPERCLASS', 91, "Mixin can only be applied
to class"); |
| 1398 | 1388 |
| 1399 /** | 1389 /** |
| 1400 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 1390 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
| 1401 * only action is to invoke another generative constructor. | 1391 * only action is to invoke another generative constructor. |
| 1402 */ | 1392 */ |
| 1403 static final CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS
= new CompileTimeErrorCode('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS', 93,
"Constructor may have at most one 'this' redirection"); | 1393 static final CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS
= new CompileTimeErrorCode('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS', 92,
"Constructor may have at most one 'this' redirection"); |
| 1404 | 1394 |
| 1405 /** | 1395 /** |
| 1406 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Th
en <i>k</i> may | 1396 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Th
en <i>k</i> may |
| 1407 * include at most one superinitializer in its initializer list or a compile t
ime error occurs. | 1397 * include at most one superinitializer in its initializer list or a compile t
ime error occurs. |
| 1408 */ | 1398 */ |
| 1409 static final CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = new CompileTim
eErrorCode('MULTIPLE_SUPER_INITIALIZERS', 94, "Constructor may have at most one
'super' initializer"); | 1399 static final CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = new CompileTim
eErrorCode('MULTIPLE_SUPER_INITIALIZERS', 93, "Constructor may have at most one
'super' initializer"); |
| 1410 | 1400 |
| 1411 /** | 1401 /** |
| 1412 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the | 1402 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the |
| 1413 * character @, followed by a constant expression that must be either a refere
nce to a | 1403 * character @, followed by a constant expression that must be either a refere
nce to a |
| 1414 * compile-time constant variable, or a call to a constant constructor. | 1404 * compile-time constant variable, or a call to a constant constructor. |
| 1415 */ | 1405 */ |
| 1416 static final CompileTimeErrorCode NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS = new Co
mpileTimeErrorCode('NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS', 95, "Annotation creati
on must have arguments"); | 1406 static final CompileTimeErrorCode NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS = new Co
mpileTimeErrorCode('NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS', 94, "Annotation creati
on must have arguments"); |
| 1417 | 1407 |
| 1418 /** | 1408 /** |
| 1419 * 7.6.1 Generative Constructors: If no superinitializer is provided, an impli
cit superinitializer | 1409 * 7.6.1 Generative Constructors: If no superinitializer is provided, an impli
cit superinitializer |
| 1420 * of the form <b>super</b>() is added at the end of <i>k</i>'s initializer li
st, unless the | 1410 * of the form <b>super</b>() is added at the end of <i>k</i>'s initializer li
st, unless the |
| 1421 * enclosing class is class <i>Object</i>. | 1411 * enclosing class is class <i>Object</i>. |
| 1422 * | 1412 * |
| 1423 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i>
does not declare a | 1413 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i>
does not declare a |
| 1424 * generative constructor named <i>S</i> (respectively <i>S.id</i>) | 1414 * generative constructor named <i>S</i> (respectively <i>S.id</i>) |
| 1425 */ | 1415 */ |
| 1426 static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT = new
CompileTimeErrorCode('NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT', 96, "The class '%s
' does not have a default constructor"); | 1416 static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT = new
CompileTimeErrorCode('NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT', 95, "The class '%s
' does not have a default constructor"); |
| 1427 | 1417 |
| 1428 /** | 1418 /** |
| 1429 * 7.6 Constructors: Iff no constructor is specified for a class <i>C</i>, it
implicitly has a | 1419 * 7.6 Constructors: Iff no constructor is specified for a class <i>C</i>, it
implicitly has a |
| 1430 * default constructor C() : <b>super<b>() {}, unless <i>C</i> is class <i>Obj
ect</i>. | 1420 * default constructor C() : <b>super<b>() {}, unless <i>C</i> is class <i>Obj
ect</i>. |
| 1431 * | 1421 * |
| 1432 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i>
does not declare a | 1422 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i>
does not declare a |
| 1433 * generative constructor named <i>S</i> (respectively <i>S.id</i>) | 1423 * generative constructor named <i>S</i> (respectively <i>S.id</i>) |
| 1434 */ | 1424 */ |
| 1435 static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT = new
CompileTimeErrorCode('NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT', 97, "The class '%s
' does not have a default constructor"); | 1425 static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT = new
CompileTimeErrorCode('NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT', 96, "The class '%s
' does not have a default constructor"); |
| 1436 | 1426 |
| 1437 /** | 1427 /** |
| 1438 * 13.2 Expression Statements: It is a compile-time error if a non-constant ma
p literal that has | 1428 * 13.2 Expression Statements: It is a compile-time error if a non-constant ma
p literal that has |
| 1439 * no explicit type arguments appears in a place where a statement is expected
. | 1429 * no explicit type arguments appears in a place where a statement is expected
. |
| 1440 */ | 1430 */ |
| 1441 static final CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = new
CompileTimeErrorCode('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 98, "A non-constan
t map literal without type arguments cannot be used as an expression statement")
; | 1431 static final CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = new
CompileTimeErrorCode('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 97, "A non-constan
t map literal without type arguments cannot be used as an expression statement")
; |
| 1442 | 1432 |
| 1443 /** | 1433 /** |
| 1444 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub
>11</sub> … | 1434 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub
>11</sub> … |
| 1445 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> … label<sub>n1
</sub> … | 1435 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> … label<sub>n1
</sub> … |
| 1446 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s
ub>}</i> or the form | 1436 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s
ub>}</i> or the form |
| 1447 * <i>switch (e) { label<sub>11</sub> … label<sub>1j1</sub> case e<sub>
1</sub>: | 1437 * <i>switch (e) { label<sub>11</sub> … label<sub>1j1</sub> case e<sub>
1</sub>: |
| 1448 * s<sub>1</sub> … label<sub>n1</sub> … label<sub>njn</sub> case
e<sub>n</sub>: | 1438 * s<sub>1</sub> … label<sub>n1</sub> … label<sub>njn</sub> case
e<sub>n</sub>: |
| 1449 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub>
k</sub></i> are not | 1439 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub>
k</sub></i> are not |
| 1450 * compile-time constants, for all <i>1 <= k <= n</i>. | 1440 * compile-time constants, for all <i>1 <= k <= n</i>. |
| 1451 */ | 1441 */ |
| 1452 static final CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = new CompileTi
meErrorCode('NON_CONSTANT_CASE_EXPRESSION', 99, "Case expressions must be consta
nt"); | 1442 static final CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = new CompileTi
meErrorCode('NON_CONSTANT_CASE_EXPRESSION', 98, "Case expressions must be consta
nt"); |
| 1453 | 1443 |
| 1454 /** | 1444 /** |
| 1455 * 6.2.2 Optional Formals: It is a compile-time error if the default value of
an optional | 1445 * 6.2.2 Optional Formals: It is a compile-time error if the default value of
an optional |
| 1456 * parameter is not a compile-time constant. | 1446 * parameter is not a compile-time constant. |
| 1457 */ | 1447 */ |
| 1458 static final CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = new CompileTime
ErrorCode('NON_CONSTANT_DEFAULT_VALUE', 100, "Default values of an optional para
meter must be constant"); | 1448 static final CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = new CompileTime
ErrorCode('NON_CONSTANT_DEFAULT_VALUE', 99, "Default values of an optional param
eter must be constant"); |
| 1459 | 1449 |
| 1460 /** | 1450 /** |
| 1461 * 12.6 Lists: It is a compile time error if an element of a constant list lit
eral is not a | 1451 * 12.6 Lists: It is a compile time error if an element of a constant list lit
eral is not a |
| 1462 * compile-time constant. | 1452 * compile-time constant. |
| 1463 */ | 1453 */ |
| 1464 static final CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = new CompileTimeE
rrorCode('NON_CONSTANT_LIST_ELEMENT', 101, "'const' lists must have all constant
values"); | 1454 static final CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = new CompileTimeE
rrorCode('NON_CONSTANT_LIST_ELEMENT', 100, "'const' lists must have all constant
values"); |
| 1465 | 1455 |
| 1466 /** | 1456 /** |
| 1467 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map | 1457 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map |
| 1468 * literal is not a compile-time constant. | 1458 * literal is not a compile-time constant. |
| 1469 */ | 1459 */ |
| 1470 static final CompileTimeErrorCode NON_CONSTANT_MAP_KEY = new CompileTimeErrorC
ode('NON_CONSTANT_MAP_KEY', 102, "The keys in a map must be constant"); | 1460 static final CompileTimeErrorCode NON_CONSTANT_MAP_KEY = new CompileTimeErrorC
ode('NON_CONSTANT_MAP_KEY', 101, "The keys in a map must be constant"); |
| 1471 | 1461 |
| 1472 /** | 1462 /** |
| 1473 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map | 1463 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map |
| 1474 * literal is not a compile-time constant. | 1464 * literal is not a compile-time constant. |
| 1475 */ | 1465 */ |
| 1476 static final CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = new CompileTimeErro
rCode('NON_CONSTANT_MAP_VALUE', 103, "The values in a 'const' map must be consta
nt"); | 1466 static final CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = new CompileTimeErro
rCode('NON_CONSTANT_MAP_VALUE', 102, "The values in a 'const' map must be consta
nt"); |
| 1477 | 1467 |
| 1478 /** | 1468 /** |
| 1479 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the | 1469 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the |
| 1480 * character @, followed by a constant expression that must be either a refere
nce to a | 1470 * character @, followed by a constant expression that must be either a refere
nce to a |
| 1481 * compile-time constant variable, or a call to a constant constructor. | 1471 * compile-time constant variable, or a call to a constant constructor. |
| 1482 */ | 1472 */ |
| 1483 static final CompileTimeErrorCode NON_CONSTANT_ANNOTATION_CONSTRUCTOR = new Co
mpileTimeErrorCode('NON_CONSTANT_ANNOTATION_CONSTRUCTOR', 104, "Annotation creat
ion can use only 'const' constructor"); | 1473 static final CompileTimeErrorCode NON_CONSTANT_ANNOTATION_CONSTRUCTOR = new Co
mpileTimeErrorCode('NON_CONSTANT_ANNOTATION_CONSTRUCTOR', 103, "Annotation creat
ion can use only 'const' constructor"); |
| 1484 | 1474 |
| 1485 /** | 1475 /** |
| 1486 * 7.6.3 Constant Constructors: Any expression that appears within the initial
izer list of a | 1476 * 7.6.3 Constant Constructors: Any expression that appears within the initial
izer list of a |
| 1487 * constant constructor must be a potentially constant expression, or a compil
e-time error occurs. | 1477 * constant constructor must be a potentially constant expression, or a compil
e-time error occurs. |
| 1488 */ | 1478 */ |
| 1489 static final CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = new Comp
ileTimeErrorCode('NON_CONSTANT_VALUE_IN_INITIALIZER', 105, "Initializer expressi
ons in constant constructors must be constants"); | 1479 static final CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = new Comp
ileTimeErrorCode('NON_CONSTANT_VALUE_IN_INITIALIZER', 104, "Initializer expressi
ons in constant constructors must be constants"); |
| 1490 | 1480 |
| 1491 /** | 1481 /** |
| 1492 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i>
or if <i>m > n</i>. | 1482 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i>
or if <i>m > n</i>. |
| 1493 * | 1483 * |
| 1494 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 1484 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 1495 * uncaught exception being thrown. | 1485 * uncaught exception being thrown. |
| 1496 * | 1486 * |
| 1497 * @param requiredCount the expected number of required arguments | 1487 * @param requiredCount the expected number of required arguments |
| 1498 * @param argumentCount the actual number of positional arguments given | 1488 * @param argumentCount the actual number of positional arguments given |
| 1499 */ | 1489 */ |
| 1500 static final CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new CompileT
imeErrorCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', 106, "%d required argument(s) expe
cted, but %d found"); | 1490 static final CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new CompileT
imeErrorCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', 105, "%d required argument(s) expe
cted, but %d found"); |
| 1501 | 1491 |
| 1502 /** | 1492 /** |
| 1503 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears | 1493 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears |
| 1504 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is | 1494 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is |
| 1505 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> | 1495 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> |
| 1506 * (respectively <i>S.id</i>) | 1496 * (respectively <i>S.id</i>) |
| 1507 */ | 1497 */ |
| 1508 static final CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR = new CompileTime
ErrorCode('NON_GENERATIVE_CONSTRUCTOR', 107, "The generative constructor '%s' ex
pected, but factory found"); | 1498 static final CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR = new CompileTime
ErrorCode('NON_GENERATIVE_CONSTRUCTOR', 106, "The generative constructor '%s' ex
pected, but factory found"); |
| 1509 | 1499 |
| 1510 /** | 1500 /** |
| 1511 * 7.9 Superclasses: It is a compile-time error to specify an extends clause f
or class Object. | 1501 * 7.9 Superclasses: It is a compile-time error to specify an extends clause f
or class Object. |
| 1512 */ | 1502 */ |
| 1513 static final CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = new Com
pileTimeErrorCode('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 108, ""); | 1503 static final CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = new Com
pileTimeErrorCode('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 107, ""); |
| 1514 | 1504 |
| 1515 /** | 1505 /** |
| 1516 * 7.1.1 Operators: It is a compile-time error to declare an optional paramete
r in an operator. | 1506 * 7.1.1 Operators: It is a compile-time error to declare an optional paramete
r in an operator. |
| 1517 */ | 1507 */ |
| 1518 static final CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = new Compile
TimeErrorCode('OPTIONAL_PARAMETER_IN_OPERATOR', 109, "Optional parameters are no
t allowed when defining an operator"); | 1508 static final CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = new Compile
TimeErrorCode('OPTIONAL_PARAMETER_IN_OPERATOR', 108, "Optional parameters are no
t allowed when defining an operator"); |
| 1519 | 1509 |
| 1520 /** | 1510 /** |
| 1521 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part | 1511 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part |
| 1522 * declaration. | 1512 * declaration. |
| 1523 * | 1513 * |
| 1524 * @param uri the uri pointing to a non-library declaration | 1514 * @param uri the uri pointing to a non-library declaration |
| 1525 */ | 1515 */ |
| 1526 static final CompileTimeErrorCode PART_OF_NON_PART = new CompileTimeErrorCode(
'PART_OF_NON_PART', 110, "The included part '%s' must have a part-of directive")
; | 1516 static final CompileTimeErrorCode PART_OF_NON_PART = new CompileTimeErrorCode(
'PART_OF_NON_PART', 109, "The included part '%s' must have a part-of directive")
; |
| 1527 | 1517 |
| 1528 /** | 1518 /** |
| 1529 * 14.1 Imports: It is a compile-time error if the current library declares a
top-level member | 1519 * 14.1 Imports: It is a compile-time error if the current library declares a
top-level member |
| 1530 * named <i>p</i>. | 1520 * named <i>p</i>. |
| 1531 */ | 1521 */ |
| 1532 static final CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = new
CompileTimeErrorCode('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 111, "The name '%s
' is already used as an import prefix and cannot be used to name a top-level ele
ment"); | 1522 static final CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = new
CompileTimeErrorCode('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 110, "The name '%s
' is already used as an import prefix and cannot be used to name a top-level ele
ment"); |
| 1533 | 1523 |
| 1534 /** | 1524 /** |
| 1535 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named o
ptional parameter | 1525 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named o
ptional parameter |
| 1536 * begins with an '_' character. | 1526 * begins with an '_' character. |
| 1537 */ | 1527 */ |
| 1538 static final CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = new CompileTime
ErrorCode('PRIVATE_OPTIONAL_PARAMETER', 112, "Named optional parameters cannot s
tart with an underscore"); | 1528 static final CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = new CompileTime
ErrorCode('PRIVATE_OPTIONAL_PARAMETER', 111, "Named optional parameters cannot s
tart with an underscore"); |
| 1539 | 1529 |
| 1540 /** | 1530 /** |
| 1541 * 12.1 Constants: It is a compile-time error if the value of a compile-time c
onstant expression | 1531 * 12.1 Constants: It is a compile-time error if the value of a compile-time c
onstant expression |
| 1542 * depends on itself. | 1532 * depends on itself. |
| 1543 */ | 1533 */ |
| 1544 static final CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = new Compil
eTimeErrorCode('RECURSIVE_COMPILE_TIME_CONSTANT', 113, ""); | 1534 static final CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = new Compil
eTimeErrorCode('RECURSIVE_COMPILE_TIME_CONSTANT', 112, ""); |
| 1545 | 1535 |
| 1546 /** | 1536 /** |
| 1547 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 1537 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
| 1548 * only action is to invoke another generative constructor. | 1538 * only action is to invoke another generative constructor. |
| 1549 * | 1539 * |
| 1550 * TODO(scheglov) review this later, there are no explicit "it is a compile-ti
me error" in | 1540 * TODO(scheglov) review this later, there are no explicit "it is a compile-ti
me error" in |
| 1551 * specification. But it was added to the co19 and there is same error for fac
tories. | 1541 * specification. But it was added to the co19 and there is same error for fac
tories. |
| 1552 * | 1542 * |
| 1553 * https://code.google.com/p/dart/issues/detail?id=954 | 1543 * https://code.google.com/p/dart/issues/detail?id=954 |
| 1554 */ | 1544 */ |
| 1555 static final CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = new Compile
TimeErrorCode('RECURSIVE_CONSTRUCTOR_REDIRECT', 114, "Cycle in redirecting gener
ative constructors"); | 1545 static final CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = new Compile
TimeErrorCode('RECURSIVE_CONSTRUCTOR_REDIRECT', 113, "Cycle in redirecting gener
ative constructors"); |
| 1556 | 1546 |
| 1557 /** | 1547 /** |
| 1558 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr
uctor redirects to | 1548 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr
uctor redirects to |
| 1559 * itself, either directly or indirectly via a sequence of redirections. | 1549 * itself, either directly or indirectly via a sequence of redirections. |
| 1560 */ | 1550 */ |
| 1561 static final CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = new CompileTime
ErrorCode('RECURSIVE_FACTORY_REDIRECT', 115, "Cycle in redirecting factory const
ructors"); | 1551 static final CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = new CompileTime
ErrorCode('RECURSIVE_FACTORY_REDIRECT', 114, "Cycle in redirecting factory const
ructors"); |
| 1562 | 1552 |
| 1563 /** | 1553 /** |
| 1564 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a | 1554 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a |
| 1565 * superinterface of itself. | 1555 * superinterface of itself. |
| 1566 * | 1556 * |
| 1567 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. | 1557 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. |
| 1568 * | 1558 * |
| 1569 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. | 1559 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. |
| 1570 * | 1560 * |
| 1571 * @param className the name of the class that implements itself recursively | 1561 * @param className the name of the class that implements itself recursively |
| 1572 * @param strImplementsPath a string representation of the implements loop | 1562 * @param strImplementsPath a string representation of the implements loop |
| 1573 */ | 1563 */ |
| 1574 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = new Compil
eTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE', 116, "'%s' cannot be a superin
terface of itself: %s"); | 1564 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = new Compil
eTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE', 115, "'%s' cannot be a superin
terface of itself: %s"); |
| 1575 | 1565 |
| 1576 /** | 1566 /** |
| 1577 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a | 1567 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a |
| 1578 * superinterface of itself. | 1568 * superinterface of itself. |
| 1579 * | 1569 * |
| 1580 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. | 1570 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. |
| 1581 * | 1571 * |
| 1582 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. | 1572 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. |
| 1583 * | 1573 * |
| 1584 * @param className the name of the class that implements itself recursively | 1574 * @param className the name of the class that implements itself recursively |
| 1585 */ | 1575 */ |
| 1586 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EX
TENDS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTE
NDS', 117, "'%s' cannot extend itself"); | 1576 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EX
TENDS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTE
NDS', 116, "'%s' cannot extend itself"); |
| 1587 | 1577 |
| 1588 /** | 1578 /** |
| 1589 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a | 1579 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a |
| 1590 * superinterface of itself. | 1580 * superinterface of itself. |
| 1591 * | 1581 * |
| 1592 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. | 1582 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. |
| 1593 * | 1583 * |
| 1594 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. | 1584 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. |
| 1595 * | 1585 * |
| 1596 * @param className the name of the class that implements itself recursively | 1586 * @param className the name of the class that implements itself recursively |
| 1597 */ | 1587 */ |
| 1598 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IM
PLEMENTS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_I
MPLEMENTS', 118, "'%s' cannot implement itself"); | 1588 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IM
PLEMENTS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_I
MPLEMENTS', 117, "'%s' cannot implement itself"); |
| 1599 | 1589 |
| 1600 /** | 1590 /** |
| 1601 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th
e const modifier but | 1591 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th
e const modifier but |
| 1602 * <i>k'</i> is not a constant constructor. | 1592 * <i>k'</i> is not a constant constructor. |
| 1603 */ | 1593 */ |
| 1604 static final CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = new Comp
ileTimeErrorCode('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 119, "Constant factory con
structor cannot delegate to a non-constant constructor"); | 1594 static final CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = new Comp
ileTimeErrorCode('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 118, "Constant factory con
structor cannot delegate to a non-constant constructor"); |
| 1605 | 1595 |
| 1606 /** | 1596 /** |
| 1607 * 13.3 Local Variable Declaration: It is a compile-time error if <i>e</i> ref
ers to the name | 1597 * 13.3 Local Variable Declaration: It is a compile-time error if <i>e</i> ref
ers to the name |
| 1608 * <i>v</i> or the name <i>v=</i>. | 1598 * <i>v</i> or the name <i>v=</i>. |
| 1609 */ | 1599 */ |
| 1610 static final CompileTimeErrorCode REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZE
R = new CompileTimeErrorCode('REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER', 12
0, "The name '%s' cannot be referenced in the initializer of a variable with the
same name"); | 1600 static final CompileTimeErrorCode REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZE
R = new CompileTimeErrorCode('REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER', 11
9, "The name '%s' cannot be referenced in the initializer of a variable with the
same name"); |
| 1611 | 1601 |
| 1612 /** | 1602 /** |
| 1613 * 12.8.1 Rethrow: It is a compile-time error if an expression of the form <i>
rethrow;</i> is not | 1603 * 12.8.1 Rethrow: It is a compile-time error if an expression of the form <i>
rethrow;</i> is not |
| 1614 * enclosed within a on-catch clause. | 1604 * enclosed within a on-catch clause. |
| 1615 */ | 1605 */ |
| 1616 static final CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = new CompileTimeError
Code('RETHROW_OUTSIDE_CATCH', 121, "rethrow must be inside of a catch clause"); | 1606 static final CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = new CompileTimeError
Code('RETHROW_OUTSIDE_CATCH', 120, "rethrow must be inside of a catch clause"); |
| 1617 | 1607 |
| 1618 /** | 1608 /** |
| 1619 * 13.11 Return: It is a compile-time error if a return statement of the form
<i>return e;</i> | 1609 * 13.11 Return: It is a compile-time error if a return statement of the form
<i>return e;</i> |
| 1620 * appears in a generative constructor. | 1610 * appears in a generative constructor. |
| 1621 */ | 1611 */ |
| 1622 static final CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = new Compi
leTimeErrorCode('RETURN_IN_GENERATIVE_CONSTRUCTOR', 122, "Constructors cannot re
turn a value"); | 1612 static final CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = new Compi
leTimeErrorCode('RETURN_IN_GENERATIVE_CONSTRUCTOR', 121, "Constructors cannot re
turn a value"); |
| 1623 | 1613 |
| 1624 /** | 1614 /** |
| 1625 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form | 1615 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form |
| 1626 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … | 1616 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … |
| 1627 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe
r method invocation | 1617 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe
r method invocation |
| 1628 * occurs in a top-level function or variable initializer, in an instance vari
able initializer or | 1618 * occurs in a top-level function or variable initializer, in an instance vari
able initializer or |
| 1629 * initializer list, in class Object, in a factory constructor, or in a static
method or variable | 1619 * initializer list, in class Object, in a factory constructor, or in a static
method or variable |
| 1630 * initializer. | 1620 * initializer. |
| 1631 */ | 1621 */ |
| 1632 static final CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = new CompileTimeEr
rorCode('SUPER_IN_INVALID_CONTEXT', 123, "Invalid context for 'super' invocation
"); | 1622 static final CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = new CompileTimeEr
rorCode('SUPER_IN_INVALID_CONTEXT', 122, "Invalid context for 'super' invocation
"); |
| 1633 | 1623 |
| 1634 /** | 1624 /** |
| 1635 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 1625 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
| 1636 * only action is to invoke another generative constructor. | 1626 * only action is to invoke another generative constructor. |
| 1637 */ | 1627 */ |
| 1638 static final CompileTimeErrorCode SUPER_IN_REDIRECTING_CONSTRUCTOR = new Compi
leTimeErrorCode('SUPER_IN_REDIRECTING_CONSTRUCTOR', 124, "The redirecting constr
uctor cannot have a 'super' initializer"); | 1628 static final CompileTimeErrorCode SUPER_IN_REDIRECTING_CONSTRUCTOR = new Compi
leTimeErrorCode('SUPER_IN_REDIRECTING_CONSTRUCTOR', 123, "The redirecting constr
uctor cannot have a 'super' initializer"); |
| 1639 | 1629 |
| 1640 /** | 1630 /** |
| 1641 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time | 1631 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time |
| 1642 * error if a generative constructor of class Object includes a superinitializ
er. | 1632 * error if a generative constructor of class Object includes a superinitializ
er. |
| 1643 */ | 1633 */ |
| 1644 static final CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = new CompileTim
eErrorCode('SUPER_INITIALIZER_IN_OBJECT', 125, ""); | 1634 static final CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = new CompileTim
eErrorCode('SUPER_INITIALIZER_IN_OBJECT', 124, ""); |
| 1645 | 1635 |
| 1646 /** | 1636 /** |
| 1647 * 12.11 Instance Creation: It is a static type warning if any of the type arg
uments to a | 1637 * 12.11 Instance Creation: It is a static type warning if any of the type arg
uments to a |
| 1648 * constructor of a generic type <i>G</i> invoked by a new expression or a con
stant object | 1638 * constructor of a generic type <i>G</i> invoked by a new expression or a con
stant object |
| 1649 * expression are not subtypes of the bounds of the corresponding formal type
parameters of | 1639 * expression are not subtypes of the bounds of the corresponding formal type
parameters of |
| 1650 * <i>G</i>. | 1640 * <i>G</i>. |
| 1651 * | 1641 * |
| 1652 * 12.11.1 New: If T is malformed a dynamic error occurs. In checked mode, if
T is mal-bounded a | 1642 * 12.11.1 New: If T is malformed a dynamic error occurs. In checked mode, if
T is mal-bounded a |
| 1653 * dynamic error occurs. | 1643 * dynamic error occurs. |
| 1654 * | 1644 * |
| 1655 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time
constant would raise | 1645 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time
constant would raise |
| 1656 * an exception. | 1646 * an exception. |
| 1657 * | 1647 * |
| 1658 * @param boundedTypeName the name of the type used in the instance creation t
hat should be | 1648 * @param boundedTypeName the name of the type used in the instance creation t
hat should be |
| 1659 * limited by the bound as specified in the class declaration | 1649 * limited by the bound as specified in the class declaration |
| 1660 * @param boundingTypeName the name of the bounding type | 1650 * @param boundingTypeName the name of the bounding type |
| 1661 * @see StaticTypeWarningCode#TYPE_ARGUMENT_NOT_MATCHING_BOUNDS | 1651 * @see StaticTypeWarningCode#TYPE_ARGUMENT_NOT_MATCHING_BOUNDS |
| 1662 */ | 1652 */ |
| 1663 static final CompileTimeErrorCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = new Comp
ileTimeErrorCode('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 126, "'%s' does not extend
'%s'"); | 1653 static final CompileTimeErrorCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = new Comp
ileTimeErrorCode('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 125, "'%s' does not extend
'%s'"); |
| 1664 | 1654 |
| 1665 /** | 1655 /** |
| 1666 * 15.3.1 Typedef: It is a compile-time error if a typedef refers to itself vi
a a chain of | 1656 * 15.3.1 Typedef: It is a compile-time error if a typedef refers to itself vi
a a chain of |
| 1667 * references that does not include a class declaration. | 1657 * references that does not include a class declaration. |
| 1668 */ | 1658 */ |
| 1669 static final CompileTimeErrorCode TYPE_ALIAS_CANNOT_REFERENCE_ITSELF = new Com
pileTimeErrorCode('TYPE_ALIAS_CANNOT_REFERENCE_ITSELF', 127, "Type alias cannot
reference itself directly or via other typedefs"); | 1659 static final CompileTimeErrorCode TYPE_ALIAS_CANNOT_REFERENCE_ITSELF = new Com
pileTimeErrorCode('TYPE_ALIAS_CANNOT_REFERENCE_ITSELF', 126, "Type alias can ref
erence itself only via the bounds of its generic parameters"); |
| 1670 | 1660 |
| 1671 /** | 1661 /** |
| 1672 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current | 1662 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current |
| 1673 * scope, optionally followed by type arguments. | 1663 * scope, optionally followed by type arguments. |
| 1674 */ | 1664 */ |
| 1675 static final CompileTimeErrorCode UNDEFINED_CLASS = new CompileTimeErrorCode('
UNDEFINED_CLASS', 128, "Undefined class '%s'"); | 1665 static final CompileTimeErrorCode UNDEFINED_CLASS = new CompileTimeErrorCode('
UNDEFINED_CLASS', 127, "Undefined class '%s'"); |
| 1676 | 1666 |
| 1677 /** | 1667 /** |
| 1678 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears | 1668 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears |
| 1679 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is | 1669 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is |
| 1680 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> | 1670 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> |
| 1681 * (respectively <i>S.id</i>) | 1671 * (respectively <i>S.id</i>) |
| 1682 */ | 1672 */ |
| 1683 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = new C
ompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 129, "The class '%s'
does not have a generative constructor '%s'"); | 1673 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = new C
ompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 128, "The class '%s'
does not have a generative constructor '%s'"); |
| 1684 | 1674 |
| 1685 /** | 1675 /** |
| 1686 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears | 1676 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears |
| 1687 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is | 1677 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is |
| 1688 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> | 1678 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> |
| 1689 * (respectively <i>S.id</i>) | 1679 * (respectively <i>S.id</i>) |
| 1690 */ | 1680 */ |
| 1691 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT
= new CompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT', 130,
"The class '%s' does not have a default generative constructor"); | 1681 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT
= new CompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT', 129,
"The class '%s' does not have a default generative constructor"); |
| 1692 | 1682 |
| 1693 /** | 1683 /** |
| 1694 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>,
<i>1<=i<=l</i>, | 1684 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>,
<i>1<=i<=l</i>, |
| 1695 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i
> ... | 1685 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i
> ... |
| 1696 * <i>p<sub>n+k</sub></i>} or a static warning occurs. | 1686 * <i>p<sub>n+k</sub></i>} or a static warning occurs. |
| 1697 * | 1687 * |
| 1698 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 1688 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 1699 * uncaught exception being thrown. | 1689 * uncaught exception being thrown. |
| 1700 * | 1690 * |
| 1701 * @param name the name of the requested named parameter | 1691 * @param name the name of the requested named parameter |
| 1702 */ | 1692 */ |
| 1703 static final CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER = new CompileTimeE
rrorCode('UNDEFINED_NAMED_PARAMETER', 131, "The named parameter '%s' is not defi
ned"); | 1693 static final CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER = new CompileTimeE
rrorCode('UNDEFINED_NAMED_PARAMETER', 130, "The named parameter '%s' is not defi
ned"); |
| 1704 | 1694 |
| 1705 /** | 1695 /** |
| 1706 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1696 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 1707 * not a library declaration. | 1697 * not a library declaration. |
| 1708 * | 1698 * |
| 1709 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1699 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 1710 * not a library declaration. | 1700 * not a library declaration. |
| 1711 * | 1701 * |
| 1712 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part | 1702 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part |
| 1713 * declaration. | 1703 * declaration. |
| 1714 * | 1704 * |
| 1715 * @param uri the URI pointing to a non-existent file | 1705 * @param uri the URI pointing to a non-existent file |
| 1716 * @see #INVALID_URI | 1706 * @see #INVALID_URI |
| 1717 */ | 1707 */ |
| 1718 static final CompileTimeErrorCode URI_DOES_NOT_EXIST = new CompileTimeErrorCod
e('URI_DOES_NOT_EXIST', 132, "Target of URI does not exist: '%s'"); | 1708 static final CompileTimeErrorCode URI_DOES_NOT_EXIST = new CompileTimeErrorCod
e('URI_DOES_NOT_EXIST', 131, "Target of URI does not exist: '%s'"); |
| 1719 | 1709 |
| 1720 /** | 1710 /** |
| 1721 * 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time
constant, or if | 1711 * 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time
constant, or if |
| 1722 * <i>x</i> involves string interpolation. | 1712 * <i>x</i> involves string interpolation. |
| 1723 * | 1713 * |
| 1724 * 14.3 Parts: It is a compile-time error if <i>s</i> is not a compile-time co
nstant, or if | 1714 * 14.3 Parts: It is a compile-time error if <i>s</i> is not a compile-time co
nstant, or if |
| 1725 * <i>s</i> involves string interpolation. | 1715 * <i>s</i> involves string interpolation. |
| 1726 * | 1716 * |
| 1727 * 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that d
escribes a URI is | 1717 * 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that d
escribes a URI is |
| 1728 * not a compile-time constant, or if <i>x</i> involves string interpolation. | 1718 * not a compile-time constant, or if <i>x</i> involves string interpolation. |
| 1729 */ | 1719 */ |
| 1730 static final CompileTimeErrorCode URI_WITH_INTERPOLATION = new CompileTimeErro
rCode('URI_WITH_INTERPOLATION', 133, "URIs cannot use string interpolation"); | 1720 static final CompileTimeErrorCode URI_WITH_INTERPOLATION = new CompileTimeErro
rCode('URI_WITH_INTERPOLATION', 132, "URIs cannot use string interpolation"); |
| 1731 | 1721 |
| 1732 /** | 1722 /** |
| 1733 * 7.1.1 Operators: It is a compile-time error if the arity of the user-declar
ed operator []= is | 1723 * 7.1.1 Operators: It is a compile-time error if the arity of the user-declar
ed operator []= is |
| 1734 * not 2. It is a compile time error if the arity of a user-declared operator
with one of the | 1724 * not 2. It is a compile time error if the arity of a user-declared operator
with one of the |
| 1735 * names: <, >, <=, >=, ==, +, /, ~/, *, %, |, ^, &, <<, >
;>, [] is not 1. | 1725 * names: <, >, <=, >=, ==, +, /, ~/, *, %, |, ^, &, <<, >
;>, [] is not 1. |
| 1736 * It is a compile time error if the arity of the user-declared operator - is
not 0 or 1. It is a | 1726 * It is a compile time error if the arity of the user-declared operator - is
not 0 or 1. It is a |
| 1737 * compile time error if the arity of the user-declared operator ~ is not 0. | 1727 * compile time error if the arity of the user-declared operator ~ is not 0. |
| 1738 * | 1728 * |
| 1739 * @param operatorName the name of the declared operator | 1729 * @param operatorName the name of the declared operator |
| 1740 * @param expectedNumberOfParameters the number of parameters expected | 1730 * @param expectedNumberOfParameters the number of parameters expected |
| 1741 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration | 1731 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration |
| 1742 */ | 1732 */ |
| 1743 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = ne
w CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 134, "Operator
'%s' should declare exactly %d parameter(s), but %d found"); | 1733 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = ne
w CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 133, "Operator
'%s' should declare exactly %d parameter(s), but %d found"); |
| 1744 | 1734 |
| 1745 /** | 1735 /** |
| 1746 * 7.1.1 Operators: It is a compile time error if the arity of the user-declar
ed operator - is not | 1736 * 7.1.1 Operators: It is a compile time error if the arity of the user-declar
ed operator - is not |
| 1747 * 0 or 1. | 1737 * 0 or 1. |
| 1748 * | 1738 * |
| 1749 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration | 1739 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration |
| 1750 */ | 1740 */ |
| 1751 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINU
S = new CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS', 13
5, "Operator '-' should declare 0 or 1 parameter, but %d found"); | 1741 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINU
S = new CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS', 13
4, "Operator '-' should declare 0 or 1 parameter, but %d found"); |
| 1752 | 1742 |
| 1753 /** | 1743 /** |
| 1754 * 7.3 Setters: It is a compile-time error if a setter's formal parameter list
does not include | 1744 * 7.3 Setters: It is a compile-time error if a setter's formal parameter list
does not include |
| 1755 * exactly one required formal parameter <i>p</i>. | 1745 * exactly one required formal parameter <i>p</i>. |
| 1756 */ | 1746 */ |
| 1757 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = new
CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 136, "Setters shou
ld declare exactly one required parameter"); | 1747 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = new
CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 135, "Setters shou
ld declare exactly one required parameter"); |
| 1758 static final List<CompileTimeErrorCode> values = [ | 1748 static final List<CompileTimeErrorCode> values = [ |
| 1759 AMBIGUOUS_EXPORT, | 1749 AMBIGUOUS_EXPORT, |
| 1760 AMBIGUOUS_IMPORT, | |
| 1761 ARGUMENT_DEFINITION_TEST_NON_PARAMETER, | 1750 ARGUMENT_DEFINITION_TEST_NON_PARAMETER, |
| 1762 ARGUMENT_TYPE_NOT_ASSIGNABLE, | 1751 ARGUMENT_TYPE_NOT_ASSIGNABLE, |
| 1763 BUILT_IN_IDENTIFIER_AS_TYPE, | 1752 BUILT_IN_IDENTIFIER_AS_TYPE, |
| 1764 BUILT_IN_IDENTIFIER_AS_TYPE_NAME, | 1753 BUILT_IN_IDENTIFIER_AS_TYPE_NAME, |
| 1765 BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, | 1754 BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, |
| 1766 BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME, | 1755 BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME, |
| 1767 CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, | 1756 CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, |
| 1768 COMPILE_TIME_CONSTANT_RAISES_EXCEPTION, | 1757 COMPILE_TIME_CONSTANT_RAISES_EXCEPTION, |
| 1769 CONFLICTING_GETTER_AND_METHOD, | 1758 CONFLICTING_GETTER_AND_METHOD, |
| 1770 CONFLICTING_METHOD_AND_GETTER, | 1759 CONFLICTING_METHOD_AND_GETTER, |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1919 int compareTo(CompileTimeErrorCode other) => ordinal - other.ordinal; | 1908 int compareTo(CompileTimeErrorCode other) => ordinal - other.ordinal; |
| 1920 int get hashCode => ordinal; | 1909 int get hashCode => ordinal; |
| 1921 String toString() => name; | 1910 String toString() => name; |
| 1922 } | 1911 } |
| 1923 /** | 1912 /** |
| 1924 * The enumeration `PubSuggestionCode` defines the suggestions used for reportin
g deviations | 1913 * The enumeration `PubSuggestionCode` defines the suggestions used for reportin
g deviations |
| 1925 * from pub best practices. The convention for this class is for the name of the
bad practice to | 1914 * from pub best practices. The convention for this class is for the name of the
bad practice to |
| 1926 * indicate the problem that caused the suggestion to be generated and for the m
essage to explain | 1915 * indicate the problem that caused the suggestion to be generated and for the m
essage to explain |
| 1927 * what is wrong and, when appropriate, how the situation can be corrected. | 1916 * what is wrong and, when appropriate, how the situation can be corrected. |
| 1928 */ | 1917 */ |
| 1929 class PubSuggestionCode implements Comparable<PubSuggestionCode>, ErrorCode { | 1918 class PubSuggestionCode implements Enum<PubSuggestionCode>, ErrorCode { |
| 1930 | 1919 |
| 1931 /** | 1920 /** |
| 1932 * It is a bad practice for a source file in a package "lib" directory hierarc
hy to traverse | 1921 * It is a bad practice for a source file in a package "lib" directory hierarc
hy to traverse |
| 1933 * outside that directory hierarchy. For example, a source file in the "lib" d
irectory should not | 1922 * outside that directory hierarchy. For example, a source file in the "lib" d
irectory should not |
| 1934 * contain a directive such as `import '../web/some.dart'` which references a
file outside | 1923 * contain a directive such as `import '../web/some.dart'` which references a
file outside |
| 1935 * the lib directory. | 1924 * the lib directory. |
| 1936 */ | 1925 */ |
| 1937 static final PubSuggestionCode FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE
= new PubSuggestionCode('FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE', 0, "A
file in the 'lib' directory hierarchy should not reference a file outside that h
ierarchy"); | 1926 static final PubSuggestionCode FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE
= new PubSuggestionCode('FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE', 0, "A
file in the 'lib' directory hierarchy should not reference a file outside that h
ierarchy"); |
| 1938 | 1927 |
| 1939 /** | 1928 /** |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1982 String toString() => name; | 1971 String toString() => name; |
| 1983 } | 1972 } |
| 1984 /** | 1973 /** |
| 1985 * The enumeration `StaticWarningCode` defines the error codes used for static w
arnings. The | 1974 * The enumeration `StaticWarningCode` defines the error codes used for static w
arnings. The |
| 1986 * convention for this class is for the name of the error code to indicate the p
roblem that caused | 1975 * convention for this class is for the name of the error code to indicate the p
roblem that caused |
| 1987 * the error to be generated and for the error message to explain what is wrong
and, when | 1976 * the error to be generated and for the error message to explain what is wrong
and, when |
| 1988 * appropriate, how the problem can be corrected. | 1977 * appropriate, how the problem can be corrected. |
| 1989 * | 1978 * |
| 1990 * @coverage dart.engine.error | 1979 * @coverage dart.engine.error |
| 1991 */ | 1980 */ |
| 1992 class StaticWarningCode implements Comparable<StaticWarningCode>, ErrorCode { | 1981 class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
| 1993 | 1982 |
| 1994 /** | 1983 /** |
| 1995 * 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i
>N</i> is introduced | 1984 * 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i
>N</i> is introduced |
| 1996 * into the top level scope <i>L</i> by more than one import then: | 1985 * into the top level scope <i>L</i> by more than one import then: |
| 1997 * <ol> | 1986 * <ol> |
| 1998 * * It is a static warning if <i>N</i> is used as a type annotation. | 1987 * * A static warning occurs. |
| 1999 * * In checked mode, it is a dynamic error if <i>N</i> is used as a type anno
tation and | 1988 * * If <i>N</i> is referenced as a function, getter or setter, a <i>NoSuchMet
hodError</i> is |
| 2000 * referenced during a subtype test. | 1989 * raised. |
| 2001 * * Otherwise, it is a compile-time error. | 1990 * * If <i>N</i> is referenced as a type, it is treated as a malformed type. |
| 2002 * </ol> | 1991 * </ol> |
| 2003 * | 1992 * |
| 2004 * @param ambiguousTypeName the name of the ambiguous type | 1993 * @param ambiguousTypeName the name of the ambiguous type |
| 2005 * @param firstLibraryName the name of the first library that the type is foun
d | 1994 * @param firstLibraryName the name of the first library that the type is foun
d |
| 2006 * @param secondLibraryName the name of the second library that the type is fo
und | 1995 * @param secondLibraryName the name of the second library that the type is fo
und |
| 2007 */ | 1996 */ |
| 2008 static final StaticWarningCode AMBIGUOUS_IMPORT = new StaticWarningCode('AMBIG
UOUS_IMPORT', 0, "The type '%s' is defined in the libraries '%s' and '%s'"); | 1997 static final StaticWarningCode AMBIGUOUS_IMPORT = new StaticWarningCode('AMBIG
UOUS_IMPORT', 0, "The type '%s' is defined in the libraries '%s' and '%s'"); |
| 2009 | 1998 |
| 2010 /** | 1999 /** |
| 2011 * 12.11.1 New: It is a static warning if the static type of <i>a<sub>i</sub>,
1 <= i <= n+ | 2000 * 12.11.1 New: It is a static warning if the static type of <i>a<sub>i</sub>,
1 <= i <= n+ |
| (...skipping 15 matching lines...) Expand all Loading... |
| 2027 * p<sub>n+k</sub>}</i> or a static warning occurs. It is a static warning if | 2016 * p<sub>n+k</sub>}</i> or a static warning occurs. It is a static warning if |
| 2028 * <i>T<sub>m+j</sub></i> may not be assigned to <i>S<sub>r</sub></i>, where <
i>r = q<sub>j</sub>, | 2017 * <i>T<sub>m+j</sub></i> may not be assigned to <i>S<sub>r</sub></i>, where <
i>r = q<sub>j</sub>, |
| 2029 * 1 <= j <= l</i>. | 2018 * 1 <= j <= l</i>. |
| 2030 */ | 2019 */ |
| 2031 static final StaticWarningCode ARGUMENT_TYPE_NOT_ASSIGNABLE = new StaticWarnin
gCode('ARGUMENT_TYPE_NOT_ASSIGNABLE', 1, "The argument type '%s' cannot be assig
ned to the parameter type '%s'"); | 2020 static final StaticWarningCode ARGUMENT_TYPE_NOT_ASSIGNABLE = new StaticWarnin
gCode('ARGUMENT_TYPE_NOT_ASSIGNABLE', 1, "The argument type '%s' cannot be assig
ned to the parameter type '%s'"); |
| 2032 | 2021 |
| 2033 /** | 2022 /** |
| 2034 * 5 Variables: Attempting to assign to a final variable elsewhere will cause
a NoSuchMethodError | 2023 * 5 Variables: Attempting to assign to a final variable elsewhere will cause
a NoSuchMethodError |
| 2035 * to be thrown, because no setter is defined for it. The assignment will also
give rise to a | 2024 * to be thrown, because no setter is defined for it. The assignment will also
give rise to a |
| 2036 * static warning for the same reason. | 2025 * static warning for the same reason. |
| 2026 * |
| 2027 * A constant variable is always implicitly final. |
| 2028 */ |
| 2029 static final StaticWarningCode ASSIGNMENT_TO_CONST = new StaticWarningCode('AS
SIGNMENT_TO_CONST', 2, "Constant variables cannot be assigned a value"); |
| 2030 |
| 2031 /** |
| 2032 * 5 Variables: Attempting to assign to a final variable elsewhere will cause
a NoSuchMethodError |
| 2033 * to be thrown, because no setter is defined for it. The assignment will also
give rise to a |
| 2034 * static warning for the same reason. |
| 2037 */ | 2035 */ |
| 2038 static final StaticWarningCode ASSIGNMENT_TO_FINAL = new StaticWarningCode('AS
SIGNMENT_TO_FINAL', 2, "Final variables cannot be assigned a value"); | 2036 static final StaticWarningCode ASSIGNMENT_TO_FINAL = new StaticWarningCode('AS
SIGNMENT_TO_FINAL', 3, "Final variables cannot be assigned a value"); |
| 2039 | 2037 |
| 2040 /** | 2038 /** |
| 2041 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
It is a static type | 2039 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
It is a static type |
| 2042 * warning if <i>T</i> does not have an accessible instance setter named <i>v
=</i>. | 2040 * warning if <i>T</i> does not have an accessible instance setter named <i>v
=</i>. |
| 2043 */ | 2041 */ |
| 2044 static final StaticWarningCode ASSIGNMENT_TO_METHOD = new StaticWarningCode('A
SSIGNMENT_TO_METHOD', 3, "Methods cannot be assigned a value"); | 2042 static final StaticWarningCode ASSIGNMENT_TO_METHOD = new StaticWarningCode('A
SSIGNMENT_TO_METHOD', 4, "Methods cannot be assigned a value"); |
| 2045 | 2043 |
| 2046 /** | 2044 /** |
| 2047 * 13.9 Switch: It is a static warning if the last statement of the statement
sequence | 2045 * 13.9 Switch: It is a static warning if the last statement of the statement
sequence |
| 2048 * <i>s<sub>k</sub></i> is not a break, continue, return or throw statement. | 2046 * <i>s<sub>k</sub></i> is not a break, continue, return or throw statement. |
| 2049 */ | 2047 */ |
| 2050 static final StaticWarningCode CASE_BLOCK_NOT_TERMINATED = new StaticWarningCo
de('CASE_BLOCK_NOT_TERMINATED', 4, "The last statement of the 'case' should be '
break', 'continue', 'return' or 'throw'"); | 2048 static final StaticWarningCode CASE_BLOCK_NOT_TERMINATED = new StaticWarningCo
de('CASE_BLOCK_NOT_TERMINATED', 5, "The last statement of the 'case' should be '
break', 'continue', 'return' or 'throw'"); |
| 2051 | 2049 |
| 2052 /** | 2050 /** |
| 2053 * 12.32 Type Cast: It is a static warning if <i>T</i> does not denote a type
available in the | 2051 * 12.32 Type Cast: It is a static warning if <i>T</i> does not denote a type
available in the |
| 2054 * current lexical scope. | 2052 * current lexical scope. |
| 2055 */ | 2053 */ |
| 2056 static final StaticWarningCode CAST_TO_NON_TYPE = new StaticWarningCode('CAST_
TO_NON_TYPE', 5, "The name '%s' is not a type and cannot be used in an 'as' expr
ession"); | 2054 static final StaticWarningCode CAST_TO_NON_TYPE = new StaticWarningCode('CAST_
TO_NON_TYPE', 6, "The name '%s' is not a type and cannot be used in an 'as' expr
ession"); |
| 2057 | 2055 |
| 2058 /** | 2056 /** |
| 2059 * 16.1.2 Comments: A token of the form <i>[new c](uri)</i> will be replaced b
y a link in the | 2057 * 16.1.2 Comments: A token of the form <i>[new c](uri)</i> will be replaced b
y a link in the |
| 2060 * formatted output. The link will point at the constructor named <i>c</i> in
<i>L</i>. The title | 2058 * formatted output. The link will point at the constructor named <i>c</i> in
<i>L</i>. The title |
| 2061 * of the link will be <i>c</i>. It is a static warning if uri is not the URI
of a dart library | 2059 * of the link will be <i>c</i>. It is a static warning if uri is not the URI
of a dart library |
| 2062 * <i>L</i>, or if <i>c</i> is not the name of a constructor of a class declar
ed in the exported | 2060 * <i>L</i>, or if <i>c</i> is not the name of a constructor of a class declar
ed in the exported |
| 2063 * namespace of <i>L</i>. | 2061 * namespace of <i>L</i>. |
| 2064 */ | 2062 */ |
| 2065 static final StaticWarningCode COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE = new
StaticWarningCode('COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE', 6, ""); | 2063 static final StaticWarningCode COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE = new
StaticWarningCode('COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE', 7, ""); |
| 2066 | 2064 |
| 2067 /** | 2065 /** |
| 2068 * 16.1.2 Comments: A token of the form <i>[id](uri)</i> will be replaced by a
link in the | 2066 * 16.1.2 Comments: A token of the form <i>[id](uri)</i> will be replaced by a
link in the |
| 2069 * formatted output. The link will point at the declaration named <i>id</i> in
<i>L</i>. The title | 2067 * formatted output. The link will point at the declaration named <i>id</i> in
<i>L</i>. The title |
| 2070 * of the link will be <i>id</i>. It is a static warning if uri is not the URI
of a dart library | 2068 * of the link will be <i>id</i>. It is a static warning if uri is not the URI
of a dart library |
| 2071 * <i>L</i>, or if <i>id</i> is not a name declared in the exported namespace
of <i>L</i>. | 2069 * <i>L</i>, or if <i>id</i> is not a name declared in the exported namespace
of <i>L</i>. |
| 2072 */ | 2070 */ |
| 2073 static final StaticWarningCode COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE = new
StaticWarningCode('COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE', 7, ""); | 2071 static final StaticWarningCode COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE = new
StaticWarningCode('COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE', 8, ""); |
| 2074 | 2072 |
| 2075 /** | 2073 /** |
| 2076 * 16.1.2 Comments: It is a static warning if <i>c</i> does not denote a const
ructor that | 2074 * 16.1.2 Comments: It is a static warning if <i>c</i> does not denote a const
ructor that |
| 2077 * available in the scope of the documentation comment. | 2075 * available in the scope of the documentation comment. |
| 2078 */ | 2076 */ |
| 2079 static final StaticWarningCode COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR = new
StaticWarningCode('COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR', 8, ""); | 2077 static final StaticWarningCode COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR = new
StaticWarningCode('COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR', 9, ""); |
| 2080 | 2078 |
| 2081 /** | 2079 /** |
| 2082 * 16.1.2 Comments: It is a static warning if <i>id</i> does not denote a decl
aration that | 2080 * 16.1.2 Comments: It is a static warning if <i>id</i> does not denote a decl
aration that |
| 2083 * available in the scope of the documentation comment. | 2081 * available in the scope of the documentation comment. |
| 2084 */ | 2082 */ |
| 2085 static final StaticWarningCode COMMENT_REFERENCE_UNDECLARED_IDENTIFIER = new S
taticWarningCode('COMMENT_REFERENCE_UNDECLARED_IDENTIFIER', 9, ""); | 2083 static final StaticWarningCode COMMENT_REFERENCE_UNDECLARED_IDENTIFIER = new S
taticWarningCode('COMMENT_REFERENCE_UNDECLARED_IDENTIFIER', 10, ""); |
| 2086 | 2084 |
| 2087 /** | 2085 /** |
| 2088 * 16.1.2 Comments: A token of the form <i>[id](uri)</i> will be replaced by a
link in the | 2086 * 16.1.2 Comments: A token of the form <i>[id](uri)</i> will be replaced by a
link in the |
| 2089 * formatted output. The link will point at the declaration named <i>id</i> in
<i>L</i>. The title | 2087 * formatted output. The link will point at the declaration named <i>id</i> in
<i>L</i>. The title |
| 2090 * of the link will be <i>id</i>. It is a static warning if uri is not the URI
of a dart library | 2088 * of the link will be <i>id</i>. It is a static warning if uri is not the URI
of a dart library |
| 2091 * <i>L</i>, or if <i>id</i> is not a name declared in the exported namespace
of <i>L</i>. | 2089 * <i>L</i>, or if <i>id</i> is not a name declared in the exported namespace
of <i>L</i>. |
| 2092 */ | 2090 */ |
| 2093 static final StaticWarningCode COMMENT_REFERENCE_URI_NOT_LIBRARY = new StaticW
arningCode('COMMENT_REFERENCE_URI_NOT_LIBRARY', 10, ""); | 2091 static final StaticWarningCode COMMENT_REFERENCE_URI_NOT_LIBRARY = new StaticW
arningCode('COMMENT_REFERENCE_URI_NOT_LIBRARY', 11, ""); |
| 2094 | 2092 |
| 2095 /** | 2093 /** |
| 2096 * 7.4 Abstract Instance Members: It is a static warning if an abstract member
is declared or | 2094 * 7.4 Abstract Instance Members: It is a static warning if an abstract member
is declared or |
| 2097 * inherited in a concrete class. | 2095 * inherited in a concrete class. |
| 2098 */ | 2096 */ |
| 2099 static final StaticWarningCode CONCRETE_CLASS_WITH_ABSTRACT_MEMBER = new Stati
cWarningCode('CONCRETE_CLASS_WITH_ABSTRACT_MEMBER', 11, "'%s' must have a method
body because '%s' is not abstract"); | 2097 static final StaticWarningCode CONCRETE_CLASS_WITH_ABSTRACT_MEMBER = new Stati
cWarningCode('CONCRETE_CLASS_WITH_ABSTRACT_MEMBER', 12, "'%s' must have a method
body because '%s' is not abstract"); |
| 2100 | 2098 |
| 2101 /** | 2099 /** |
| 2102 * 7.2 Getters: It is a static warning if a class <i>C</i> declares an instanc
e getter named | 2100 * 7.2 Getters: It is a static warning if a class <i>C</i> declares an instanc
e getter named |
| 2103 * <i>v</i> and an accessible static member named <i>v</i> or <i>v=</i> is dec
lared in a | 2101 * <i>v</i> and an accessible static member named <i>v</i> or <i>v=</i> is dec
lared in a |
| 2104 * superclass of <i>C</i>. | 2102 * superclass of <i>C</i>. |
| 2105 * | 2103 * |
| 2106 * @param superName the name of the super class declaring a static member | 2104 * @param superName the name of the super class declaring a static member |
| 2107 */ | 2105 */ |
| 2108 static final StaticWarningCode CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMB
ER = new StaticWarningCode('CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER',
12, "Superclass '%s' declares static member with the same name"); | 2106 static final StaticWarningCode CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMB
ER = new StaticWarningCode('CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER',
13, "Superclass '%s' declares static member with the same name"); |
| 2109 | 2107 |
| 2110 /** | 2108 /** |
| 2111 * 7.3 Setters: It is a static warning if a class <i>C</i> declares an instanc
e setter named | 2109 * 7.3 Setters: It is a static warning if a class <i>C</i> declares an instanc
e setter named |
| 2112 * <i>v=</i> and an accessible static member named <i>v=</i> or <i>v</i> is de
clared in a | 2110 * <i>v=</i> and an accessible static member named <i>v=</i> or <i>v</i> is de
clared in a |
| 2113 * superclass of <i>C</i>. | 2111 * superclass of <i>C</i>. |
| 2114 * | 2112 * |
| 2115 * @param superName the name of the super class declaring a static member | 2113 * @param superName the name of the super class declaring a static member |
| 2116 */ | 2114 */ |
| 2117 static final StaticWarningCode CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMB
ER = new StaticWarningCode('CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER',
13, "Superclass '%s' declares static member with the same name"); | 2115 static final StaticWarningCode CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMB
ER = new StaticWarningCode('CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER',
14, "Superclass '%s' declares static member with the same name"); |
| 2118 | 2116 |
| 2119 /** | 2117 /** |
| 2120 * 7.2 Getters: It is a static warning if a class declares a static getter nam
ed <i>v</i> and also | 2118 * 7.2 Getters: It is a static warning if a class declares a static getter nam
ed <i>v</i> and also |
| 2121 * has a non-static setter named <i>v=</i>. | 2119 * has a non-static setter named <i>v=</i>. |
| 2122 */ | 2120 */ |
| 2123 static final StaticWarningCode CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER =
new StaticWarningCode('CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER', 14, "Cla
ss '%s' declares non-static setter with the same name"); | 2121 static final StaticWarningCode CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER =
new StaticWarningCode('CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER', 15, "Cla
ss '%s' declares non-static setter with the same name"); |
| 2124 | 2122 |
| 2125 /** | 2123 /** |
| 2126 * 7.3 Setters: It is a static warning if a class declares a static setter nam
ed <i>v=</i> and | 2124 * 7.3 Setters: It is a static warning if a class declares a static setter nam
ed <i>v=</i> and |
| 2127 * also has a non-static member named <i>v</i>. | 2125 * also has a non-static member named <i>v</i>. |
| 2128 */ | 2126 */ |
| 2129 static final StaticWarningCode CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER =
new StaticWarningCode('CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER', 15, "Cla
ss '%s' declares non-static member with the same name"); | 2127 static final StaticWarningCode CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER =
new StaticWarningCode('CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER', 16, "Cla
ss '%s' declares non-static member with the same name"); |
| 2130 | 2128 |
| 2131 /** | 2129 /** |
| 2132 * 12.11.2 Const: Given an instance creation expression of the form <i>const q
(a<sub>1</sub>, | 2130 * 12.11.2 Const: Given an instance creation expression of the form <i>const q
(a<sub>1</sub>, |
| 2133 * … a<sub>n</sub>)</i> it is a static warning if <i>q</i> is the const
ructor of an | 2131 * … a<sub>n</sub>)</i> it is a static warning if <i>q</i> is the const
ructor of an |
| 2134 * abstract class but <i>q</i> is not a factory constructor. | 2132 * abstract class but <i>q</i> is not a factory constructor. |
| 2135 */ | 2133 */ |
| 2136 static final StaticWarningCode CONST_WITH_ABSTRACT_CLASS = new StaticWarningCo
de('CONST_WITH_ABSTRACT_CLASS', 16, "Abstract classes cannot be created with a '
const' expression"); | 2134 static final StaticWarningCode CONST_WITH_ABSTRACT_CLASS = new StaticWarningCo
de('CONST_WITH_ABSTRACT_CLASS', 17, "Abstract classes cannot be created with a '
const' expression"); |
| 2137 | 2135 |
| 2138 /** | 2136 /** |
| 2139 * 12.7 Maps: It is a static warning if the values of any two keys in a map li
teral are equal. | 2137 * 12.7 Maps: It is a static warning if the values of any two keys in a map li
teral are equal. |
| 2140 */ | 2138 */ |
| 2141 static final StaticWarningCode EQUAL_KEYS_IN_MAP = new StaticWarningCode('EQUA
L_KEYS_IN_MAP', 17, "Keys in a map cannot be equal"); | 2139 static final StaticWarningCode EQUAL_KEYS_IN_MAP = new StaticWarningCode('EQUA
L_KEYS_IN_MAP', 18, "Keys in a map cannot be equal"); |
| 2142 | 2140 |
| 2143 /** | 2141 /** |
| 2144 * 14.2 Exports: It is a static warning to export two different libraries with
the same name. | 2142 * 14.2 Exports: It is a static warning to export two different libraries with
the same name. |
| 2145 * | 2143 * |
| 2146 * @param uri1 the uri pointing to a first library | 2144 * @param uri1 the uri pointing to a first library |
| 2147 * @param uri2 the uri pointing to a second library | 2145 * @param uri2 the uri pointing to a second library |
| 2148 * @param name the shared name of the exported libraries | 2146 * @param name the shared name of the exported libraries |
| 2149 */ | 2147 */ |
| 2150 static final StaticWarningCode EXPORT_DUPLICATED_LIBRARY_NAME = new StaticWarn
ingCode('EXPORT_DUPLICATED_LIBRARY_NAME', 18, "The exported libraries '%s' and '
%s' should not have the same name '%s'"); | 2148 static final StaticWarningCode EXPORT_DUPLICATED_LIBRARY_NAME = new StaticWarn
ingCode('EXPORT_DUPLICATED_LIBRARY_NAME', 19, "The exported libraries '%s' and '
%s' should not have the same name '%s'"); |
| 2151 | 2149 |
| 2152 /** | 2150 /** |
| 2153 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > | 2151 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > |
| 2154 * n</i>. | 2152 * n</i>. |
| 2155 * | 2153 * |
| 2156 * @param requiredCount the maximum number of positional arguments | 2154 * @param requiredCount the maximum number of positional arguments |
| 2157 * @param argumentCount the actual number of positional arguments given | 2155 * @param argumentCount the actual number of positional arguments given |
| 2158 * @see #NOT_ENOUGH_REQUIRED_ARGUMENTS | 2156 * @see #NOT_ENOUGH_REQUIRED_ARGUMENTS |
| 2159 */ | 2157 */ |
| 2160 static final StaticWarningCode EXTRA_POSITIONAL_ARGUMENTS = new StaticWarningC
ode('EXTRA_POSITIONAL_ARGUMENTS', 19, "%d positional arguments expected, but %d
found"); | 2158 static final StaticWarningCode EXTRA_POSITIONAL_ARGUMENTS = new StaticWarningC
ode('EXTRA_POSITIONAL_ARGUMENTS', 20, "%d positional arguments expected, but %d
found"); |
| 2161 | 2159 |
| 2162 /** | 2160 /** |
| 2163 * 7.6.1 Generative Constructors: Execution of an initializer of the form <b>t
his</b>.<i>v</i> = | 2161 * 7.6.1 Generative Constructors: Execution of an initializer of the form <b>t
his</b>.<i>v</i> = |
| 2164 * <i>e</i> proceeds as follows: First, the expression <i>e</i> is evaluated t
o an object | 2162 * <i>e</i> proceeds as follows: First, the expression <i>e</i> is evaluated t
o an object |
| 2165 * <i>o</i>. Then, the instance variable <i>v</i> of the object denoted by thi
s is bound to | 2163 * <i>o</i>. Then, the instance variable <i>v</i> of the object denoted by thi
s is bound to |
| 2166 * <i>o</i>. | 2164 * <i>o</i>. |
| 2167 * | 2165 * |
| 2168 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 2166 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
| 2169 * <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 <= | 2167 * <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 <= |
| 2170 * 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>. | 2168 * 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>. |
| 2171 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 2169 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
| 2172 * j <= m</i>. | 2170 * j <= m</i>. |
| 2173 * | 2171 * |
| 2174 * @param initializerType the name of the type of the initializer expression | 2172 * @param initializerType the name of the type of the initializer expression |
| 2175 * @param fieldType the name of the type of the field | 2173 * @param fieldType the name of the type of the field |
| 2176 */ | 2174 */ |
| 2177 static final StaticWarningCode FIELD_INITIALIZER_NOT_ASSIGNABLE = new StaticWa
rningCode('FIELD_INITIALIZER_NOT_ASSIGNABLE', 20, "The initializer type '%s' can
not be assigned to the field type '%s'"); | 2175 static final StaticWarningCode FIELD_INITIALIZER_NOT_ASSIGNABLE = new StaticWa
rningCode('FIELD_INITIALIZER_NOT_ASSIGNABLE', 21, "The initializer type '%s' can
not be assigned to the field type '%s'"); |
| 2178 | 2176 |
| 2179 /** | 2177 /** |
| 2180 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a | 2178 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a |
| 2181 * static warning if the static type of <i>id</i> is not assignable to <i>T<su
b>id</sub></i>. | 2179 * static warning if the static type of <i>id</i> is not assignable to <i>T<su
b>id</sub></i>. |
| 2182 * | 2180 * |
| 2183 * @param parameterType the name of the type of the field formal parameter | 2181 * @param parameterType the name of the type of the field formal parameter |
| 2184 * @param fieldType the name of the type of the field | 2182 * @param fieldType the name of the type of the field |
| 2185 */ | 2183 */ |
| 2186 static final StaticWarningCode FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE = new
StaticWarningCode('FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE', 21, "The parameter
type '%s' is incompatable with the field type '%s'"); | 2184 static final StaticWarningCode FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE = new
StaticWarningCode('FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE', 22, "The parameter
type '%s' is incompatable with the field type '%s'"); |
| 2187 | 2185 |
| 2188 /** | 2186 /** |
| 2189 * 5 Variables: It is a static warning if a library, static or local variable
<i>v</i> is final | 2187 * 5 Variables: It is a static warning if a library, static or local variable
<i>v</i> is final |
| 2190 * and <i>v</i> is not initialized at its point of declaration. | 2188 * and <i>v</i> is not initialized at its point of declaration. |
| 2191 * | 2189 * |
| 2192 * 7.6.1 Generative Constructors: Each final instance variable <i>f</i> declar
ed in the | 2190 * 7.6.1 Generative Constructors: Each final instance variable <i>f</i> declar
ed in the |
| 2193 * immediately enclosing class must have an initializer in <i>k</i>'s initiali
zer list unless it | 2191 * immediately enclosing class must have an initializer in <i>k</i>'s initiali
zer list unless it |
| 2194 * has already been initialized by one of the following means: | 2192 * has already been initialized by one of the following means: |
| 2195 * | 2193 * |
| 2196 * * Initialization at the declaration of <i>f</i>. | 2194 * * Initialization at the declaration of <i>f</i>. |
| 2197 * * Initialization by means of an initializing formal of <i>k</i>. | 2195 * * Initialization by means of an initializing formal of <i>k</i>. |
| 2198 * | 2196 * |
| 2199 * or a static warning occurs. | 2197 * or a static warning occurs. |
| 2200 * | 2198 * |
| 2201 * @param name the name of the uninitialized final variable | 2199 * @param name the name of the uninitialized final variable |
| 2202 */ | 2200 */ |
| 2203 static final StaticWarningCode FINAL_NOT_INITIALIZED = new StaticWarningCode('
FINAL_NOT_INITIALIZED', 22, "The final variable '%s' must be initialized"); | 2201 static final StaticWarningCode FINAL_NOT_INITIALIZED = new StaticWarningCode('
FINAL_NOT_INITIALIZED', 23, "The final variable '%s' must be initialized"); |
| 2204 | 2202 |
| 2205 /** | 2203 /** |
| 2206 * 14.1 Imports: It is a static warning to import two different libraries with
the same name. | 2204 * 14.1 Imports: It is a static warning to import two different libraries with
the same name. |
| 2207 * | 2205 * |
| 2208 * @param uri1 the uri pointing to a first library | 2206 * @param uri1 the uri pointing to a first library |
| 2209 * @param uri2 the uri pointing to a second library | 2207 * @param uri2 the uri pointing to a second library |
| 2210 * @param name the shared name of the imported libraries | 2208 * @param name the shared name of the imported libraries |
| 2211 */ | 2209 */ |
| 2212 static final StaticWarningCode IMPORT_DUPLICATED_LIBRARY_NAME = new StaticWarn
ingCode('IMPORT_DUPLICATED_LIBRARY_NAME', 23, "The imported libraries '%s' and '
%s' should not have the same name '%s'"); | 2210 static final StaticWarningCode IMPORT_DUPLICATED_LIBRARY_NAME = new StaticWarn
ingCode('IMPORT_DUPLICATED_LIBRARY_NAME', 24, "The imported libraries '%s' and '
%s' should not have the same name '%s'"); |
| 2213 | 2211 |
| 2214 /** | 2212 /** |
| 2215 * 8.1.1 Inheritance and Overriding: However, if there are multiple members <i
>m<sub>1</sub>, | 2213 * 8.1.1 Inheritance and Overriding: However, if there are multiple members <i
>m<sub>1</sub>, |
| 2216 * … m<sub>k</sub></i> with the same name <i>n</i> that would be inheri
ted (because | 2214 * … m<sub>k</sub></i> with the same name <i>n</i> that would be inheri
ted (because |
| 2217 * identically named members existed in several superinterfaces) then at most
one member is | 2215 * identically named members existed in several superinterfaces) then at most
one member is |
| 2218 * inherited. | 2216 * inherited. |
| 2219 * | 2217 * |
| 2220 * If some but not all of the <i>m<sub>i</sub>, 1 <= i <= k</i>, are get
ters, or if some but | 2218 * If some but not all of the <i>m<sub>i</sub>, 1 <= i <= k</i>, are get
ters, or if some but |
| 2221 * not all of the <i>m<sub>i</sub></i> are setters, none of the <i>m<sub>i</su
b></i> are | 2219 * not all of the <i>m<sub>i</sub></i> are setters, none of the <i>m<sub>i</su
b></i> are |
| 2222 * inherited, and a static warning is issued. | 2220 * inherited, and a static warning is issued. |
| 2223 */ | 2221 */ |
| 2224 static final StaticWarningCode INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METH
OD = new StaticWarningCode('INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD',
24, "'%s' is inherited as a getter and also a method"); | 2222 static final StaticWarningCode INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METH
OD = new StaticWarningCode('INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD',
25, "'%s' is inherited as a getter and also a method"); |
| 2225 | 2223 |
| 2226 /** | 2224 /** |
| 2227 * 7.1 Instance Methods: It is a static warning if a class <i>C</i> declares a
n instance method | 2225 * 7.1 Instance Methods: It is a static warning if a class <i>C</i> declares a
n instance method |
| 2228 * named <i>n</i> and an accessible static member named <i>n</i> is declared i
n a superclass of | 2226 * named <i>n</i> and an accessible static member named <i>n</i> is declared i
n a superclass of |
| 2229 * <i>C</i>. | 2227 * <i>C</i>. |
| 2230 * | 2228 * |
| 2231 * @param memberName the name of the member with the name conflict | 2229 * @param memberName the name of the member with the name conflict |
| 2232 * @param superclassName the name of the enclosing class that has the static m
ember | 2230 * @param superclassName the name of the enclosing class that has the static m
ember |
| 2233 */ | 2231 */ |
| 2234 static final StaticWarningCode INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_S
TATIC = new StaticWarningCode('INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STA
TIC', 25, "'%s' collides with a static member in the superclass '%s'"); | 2232 static final StaticWarningCode INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_S
TATIC = new StaticWarningCode('INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STA
TIC', 26, "'%s' collides with a static member in the superclass '%s'"); |
| 2235 | 2233 |
| 2236 /** | 2234 /** |
| 2237 * 7.2 Getters: It is a static warning if a getter <i>m1</i> overrides a gette
r <i>m2</i> and the | 2235 * 7.2 Getters: It is a static warning if a getter <i>m1</i> overrides a gette
r <i>m2</i> and the |
| 2238 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>. | 2236 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>. |
| 2239 * | 2237 * |
| 2240 * @param actualReturnTypeName the name of the expected return type | 2238 * @param actualReturnTypeName the name of the expected return type |
| 2241 * @param expectedReturnType the name of the actual return type, not assignabl
e to the | 2239 * @param expectedReturnType the name of the actual return type, not assignabl
e to the |
| 2242 * actualReturnTypeName | 2240 * actualReturnTypeName |
| 2243 * @param className the name of the class where the overridden getter is decla
red | 2241 * @param className the name of the class where the overridden getter is decla
red |
| 2244 * @see #INVALID_METHOD_OVERRIDE_RETURN_TYPE | 2242 * @see #INVALID_METHOD_OVERRIDE_RETURN_TYPE |
| 2245 */ | 2243 */ |
| 2246 static final StaticWarningCode INVALID_GETTER_OVERRIDE_RETURN_TYPE = new Stati
cWarningCode('INVALID_GETTER_OVERRIDE_RETURN_TYPE', 26, "The return type '%s' is
not assignable to '%s' as required from getter it is overriding from '%s'"); | 2244 static final StaticWarningCode INVALID_GETTER_OVERRIDE_RETURN_TYPE = new Stati
cWarningCode('INVALID_GETTER_OVERRIDE_RETURN_TYPE', 27, "The return type '%s' is
not assignable to '%s' as required from getter it is overriding from '%s'"); |
| 2247 | 2245 |
| 2248 /** | 2246 /** |
| 2249 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 2247 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
| 2250 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. | 2248 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. |
| 2251 * | 2249 * |
| 2252 * @param actualParamTypeName the name of the expected parameter type | 2250 * @param actualParamTypeName the name of the expected parameter type |
| 2253 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the | 2251 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the |
| 2254 * actualParamTypeName | 2252 * actualParamTypeName |
| 2255 * @param className the name of the class where the overridden method is decla
red | 2253 * @param className the name of the class where the overridden method is decla
red |
| 2256 */ | 2254 */ |
| 2257 static final StaticWarningCode INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE = new
StaticWarningCode('INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE', 27, "The parameter
type '%s' is not assignable to '%s' as required from method it is overriding fr
om '%s'"); | 2255 static final StaticWarningCode INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE = new
StaticWarningCode('INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE', 28, "The parameter
type '%s' is not assignable to '%s' as required from method it is overriding fr
om '%s'"); |
| 2258 | 2256 |
| 2259 /** | 2257 /** |
| 2260 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 2258 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
| 2261 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. | 2259 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. |
| 2262 * | 2260 * |
| 2263 * @param actualParamTypeName the name of the expected parameter type | 2261 * @param actualParamTypeName the name of the expected parameter type |
| 2264 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the | 2262 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the |
| 2265 * actualParamTypeName | 2263 * actualParamTypeName |
| 2266 * @param className the name of the class where the overridden method is decla
red | 2264 * @param className the name of the class where the overridden method is decla
red |
| 2267 * @see #INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE | 2265 * @see #INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE |
| 2268 */ | 2266 */ |
| 2269 static final StaticWarningCode INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE = new
StaticWarningCode('INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE', 28, "The paramet
er type '%s' is not assignable to '%s' as required by the method it is overridin
g from '%s'"); | 2267 static final StaticWarningCode INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE = new
StaticWarningCode('INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE', 29, "The paramet
er type '%s' is not assignable to '%s' as required by the method it is overridin
g from '%s'"); |
| 2270 | 2268 |
| 2271 /** | 2269 /** |
| 2272 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 2270 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
| 2273 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. | 2271 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. |
| 2274 * | 2272 * |
| 2275 * @param actualParamTypeName the name of the expected parameter type | 2273 * @param actualParamTypeName the name of the expected parameter type |
| 2276 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the | 2274 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the |
| 2277 * actualParamTypeName | 2275 * actualParamTypeName |
| 2278 * @param className the name of the class where the overridden method is decla
red | 2276 * @param className the name of the class where the overridden method is decla
red |
| 2279 */ | 2277 */ |
| 2280 static final StaticWarningCode INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE = n
ew StaticWarningCode('INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE', 29, "The par
ameter type '%s' is not assignable to '%s' as required from method it is overrid
ing from '%s'"); | 2278 static final StaticWarningCode INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE = n
ew StaticWarningCode('INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE', 30, "The par
ameter type '%s' is not assignable to '%s' as required from method it is overrid
ing from '%s'"); |
| 2281 | 2279 |
| 2282 /** | 2280 /** |
| 2283 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 2281 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
| 2284 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. | 2282 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. |
| 2285 * | 2283 * |
| 2286 * @param actualReturnTypeName the name of the expected return type | 2284 * @param actualReturnTypeName the name of the expected return type |
| 2287 * @param expectedReturnType the name of the actual return type, not assignabl
e to the | 2285 * @param expectedReturnType the name of the actual return type, not assignabl
e to the |
| 2288 * actualReturnTypeName | 2286 * actualReturnTypeName |
| 2289 * @param className the name of the class where the overridden method is decla
red | 2287 * @param className the name of the class where the overridden method is decla
red |
| 2290 * @see #INVALID_GETTER_OVERRIDE_RETURN_TYPE | 2288 * @see #INVALID_GETTER_OVERRIDE_RETURN_TYPE |
| 2291 */ | 2289 */ |
| 2292 static final StaticWarningCode INVALID_METHOD_OVERRIDE_RETURN_TYPE = new Stati
cWarningCode('INVALID_METHOD_OVERRIDE_RETURN_TYPE', 30, "The return type '%s' is
not assignable to '%s' as required from method it is overriding from '%s'"); | 2290 static final StaticWarningCode INVALID_METHOD_OVERRIDE_RETURN_TYPE = new Stati
cWarningCode('INVALID_METHOD_OVERRIDE_RETURN_TYPE', 31, "The return type '%s' is
not assignable to '%s' as required from method it is overriding from '%s'"); |
| 2293 | 2291 |
| 2294 /** | 2292 /** |
| 2295 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 2293 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
| 2296 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies
a default value for | 2294 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies
a default value for |
| 2297 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff
erent default value | 2295 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff
erent default value |
| 2298 * for <i>p</i>. | 2296 * for <i>p</i>. |
| 2299 */ | 2297 */ |
| 2300 static final StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED
= new StaticWarningCode('INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED', 31,
"Parameters cannot override default values, this method overrides '%s.%s' where
'%s' has a different value"); | 2298 static final StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED
= new StaticWarningCode('INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED', 32,
"Parameters cannot override default values, this method overrides '%s.%s' where
'%s' has a different value"); |
| 2301 | 2299 |
| 2302 /** | 2300 /** |
| 2303 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 2301 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
| 2304 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies
a default value for | 2302 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies
a default value for |
| 2305 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff
erent default value | 2303 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff
erent default value |
| 2306 * for <i>p</i>. | 2304 * for <i>p</i>. |
| 2307 */ | 2305 */ |
| 2308 static final StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSIT
IONAL = new StaticWarningCode('INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIO
NAL', 32, "Parameters cannot override default values, this method overrides '%s.
%s' where this positional parameter has a different value"); | 2306 static final StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSIT
IONAL = new StaticWarningCode('INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIO
NAL', 33, "Parameters cannot override default values, this method overrides '%s.
%s' where this positional parameter has a different value"); |
| 2309 | 2307 |
| 2310 /** | 2308 /** |
| 2311 * 7.3 Setters: It is a static warning if a setter <i>m1</i> overrides a sette
r <i>m2</i> and the | 2309 * 7.3 Setters: It is a static warning if a setter <i>m1</i> overrides a sette
r <i>m2</i> and the |
| 2312 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>. | 2310 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>. |
| 2313 * | 2311 * |
| 2314 * @param actualParamTypeName the name of the expected parameter type | 2312 * @param actualParamTypeName the name of the expected parameter type |
| 2315 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the | 2313 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the |
| 2316 * actualParamTypeName | 2314 * actualParamTypeName |
| 2317 * @param className the name of the class where the overridden setter is decla
red | 2315 * @param className the name of the class where the overridden setter is decla
red |
| 2318 * @see #INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE | 2316 * @see #INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE |
| 2319 */ | 2317 */ |
| 2320 static final StaticWarningCode INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE = new
StaticWarningCode('INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE', 33, "The paramet
er type '%s' is not assignable to '%s' as required by the setter it is overridin
g from '%s'"); | 2318 static final StaticWarningCode INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE = new
StaticWarningCode('INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE', 34, "The paramet
er type '%s' is not assignable to '%s' as required by the setter it is overridin
g from '%s'"); |
| 2321 | 2319 |
| 2322 /** | 2320 /** |
| 2323 * 12.6 Lists: A run-time list literal <<i>E</i>> [<i>e<sub>1</sub></i>
... | 2321 * 12.6 Lists: A run-time list literal <<i>E</i>> [<i>e<sub>1</sub></i>
... |
| 2324 * <i>e<sub>n</sub></i>] is evaluated as follows: | 2322 * <i>e<sub>n</sub></i>] is evaluated as follows: |
| 2325 * | 2323 * |
| 2326 * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and
second argument | 2324 * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and
second argument |
| 2327 * <i>o<sub>i+1</sub></i><i>, 1 <= i <= n</i> | 2325 * <i>o<sub>i+1</sub></i><i>, 1 <= i <= n</i> |
| 2328 * | 2326 * |
| 2329 * | 2327 * |
| 2330 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 2328 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
| 2331 * <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 <= | 2329 * <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 <= |
| 2332 * 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>. | 2330 * 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>. |
| 2333 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 2331 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
| 2334 * j <= m</i>. | 2332 * j <= m</i>. |
| 2335 */ | 2333 */ |
| 2336 static final StaticWarningCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = new StaticWa
rningCode('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 34, "The element type '%s' cannot
be assigned to the list type '%s'"); | 2334 static final StaticWarningCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = new StaticWa
rningCode('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 35, "The element type '%s' cannot
be assigned to the list type '%s'"); |
| 2337 | 2335 |
| 2338 /** | 2336 /** |
| 2339 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : | 2337 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : |
| 2340 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: | 2338 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: |
| 2341 * | 2339 * |
| 2342 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second | 2340 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second |
| 2343 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> | 2341 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> |
| 2344 * | 2342 * |
| 2345 * | 2343 * |
| 2346 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 2344 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
| 2347 * <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 <= | 2345 * <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 <= |
| 2348 * 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>. | 2346 * 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>. |
| 2349 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 2347 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
| 2350 * j <= m</i>. | 2348 * j <= m</i>. |
| 2351 */ | 2349 */ |
| 2352 static final StaticWarningCode MAP_KEY_TYPE_NOT_ASSIGNABLE = new StaticWarning
Code('MAP_KEY_TYPE_NOT_ASSIGNABLE', 35, "The element type '%s' cannot be assigne
d to the map key type '%s'"); | 2350 static final StaticWarningCode MAP_KEY_TYPE_NOT_ASSIGNABLE = new StaticWarning
Code('MAP_KEY_TYPE_NOT_ASSIGNABLE', 36, "The element type '%s' cannot be assigne
d to the map key type '%s'"); |
| 2353 | 2351 |
| 2354 /** | 2352 /** |
| 2355 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : | 2353 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : |
| 2356 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: | 2354 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: |
| 2357 * | 2355 * |
| 2358 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second | 2356 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second |
| 2359 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> | 2357 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> |
| 2360 * | 2358 * |
| 2361 * | 2359 * |
| 2362 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 2360 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
| 2363 * <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 <= | 2361 * <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 <= |
| 2364 * 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>. | 2362 * 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>. |
| 2365 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 2363 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
| 2366 * j <= m</i>. | 2364 * j <= m</i>. |
| 2367 */ | 2365 */ |
| 2368 static final StaticWarningCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = new StaticWarni
ngCode('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 36, "The element type '%s' cannot be ass
igned to the map value type '%s'"); | 2366 static final StaticWarningCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = new StaticWarni
ngCode('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 37, "The element type '%s' cannot be ass
igned to the map value type '%s'"); |
| 2369 | 2367 |
| 2370 /** | 2368 /** |
| 2371 * 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i>
with argument type | 2369 * 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i>
with argument type |
| 2372 * <i>T</i> and a getter named <i>v</i> with return type <i>S</i>, and <i>T</i
> may not be | 2370 * <i>T</i> and a getter named <i>v</i> with return type <i>S</i>, and <i>T</i
> may not be |
| 2373 * assigned to <i>S</i>. | 2371 * assigned to <i>S</i>. |
| 2374 */ | 2372 */ |
| 2375 static final StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES = new Static
WarningCode('MISMATCHED_GETTER_AND_SETTER_TYPES', 37, "The parameter type for se
tter '%s' is %s which is not assignable to its getter (of type %s)"); | 2373 static final StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES = new Static
WarningCode('MISMATCHED_GETTER_AND_SETTER_TYPES', 38, "The parameter type for se
tter '%s' is %s which is not assignable to its getter (of type %s)"); |
| 2376 | 2374 |
| 2377 /** | 2375 /** |
| 2378 * 12.11.1 New: It is a static warning if <i>q</i> is a constructor of an abst
ract class and | 2376 * 12.11.1 New: It is a static warning if <i>q</i> is a constructor of an abst
ract class and |
| 2379 * <i>q</i> is not a factory constructor. | 2377 * <i>q</i> is not a factory constructor. |
| 2380 */ | 2378 */ |
| 2381 static final StaticWarningCode NEW_WITH_ABSTRACT_CLASS = new StaticWarningCode
('NEW_WITH_ABSTRACT_CLASS', 38, "Abstract classes cannot be created with a 'new'
expression"); | 2379 static final StaticWarningCode NEW_WITH_ABSTRACT_CLASS = new StaticWarningCode
('NEW_WITH_ABSTRACT_CLASS', 39, "Abstract classes cannot be created with a 'new'
expression"); |
| 2382 | 2380 |
| 2383 /** | 2381 /** |
| 2384 * 15.8 Parameterized Types: Any use of a malbounded type gives rise to a stat
ic warning. | 2382 * 15.8 Parameterized Types: Any use of a malbounded type gives rise to a stat
ic warning. |
| 2385 * | 2383 * |
| 2386 * @param typeName the name of the type being referenced (<i>S</i>) | 2384 * @param typeName the name of the type being referenced (<i>S</i>) |
| 2387 * @param parameterCount the number of type parameters that were declared | 2385 * @param parameterCount the number of type parameters that were declared |
| 2388 * @param argumentCount the number of type arguments provided | 2386 * @param argumentCount the number of type arguments provided |
| 2389 * @see CompileTimeErrorCode#CONST_WITH_INVALID_TYPE_PARAMETERS | 2387 * @see CompileTimeErrorCode#CONST_WITH_INVALID_TYPE_PARAMETERS |
| 2390 * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS | 2388 * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS |
| 2391 */ | 2389 */ |
| 2392 static final StaticWarningCode NEW_WITH_INVALID_TYPE_PARAMETERS = new StaticWa
rningCode('NEW_WITH_INVALID_TYPE_PARAMETERS', 39, "The type '%s' is declared wit
h %d type parameters, but %d type arguments were given"); | 2390 static final StaticWarningCode NEW_WITH_INVALID_TYPE_PARAMETERS = new StaticWa
rningCode('NEW_WITH_INVALID_TYPE_PARAMETERS', 40, "The type '%s' is declared wit
h %d type parameters, but %d type arguments were given"); |
| 2393 | 2391 |
| 2394 /** | 2392 /** |
| 2395 * 12.11.1 New: It is a static warning if <i>T</i> is not a class accessible i
n the current scope, | 2393 * 12.11.1 New: It is a static warning if <i>T</i> is not a class accessible i
n the current scope, |
| 2396 * optionally followed by type arguments. | 2394 * optionally followed by type arguments. |
| 2397 * | 2395 * |
| 2398 * @param name the name of the non-type element | 2396 * @param name the name of the non-type element |
| 2399 */ | 2397 */ |
| 2400 static final StaticWarningCode NEW_WITH_NON_TYPE = new StaticWarningCode('NEW_
WITH_NON_TYPE', 40, "The name '%s' is not a class"); | 2398 static final StaticWarningCode NEW_WITH_NON_TYPE = new StaticWarningCode('NEW_
WITH_NON_TYPE', 41, "The name '%s' is not a class"); |
| 2401 | 2399 |
| 2402 /** | 2400 /** |
| 2403 * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the
current scope then: | 2401 * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the
current scope then: |
| 2404 * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, …, a<sub>n<
/sub>, | 2402 * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, …, a<sub>n<
/sub>, |
| 2405 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a | 2403 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a |
| 2406 * static warning if <i>T.id</i> is not the name of a constructor declared by
the type <i>T</i>. | 2404 * static warning if <i>T.id</i> is not the name of a constructor declared by
the type <i>T</i>. |
| 2407 * If <i>e</i> of the form <i>new T(a<sub>1</sub>, …, a<sub>n</sub>, x<
sub>n+1</sub>: | 2405 * If <i>e</i> of the form <i>new T(a<sub>1</sub>, …, a<sub>n</sub>, x<
sub>n+1</sub>: |
| 2408 * a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a sta
tic warning if the | 2406 * a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a sta
tic warning if the |
| 2409 * type <i>T</i> does not declare a constructor with the same name as the decl
aration of <i>T</i>. | 2407 * type <i>T</i> does not declare a constructor with the same name as the decl
aration of <i>T</i>. |
| 2410 */ | 2408 */ |
| 2411 static final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR = new StaticWarn
ingCode('NEW_WITH_UNDEFINED_CONSTRUCTOR', 41, "The class '%s' does not have a co
nstructor '%s'"); | 2409 static final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR = new StaticWarn
ingCode('NEW_WITH_UNDEFINED_CONSTRUCTOR', 42, "The class '%s' does not have a co
nstructor '%s'"); |
| 2412 | 2410 |
| 2413 /** | 2411 /** |
| 2414 * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the
current scope then: | 2412 * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the
current scope then: |
| 2415 * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, …, a<sub>n<
/sub>, | 2413 * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, …, a<sub>n<
/sub>, |
| 2416 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a | 2414 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a |
| 2417 * static warning if <i>T.id</i> is not the name of a constructor declared by
the type <i>T</i>. | 2415 * static warning if <i>T.id</i> is not the name of a constructor declared by
the type <i>T</i>. |
| 2418 * If <i>e</i> of the form <i>new T(a<sub>1</sub>, …, a<sub>n</sub>, x<
sub>n+1</sub>: | 2416 * If <i>e</i> of the form <i>new T(a<sub>1</sub>, …, a<sub>n</sub>, x<
sub>n+1</sub>: |
| 2419 * a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a sta
tic warning if the | 2417 * a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a sta
tic warning if the |
| 2420 * type <i>T</i> does not declare a constructor with the same name as the decl
aration of <i>T</i>. | 2418 * type <i>T</i> does not declare a constructor with the same name as the decl
aration of <i>T</i>. |
| 2421 */ | 2419 */ |
| 2422 static final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = new St
aticWarningCode('NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 42, "The class '%s' do
es not have a default constructor"); | 2420 static final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = new St
aticWarningCode('NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 43, "The class '%s' do
es not have a default constructor"); |
| 2423 | 2421 |
| 2424 /** | 2422 /** |
| 2425 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an | 2423 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an |
| 2426 * abstract method. | 2424 * abstract method. |
| 2427 * | 2425 * |
| 2428 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class | 2426 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not declar
e its own |
| 2429 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a | 2427 * <i>noSuchMethod()</i> method. It is a static warning if the implicit interf
ace of <i>C</i> |
| 2430 * corresponding instance member <i>m</i>. | 2428 * includes an instance member <i>m</i> of type <i>F</i> and <i>C</i> does not
declare or inherit |
| 2429 * a corresponding instance member <i>m</i> of type <i>F'</i> such that <i>F'
<: F</i>. |
| 2430 * |
| 2431 * 7.4 Abstract Instance Members: It is a static warning if an abstract member
is declared or |
| 2432 * inherited in a concrete class unless that member overrides a concrete one. |
| 2431 * | 2433 * |
| 2432 * @param memberName the name of the first member | 2434 * @param memberName the name of the first member |
| 2433 * @param memberName the name of the second member | 2435 * @param memberName the name of the second member |
| 2434 * @param memberName the name of the third member | 2436 * @param memberName the name of the third member |
| 2435 * @param memberName the name of the fourth member | 2437 * @param memberName the name of the fourth member |
| 2436 * @param additionalCount the number of additional missing members that aren't
listed | 2438 * @param additionalCount the number of additional missing members that aren't
listed |
| 2437 */ | 2439 */ |
| 2438 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIV
E_PLUS = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE
_PLUS', 43, "Missing inherited members: '%s', '%s', '%s', '%s' and %d more"); | 2440 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIV
E_PLUS = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE
_PLUS', 44, "Missing inherited members: '%s', '%s', '%s', '%s' and %d more"); |
| 2439 | 2441 |
| 2440 /** | 2442 /** |
| 2441 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an | 2443 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an |
| 2442 * abstract method. | 2444 * abstract method. |
| 2443 * | 2445 * |
| 2444 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class | 2446 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not declar
e its own |
| 2445 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a | 2447 * <i>noSuchMethod()</i> method. It is a static warning if the implicit interf
ace of <i>C</i> |
| 2446 * corresponding instance member <i>m</i>. | 2448 * includes an instance member <i>m</i> of type <i>F</i> and <i>C</i> does not
declare or inherit |
| 2449 * a corresponding instance member <i>m</i> of type <i>F'</i> such that <i>F'
<: F</i>. |
| 2450 * |
| 2451 * 7.4 Abstract Instance Members: It is a static warning if an abstract member
is declared or |
| 2452 * inherited in a concrete class unless that member overrides a concrete one. |
| 2447 * | 2453 * |
| 2448 * @param memberName the name of the first member | 2454 * @param memberName the name of the first member |
| 2449 * @param memberName the name of the second member | 2455 * @param memberName the name of the second member |
| 2450 * @param memberName the name of the third member | 2456 * @param memberName the name of the third member |
| 2451 * @param memberName the name of the fourth member | 2457 * @param memberName the name of the fourth member |
| 2452 */ | 2458 */ |
| 2453 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOU
R = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR', 44
, "Missing inherited members: '%s', '%s', '%s' and '%s'"); | 2459 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOU
R = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR', 45
, "Missing inherited members: '%s', '%s', '%s' and '%s'"); |
| 2454 | 2460 |
| 2455 /** | 2461 /** |
| 2456 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an | 2462 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an |
| 2457 * abstract method. | 2463 * abstract method. |
| 2458 * | 2464 * |
| 2459 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class | 2465 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not declar
e its own |
| 2460 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a | 2466 * <i>noSuchMethod()</i> method. It is a static warning if the implicit interf
ace of <i>C</i> |
| 2461 * corresponding instance member <i>m</i>. | 2467 * includes an instance member <i>m</i> of type <i>F</i> and <i>C</i> does not
declare or inherit |
| 2468 * a corresponding instance member <i>m</i> of type <i>F'</i> such that <i>F'
<: F</i>. |
| 2469 * |
| 2470 * 7.4 Abstract Instance Members: It is a static warning if an abstract member
is declared or |
| 2471 * inherited in a concrete class unless that member overrides a concrete one. |
| 2462 * | 2472 * |
| 2463 * @param memberName the name of the member | 2473 * @param memberName the name of the member |
| 2464 */ | 2474 */ |
| 2465 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE
= new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE', 45,
"Missing inherited member '%s'"); | 2475 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE
= new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE', 46,
"Missing inherited member '%s'"); |
| 2466 | 2476 |
| 2467 /** | 2477 /** |
| 2468 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an | 2478 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an |
| 2469 * abstract method. | 2479 * abstract method. |
| 2470 * | 2480 * |
| 2471 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class | 2481 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not declar
e its own |
| 2472 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a | 2482 * <i>noSuchMethod()</i> method. It is a static warning if the implicit interf
ace of <i>C</i> |
| 2473 * corresponding instance member <i>m</i>. | 2483 * includes an instance member <i>m</i> of type <i>F</i> and <i>C</i> does not
declare or inherit |
| 2484 * a corresponding instance member <i>m</i> of type <i>F'</i> such that <i>F'
<: F</i>. |
| 2485 * |
| 2486 * 7.4 Abstract Instance Members: It is a static warning if an abstract member
is declared or |
| 2487 * inherited in a concrete class unless that member overrides a concrete one. |
| 2474 * | 2488 * |
| 2475 * @param memberName the name of the first member | 2489 * @param memberName the name of the first member |
| 2476 * @param memberName the name of the second member | 2490 * @param memberName the name of the second member |
| 2477 * @param memberName the name of the third member | 2491 * @param memberName the name of the third member |
| 2478 */ | 2492 */ |
| 2479 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THR
EE = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE',
46, "Missing inherited members: '%s', '%s' and '%s'"); | 2493 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THR
EE = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE',
47, "Missing inherited members: '%s', '%s' and '%s'"); |
| 2480 | 2494 |
| 2481 /** | 2495 /** |
| 2482 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an | 2496 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an |
| 2483 * abstract method. | 2497 * abstract method. |
| 2484 * | 2498 * |
| 2485 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class | 2499 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not declar
e its own |
| 2486 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a | 2500 * <i>noSuchMethod()</i> method. It is a static warning if the implicit interf
ace of <i>C</i> |
| 2487 * corresponding instance member <i>m</i>. | 2501 * includes an instance member <i>m</i> of type <i>F</i> and <i>C</i> does not
declare or inherit |
| 2502 * a corresponding instance member <i>m</i> of type <i>F'</i> such that <i>F'
<: F</i>. |
| 2503 * |
| 2504 * 7.4 Abstract Instance Members: It is a static warning if an abstract member
is declared or |
| 2505 * inherited in a concrete class unless that member overrides a concrete one. |
| 2488 * | 2506 * |
| 2489 * @param memberName the name of the first member | 2507 * @param memberName the name of the first member |
| 2490 * @param memberName the name of the second member | 2508 * @param memberName the name of the second member |
| 2491 */ | 2509 */ |
| 2492 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO
= new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO', 47,
"Missing inherited members: '%s' and '%s'"); | 2510 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO
= new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO', 48,
"Missing inherited members: '%s' and '%s'"); |
| 2493 | 2511 |
| 2494 /** | 2512 /** |
| 2495 * 13.11 Try: An on-catch clause of the form <i>on T catch (p<sub>1</sub>, p<s
ub>2</sub>) s</i> or | 2513 * 13.11 Try: An on-catch clause of the form <i>on T catch (p<sub>1</sub>, p<s
ub>2</sub>) s</i> or |
| 2496 * <i>on T s</i> matches an object <i>o</i> if the type of <i>o</i> is a subty
pe of <i>T</i>. It | 2514 * <i>on T s</i> matches an object <i>o</i> if the type of <i>o</i> is a subty
pe of <i>T</i>. It |
| 2497 * is a static warning if <i>T</i> does not denote a type available in the lex
ical scope of the | 2515 * is a static warning if <i>T</i> does not denote a type available in the lex
ical scope of the |
| 2498 * catch clause. | 2516 * catch clause. |
| 2499 * | 2517 * |
| 2500 * @param name the name of the non-type element | 2518 * @param name the name of the non-type element |
| 2501 */ | 2519 */ |
| 2502 static final StaticWarningCode NON_TYPE_IN_CATCH_CLAUSE = new StaticWarningCod
e('NON_TYPE_IN_CATCH_CLAUSE', 48, "The name '%s' is not a type and cannot be use
d in an on-catch clause"); | 2520 static final StaticWarningCode NON_TYPE_IN_CATCH_CLAUSE = new StaticWarningCod
e('NON_TYPE_IN_CATCH_CLAUSE', 49, "The name '%s' is not a type and cannot be use
d in an on-catch clause"); |
| 2503 | 2521 |
| 2504 /** | 2522 /** |
| 2505 * 7.1.1 Operators: It is a static warning if the return type of the user-decl
ared operator []= is | 2523 * 7.1.1 Operators: It is a static warning if the return type of the user-decl
ared operator []= is |
| 2506 * explicitly declared and not void. | 2524 * explicitly declared and not void. |
| 2507 */ | 2525 */ |
| 2508 static final StaticWarningCode NON_VOID_RETURN_FOR_OPERATOR = new StaticWarnin
gCode('NON_VOID_RETURN_FOR_OPERATOR', 49, "The return type of the operator []= m
ust be 'void'"); | 2526 static final StaticWarningCode NON_VOID_RETURN_FOR_OPERATOR = new StaticWarnin
gCode('NON_VOID_RETURN_FOR_OPERATOR', 50, "The return type of the operator []= m
ust be 'void'"); |
| 2509 | 2527 |
| 2510 /** | 2528 /** |
| 2511 * 7.3 Setters: It is a static warning if a setter declares a return type othe
r than void. | 2529 * 7.3 Setters: It is a static warning if a setter declares a return type othe
r than void. |
| 2512 */ | 2530 */ |
| 2513 static final StaticWarningCode NON_VOID_RETURN_FOR_SETTER = new StaticWarningC
ode('NON_VOID_RETURN_FOR_SETTER', 50, "The return type of the setter must be 'vo
id'"); | 2531 static final StaticWarningCode NON_VOID_RETURN_FOR_SETTER = new StaticWarningC
ode('NON_VOID_RETURN_FOR_SETTER', 51, "The return type of the setter must be 'vo
id'"); |
| 2514 | 2532 |
| 2515 /** | 2533 /** |
| 2516 * 15.1 Static Types: A type <i>T</i> is malformed iff: * <i>T</i> has the for
m <i>id</i> or the | 2534 * 15.1 Static Types: A type <i>T</i> is malformed iff: * <i>T</i> has the for
m <i>id</i> or the |
| 2517 * form <i>prefix.id</i>, and in the enclosing lexical scope, the name <i>id</
i> (respectively | 2535 * form <i>prefix.id</i>, and in the enclosing lexical scope, the name <i>id</
i> (respectively |
| 2518 * <i>prefix.id</i>) does not denote a type. * <i>T</i> denotes a type variabl
e in the | 2536 * <i>prefix.id</i>) does not denote a type. * <i>T</i> denotes a type variabl
e in the |
| 2519 * enclosing lexical scope, but occurs in the signature or body of a static me
mber. * | 2537 * enclosing lexical scope, but occurs in the signature or body of a static me
mber. * |
| 2520 * <i>T</i> is a parameterized type of the form <i>G<S<sub>1</sub>, .., S<s
ub>n</sub>></i>, | 2538 * <i>T</i> is a parameterized type of the form <i>G<S<sub>1</sub>, .., S<s
ub>n</sub>></i>, |
| 2521 * and <i>G</i> is malformed. | 2539 * and <i>G</i> is malformed. |
| 2522 * | 2540 * |
| 2523 * Any use of a malformed type gives rise to a static warning. | 2541 * Any use of a malformed type gives rise to a static warning. |
| 2524 * | 2542 * |
| 2525 * @param nonTypeName the name that is not a type | 2543 * @param nonTypeName the name that is not a type |
| 2526 */ | 2544 */ |
| 2527 static final StaticWarningCode NOT_A_TYPE = new StaticWarningCode('NOT_A_TYPE'
, 51, "%s is not a type"); | 2545 static final StaticWarningCode NOT_A_TYPE = new StaticWarningCode('NOT_A_TYPE'
, 52, "%s is not a type"); |
| 2528 | 2546 |
| 2529 /** | 2547 /** |
| 2530 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > | 2548 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > |
| 2531 * n</i>. | 2549 * n</i>. |
| 2532 * | 2550 * |
| 2533 * @param requiredCount the expected number of required arguments | 2551 * @param requiredCount the expected number of required arguments |
| 2534 * @param argumentCount the actual number of positional arguments given | 2552 * @param argumentCount the actual number of positional arguments given |
| 2535 * @see #EXTRA_POSITIONAL_ARGUMENTS | 2553 * @see #EXTRA_POSITIONAL_ARGUMENTS |
| 2536 */ | 2554 */ |
| 2537 static final StaticWarningCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new StaticWarni
ngCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', 52, "%d required argument(s) expected, b
ut %d found"); | 2555 static final StaticWarningCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new StaticWarni
ngCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', 53, "%d required argument(s) expected, b
ut %d found"); |
| 2538 | 2556 |
| 2539 /** | 2557 /** |
| 2540 * 14.3 Parts: It is a static warning if the referenced part declaration <i>p<
/i> names a library | 2558 * 14.3 Parts: It is a static warning if the referenced part declaration <i>p<
/i> names a library |
| 2541 * other than the current library as the library to which <i>p</i> belongs. | 2559 * other than the current library as the library to which <i>p</i> belongs. |
| 2542 * | 2560 * |
| 2543 * @param expectedLibraryName the name of expected library name | 2561 * @param expectedLibraryName the name of expected library name |
| 2544 * @param actualLibraryName the non-matching actual library name from the "par
t of" declaration | 2562 * @param actualLibraryName the non-matching actual library name from the "par
t of" declaration |
| 2545 */ | 2563 */ |
| 2546 static final StaticWarningCode PART_OF_DIFFERENT_LIBRARY = new StaticWarningCo
de('PART_OF_DIFFERENT_LIBRARY', 53, "Expected this library to be part of '%s', n
ot '%s'"); | 2564 static final StaticWarningCode PART_OF_DIFFERENT_LIBRARY = new StaticWarningCo
de('PART_OF_DIFFERENT_LIBRARY', 54, "Expected this library to be part of '%s', n
ot '%s'"); |
| 2547 | 2565 |
| 2548 /** | 2566 /** |
| 2549 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> i
s not a subtype of | 2567 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> i
s not a subtype of |
| 2550 * the type of <i>k</i>. | 2568 * the type of <i>k</i>. |
| 2551 * | 2569 * |
| 2552 * @param redirectedName the name of the redirected constructor | 2570 * @param redirectedName the name of the redirected constructor |
| 2553 * @param redirectingName the name of the redirecting constructor | 2571 * @param redirectingName the name of the redirecting constructor |
| 2554 */ | 2572 */ |
| 2555 static final StaticWarningCode REDIRECT_TO_INVALID_FUNCTION_TYPE = new StaticW
arningCode('REDIRECT_TO_INVALID_FUNCTION_TYPE', 54, "The redirected constructor
'%s' has incompatible parameters with '%s'"); | 2573 static final StaticWarningCode REDIRECT_TO_INVALID_FUNCTION_TYPE = new StaticW
arningCode('REDIRECT_TO_INVALID_FUNCTION_TYPE', 55, "The redirected constructor
'%s' has incompatible parameters with '%s'"); |
| 2556 | 2574 |
| 2557 /** | 2575 /** |
| 2558 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> i
s not a subtype of | 2576 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> i
s not a subtype of |
| 2559 * the type of <i>k</i>. | 2577 * the type of <i>k</i>. |
| 2560 * | 2578 * |
| 2561 * @param redirectedName the name of the redirected constructor return type | 2579 * @param redirectedName the name of the redirected constructor return type |
| 2562 * @param redirectingName the name of the redirecting constructor return type | 2580 * @param redirectingName the name of the redirecting constructor return type |
| 2563 */ | 2581 */ |
| 2564 static final StaticWarningCode REDIRECT_TO_INVALID_RETURN_TYPE = new StaticWar
ningCode('REDIRECT_TO_INVALID_RETURN_TYPE', 55, "The return type '%s' of the red
irected constructor is not a subclass of '%s'"); | 2582 static final StaticWarningCode REDIRECT_TO_INVALID_RETURN_TYPE = new StaticWar
ningCode('REDIRECT_TO_INVALID_RETURN_TYPE', 56, "The return type '%s' of the red
irected constructor is not a subclass of '%s'"); |
| 2565 | 2583 |
| 2566 /** | 2584 /** |
| 2567 * 7.6.2 Factories: It is a static warning if type does not denote a class acc
essible in the | 2585 * 7.6.2 Factories: It is a static warning if type does not denote a class acc
essible in the |
| 2568 * current scope; if type does denote such a class <i>C</i> it is a static war
ning if the | 2586 * current scope; if type does denote such a class <i>C</i> it is a static war
ning if the |
| 2569 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const
ructor of <i>C</i>. | 2587 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const
ructor of <i>C</i>. |
| 2570 */ | 2588 */ |
| 2571 static final StaticWarningCode REDIRECT_TO_MISSING_CONSTRUCTOR = new StaticWar
ningCode('REDIRECT_TO_MISSING_CONSTRUCTOR', 56, "The constructor '%s' could not
be found in '%s'"); | 2589 static final StaticWarningCode REDIRECT_TO_MISSING_CONSTRUCTOR = new StaticWar
ningCode('REDIRECT_TO_MISSING_CONSTRUCTOR', 57, "The constructor '%s' could not
be found in '%s'"); |
| 2572 | 2590 |
| 2573 /** | 2591 /** |
| 2574 * 7.6.2 Factories: It is a static warning if type does not denote a class acc
essible in the | 2592 * 7.6.2 Factories: It is a static warning if type does not denote a class acc
essible in the |
| 2575 * current scope; if type does denote such a class <i>C</i> it is a static war
ning if the | 2593 * current scope; if type does denote such a class <i>C</i> it is a static war
ning if the |
| 2576 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const
ructor of <i>C</i>. | 2594 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const
ructor of <i>C</i>. |
| 2577 */ | 2595 */ |
| 2578 static final StaticWarningCode REDIRECT_TO_NON_CLASS = new StaticWarningCode('
REDIRECT_TO_NON_CLASS', 57, "The name '%s' is not a type and cannot be used in a
redirected constructor"); | 2596 static final StaticWarningCode REDIRECT_TO_NON_CLASS = new StaticWarningCode('
REDIRECT_TO_NON_CLASS', 58, "The name '%s' is not a type and cannot be used in a
redirected constructor"); |
| 2579 | 2597 |
| 2580 /** | 2598 /** |
| 2581 * 13.11 Return: Let <i>f</i> be the function immediately enclosing a return s
tatement of the form | 2599 * 13.11 Return: Let <i>f</i> be the function immediately enclosing a return s
tatement of the form |
| 2582 * <i>return;</i> It is a static warning if both of the following conditions h
old: | 2600 * <i>return;</i> It is a static warning if both of the following conditions h
old: |
| 2583 * <ol> | 2601 * <ol> |
| 2584 * * <i>f</i> is not a generative constructor. | 2602 * * <i>f</i> is not a generative constructor. |
| 2585 * * The return type of <i>f</i> may not be assigned to void. | 2603 * * The return type of <i>f</i> may not be assigned to void. |
| 2586 * </ol> | 2604 * </ol> |
| 2587 */ | 2605 */ |
| 2588 static final StaticWarningCode RETURN_WITHOUT_VALUE = new StaticWarningCode('R
ETURN_WITHOUT_VALUE', 58, "Missing return value after 'return'"); | 2606 static final StaticWarningCode RETURN_WITHOUT_VALUE = new StaticWarningCode('R
ETURN_WITHOUT_VALUE', 59, "Missing return value after 'return'"); |
| 2589 | 2607 |
| 2590 /** | 2608 /** |
| 2591 * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not decl
are a static method | 2609 * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not decl
are a static method |
| 2592 * or getter <i>m</i>. | 2610 * or getter <i>m</i>. |
| 2593 * | 2611 * |
| 2594 * @param memberName the name of the instance member | 2612 * @param memberName the name of the instance member |
| 2595 */ | 2613 */ |
| 2596 static final StaticWarningCode STATIC_ACCESS_TO_INSTANCE_MEMBER = new StaticWa
rningCode('STATIC_ACCESS_TO_INSTANCE_MEMBER', 59, "Instance member '%s' cannot b
e accessed using static access"); | 2614 static final StaticWarningCode STATIC_ACCESS_TO_INSTANCE_MEMBER = new StaticWa
rningCode('STATIC_ACCESS_TO_INSTANCE_MEMBER', 60, "Instance member '%s' cannot b
e accessed using static access"); |
| 2597 | 2615 |
| 2598 /** | 2616 /** |
| 2599 * 13.9 Switch: It is a static warning if the type of <i>e</i> may not be assi
gned to the type of | 2617 * 13.9 Switch: It is a static warning if the type of <i>e</i> may not be assi
gned to the type of |
| 2600 * <i>e<sub>k</sub></i>. | 2618 * <i>e<sub>k</sub></i>. |
| 2601 */ | 2619 */ |
| 2602 static final StaticWarningCode SWITCH_EXPRESSION_NOT_ASSIGNABLE = new StaticWa
rningCode('SWITCH_EXPRESSION_NOT_ASSIGNABLE', 60, "Type '%s' of the switch expre
ssion is not assignable to the type '%s' of case expressions"); | 2620 static final StaticWarningCode SWITCH_EXPRESSION_NOT_ASSIGNABLE = new StaticWa
rningCode('SWITCH_EXPRESSION_NOT_ASSIGNABLE', 61, "Type '%s' of the switch expre
ssion is not assignable to the type '%s' of case expressions"); |
| 2603 | 2621 |
| 2604 /** | 2622 /** |
| 2605 * 12.31 Type Test: It is a static warning if <i>T</i> does not denote a type
available in the | 2623 * 12.31 Type Test: It is a static warning if <i>T</i> does not denote a type
available in the |
| 2606 * current lexical scope. | 2624 * current lexical scope. |
| 2607 */ | 2625 */ |
| 2608 static final StaticWarningCode TYPE_TEST_NON_TYPE = new StaticWarningCode('TYP
E_TEST_NON_TYPE', 61, "The name '%s' is not a type and cannot be used in an 'is'
expression"); | 2626 static final StaticWarningCode TYPE_TEST_NON_TYPE = new StaticWarningCode('TYP
E_TEST_NON_TYPE', 62, "The name '%s' is not a type and cannot be used in an 'is'
expression"); |
| 2609 | 2627 |
| 2610 /** | 2628 /** |
| 2611 * 10 Generics: However, a type parameter is considered to be a malformed type
when referenced by | 2629 * 10 Generics: However, a type parameter is considered to be a malformed type
when referenced by |
| 2612 * a static member. | 2630 * a static member. |
| 2613 * | 2631 * |
| 2614 * 15.1 Static Types: Any use of a malformed type gives rise to a static warni
ng. A malformed type | 2632 * 15.1 Static Types: Any use of a malformed type gives rise to a static warni
ng. A malformed type |
| 2615 * is then interpreted as dynamic by the static type checker and the runtime. | 2633 * is then interpreted as dynamic by the static type checker and the runtime. |
| 2616 */ | 2634 */ |
| 2617 static final StaticWarningCode TYPE_PARAMETER_REFERENCED_BY_STATIC = new Stati
cWarningCode('TYPE_PARAMETER_REFERENCED_BY_STATIC', 62, "Static members cannot r
eference type parameters"); | 2635 static final StaticWarningCode TYPE_PARAMETER_REFERENCED_BY_STATIC = new Stati
cWarningCode('TYPE_PARAMETER_REFERENCED_BY_STATIC', 63, "Static members cannot r
eference type parameters"); |
| 2618 | 2636 |
| 2619 /** | 2637 /** |
| 2620 * 12.15.3 Static Invocation: A static method invocation <i>i</i> has the form | 2638 * 12.15.3 Static Invocation: A static method invocation <i>i</i> has the form |
| 2621 * <i>C.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</
sub>, … | 2639 * <i>C.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</
sub>, … |
| 2622 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a static warning if <i>C</i> d
oes not denote a | 2640 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a static warning if <i>C</i> d
oes not denote a |
| 2623 * class in the current scope. | 2641 * class in the current scope. |
| 2624 * | 2642 * |
| 2625 * @param undefinedClassName the name of the undefined class | 2643 * @param undefinedClassName the name of the undefined class |
| 2626 */ | 2644 */ |
| 2627 static final StaticWarningCode UNDEFINED_CLASS = new StaticWarningCode('UNDEFI
NED_CLASS', 63, "Undefined class '%s'"); | 2645 static final StaticWarningCode UNDEFINED_CLASS = new StaticWarningCode('UNDEFI
NED_CLASS', 64, "Undefined class '%s'"); |
| 2628 | 2646 |
| 2629 /** | 2647 /** |
| 2630 * Same as [UNDEFINED_CLASS], but to catch using "boolean" instead of "bool". | 2648 * Same as [UNDEFINED_CLASS], but to catch using "boolean" instead of "bool". |
| 2631 */ | 2649 */ |
| 2632 static final StaticWarningCode UNDEFINED_CLASS_BOOLEAN = new StaticWarningCode
('UNDEFINED_CLASS_BOOLEAN', 64, "Undefined class 'boolean'; did you mean 'bool'?
"); | 2650 static final StaticWarningCode UNDEFINED_CLASS_BOOLEAN = new StaticWarningCode
('UNDEFINED_CLASS_BOOLEAN', 65, "Undefined class 'boolean'; did you mean 'bool'?
"); |
| 2633 | 2651 |
| 2634 /** | 2652 /** |
| 2635 * 12.17 Getter Invocation: It is a static warning if there is no class <i>C</
i> in the enclosing | 2653 * 12.17 Getter Invocation: It is a static warning if there is no class <i>C</
i> in the enclosing |
| 2636 * lexical scope of <i>i</i>, or if <i>C</i> does not declare, implicitly or e
xplicitly, a getter | 2654 * lexical scope of <i>i</i>, or if <i>C</i> does not declare, implicitly or e
xplicitly, a getter |
| 2637 * named <i>m</i>. | 2655 * named <i>m</i>. |
| 2638 * | 2656 * |
| 2639 * @param getterName the name of the getter | 2657 * @param getterName the name of the getter |
| 2640 * @param enclosingType the name of the enclosing type where the getter is bei
ng looked for | 2658 * @param enclosingType the name of the enclosing type where the getter is bei
ng looked for |
| 2641 */ | 2659 */ |
| 2642 static final StaticWarningCode UNDEFINED_GETTER = new StaticWarningCode('UNDEF
INED_GETTER', 65, "There is no such getter '%s' in '%s'"); | 2660 static final StaticWarningCode UNDEFINED_GETTER = new StaticWarningCode('UNDEF
INED_GETTER', 66, "There is no such getter '%s' in '%s'"); |
| 2643 | 2661 |
| 2644 /** | 2662 /** |
| 2645 * 12.30 Identifier Reference: It is as static warning if an identifier expres
sion of the form | 2663 * 12.30 Identifier Reference: It is as static warning if an identifier expres
sion of the form |
| 2646 * <i>id</i> occurs inside a top level or static function (be it function, met
hod, getter, or | 2664 * <i>id</i> occurs inside a top level or static function (be it function, met
hod, getter, or |
| 2647 * setter) or variable initializer and there is no declaration <i>d</i> with n
ame <i>id</i> in the | 2665 * setter) or variable initializer and there is no declaration <i>d</i> with n
ame <i>id</i> in the |
| 2648 * lexical scope enclosing the expression. | 2666 * lexical scope enclosing the expression. |
| 2649 */ | 2667 */ |
| 2650 static final StaticWarningCode UNDEFINED_IDENTIFIER = new StaticWarningCode('U
NDEFINED_IDENTIFIER', 66, "Undefined name '%s'"); | 2668 static final StaticWarningCode UNDEFINED_IDENTIFIER = new StaticWarningCode('U
NDEFINED_IDENTIFIER', 67, "Undefined name '%s'"); |
| 2651 | 2669 |
| 2652 /** | 2670 /** |
| 2653 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>,
<i>1<=i<=l</i>, | 2671 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>,
<i>1<=i<=l</i>, |
| 2654 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i
> ... | 2672 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i
> ... |
| 2655 * <i>p<sub>n+k</sub></i>} or a static warning occurs. | 2673 * <i>p<sub>n+k</sub></i>} or a static warning occurs. |
| 2656 * | 2674 * |
| 2657 * @param name the name of the requested named parameter | 2675 * @param name the name of the requested named parameter |
| 2658 */ | 2676 */ |
| 2659 static final StaticWarningCode UNDEFINED_NAMED_PARAMETER = new StaticWarningCo
de('UNDEFINED_NAMED_PARAMETER', 67, "The named parameter '%s' is not defined"); | 2677 static final StaticWarningCode UNDEFINED_NAMED_PARAMETER = new StaticWarningCo
de('UNDEFINED_NAMED_PARAMETER', 68, "The named parameter '%s' is not defined"); |
| 2660 | 2678 |
| 2661 /** | 2679 /** |
| 2662 * 12.18 Assignment: It is as static warning if an assignment of the form <i>v
= e</i> occurs | 2680 * 12.18 Assignment: It is as static warning if an assignment of the form <i>v
= e</i> occurs |
| 2663 * inside a top level or static function (be it function, method, getter, or s
etter) or variable | 2681 * inside a top level or static function (be it function, method, getter, or s
etter) or variable |
| 2664 * initializer and there is no declaration <i>d</i> with name <i>v=</i> in the
lexical scope | 2682 * initializer and there is no declaration <i>d</i> with name <i>v=</i> in the
lexical scope |
| 2665 * enclosing the assignment. | 2683 * enclosing the assignment. |
| 2666 * | 2684 * |
| 2667 * 12.18 Assignment: It is a static warning if there is no class <i>C</i> in t
he enclosing lexical | 2685 * 12.18 Assignment: It is a static warning if there is no class <i>C</i> in t
he enclosing lexical |
| 2668 * scope of the assignment, or if <i>C</i> does not declare, implicitly or exp
licitly, a setter | 2686 * scope of the assignment, or if <i>C</i> does not declare, implicitly or exp
licitly, a setter |
| 2669 * <i>v=</i>. | 2687 * <i>v=</i>. |
| 2670 * | 2688 * |
| 2671 * @param setterName the name of the getter | 2689 * @param setterName the name of the getter |
| 2672 * @param enclosingType the name of the enclosing type where the setter is bei
ng looked for | 2690 * @param enclosingType the name of the enclosing type where the setter is bei
ng looked for |
| 2673 */ | 2691 */ |
| 2674 static final StaticWarningCode UNDEFINED_SETTER = new StaticWarningCode('UNDEF
INED_SETTER', 68, "There is no such setter '%s' in '%s'"); | 2692 static final StaticWarningCode UNDEFINED_SETTER = new StaticWarningCode('UNDEF
INED_SETTER', 69, "There is no such setter '%s' in '%s'"); |
| 2675 | 2693 |
| 2676 /** | 2694 /** |
| 2677 * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not decl
are a static method | 2695 * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not decl
are a static method |
| 2678 * or getter <i>m</i>. | 2696 * or getter <i>m</i>. |
| 2679 * | 2697 * |
| 2680 * @param methodName the name of the method | 2698 * @param methodName the name of the method |
| 2681 * @param enclosingType the name of the enclosing type where the method is bei
ng looked for | 2699 * @param enclosingType the name of the enclosing type where the method is bei
ng looked for |
| 2682 */ | 2700 */ |
| 2683 static final StaticWarningCode UNDEFINED_STATIC_METHOD_OR_GETTER = new StaticW
arningCode('UNDEFINED_STATIC_METHOD_OR_GETTER', 69, "There is no such static met
hod '%s' in '%s'"); | 2701 static final StaticWarningCode UNDEFINED_STATIC_METHOD_OR_GETTER = new StaticW
arningCode('UNDEFINED_STATIC_METHOD_OR_GETTER', 70, "There is no such static met
hod '%s' in '%s'"); |
| 2684 static final List<StaticWarningCode> values = [ | 2702 static final List<StaticWarningCode> values = [ |
| 2685 AMBIGUOUS_IMPORT, | 2703 AMBIGUOUS_IMPORT, |
| 2686 ARGUMENT_TYPE_NOT_ASSIGNABLE, | 2704 ARGUMENT_TYPE_NOT_ASSIGNABLE, |
| 2705 ASSIGNMENT_TO_CONST, |
| 2687 ASSIGNMENT_TO_FINAL, | 2706 ASSIGNMENT_TO_FINAL, |
| 2688 ASSIGNMENT_TO_METHOD, | 2707 ASSIGNMENT_TO_METHOD, |
| 2689 CASE_BLOCK_NOT_TERMINATED, | 2708 CASE_BLOCK_NOT_TERMINATED, |
| 2690 CAST_TO_NON_TYPE, | 2709 CAST_TO_NON_TYPE, |
| 2691 COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE, | 2710 COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE, |
| 2692 COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE, | 2711 COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE, |
| 2693 COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR, | 2712 COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR, |
| 2694 COMMENT_REFERENCE_UNDECLARED_IDENTIFIER, | 2713 COMMENT_REFERENCE_UNDECLARED_IDENTIFIER, |
| 2695 COMMENT_REFERENCE_URI_NOT_LIBRARY, | 2714 COMMENT_REFERENCE_URI_NOT_LIBRARY, |
| 2696 CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, | 2715 CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2804 } | 2823 } |
| 2805 } | 2824 } |
| 2806 /** | 2825 /** |
| 2807 * The enumeration `HtmlWarningCode` defines the error codes used for warnings i
n HTML files. | 2826 * The enumeration `HtmlWarningCode` defines the error codes used for warnings i
n HTML files. |
| 2808 * The convention for this class is for the name of the error code to indicate t
he problem that | 2827 * The convention for this class is for the name of the error code to indicate t
he problem that |
| 2809 * caused the error to be generated and for the error message to explain what is
wrong and, when | 2828 * caused the error to be generated and for the error message to explain what is
wrong and, when |
| 2810 * appropriate, how the problem can be corrected. | 2829 * appropriate, how the problem can be corrected. |
| 2811 * | 2830 * |
| 2812 * @coverage dart.engine.error | 2831 * @coverage dart.engine.error |
| 2813 */ | 2832 */ |
| 2814 class HtmlWarningCode implements Comparable<HtmlWarningCode>, ErrorCode { | 2833 class HtmlWarningCode implements Enum<HtmlWarningCode>, ErrorCode { |
| 2815 | 2834 |
| 2816 /** | 2835 /** |
| 2817 * An error code indicating that the value of the 'src' attribute of a Dart sc
ript tag is not a | 2836 * An error code indicating that the value of the 'src' attribute of a Dart sc
ript tag is not a |
| 2818 * valid URI. | 2837 * valid URI. |
| 2819 * | 2838 * |
| 2820 * @param uri the URI that is invalid | 2839 * @param uri the URI that is invalid |
| 2821 */ | 2840 */ |
| 2822 static final HtmlWarningCode INVALID_URI = new HtmlWarningCode('INVALID_URI',
0, "Invalid URI syntax: '%s'"); | 2841 static final HtmlWarningCode INVALID_URI = new HtmlWarningCode('INVALID_URI',
0, "Invalid URI syntax: '%s'"); |
| 2823 | 2842 |
| 2824 /** | 2843 /** |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2857 String toString() => name; | 2876 String toString() => name; |
| 2858 } | 2877 } |
| 2859 /** | 2878 /** |
| 2860 * The enumeration `StaticTypeWarningCode` defines the error codes used for stat
ic type | 2879 * The enumeration `StaticTypeWarningCode` defines the error codes used for stat
ic type |
| 2861 * warnings. The convention for this class is for the name of the error code to
indicate the problem | 2880 * warnings. The convention for this class is for the name of the error code to
indicate the problem |
| 2862 * that caused the error to be generated and for the error message to explain wh
at is wrong and, | 2881 * that caused the error to be generated and for the error message to explain wh
at is wrong and, |
| 2863 * when appropriate, how the problem can be corrected. | 2882 * when appropriate, how the problem can be corrected. |
| 2864 * | 2883 * |
| 2865 * @coverage dart.engine.error | 2884 * @coverage dart.engine.error |
| 2866 */ | 2885 */ |
| 2867 class StaticTypeWarningCode implements Comparable<StaticTypeWarningCode>, ErrorC
ode { | 2886 class StaticTypeWarningCode implements Enum<StaticTypeWarningCode>, ErrorCode { |
| 2868 | 2887 |
| 2869 /** | 2888 /** |
| 2870 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
It is a static type | 2889 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
It is a static type |
| 2871 * warning if <i>T</i> does not have an accessible instance setter named <i>v=
</i>. | 2890 * warning if <i>T</i> does not have an accessible instance setter named <i>v=
</i>. |
| 2872 * | 2891 * |
| 2873 * @see #UNDEFINED_SETTER | 2892 * @see #UNDEFINED_SETTER |
| 2874 */ | 2893 */ |
| 2875 static final StaticTypeWarningCode INACCESSIBLE_SETTER = new StaticTypeWarning
Code('INACCESSIBLE_SETTER', 0, ""); | 2894 static final StaticTypeWarningCode INACCESSIBLE_SETTER = new StaticTypeWarning
Code('INACCESSIBLE_SETTER', 0, ""); |
| 2876 | 2895 |
| 2877 /** | 2896 /** |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3115 StaticTypeWarningCode(this.name, this.ordinal, String message) { | 3134 StaticTypeWarningCode(this.name, this.ordinal, String message) { |
| 3116 this._message = message; | 3135 this._message = message; |
| 3117 } | 3136 } |
| 3118 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; | 3137 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; |
| 3119 String get message => _message; | 3138 String get message => _message; |
| 3120 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; | 3139 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; |
| 3121 int compareTo(StaticTypeWarningCode other) => ordinal - other.ordinal; | 3140 int compareTo(StaticTypeWarningCode other) => ordinal - other.ordinal; |
| 3122 int get hashCode => ordinal; | 3141 int get hashCode => ordinal; |
| 3123 String toString() => name; | 3142 String toString() => name; |
| 3124 } | 3143 } |
| OLD | NEW |