| 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 * . |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 } | 191 } |
| 192 | 192 |
| 193 /** | 193 /** |
| 194 * Report an error with the given error code and arguments. | 194 * Report an error with the given error code and arguments. |
| 195 * | 195 * |
| 196 * @param errorCode the error code of the error to be reported | 196 * @param errorCode the error code of the error to be reported |
| 197 * @param node the node specifying the location of the error | 197 * @param node the node specifying the location of the error |
| 198 * @param arguments the arguments to the error, used to compose the error mess
age | 198 * @param arguments the arguments to the error, used to compose the error mess
age |
| 199 */ | 199 */ |
| 200 void reportError2(ErrorCode errorCode, ASTNode node, List<Object> arguments) { | 200 void reportError2(ErrorCode errorCode, ASTNode node, List<Object> arguments) { |
| 201 _errorListener.onError(new AnalysisError.con2(_source, node.offset, node.len
gth, errorCode, arguments)); | 201 reportError3(errorCode, node.offset, node.length, arguments); |
| 202 } | 202 } |
| 203 | 203 |
| 204 /** | 204 /** |
| 205 * Report an error with the given error code and arguments. | 205 * Report an error with the given error code and arguments. |
| 206 * | 206 * |
| 207 * @param errorCode the error code of the error to be reported | 207 * @param errorCode the error code of the error to be reported |
| 208 * @param offset the offset of the location of the error | 208 * @param offset the offset of the location of the error |
| 209 * @param length the length of the location of the error | 209 * @param length the length of the location of the error |
| 210 * @param arguments the arguments to the error, used to compose the error mess
age | 210 * @param arguments the arguments to the error, used to compose the error mess
age |
| 211 */ | 211 */ |
| 212 void reportError3(ErrorCode errorCode, int offset, int length, List<Object> ar
guments) { | 212 void reportError3(ErrorCode errorCode, int offset, int length, List<Object> ar
guments) { |
| 213 _errorListener.onError(new AnalysisError.con2(_source, offset, length, error
Code, arguments)); | 213 _errorListener.onError(new AnalysisError.con2(_source, offset, length, error
Code, arguments)); |
| 214 } | 214 } |
| 215 | 215 |
| 216 /** | 216 /** |
| 217 * Report an error with the given error code and arguments. | 217 * Report an error with the given error code and arguments. |
| 218 * | 218 * |
| 219 * @param errorCode the error code of the error to be reported | 219 * @param errorCode the error code of the error to be reported |
| 220 * @param token the token specifying the location of the error | 220 * @param token the token specifying the location of the error |
| 221 * @param arguments the arguments to the error, used to compose the error mess
age | 221 * @param arguments the arguments to the error, used to compose the error mess
age |
| 222 */ | 222 */ |
| 223 void reportError4(ErrorCode errorCode, Token token, List<Object> arguments) { | 223 void reportError4(ErrorCode errorCode, Token token, List<Object> arguments) { |
| 224 _errorListener.onError(new AnalysisError.con2(_source, token.offset, token.l
ength, errorCode, arguments)); | 224 reportError3(errorCode, token.offset, token.length, arguments); |
| 225 } | 225 } |
| 226 | 226 |
| 227 /** | 227 /** |
| 228 * Set the source to be used when reporting errors. Setting the source to `nul
l` will cause | 228 * Set the source to be used when reporting errors. Setting the source to `nul
l` will cause |
| 229 * the default source to be used. | 229 * the default source to be used. |
| 230 * | 230 * |
| 231 * @param source the source to be used when reporting errors | 231 * @param source the source to be used when reporting errors |
| 232 */ | 232 */ |
| 233 void set source(Source source2) { | 233 void set source(Source source2) { |
| 234 this._source = source2 == null ? _defaultSource : source2; | 234 this._source = source2 == null ? _defaultSource : source2; |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 static final List<HintCode> values = [DEAD_CODE, DEAD_CODE_CATCH_FOLLOWING_CAT
CH, DEAD_CODE_ON_CATCH_SUBTYPE]; | 453 static final List<HintCode> values = [ |
| 454 DEAD_CODE, |
| 455 DEAD_CODE_CATCH_FOLLOWING_CATCH, |
| 456 DEAD_CODE_ON_CATCH_SUBTYPE]; |
| 454 | 457 |
| 455 /// The name of this enum constant, as declared in the enum declaration. | 458 /// The name of this enum constant, as declared in the enum declaration. |
| 456 final String name; | 459 final String name; |
| 457 | 460 |
| 458 /// The position in the enum declaration. | 461 /// The position in the enum declaration. |
| 459 final int ordinal; | 462 final int ordinal; |
| 460 | 463 |
| 461 /** | 464 /** |
| 462 * The message template used to create the message to be displayed for this er
ror. | 465 * The message template used to create the message to be displayed for this er
ror. |
| 463 */ | 466 */ |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 /** | 544 /** |
| 542 * Many, but not all, static warnings relate to types, in which case they are
known as static type | 545 * Many, but not all, static warnings relate to types, in which case they are
known as static type |
| 543 * warnings. | 546 * warnings. |
| 544 */ | 547 */ |
| 545 static final ErrorType STATIC_TYPE_WARNING = new ErrorType('STATIC_TYPE_WARNIN
G', 4, ErrorSeverity.WARNING); | 548 static final ErrorType STATIC_TYPE_WARNING = new ErrorType('STATIC_TYPE_WARNIN
G', 4, ErrorSeverity.WARNING); |
| 546 | 549 |
| 547 /** | 550 /** |
| 548 * Syntactic errors are errors produced as a result of input that does not con
form to the grammar. | 551 * Syntactic errors are errors produced as a result of input that does not con
form to the grammar. |
| 549 */ | 552 */ |
| 550 static final ErrorType SYNTACTIC_ERROR = new ErrorType('SYNTACTIC_ERROR', 5, E
rrorSeverity.ERROR); | 553 static final ErrorType SYNTACTIC_ERROR = new ErrorType('SYNTACTIC_ERROR', 5, E
rrorSeverity.ERROR); |
| 551 static final List<ErrorType> values = [HINT, COMPILE_TIME_ERROR, PUB_SUGGESTIO
N, STATIC_WARNING, STATIC_TYPE_WARNING, SYNTACTIC_ERROR]; | 554 static final List<ErrorType> values = [ |
| 555 HINT, |
| 556 COMPILE_TIME_ERROR, |
| 557 PUB_SUGGESTION, |
| 558 STATIC_WARNING, |
| 559 STATIC_TYPE_WARNING, |
| 560 SYNTACTIC_ERROR]; |
| 552 | 561 |
| 553 /// The name of this enum constant, as declared in the enum declaration. | 562 /// The name of this enum constant, as declared in the enum declaration. |
| 554 final String name; | 563 final String name; |
| 555 | 564 |
| 556 /// The position in the enum declaration. | 565 /// The position in the enum declaration. |
| 557 final int ordinal; | 566 final int ordinal; |
| 558 | 567 |
| 559 /** | 568 /** |
| 560 * The severity of this type of error. | 569 * The severity of this type of error. |
| 561 */ | 570 */ |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 | 628 |
| 620 /** | 629 /** |
| 621 * 12.33 Argument Definition Test: It is a compile time error if <i>v</i> does
not denote a formal | 630 * 12.33 Argument Definition Test: It is a compile time error if <i>v</i> does
not denote a formal |
| 622 * parameter. | 631 * parameter. |
| 623 * | 632 * |
| 624 * @param the name of the identifier in the argument definition test that is n
ot a parameter | 633 * @param the name of the identifier in the argument definition test that is n
ot a parameter |
| 625 */ | 634 */ |
| 626 static final CompileTimeErrorCode ARGUMENT_DEFINITION_TEST_NON_PARAMETER = new
CompileTimeErrorCode('ARGUMENT_DEFINITION_TEST_NON_PARAMETER', 2, "'%s' is not
a parameter"); | 635 static final CompileTimeErrorCode ARGUMENT_DEFINITION_TEST_NON_PARAMETER = new
CompileTimeErrorCode('ARGUMENT_DEFINITION_TEST_NON_PARAMETER', 2, "'%s' is not
a parameter"); |
| 627 | 636 |
| 628 /** | 637 /** |
| 638 * 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 |
| 640 * supertype of the type of <i>o<sub>i</sub></i>, i = 1..m. |
| 641 * |
| 642 * 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. |
| 644 * |
| 645 * @param requiredCount the maximum number of positional arguments |
| 646 * @param argumentCount the actual number of positional arguments given |
| 647 */ |
| 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'"); |
| 649 |
| 650 /** |
| 629 * 12.30 Identifier Reference: It is a compile-time error to use a built-in id
entifier other than | 651 * 12.30 Identifier Reference: It is a compile-time error to use a built-in id
entifier other than |
| 630 * dynamic as a type annotation. | 652 * dynamic as a type annotation. |
| 631 */ | 653 */ |
| 632 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"); | 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"); |
| 633 | 655 |
| 634 /** | 656 /** |
| 635 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the | 657 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the |
| 636 * declared name of a class, type parameter or type alias. | 658 * declared name of a class, type parameter or type alias. |
| 637 */ | 659 */ |
| 638 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"); | 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"); |
| 639 | 661 |
| 640 /** | 662 /** |
| 641 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the | 663 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the |
| 642 * declared name of a class, type parameter or type alias. | 664 * declared name of a class, type parameter or type alias. |
| 643 */ | 665 */ |
| 644 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"); | 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"); |
| 645 | 667 |
| 646 /** | 668 /** |
| 647 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the | 669 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the |
| 648 * declared name of a class, type parameter or type alias. | 670 * declared name of a class, type parameter or type alias. |
| 649 */ | 671 */ |
| 650 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"); | 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"); |
| 651 | 673 |
| 652 /** | 674 /** |
| 653 * 13.9 Switch: It is a compile-time error if the class <i>C</i> implements th
e operator | 675 * 13.9 Switch: It is a compile-time error if the class <i>C</i> implements th
e operator |
| 654 * <i>==</i>. | 676 * <i>==</i>. |
| 655 */ | 677 */ |
| 656 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"); | 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"); |
| 657 | 679 |
| 658 /** | 680 /** |
| 659 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time
constant would raise | 681 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time
constant would raise |
| 660 * an exception. | 682 * an exception. |
| 661 */ | 683 */ |
| 662 static final CompileTimeErrorCode COMPILE_TIME_CONSTANT_RAISES_EXCEPTION = new
CompileTimeErrorCode('COMPILE_TIME_CONSTANT_RAISES_EXCEPTION', 8, ""); | 684 static final CompileTimeErrorCode COMPILE_TIME_CONSTANT_RAISES_EXCEPTION = new
CompileTimeErrorCode('COMPILE_TIME_CONSTANT_RAISES_EXCEPTION', 9, ""); |
| 663 | 685 |
| 664 /** | 686 /** |
| 665 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same | 687 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same |
| 666 * name. This restriction holds regardless of whether the getter is defined ex
plicitly or | 688 * name. This restriction holds regardless of whether the getter is defined ex
plicitly or |
| 667 * implicitly, or whether the getter or the method are inherited or not. | 689 * implicitly, or whether the getter or the method are inherited or not. |
| 668 */ | 690 */ |
| 669 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"); | 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"); |
| 670 | 692 |
| 671 /** | 693 /** |
| 672 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same | 694 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same |
| 673 * name. This restriction holds regardless of whether the getter is defined ex
plicitly or | 695 * name. This restriction holds regardless of whether the getter is defined ex
plicitly or |
| 674 * implicitly, or whether the getter or the method are inherited or not. | 696 * implicitly, or whether the getter or the method are inherited or not. |
| 675 */ | 697 */ |
| 676 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"); | 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"); |
| 677 | 699 |
| 678 /** | 700 /** |
| 679 * 7.6 Constructors: A constructor name always begins with the name of its imm
ediately enclosing | 701 * 7.6 Constructors: A constructor name always begins with the name of its imm
ediately enclosing |
| 680 * class, and may optionally be followed by a dot and an identifier <i>id</i>.
It is a | 702 * class, and may optionally be followed by a dot and an identifier <i>id</i>.
It is a |
| 681 * compile-time error if <i>id</i> is the name of a member declared in the imm
ediately enclosing | 703 * compile-time error if <i>id</i> is the name of a member declared in the imm
ediately enclosing |
| 682 * class. | 704 * class. |
| 683 */ | 705 */ |
| 684 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"); | 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"); |
| 685 | 707 |
| 686 /** | 708 /** |
| 687 * 7.6 Constructors: A constructor name always begins with the name of its imm
ediately enclosing | 709 * 7.6 Constructors: A constructor name always begins with the name of its imm
ediately enclosing |
| 688 * class, and may optionally be followed by a dot and an identifier <i>id</i>.
It is a | 710 * class, and may optionally be followed by a dot and an identifier <i>id</i>.
It is a |
| 689 * compile-time error if <i>id</i> is the name of a member declared in the imm
ediately enclosing | 711 * compile-time error if <i>id</i> is the name of a member declared in the imm
ediately enclosing |
| 690 * class. | 712 * class. |
| 691 */ | 713 */ |
| 692 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"); | 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"); |
| 693 | 715 |
| 694 /** | 716 /** |
| 695 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 717 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 696 * uncaught exception being thrown. | 718 * uncaught exception being thrown. |
| 697 */ | 719 */ |
| 698 static final CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION = new Com
pileTimeErrorCode('CONST_CONSTRUCTOR_THROWS_EXCEPTION', 13, "'const' constructor
s cannot throw exceptions"); | 720 static final CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION = new Com
pileTimeErrorCode('CONST_CONSTRUCTOR_THROWS_EXCEPTION', 14, "'const' constructor
s cannot throw exceptions"); |
| 699 | 721 |
| 700 /** | 722 /** |
| 701 * 7.6.3 Constant Constructors: It is a compile-time error if a constant const
ructor is declared | 723 * 7.6.3 Constant Constructors: It is a compile-time error if a constant const
ructor is declared |
| 702 * by a class that has a non-final instance variable. | 724 * by a class that has a non-final instance variable. |
| 703 * | 725 * |
| 704 * The above refers to both locally declared and inherited instance variables. | 726 * The above refers to both locally declared and inherited instance variables. |
| 705 */ | 727 */ |
| 706 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"); | 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"); |
| 707 | 729 |
| 708 /** | 730 /** |
| 709 * 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error
if o is not | 731 * 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error
if o is not |
| 710 * <b>null</b> and the interface of the class of <i>o</i> is not a subtype of
the static type of | 732 * <b>null</b> and the interface of the class of <i>o</i> is not a subtype of
the static type of |
| 711 * the field <i>v</i>. | 733 * the field <i>v</i>. |
| 712 * | 734 * |
| 713 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 735 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 714 * uncaught exception being thrown. | 736 * uncaught exception being thrown. |
| 715 * | 737 * |
| 716 * @param initializerType the name of the type of the initializer expression | 738 * @param initializerType the name of the type of the initializer expression |
| 717 * @param fieldType the name of the type of the field | 739 * @param fieldType the name of the type of the field |
| 718 */ | 740 */ |
| 719 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'"); | 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'"); |
| 720 | 742 |
| 721 /** | 743 /** |
| 722 * 6.2 Formal Parameters: It is a compile-time error if a formal parameter is
declared as a | 744 * 6.2 Formal Parameters: It is a compile-time error if a formal parameter is
declared as a |
| 723 * constant variable. | 745 * constant variable. |
| 724 */ | 746 */ |
| 725 static final CompileTimeErrorCode CONST_FORMAL_PARAMETER = new CompileTimeErro
rCode('CONST_FORMAL_PARAMETER', 16, "Parameters cannot be 'const'"); | 747 static final CompileTimeErrorCode CONST_FORMAL_PARAMETER = new CompileTimeErro
rCode('CONST_FORMAL_PARAMETER', 17, "Parameters cannot be 'const'"); |
| 726 | 748 |
| 727 /** | 749 /** |
| 728 * 5 Variables: A constant variable must be initialized to a compile-time cons
tant or a | 750 * 5 Variables: A constant variable must be initialized to a compile-time cons
tant or a |
| 729 * compile-time error occurs. | 751 * compile-time error occurs. |
| 730 */ | 752 */ |
| 731 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"); | 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"); |
| 732 | 754 |
| 733 /** | 755 /** |
| 734 * 7.5 Instance Variables: It is a compile-time error if an instance variable
is declared to be | 756 * 7.5 Instance Variables: It is a compile-time error if an instance variable
is declared to be |
| 735 * constant. | 757 * constant. |
| 736 */ | 758 */ |
| 737 static final CompileTimeErrorCode CONST_INSTANCE_FIELD = new CompileTimeErrorC
ode('CONST_INSTANCE_FIELD', 18, "Only static fields can be declared as 'const'")
; | 759 static final CompileTimeErrorCode CONST_INSTANCE_FIELD = new CompileTimeErrorC
ode('CONST_INSTANCE_FIELD', 19, "Only static fields can be declared as 'const'")
; |
| 738 | 760 |
| 739 /** | 761 /** |
| 740 * 12.11.2 Const: An expression of one of the forms !e, e1 && e2 or e1 || e2,
where e, e1 and e2 | 762 * 12.11.2 Const: An expression of one of the forms !e, e1 && e2 or e1 || e2,
where e, e1 and e2 |
| 741 * are constant expressions that evaluate to a boolean value. | 763 * are constant expressions that evaluate to a boolean value. |
| 742 */ | 764 */ |
| 743 static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = new CompileTimeErrorC
ode('CONST_EVAL_TYPE_BOOL', 19, "An expression of type 'bool' was expected"); | 765 static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = new CompileTimeErrorC
ode('CONST_EVAL_TYPE_BOOL', 20, "An expression of type 'bool' was expected"); |
| 744 | 766 |
| 745 /** | 767 /** |
| 746 * 12.11.2 Const: An expression of one of the forms e1 == e2 or e1 != e2 where
e1 and e2 are | 768 * 12.11.2 Const: An expression of one of the forms e1 == e2 or e1 != e2 where
e1 and e2 are |
| 747 * constant expressions that evaluate to a numeric, string or boolean value or
to null. | 769 * constant expressions that evaluate to a numeric, string or boolean value or
to null. |
| 748 */ | 770 */ |
| 749 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"); | 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"); |
| 750 | 772 |
| 751 /** | 773 /** |
| 752 * 12.11.2 Const: An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 |
e2, e1 >> e2 or e1 | 774 * 12.11.2 Const: An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 |
e2, e1 >> e2 or e1 |
| 753 * << e2, where e, e1 and e2 are constant expressions that evaluate to an inte
ger value or to | 775 * << e2, where e, e1 and e2 are constant expressions that evaluate to an inte
ger value or to |
| 754 * null. | 776 * null. |
| 755 */ | 777 */ |
| 756 static final CompileTimeErrorCode CONST_EVAL_TYPE_INT = new CompileTimeErrorCo
de('CONST_EVAL_TYPE_INT', 21, "An expression of type 'int' was expected"); | 778 static final CompileTimeErrorCode CONST_EVAL_TYPE_INT = new CompileTimeErrorCo
de('CONST_EVAL_TYPE_INT', 22, "An expression of type 'int' was expected"); |
| 757 | 779 |
| 758 /** | 780 /** |
| 759 * 12.11.2 Const: An expression of one of the forms e, e1 + e2, e1 - e2, e1 *
e2, e1 / e2, e1 ~/ | 781 * 12.11.2 Const: An expression of one of the forms e, e1 + e2, e1 - e2, e1 *
e2, e1 / e2, e1 ~/ |
| 760 * e2, e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are
constant | 782 * e2, e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are
constant |
| 761 * expressions that evaluate to a numeric value or to null.. | 783 * expressions that evaluate to a numeric value or to null.. |
| 762 */ | 784 */ |
| 763 static final CompileTimeErrorCode CONST_EVAL_TYPE_NUM = new CompileTimeErrorCo
de('CONST_EVAL_TYPE_NUM', 22, "An expression of type 'num' was expected"); | 785 static final CompileTimeErrorCode CONST_EVAL_TYPE_NUM = new CompileTimeErrorCo
de('CONST_EVAL_TYPE_NUM', 23, "An expression of type 'num' was expected"); |
| 764 | 786 |
| 765 /** | 787 /** |
| 766 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 788 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 767 * uncaught exception being thrown. | 789 * uncaught exception being thrown. |
| 768 */ | 790 */ |
| 769 static final CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = new CompileTim
eErrorCode('CONST_EVAL_THROWS_EXCEPTION', 23, "Evaluation of this constant expre
ssion causes exception"); | 791 static final CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = new CompileTim
eErrorCode('CONST_EVAL_THROWS_EXCEPTION', 24, "Evaluation of this constant expre
ssion causes exception"); |
| 770 | 792 |
| 771 /** | 793 /** |
| 772 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 794 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 773 * uncaught exception being thrown. | 795 * uncaught exception being thrown. |
| 774 */ | 796 */ |
| 775 static final CompileTimeErrorCode CONST_EVAL_THROWS_IDBZE = new CompileTimeErr
orCode('CONST_EVAL_THROWS_IDBZE', 24, "Evaluation of this constant expression th
rows IntegerDivisionByZeroException"); | 797 static final CompileTimeErrorCode CONST_EVAL_THROWS_IDBZE = new CompileTimeErr
orCode('CONST_EVAL_THROWS_IDBZE', 25, "Evaluation of this constant expression th
rows IntegerDivisionByZeroException"); |
| 776 | 798 |
| 777 /** | 799 /** |
| 778 * 12.11.2 Const: If <i>T</i> is a parameterized type <i>S<U<sub>1</sub>, &
hellip;, | 800 * 12.11.2 Const: If <i>T</i> is a parameterized type <i>S<U<sub>1</sub>, &
hellip;, |
| 779 * U<sub>m</sub>></i>, let <i>R = S</i>; It is a compile time error if <i>S
</i> is not a | 801 * U<sub>m</sub>></i>, let <i>R = S</i>; It is a compile time error if <i>S
</i> is not a |
| 780 * generic type with <i>m</i> type parameters. | 802 * generic type with <i>m</i> type parameters. |
| 781 * | 803 * |
| 782 * @param typeName the name of the type being referenced (<i>S</i>) | 804 * @param typeName the name of the type being referenced (<i>S</i>) |
| 783 * @param parameterCount the number of type parameters that were declared | 805 * @param parameterCount the number of type parameters that were declared |
| 784 * @param argumentCount the number of type arguments provided | 806 * @param argumentCount the number of type arguments provided |
| 785 * @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS | 807 * @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS |
| 786 * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS | 808 * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS |
| 787 */ | 809 */ |
| 788 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"); | 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"); |
| 789 | 811 |
| 790 /** | 812 /** |
| 791 * 12.11.2 Const: If <i>e</i> is of the form <i>const T(a<sub>1</sub>, &hellip
;, a<sub>n</sub>, | 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>, |
| 792 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a | 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 |
| 793 * compile-time error if the type <i>T</i> does not declare a constant constru
ctor with the same | 815 * compile-time error if the type <i>T</i> does not declare a constant constru
ctor with the same |
| 794 * name as the declaration of <i>T</i>. | 816 * name as the declaration of <i>T</i>. |
| 795 */ | 817 */ |
| 796 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"); | 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"); |
| 797 | 819 |
| 798 /** | 820 /** |
| 799 * 12.11.2 Const: In all of the above cases, it is a compile-time error if <i>
a<sub>i</sub>, 1 | 821 * 12.11.2 Const: In all of the above cases, it is a compile-time error if <i>
a<sub>i</sub>, 1 |
| 800 * <= i <= n + k</i>, is not a compile-time constant expression. | 822 * <= i <= n + k</i>, is not a compile-time constant expression. |
| 801 */ | 823 */ |
| 802 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"); | 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"); |
| 803 | 825 |
| 804 /** | 826 /** |
| 805 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current | 827 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current |
| 806 * scope, optionally followed by type arguments. | 828 * scope, optionally followed by type arguments. |
| 807 * | 829 * |
| 808 * 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>, | 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>, |
| 809 * x<sub>n+1</sub>: a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+k</sub>
)</i> it is a | 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 |
| 810 * compile-time error if <i>T</i> is not a class accessible in the current sco
pe, optionally | 832 * compile-time error if <i>T</i> is not a class accessible in the current sco
pe, optionally |
| 811 * followed by type arguments. | 833 * followed by type arguments. |
| 812 * | 834 * |
| 813 * @param name the name of the non-type element | 835 * @param name the name of the non-type element |
| 814 */ | 836 */ |
| 815 static final CompileTimeErrorCode CONST_WITH_NON_TYPE = new CompileTimeErrorCo
de('CONST_WITH_NON_TYPE', 28, "The name '%s' is not a class"); | 837 static final CompileTimeErrorCode CONST_WITH_NON_TYPE = new CompileTimeErrorCo
de('CONST_WITH_NON_TYPE', 29, "The name '%s' is not a class"); |
| 816 | 838 |
| 817 /** | 839 /** |
| 818 * 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type par
ameters. | 840 * 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type par
ameters. |
| 819 */ | 841 */ |
| 820 static final CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = new CompileTime
ErrorCode('CONST_WITH_TYPE_PARAMETERS', 29, "The constant creation cannot use a
type parameter"); | 842 static final CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = new CompileTime
ErrorCode('CONST_WITH_TYPE_PARAMETERS', 30, "The constant creation cannot use a
type parameter"); |
| 821 | 843 |
| 822 /** | 844 /** |
| 823 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant | 845 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant |
| 824 * constructor declared by the type <i>T</i>. | 846 * constructor declared by the type <i>T</i>. |
| 825 * | 847 * |
| 826 * @param typeName the name of the type | 848 * @param typeName the name of the type |
| 827 * @param constructorName the name of the requested constant constructor | 849 * @param constructorName the name of the requested constant constructor |
| 828 */ | 850 */ |
| 829 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'"); | 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'"); |
| 830 | 852 |
| 831 /** | 853 /** |
| 832 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant | 854 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant |
| 833 * constructor declared by the type <i>T</i>. | 855 * constructor declared by the type <i>T</i>. |
| 834 * | 856 * |
| 835 * @param typeName the name of the type | 857 * @param typeName the name of the type |
| 836 */ | 858 */ |
| 837 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"); | 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"); |
| 838 | 860 |
| 839 /** | 861 /** |
| 840 * 15.3.1 Typedef: It is a compile-time error if any default values are specif
ied in the signature | 862 * 15.3.1 Typedef: It is a compile-time error if any default values are specif
ied in the signature |
| 841 * of a function type alias. | 863 * of a function type alias. |
| 842 */ | 864 */ |
| 843 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"); | 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"); |
| 844 | 866 |
| 845 /** | 867 /** |
| 846 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name | 868 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name |
| 847 * declared in the same scope. | 869 * declared in the same scope. |
| 848 */ | 870 */ |
| 849 static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT = new CompileT
imeErrorCode('DUPLICATE_CONSTRUCTOR_DEFAULT', 33, "The default constructor is al
ready defined"); | 871 static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT = new CompileT
imeErrorCode('DUPLICATE_CONSTRUCTOR_DEFAULT', 34, "The default constructor is al
ready defined"); |
| 850 | 872 |
| 851 /** | 873 /** |
| 852 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name | 874 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name |
| 853 * declared in the same scope. | 875 * declared in the same scope. |
| 854 * | 876 * |
| 855 * @param duplicateName the name of the duplicate entity | 877 * @param duplicateName the name of the duplicate entity |
| 856 */ | 878 */ |
| 857 static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME = new CompileTime
ErrorCode('DUPLICATE_CONSTRUCTOR_NAME', 34, "The constructor with name '%s' is a
lready defined"); | 879 static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME = new CompileTime
ErrorCode('DUPLICATE_CONSTRUCTOR_NAME', 35, "The constructor with name '%s' is a
lready defined"); |
| 858 | 880 |
| 859 /** | 881 /** |
| 860 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name | 882 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name |
| 861 * declared in the same scope. | 883 * declared in the same scope. |
| 862 * | 884 * |
| 863 * 7 Classes: It is a compile-time error if a class declares two members of th
e same name. | 885 * 7 Classes: It is a compile-time error if a class declares two members of th
e same name. |
| 864 * | 886 * |
| 865 * 7 Classes: It is a compile-time error if a class has an instance member and
a static member | 887 * 7 Classes: It is a compile-time error if a class has an instance member and
a static member |
| 866 * with the same name. | 888 * with the same name. |
| 867 * | 889 * |
| 868 * @param duplicateName the name of the duplicate entity | 890 * @param duplicateName the name of the duplicate entity |
| 869 */ | 891 */ |
| 870 static final CompileTimeErrorCode DUPLICATE_DEFINITION = new CompileTimeErrorC
ode('DUPLICATE_DEFINITION', 35, "The name '%s' is already defined"); | 892 static final CompileTimeErrorCode DUPLICATE_DEFINITION = new CompileTimeErrorC
ode('DUPLICATE_DEFINITION', 36, "The name '%s' is already defined"); |
| 871 | 893 |
| 872 /** | 894 /** |
| 873 * 7. Classes: It is a compile-time error if a class has an instance member an
d a static member | 895 * 7. Classes: It is a compile-time error if a class has an instance member an
d a static member |
| 874 * with the same name. | 896 * with the same name. |
| 875 * | 897 * |
| 876 * This covers the additional duplicate definition cases where inheritance has
to be considered. | 898 * This covers the additional duplicate definition cases where inheritance has
to be considered. |
| 877 * | 899 * |
| 878 * @param className the name of the class that has conflicting instance/static
members | 900 * @param className the name of the class that has conflicting instance/static
members |
| 879 * @param name the name of the conflicting members | 901 * @param name the name of the conflicting members |
| 880 * @see #DUPLICATE_DEFINITION | 902 * @see #DUPLICATE_DEFINITION |
| 881 */ | 903 */ |
| 882 static final CompileTimeErrorCode DUPLICATE_DEFINITION_INHERITANCE = new Compi
leTimeErrorCode('DUPLICATE_DEFINITION_INHERITANCE', 36, "The name '%s' is alread
y defined in '%s'"); | 904 static final CompileTimeErrorCode DUPLICATE_DEFINITION_INHERITANCE = new Compi
leTimeErrorCode('DUPLICATE_DEFINITION_INHERITANCE', 37, "The name '%s' is alread
y defined in '%s'"); |
| 883 | 905 |
| 884 /** | 906 /** |
| 885 * 12.14.2 Binding Actuals to Formals: It is a compile-time error if <i>q<sub>
i</sub> = | 907 * 12.14.2 Binding Actuals to Formals: It is a compile-time error if <i>q<sub>
i</sub> = |
| 886 * q<sub>j</sub></i> for any <i>i != j</i> [where <i>q<sub>i</sub></i> is the
label for a named | 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 |
| 887 * argument]. | 909 * argument]. |
| 888 */ | 910 */ |
| 889 static final CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = new CompileTimeEr
rorCode('DUPLICATE_NAMED_ARGUMENT', 37, "The argument for the named parameter '%
s' was already specified"); | 911 static final CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = new CompileTimeEr
rorCode('DUPLICATE_NAMED_ARGUMENT', 38, "The argument for the named parameter '%
s' was already specified"); |
| 890 | 912 |
| 891 /** | 913 /** |
| 892 * SDK implementation libraries can be exported only by other SDK libraries. | 914 * SDK implementation libraries can be exported only by other SDK libraries. |
| 893 * | 915 * |
| 894 * @param uri the uri pointing to a library | 916 * @param uri the uri pointing to a library |
| 895 */ | 917 */ |
| 896 static final CompileTimeErrorCode EXPORT_INTERNAL_LIBRARY = new CompileTimeErr
orCode('EXPORT_INTERNAL_LIBRARY', 38, "The library %s is internal and cannot be
exported"); | 918 static final CompileTimeErrorCode EXPORT_INTERNAL_LIBRARY = new CompileTimeErr
orCode('EXPORT_INTERNAL_LIBRARY', 39, "The library %s is internal and cannot be
exported"); |
| 897 | 919 |
| 898 /** | 920 /** |
| 899 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is | 921 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 900 * not a library declaration. | 922 * not a library declaration. |
| 901 * | 923 * |
| 902 * @param uri the uri pointing to a non-library declaration | 924 * @param uri the uri pointing to a non-library declaration |
| 903 */ | 925 */ |
| 904 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"); | 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"); |
| 905 | 927 |
| 906 /** | 928 /** |
| 907 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla
ss <i>C</i> includes | 929 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla
ss <i>C</i> includes |
| 908 * a type expression that does not denote a class available in the lexical sco
pe of <i>C</i>. | 930 * a type expression that does not denote a class available in the lexical sco
pe of <i>C</i>. |
| 909 * | 931 * |
| 910 * @param typeName the name of the superclass that was not found | 932 * @param typeName the name of the superclass that was not found |
| 911 */ | 933 */ |
| 912 static final CompileTimeErrorCode EXTENDS_NON_CLASS = new CompileTimeErrorCode
('EXTENDS_NON_CLASS', 40, "Classes can only extend other classes"); | 934 static final CompileTimeErrorCode EXTENDS_NON_CLASS = new CompileTimeErrorCode
('EXTENDS_NON_CLASS', 41, "Classes can only extend other classes"); |
| 913 | 935 |
| 914 /** | 936 /** |
| 915 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. | 937 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. |
| 916 * | 938 * |
| 917 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. | 939 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. |
| 918 * | 940 * |
| 919 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. | 941 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. |
| 920 * | 942 * |
| 921 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to | 943 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to |
| 922 * attempt to extend or implement num. | 944 * attempt to extend or implement num. |
| 923 * | 945 * |
| 924 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. | 946 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. |
| 925 * | 947 * |
| 926 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. | 948 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. |
| 927 * | 949 * |
| 928 * @param typeName the name of the type that cannot be extended | 950 * @param typeName the name of the type that cannot be extended |
| 929 * @see #IMPLEMENTS_DISALLOWED_CLASS | 951 * @see #IMPLEMENTS_DISALLOWED_CLASS |
| 930 */ | 952 */ |
| 931 static final CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = new CompileTimeEr
rorCode('EXTENDS_DISALLOWED_CLASS', 41, "Classes cannot extend '%s'"); | 953 static final CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = new CompileTimeEr
rorCode('EXTENDS_DISALLOWED_CLASS', 42, "Classes cannot extend '%s'"); |
| 932 | 954 |
| 933 /** | 955 /** |
| 934 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i>
or if <i>m > n</i>. | 956 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > |
| 957 * n</i>. |
| 935 * | 958 * |
| 936 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 959 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 937 * uncaught exception being thrown. | 960 * uncaught exception being thrown. |
| 938 * | 961 * |
| 939 * @param requiredCount the maximum number of positional arguments | 962 * @param requiredCount the maximum number of positional arguments |
| 940 * @param argumentCount the actual number of positional arguments given | 963 * @param argumentCount the actual number of positional arguments given |
| 941 */ | 964 */ |
| 942 static final CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS = new CompileTime
ErrorCode('EXTRA_POSITIONAL_ARGUMENTS', 42, "%d positional arguments expected, b
ut %d found"); | 965 static final CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS = new CompileTime
ErrorCode('EXTRA_POSITIONAL_ARGUMENTS', 43, "%d positional arguments expected, b
ut %d found"); |
| 943 | 966 |
| 944 /** | 967 /** |
| 945 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time | 968 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time |
| 946 * error if more than one initializer corresponding to a given instance variab
le appears in | 969 * error if more than one initializer corresponding to a given instance variab
le appears in |
| 947 * <i>k</i>'s list. | 970 * <i>k</i>'s list. |
| 948 */ | 971 */ |
| 949 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"); | 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"); |
| 950 | 973 |
| 951 /** | 974 /** |
| 952 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time | 975 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time |
| 953 * error if <i>k</i>'s initializer list contains an initializer for a final va
riable <i>f</i> | 976 * error if <i>k</i>'s initializer list contains an initializer for a final va
riable <i>f</i> |
| 954 * whose declaration includes an initialization expression. | 977 * whose declaration includes an initialization expression. |
| 955 */ | 978 */ |
| 956 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"); | 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"); |
| 957 | 980 |
| 958 /** | 981 /** |
| 959 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time | 982 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time |
| 960 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is initialized | 983 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is initialized |
| 961 * by means of an initializing formal of <i>k</i>. | 984 * by means of an initializing formal of <i>k</i>. |
| 962 */ | 985 */ |
| 963 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"); | 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"); |
| 964 | 987 |
| 965 /** | 988 /** |
| 966 * 5 Variables: It is a compile-time error if a final instance variable that h
as been initialized | 989 * 5 Variables: It is a compile-time error if a final instance variable that h
as been initialized |
| 967 * at its point of declaration is also initialized in a constructor. | 990 * at its point of declaration is also initialized in a constructor. |
| 968 * | 991 * |
| 969 * @param name the name of the field in question | 992 * @param name the name of the field in question |
| 970 */ | 993 */ |
| 971 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"); | 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"); |
| 972 | 995 |
| 973 /** | 996 /** |
| 974 * 5 Variables: It is a compile-time error if a final instance variable that h
as is initialized by | 997 * 5 Variables: It is a compile-time error if a final instance variable that h
as is initialized by |
| 975 * means of an initializing formal of a constructor is also initialized elsewh
ere in the same | 998 * means of an initializing formal of a constructor is also initialized elsewh
ere in the same |
| 976 * constructor. | 999 * constructor. |
| 977 * | 1000 * |
| 978 * @param name the name of the field in question | 1001 * @param name the name of the field in question |
| 979 */ | 1002 */ |
| 980 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"); | 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"); |
| 981 | 1004 |
| 982 /** | 1005 /** |
| 983 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by | 1006 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by |
| 984 * a function other than a non-redirecting generative constructor. | 1007 * a function other than a non-redirecting generative constructor. |
| 985 */ | 1008 */ |
| 986 static final CompileTimeErrorCode FIELD_INITIALIZER_FACTORY_CONSTRUCTOR = new
CompileTimeErrorCode('FIELD_INITIALIZER_FACTORY_CONSTRUCTOR', 48, "Initializing
formal fields cannot be used in factory constructors"); | 1009 static final CompileTimeErrorCode FIELD_INITIALIZER_FACTORY_CONSTRUCTOR = new
CompileTimeErrorCode('FIELD_INITIALIZER_FACTORY_CONSTRUCTOR', 49, "Initializing
formal fields cannot be used in factory constructors"); |
| 987 | 1010 |
| 988 /** | 1011 /** |
| 989 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by | 1012 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by |
| 990 * a function other than a non-redirecting generative constructor. | 1013 * a function other than a non-redirecting generative constructor. |
| 991 */ | 1014 */ |
| 992 static final CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new
CompileTimeErrorCode('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 49, "Initializing
formal fields can only be used in constructors"); | 1015 static final CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new
CompileTimeErrorCode('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 50, "Initializing
formal fields can only be used in constructors"); |
| 993 | 1016 |
| 994 /** | 1017 /** |
| 995 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 1018 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
| 996 * only action is to invoke another generative constructor. | 1019 * only action is to invoke another generative constructor. |
| 997 * | 1020 * |
| 998 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by | 1021 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by |
| 999 * a function other than a non-redirecting generative constructor. | 1022 * a function other than a non-redirecting generative constructor. |
| 1000 */ | 1023 */ |
| 1001 static final CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR =
new CompileTimeErrorCode('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', 50, "The r
edirecting constructor cannot have a field initializer"); | 1024 static final CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR =
new CompileTimeErrorCode('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', 51, "The r
edirecting constructor cannot have a field initializer"); |
| 1002 | 1025 |
| 1003 /** | 1026 /** |
| 1004 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same | 1027 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same |
| 1005 * name. | 1028 * name. |
| 1006 * | 1029 * |
| 1007 * @param name the conflicting name of the getter and method | 1030 * @param name the conflicting name of the getter and method |
| 1008 */ | 1031 */ |
| 1009 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"); | 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"); |
| 1010 | 1033 |
| 1011 /** | 1034 /** |
| 1012 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. | 1035 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. |
| 1013 * | 1036 * |
| 1014 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. | 1037 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. |
| 1015 * | 1038 * |
| 1016 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. | 1039 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. |
| 1017 * | 1040 * |
| 1018 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to | 1041 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to |
| 1019 * attempt to extend or implement num. | 1042 * attempt to extend or implement num. |
| 1020 * | 1043 * |
| 1021 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. | 1044 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. |
| 1022 * | 1045 * |
| 1023 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. | 1046 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. |
| 1024 * | 1047 * |
| 1025 * @param typeName the name of the type that cannot be implemented | 1048 * @param typeName the name of the type that cannot be implemented |
| 1026 * @see #EXTENDS_DISALLOWED_CLASS | 1049 * @see #EXTENDS_DISALLOWED_CLASS |
| 1027 */ | 1050 */ |
| 1028 static final CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = new CompileTim
eErrorCode('IMPLEMENTS_DISALLOWED_CLASS', 52, "Classes cannot implement '%s'"); | 1051 static final CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = new CompileTim
eErrorCode('IMPLEMENTS_DISALLOWED_CLASS', 53, "Classes cannot implement '%s'"); |
| 1029 | 1052 |
| 1030 /** | 1053 /** |
| 1031 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class includes | 1054 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class includes |
| 1032 * type dynamic. | 1055 * type dynamic. |
| 1033 */ | 1056 */ |
| 1034 static final CompileTimeErrorCode IMPLEMENTS_DYNAMIC = new CompileTimeErrorCod
e('IMPLEMENTS_DYNAMIC', 53, "Classes cannot implement 'dynamic'"); | 1057 static final CompileTimeErrorCode IMPLEMENTS_DYNAMIC = new CompileTimeErrorCod
e('IMPLEMENTS_DYNAMIC', 54, "Classes cannot implement 'dynamic'"); |
| 1035 | 1058 |
| 1036 /** | 1059 /** |
| 1037 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class <i>C</i> | 1060 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class <i>C</i> |
| 1038 * includes a type expression that does not denote a class available in the le
xical scope of | 1061 * includes a type expression that does not denote a class available in the le
xical scope of |
| 1039 * <i>C</i>. | 1062 * <i>C</i>. |
| 1040 * | 1063 * |
| 1041 * @param typeName the name of the interface that was not found | 1064 * @param typeName the name of the interface that was not found |
| 1042 */ | 1065 */ |
| 1043 static final CompileTimeErrorCode IMPLEMENTS_NON_CLASS = new CompileTimeErrorC
ode('IMPLEMENTS_NON_CLASS', 54, "Classes can only implement other classes"); | 1066 static final CompileTimeErrorCode IMPLEMENTS_NON_CLASS = new CompileTimeErrorC
ode('IMPLEMENTS_NON_CLASS', 55, "Classes can only implement other classes"); |
| 1044 | 1067 |
| 1045 /** | 1068 /** |
| 1046 * 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears
more than once in | 1069 * 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears
more than once in |
| 1047 * the implements clause of a class. | 1070 * the implements clause of a class. |
| 1048 * | 1071 * |
| 1049 * @param className the name of the class that is implemented more than once | 1072 * @param className the name of the class that is implemented more than once |
| 1050 */ | 1073 */ |
| 1051 static final CompileTimeErrorCode IMPLEMENTS_REPEATED = new CompileTimeErrorCo
de('IMPLEMENTS_REPEATED', 55, "'%s' can only be implemented once"); | 1074 static final CompileTimeErrorCode IMPLEMENTS_REPEATED = new CompileTimeErrorCo
de('IMPLEMENTS_REPEATED', 56, "'%s' can only be implemented once"); |
| 1075 |
| 1076 /** |
| 1077 * 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>. |
| 1079 * |
| 1080 * @param className the name of the class that appears in both "extends" and "
implements" clauses |
| 1081 */ |
| 1082 static final CompileTimeErrorCode IMPLEMENTS_SUPER_CLASS = new CompileTimeErro
rCode('IMPLEMENTS_SUPER_CLASS', 57, "'%s' cannot be used in both 'extends' and '
implements' clauses"); |
| 1052 | 1083 |
| 1053 /** | 1084 /** |
| 1054 * 7.6.1 Generative Constructors: Note that <b>this</b> is not in scope on the
right hand side of | 1085 * 7.6.1 Generative Constructors: Note that <b>this</b> is not in scope on the
right hand side of |
| 1055 * an initializer. | 1086 * an initializer. |
| 1056 * | 1087 * |
| 1057 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable | 1088 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable |
| 1058 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the | 1089 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the |
| 1059 * initializer of an instance variable. | 1090 * initializer of an instance variable. |
| 1060 * | 1091 * |
| 1061 * @param name the name of the type in question | 1092 * @param name the name of the type in question |
| 1062 */ | 1093 */ |
| 1063 static final CompileTimeErrorCode IMPLICIT_THIS_REFERENCE_IN_INITIALIZER = new
CompileTimeErrorCode('IMPLICIT_THIS_REFERENCE_IN_INITIALIZER', 56, "The 'this'
expression cannot be implicitly used in initializers"); | 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"); |
| 1064 | 1095 |
| 1065 /** | 1096 /** |
| 1066 * SDK implementation libraries can be imported only by other SDK libraries. | 1097 * SDK implementation libraries can be imported only by other SDK libraries. |
| 1067 * | 1098 * |
| 1068 * @param uri the uri pointing to a library | 1099 * @param uri the uri pointing to a library |
| 1069 */ | 1100 */ |
| 1070 static final CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY = new CompileTimeErr
orCode('IMPORT_INTERNAL_LIBRARY', 57, "The library %s is internal and cannot be
imported"); | 1101 static final CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY = new CompileTimeErr
orCode('IMPORT_INTERNAL_LIBRARY', 59, "The library %s is internal and cannot be
imported"); |
| 1071 | 1102 |
| 1072 /** | 1103 /** |
| 1073 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1104 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 1074 * not a library declaration. | 1105 * not a library declaration. |
| 1075 * | 1106 * |
| 1076 * @param uri the uri pointing to a non-library declaration | 1107 * @param uri the uri pointing to a non-library declaration |
| 1077 */ | 1108 */ |
| 1078 static final CompileTimeErrorCode IMPORT_OF_NON_LIBRARY = new CompileTimeError
Code('IMPORT_OF_NON_LIBRARY', 58, "The imported library '%s' must not have a par
t-of directive"); | 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"); |
| 1079 | 1110 |
| 1080 /** | 1111 /** |
| 1081 * 13.9 Switch: It is a compile-time error if values of the expressions <i>e<s
ub>k</sub></i> are | 1112 * 13.9 Switch: It is a compile-time error if values of the expressions <i>e<s
ub>k</sub></i> are |
| 1082 * not instances of the same class <i>C</i>, for all <i>1 <= k <= n</i>. | 1113 * not instances of the same class <i>C</i>, for all <i>1 <= k <= n</i>. |
| 1083 * | 1114 * |
| 1084 * @param expressionSource the expression source code that is the unexpected t
ype | 1115 * @param expressionSource the expression source code that is the unexpected t
ype |
| 1085 * @param expectedType the name of the expected type | 1116 * @param expectedType the name of the expected type |
| 1086 */ | 1117 */ |
| 1087 static final CompileTimeErrorCode INCONSISTENT_CASE_EXPRESSION_TYPES = new Com
pileTimeErrorCode('INCONSISTENT_CASE_EXPRESSION_TYPES', 59, "Case expressions mu
st have the same types, '%s' is not a %s'"); | 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'"); |
| 1088 | 1119 |
| 1089 /** | 1120 /** |
| 1090 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time | 1121 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time |
| 1091 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an | 1122 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an |
| 1092 * instance variable declared in the immediately surrounding class. | 1123 * instance variable declared in the immediately surrounding class. |
| 1093 * | 1124 * |
| 1094 * @param id the name of the initializing formal that is not an instance varia
ble in the | 1125 * @param id the name of the initializing formal that is not an instance varia
ble in the |
| 1095 * immediately enclosing class | 1126 * immediately enclosing class |
| 1096 * @see #INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD | 1127 * @see #INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD |
| 1097 */ | 1128 */ |
| 1098 static final CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTANT_FIELD = new Com
pileTimeErrorCode('INITIALIZER_FOR_NON_EXISTANT_FIELD', 60, "'%s' is not a varia
ble in the enclosing class"); | 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"); |
| 1099 | 1130 |
| 1100 /** | 1131 /** |
| 1101 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time | 1132 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time |
| 1102 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an | 1133 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an |
| 1103 * instance variable declared in the immediately surrounding class. | 1134 * instance variable declared in the immediately surrounding class. |
| 1104 * | 1135 * |
| 1105 * @param id the name of the initializing formal that is a static variable in
the immediately | 1136 * @param id the name of the initializing formal that is a static variable in
the immediately |
| 1106 * enclosing class | 1137 * enclosing class |
| 1107 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD | 1138 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD |
| 1108 */ | 1139 */ |
| 1109 static final CompileTimeErrorCode INITIALIZER_FOR_STATIC_FIELD = new CompileTi
meErrorCode('INITIALIZER_FOR_STATIC_FIELD', 61, "'%s' is a static variable in th
e enclosing class, variables initialized in a constructor cannot be static"); | 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"); |
| 1110 | 1141 |
| 1111 /** | 1142 /** |
| 1112 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a | 1143 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a |
| 1113 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately | 1144 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately |
| 1114 * enclosing class. | 1145 * enclosing class. |
| 1115 * | 1146 * |
| 1116 * @param id the name of the initializing formal that is not an instance varia
ble in the | 1147 * @param id the name of the initializing formal that is not an instance varia
ble in the |
| 1117 * immediately enclosing class | 1148 * immediately enclosing class |
| 1118 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD | 1149 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD |
| 1119 * @see #INITIALIZER_FOR_NON_EXISTANT_FIELD | 1150 * @see #INITIALIZER_FOR_NON_EXISTANT_FIELD |
| 1120 */ | 1151 */ |
| 1121 static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD =
new CompileTimeErrorCode('INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD', 62, "'%s
' is not a variable in the enclosing class"); | 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"); |
| 1122 | 1153 |
| 1123 /** | 1154 /** |
| 1124 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a | 1155 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a |
| 1125 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately | 1156 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately |
| 1126 * enclosing class. | 1157 * enclosing class. |
| 1127 * | 1158 * |
| 1128 * @param id the name of the initializing formal that is a static variable in
the immediately | 1159 * @param id the name of the initializing formal that is a static variable in
the immediately |
| 1129 * enclosing class | 1160 * enclosing class |
| 1130 * @see #INITIALIZER_FOR_STATIC_FIELD | 1161 * @see #INITIALIZER_FOR_STATIC_FIELD |
| 1131 */ | 1162 */ |
| 1132 static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_STATIC_FIELD = new C
ompileTimeErrorCode('INITIALIZING_FORMAL_FOR_STATIC_FIELD', 63, "'%s' is a stati
c variable in the enclosing class, variables initialized in a constructor cannot
be static"); | 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"); |
| 1133 | 1164 |
| 1134 /** | 1165 /** |
| 1135 * 12.30 Identifier Reference: Otherwise, e is equivalent to the property extr
action | 1166 * 12.30 Identifier Reference: Otherwise, e is equivalent to the property extr
action |
| 1136 * <b>this</b>.<i>id</i>. | 1167 * <b>this</b>.<i>id</i>. |
| 1137 */ | 1168 */ |
| 1138 static final CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_STATIC = new Com
pileTimeErrorCode('INSTANCE_MEMBER_ACCESS_FROM_STATIC', 64, "Instance member can
not be accessed from static method"); | 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"); |
| 1139 | 1170 |
| 1140 /** | 1171 /** |
| 1141 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the | 1172 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the |
| 1142 * character @, followed by a constant expression that must be either a refere
nce to a | 1173 * character @, followed by a constant expression that must be either a refere
nce to a |
| 1143 * compile-time constant variable, or a call to a constant constructor. | 1174 * compile-time constant variable, or a call to a constant constructor. |
| 1144 */ | 1175 */ |
| 1145 static final CompileTimeErrorCode INVALID_ANNOTATION = new CompileTimeErrorCod
e('INVALID_ANNOTATION', 65, "Annotation can be only constant variable or constan
t constructor invocation"); | 1176 static final CompileTimeErrorCode INVALID_ANNOTATION = new CompileTimeErrorCod
e('INVALID_ANNOTATION', 67, "Annotation can be only constant variable or constan
t constructor invocation"); |
| 1146 | 1177 |
| 1147 /** | 1178 /** |
| 1148 * TODO(brianwilkerson) Remove this when we have decided on how to report erro
rs in compile-time | 1179 * TODO(brianwilkerson) Remove this when we have decided on how to report erro
rs in compile-time |
| 1149 * constants. Until then, this acts as a placeholder for more informative erro
rs. | 1180 * constants. Until then, this acts as a placeholder for more informative erro
rs. |
| 1181 * |
| 1182 * See TODOs in ConstantVisitor |
| 1150 */ | 1183 */ |
| 1151 static final CompileTimeErrorCode INVALID_CONSTANT = new CompileTimeErrorCode(
'INVALID_CONSTANT', 66, ""); | 1184 static final CompileTimeErrorCode INVALID_CONSTANT = new CompileTimeErrorCode(
'INVALID_CONSTANT', 68, "Invalid constant value"); |
| 1152 | 1185 |
| 1153 /** | 1186 /** |
| 1154 * 7.6 Constructors: It is a compile-time error if the name of a constructor i
s not a constructor | 1187 * 7.6 Constructors: It is a compile-time error if the name of a constructor i
s not a constructor |
| 1155 * name. | 1188 * name. |
| 1156 */ | 1189 */ |
| 1157 static final CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = new CompileTimeEr
rorCode('INVALID_CONSTRUCTOR_NAME', 67, "Invalid constructor name"); | 1190 static final CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = new CompileTimeEr
rorCode('INVALID_CONSTRUCTOR_NAME', 69, "Invalid constructor name"); |
| 1158 | 1191 |
| 1159 /** | 1192 /** |
| 1160 * 7.6.2 Factories: It is a compile-time error if <i>M</i> is not the name of
the immediately | 1193 * 7.6.2 Factories: It is a compile-time error if <i>M</i> is not the name of
the immediately |
| 1161 * enclosing class. | 1194 * enclosing class. |
| 1162 */ | 1195 */ |
| 1163 static final CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS = new Compi
leTimeErrorCode('INVALID_FACTORY_NAME_NOT_A_CLASS', 68, "The name of the immedia
tely enclosing class expected"); | 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"); |
| 1164 | 1197 |
| 1165 /** | 1198 /** |
| 1166 * 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 |
| 1167 * instance member <i>m2</i> and <i>m1</i> does not declare all the named para
meters declared by | 1200 * instance member <i>m2</i> and <i>m1</i> does not declare all the named para
meters declared by |
| 1168 * <i>m2</i>. | 1201 * <i>m2</i>. |
| 1169 * | 1202 * |
| 1170 * @param paramCount the number of named parameters in the overridden member | 1203 * @param paramCount the number of named parameters in the overridden member |
| 1171 * @param className the name of the class from the overridden method | 1204 * @param className the name of the class from the overridden method |
| 1172 */ | 1205 */ |
| 1173 static final CompileTimeErrorCode INVALID_OVERRIDE_NAMED = new CompileTimeErro
rCode('INVALID_OVERRIDE_NAMED', 69, "Missing the named parameter '%s' to match t
he overridden method from '%s'"); | 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'"); |
| 1174 | 1207 |
| 1175 /** | 1208 /** |
| 1176 * 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 |
| 1177 * instance member <i>m2</i> and <i>m1</i> has fewer optional positional param
eters than | 1210 * instance member <i>m2</i> and <i>m1</i> has fewer optional positional param
eters than |
| 1178 * <i>m2</i>. | 1211 * <i>m2</i>. |
| 1179 * | 1212 * |
| 1180 * @param paramCount the number of positional parameters in the overridden mem
ber | 1213 * @param paramCount the number of positional parameters in the overridden mem
ber |
| 1181 * @param className the name of the class from the overridden method | 1214 * @param className the name of the class from the overridden method |
| 1182 */ | 1215 */ |
| 1183 static final CompileTimeErrorCode INVALID_OVERRIDE_POSITIONAL = new CompileTim
eErrorCode('INVALID_OVERRIDE_POSITIONAL', 70, "Must have at least %d optional pa
rameters to match the overridden method from '%s'"); | 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'"); |
| 1184 | 1217 |
| 1185 /** | 1218 /** |
| 1186 * 7.1 Instance Methods: It is a compile-time error if an instance method <i>m
1</i> overrides an | 1219 * 7.1 Instance Methods: It is a compile-time error if an instance method <i>m
1</i> overrides an |
| 1187 * instance member <i>m2</i> and <i>m1</i> has a different number of required
parameters than | 1220 * instance member <i>m2</i> and <i>m1</i> has a different number of required
parameters than |
| 1188 * <i>m2</i>. | 1221 * <i>m2</i>. |
| 1189 * | 1222 * |
| 1190 * @param paramCount the number of required parameters in the overridden membe
r | 1223 * @param paramCount the number of required parameters in the overridden membe
r |
| 1191 * @param className the name of the class from the overridden method | 1224 * @param className the name of the class from the overridden method |
| 1192 */ | 1225 */ |
| 1193 static final CompileTimeErrorCode INVALID_OVERRIDE_REQUIRED = new CompileTimeE
rrorCode('INVALID_OVERRIDE_REQUIRED', 71, "Must have at exactly %d required para
meters to match the overridden method from '%s'"); | 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'"); |
| 1194 | 1227 |
| 1195 /** | 1228 /** |
| 1196 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable | 1229 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable |
| 1197 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the | 1230 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the |
| 1198 * initializer of an instance variable. | 1231 * initializer of an instance variable. |
| 1199 */ | 1232 */ |
| 1200 static final CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = new CompileTimeE
rrorCode('INVALID_REFERENCE_TO_THIS', 72, "Invalid reference to 'this' expressio
n"); | 1233 static final CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = new CompileTimeE
rrorCode('INVALID_REFERENCE_TO_THIS', 74, "Invalid reference to 'this' expressio
n"); |
| 1201 | 1234 |
| 1202 /** | 1235 /** |
| 1203 * 12.7 Maps: It is a compile-time error if the first type argument to a map l
iteral is not | 1236 * 12.7 Maps: It is a compile-time error if the first type argument to a map l
iteral is not |
| 1204 * String. | 1237 * String. |
| 1205 */ | 1238 */ |
| 1206 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_FOR_KEY = new CompileT
imeErrorCode('INVALID_TYPE_ARGUMENT_FOR_KEY', 73, "The first type argument to a
map literal must be 'String'"); | 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'"); |
| 1207 | 1240 |
| 1208 /** | 1241 /** |
| 1209 * 12.6 Lists: It is a compile time error if the type argument of a constant l
ist literal includes | 1242 * 12.6 Lists: It is a compile time error if the type argument of a constant l
ist literal includes |
| 1210 * a type parameter. | 1243 * a type parameter. |
| 1211 * | 1244 * |
| 1212 * @name the name of the type parameter | 1245 * @name the name of the type parameter |
| 1213 */ | 1246 */ |
| 1214 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST = new Co
mpileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_LIST', 74, "Constant list lit
erals cannot include a type parameter as a type argument, such as '%s'"); | 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'"); |
| 1215 | 1248 |
| 1216 /** | 1249 /** |
| 1217 * 12.7 Maps: It is a compile time error if the type arguments of a constant m
ap literal include a | 1250 * 12.7 Maps: It is a compile time error if the type arguments of a constant m
ap literal include a |
| 1218 * type parameter. | 1251 * type parameter. |
| 1219 * | 1252 * |
| 1220 * @name the name of the type parameter | 1253 * @name the name of the type parameter |
| 1221 */ | 1254 */ |
| 1222 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = new Com
pileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 75, "Constant map litera
ls cannot include a type parameter as a type argument, such as '%s'"); | 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'"); |
| 1223 | 1256 |
| 1224 /** | 1257 /** |
| 1225 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1258 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 1226 * not a library declaration. | 1259 * not a library declaration. |
| 1227 * | 1260 * |
| 1228 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1261 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 1229 * not a library declaration. | 1262 * not a library declaration. |
| 1230 * | 1263 * |
| 1231 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part | 1264 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part |
| 1232 * declaration. | 1265 * declaration. |
| 1233 * | 1266 * |
| 1234 * @param uri the URI that is invalid | 1267 * @param uri the URI that is invalid |
| 1235 * @see #URI_DOES_NOT_EXIST | 1268 * @see #URI_DOES_NOT_EXIST |
| 1236 */ | 1269 */ |
| 1237 static final CompileTimeErrorCode INVALID_URI = new CompileTimeErrorCode('INVA
LID_URI', 76, "Invalid URI syntax: '%s'"); | 1270 static final CompileTimeErrorCode INVALID_URI = new CompileTimeErrorCode('INVA
LID_URI', 78, "Invalid URI syntax: '%s'"); |
| 1238 | 1271 |
| 1239 /** | 1272 /** |
| 1240 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within | 1273 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within |
| 1241 * the innermost function in which <i>s<sub>b</sub></i> occurs. | 1274 * the innermost function in which <i>s<sub>b</sub></i> occurs. |
| 1242 * | 1275 * |
| 1243 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use | 1276 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use |
| 1244 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. | 1277 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. |
| 1245 * | 1278 * |
| 1246 * @param labelName the name of the unresolvable label | 1279 * @param labelName the name of the unresolvable label |
| 1247 */ | 1280 */ |
| 1248 static final CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = new CompileTimeErrorC
ode('LABEL_IN_OUTER_SCOPE', 77, "Cannot reference label '%s' declared in an oute
r method"); | 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"); |
| 1249 | 1282 |
| 1250 /** | 1283 /** |
| 1251 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within | 1284 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within |
| 1252 * the innermost function in which <i>s<sub>b</sub></i> occurs. | 1285 * the innermost function in which <i>s<sub>b</sub></i> occurs. |
| 1253 * | 1286 * |
| 1254 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use | 1287 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use |
| 1255 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. | 1288 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. |
| 1256 * | 1289 * |
| 1257 * @param labelName the name of the unresolvable label | 1290 * @param labelName the name of the unresolvable label |
| 1258 */ | 1291 */ |
| 1259 static final CompileTimeErrorCode LABEL_UNDEFINED = new CompileTimeErrorCode('
LABEL_UNDEFINED', 78, "Cannot reference undefined label '%s'"); | 1292 static final CompileTimeErrorCode LABEL_UNDEFINED = new CompileTimeErrorCode('
LABEL_UNDEFINED', 80, "Cannot reference undefined label '%s'"); |
| 1293 |
| 1294 /** |
| 1295 * 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: |
| 1297 * |
| 1298 * * 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> |
| 1300 * |
| 1301 * |
| 1302 * 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 <= |
| 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>. |
| 1305 * 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>. |
| 1307 */ |
| 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'"); |
| 1309 |
| 1310 /** |
| 1311 * 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: |
| 1313 * |
| 1314 * * 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> |
| 1316 * |
| 1317 * |
| 1318 * 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 <= |
| 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>. |
| 1321 * 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>. |
| 1323 */ |
| 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'"); |
| 1325 |
| 1326 /** |
| 1327 * 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: |
| 1329 * |
| 1330 * * 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> |
| 1332 * |
| 1333 * |
| 1334 * 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 <= |
| 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>. |
| 1337 * 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>. |
| 1339 */ |
| 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'"); |
| 1260 | 1341 |
| 1261 /** | 1342 /** |
| 1262 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member
with the same name | 1343 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member
with the same name |
| 1263 * as <i>C</i>. | 1344 * as <i>C</i>. |
| 1264 */ | 1345 */ |
| 1265 static final CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = new CompileTimeErro
rCode('MEMBER_WITH_CLASS_NAME', 79, "Class members cannot have the same name as
the enclosing class"); | 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"); |
| 1266 | 1347 |
| 1267 /** | 1348 /** |
| 1268 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same | 1349 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same |
| 1269 * name. | 1350 * name. |
| 1270 * | 1351 * |
| 1271 * @param name the conflicting name of the getter and method | 1352 * @param name the conflicting name of the getter and method |
| 1272 */ | 1353 */ |
| 1273 static final CompileTimeErrorCode METHOD_AND_GETTER_WITH_SAME_NAME = new Compi
leTimeErrorCode('METHOD_AND_GETTER_WITH_SAME_NAME', 80, "'%s' cannot be used to
name a method, there is already a getter with the same name"); | 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"); |
| 1274 | 1355 |
| 1275 /** | 1356 /** |
| 1276 * 12.1 Constants: A constant expression is ... a constant list literal. | 1357 * 12.1 Constants: A constant expression is ... a constant list literal. |
| 1277 */ | 1358 */ |
| 1278 static final CompileTimeErrorCode MISSING_CONST_IN_LIST_LITERAL = new CompileT
imeErrorCode('MISSING_CONST_IN_LIST_LITERAL', 81, "List literals must be prefixe
d with 'const' when used as a constant expression"); | 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"); |
| 1279 | 1360 |
| 1280 /** | 1361 /** |
| 1281 * 12.1 Constants: A constant expression is ... a constant map literal. | 1362 * 12.1 Constants: A constant expression is ... a constant map literal. |
| 1282 */ | 1363 */ |
| 1283 static final CompileTimeErrorCode MISSING_CONST_IN_MAP_LITERAL = new CompileTi
meErrorCode('MISSING_CONST_IN_MAP_LITERAL', 82, "Map literals must be prefixed w
ith 'const' when used as a constant expression"); | 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"); |
| 1284 | 1365 |
| 1285 /** | 1366 /** |
| 1286 * 9 Mixins: It is a compile-time error if a declared or derived mixin explici
tly declares a | 1367 * 9 Mixins: It is a compile-time error if a declared or derived mixin explici
tly declares a |
| 1287 * constructor. | 1368 * constructor. |
| 1288 * | 1369 * |
| 1289 * @param typeName the name of the mixin that is invalid | 1370 * @param typeName the name of the mixin that is invalid |
| 1290 */ | 1371 */ |
| 1291 static final CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = new CompileTime
ErrorCode('MIXIN_DECLARES_CONSTRUCTOR', 83, "The class '%s' cannot be used as a
mixin because it declares a constructor"); | 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"); |
| 1292 | 1373 |
| 1293 /** | 1374 /** |
| 1294 * 9 Mixins: It is a compile-time error if a mixin is derived from a class who
se superclass is not | 1375 * 9 Mixins: It is a compile-time error if a mixin is derived from a class who
se superclass is not |
| 1295 * Object. | 1376 * Object. |
| 1296 * | 1377 * |
| 1297 * @param typeName the name of the mixin that is invalid | 1378 * @param typeName the name of the mixin that is invalid |
| 1298 */ | 1379 */ |
| 1299 static final CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = new Compile
TimeErrorCode('MIXIN_INHERITS_FROM_NOT_OBJECT', 84, "The class '%s' cannot be us
ed as a mixin because it extends a class other than Object"); | 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"); |
| 1300 | 1381 |
| 1301 /** | 1382 /** |
| 1302 * 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not deno
te a class or mixin | 1383 * 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not deno
te a class or mixin |
| 1303 * available in the immediately enclosing scope. | 1384 * available in the immediately enclosing scope. |
| 1304 */ | 1385 */ |
| 1305 static final CompileTimeErrorCode MIXIN_OF_NON_CLASS = new CompileTimeErrorCod
e('MIXIN_OF_NON_CLASS', 85, "Classes can only mixin other classes"); | 1386 static final CompileTimeErrorCode MIXIN_OF_NON_CLASS = new CompileTimeErrorCod
e('MIXIN_OF_NON_CLASS', 90, "Classes can only mixin other classes"); |
| 1306 | 1387 |
| 1307 /** | 1388 /** |
| 1308 * 9 Mixins: It is a compile-time error if a declared or derived mixin refers
to super. | 1389 * 9 Mixins: It is a compile-time error if a declared or derived mixin refers
to super. |
| 1309 */ | 1390 */ |
| 1310 static final CompileTimeErrorCode MIXIN_REFERENCES_SUPER = new CompileTimeErro
rCode('MIXIN_REFERENCES_SUPER', 86, "The class '%s' cannot be used as a mixin be
cause it references 'super'"); | 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'"); |
| 1311 | 1392 |
| 1312 /** | 1393 /** |
| 1313 * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not deno
te a class available | 1394 * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not deno
te a class available |
| 1314 * in the immediately enclosing scope. | 1395 * in the immediately enclosing scope. |
| 1315 */ | 1396 */ |
| 1316 static final CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = new Compil
eTimeErrorCode('MIXIN_WITH_NON_CLASS_SUPERCLASS', 87, "Mixin can only be applied
to class"); | 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"); |
| 1317 | 1398 |
| 1318 /** | 1399 /** |
| 1319 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 1400 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
| 1320 * only action is to invoke another generative constructor. | 1401 * only action is to invoke another generative constructor. |
| 1321 */ | 1402 */ |
| 1322 static final CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS
= new CompileTimeErrorCode('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS', 88,
"Constructor may have at most one 'this' redirection"); | 1403 static final CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS
= new CompileTimeErrorCode('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS', 93,
"Constructor may have at most one 'this' redirection"); |
| 1323 | 1404 |
| 1324 /** | 1405 /** |
| 1325 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Th
en <i>k</i> may | 1406 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Th
en <i>k</i> may |
| 1326 * include at most one superinitializer in its initializer list or a compile t
ime error occurs. | 1407 * include at most one superinitializer in its initializer list or a compile t
ime error occurs. |
| 1327 */ | 1408 */ |
| 1328 static final CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = new CompileTim
eErrorCode('MULTIPLE_SUPER_INITIALIZERS', 89, "Constructor may have at most one
'super' initializer"); | 1409 static final CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = new CompileTim
eErrorCode('MULTIPLE_SUPER_INITIALIZERS', 94, "Constructor may have at most one
'super' initializer"); |
| 1329 | 1410 |
| 1330 /** | 1411 /** |
| 1331 * 12.11.1 New: It is a compile time error if <i>S</i> is not a generic type w
ith <i>m</i> type | 1412 * 12.11.1 New: It is a compile time error if <i>S</i> is not a generic type w
ith <i>m</i> type |
| 1332 * parameters. | 1413 * parameters. |
| 1333 * | 1414 * |
| 1334 * @param typeName the name of the type being referenced (<i>S</i>) | 1415 * @param typeName the name of the type being referenced (<i>S</i>) |
| 1335 * @param parameterCount the number of type parameters that were declared | 1416 * @param parameterCount the number of type parameters that were declared |
| 1336 * @param argumentCount the number of type arguments provided | 1417 * @param argumentCount the number of type arguments provided |
| 1337 * @see CompileTimeErrorCode#CONST_WITH_INVALID_TYPE_PARAMETERS | 1418 * @see CompileTimeErrorCode#CONST_WITH_INVALID_TYPE_PARAMETERS |
| 1338 * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS | 1419 * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS |
| 1339 */ | 1420 */ |
| 1340 static final CompileTimeErrorCode NEW_WITH_INVALID_TYPE_PARAMETERS = new Compi
leTimeErrorCode('NEW_WITH_INVALID_TYPE_PARAMETERS', 90, "The type '%s' is declar
ed with %d type parameters, but %d type arguments were given"); | 1421 static final CompileTimeErrorCode NEW_WITH_INVALID_TYPE_PARAMETERS = new Compi
leTimeErrorCode('NEW_WITH_INVALID_TYPE_PARAMETERS', 95, "The type '%s' is declar
ed with %d type parameters, but %d type arguments were given"); |
| 1341 | 1422 |
| 1342 /** | 1423 /** |
| 1343 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the | 1424 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the |
| 1344 * character @, followed by a constant expression that must be either a refere
nce to a | 1425 * character @, followed by a constant expression that must be either a refere
nce to a |
| 1345 * compile-time constant variable, or a call to a constant constructor. | 1426 * compile-time constant variable, or a call to a constant constructor. |
| 1346 */ | 1427 */ |
| 1347 static final CompileTimeErrorCode NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS = new Co
mpileTimeErrorCode('NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS', 91, "Annotation creati
on must have arguments"); | 1428 static final CompileTimeErrorCode NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS = new Co
mpileTimeErrorCode('NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS', 96, "Annotation creati
on must have arguments"); |
| 1348 | 1429 |
| 1349 /** | 1430 /** |
| 1350 * 7.6.1 Generative Constructors: If no superinitializer is provided, an impli
cit superinitializer | 1431 * 7.6.1 Generative Constructors: If no superinitializer is provided, an impli
cit superinitializer |
| 1351 * of the form <b>super</b>() is added at the end of <i>k</i>'s initializer li
st, unless the | 1432 * of the form <b>super</b>() is added at the end of <i>k</i>'s initializer li
st, unless the |
| 1352 * enclosing class is class <i>Object</i>. | 1433 * enclosing class is class <i>Object</i>. |
| 1353 * | 1434 * |
| 1354 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i>
does not declare a | 1435 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i>
does not declare a |
| 1355 * generative constructor named <i>S</i> (respectively <i>S.id</i>) | 1436 * generative constructor named <i>S</i> (respectively <i>S.id</i>) |
| 1356 */ | 1437 */ |
| 1357 static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT = new
CompileTimeErrorCode('NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT', 92, "The class '%s
' does not have a default constructor"); | 1438 static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT = new
CompileTimeErrorCode('NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT', 97, "The class '%s
' does not have a default constructor"); |
| 1358 | 1439 |
| 1359 /** | 1440 /** |
| 1360 * 7.6 Constructors: Iff no constructor is specified for a class <i>C</i>, it
implicitly has a | 1441 * 7.6 Constructors: Iff no constructor is specified for a class <i>C</i>, it
implicitly has a |
| 1361 * default constructor C() : <b>super<b>() {}, unless <i>C</i> is class <i>Obj
ect</i>. | 1442 * default constructor C() : <b>super<b>() {}, unless <i>C</i> is class <i>Obj
ect</i>. |
| 1362 * | 1443 * |
| 1363 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i>
does not declare a | 1444 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i>
does not declare a |
| 1364 * generative constructor named <i>S</i> (respectively <i>S.id</i>) | 1445 * generative constructor named <i>S</i> (respectively <i>S.id</i>) |
| 1365 */ | 1446 */ |
| 1366 static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT = new
CompileTimeErrorCode('NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT', 93, "The class '%s
' does not have a default constructor"); | 1447 static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT = new
CompileTimeErrorCode('NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT', 98, "The class '%s
' does not have a default constructor"); |
| 1367 | 1448 |
| 1368 /** | 1449 /** |
| 1369 * 13.2 Expression Statements: It is a compile-time error if a non-constant ma
p literal that has | 1450 * 13.2 Expression Statements: It is a compile-time error if a non-constant ma
p literal that has |
| 1370 * no explicit type arguments appears in a place where a statement is expected
. | 1451 * no explicit type arguments appears in a place where a statement is expected
. |
| 1371 */ | 1452 */ |
| 1372 static final CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = new
CompileTimeErrorCode('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 94, "A non-constan
t map literal without type arguments cannot be used as an expression statement")
; | 1453 static final CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = new
CompileTimeErrorCode('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 99, "A non-constan
t map literal without type arguments cannot be used as an expression statement")
; |
| 1373 | 1454 |
| 1374 /** | 1455 /** |
| 1375 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub
>11</sub> … | 1456 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub
>11</sub> … |
| 1376 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> … label<sub>n1
</sub> … | 1457 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> … label<sub>n1
</sub> … |
| 1377 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s
ub>}</i> or the form | 1458 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s
ub>}</i> or the form |
| 1378 * <i>switch (e) { label<sub>11</sub> … label<sub>1j1</sub> case e<sub>
1</sub>: | 1459 * <i>switch (e) { label<sub>11</sub> … label<sub>1j1</sub> case e<sub>
1</sub>: |
| 1379 * s<sub>1</sub> … label<sub>n1</sub> … label<sub>njn</sub> case
e<sub>n</sub>: | 1460 * s<sub>1</sub> … label<sub>n1</sub> … label<sub>njn</sub> case
e<sub>n</sub>: |
| 1380 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub>
k</sub></i> are not | 1461 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub>
k</sub></i> are not |
| 1381 * compile-time constants, for all <i>1 <= k <= n</i>. | 1462 * compile-time constants, for all <i>1 <= k <= n</i>. |
| 1382 */ | 1463 */ |
| 1383 static final CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = new CompileTi
meErrorCode('NON_CONSTANT_CASE_EXPRESSION', 95, "Case expressions must be consta
nt"); | 1464 static final CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = new CompileTi
meErrorCode('NON_CONSTANT_CASE_EXPRESSION', 100, "Case expressions must be const
ant"); |
| 1384 | 1465 |
| 1385 /** | 1466 /** |
| 1386 * 6.2.2 Optional Formals: It is a compile-time error if the default value of
an optional | 1467 * 6.2.2 Optional Formals: It is a compile-time error if the default value of
an optional |
| 1387 * parameter is not a compile-time constant. | 1468 * parameter is not a compile-time constant. |
| 1388 */ | 1469 */ |
| 1389 static final CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = new CompileTime
ErrorCode('NON_CONSTANT_DEFAULT_VALUE', 96, "Default values of an optional param
eter must be constant"); | 1470 static final CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = new CompileTime
ErrorCode('NON_CONSTANT_DEFAULT_VALUE', 101, "Default values of an optional para
meter must be constant"); |
| 1390 | 1471 |
| 1391 /** | 1472 /** |
| 1392 * 12.6 Lists: It is a compile time error if an element of a constant list lit
eral is not a | 1473 * 12.6 Lists: It is a compile time error if an element of a constant list lit
eral is not a |
| 1393 * compile-time constant. | 1474 * compile-time constant. |
| 1394 */ | 1475 */ |
| 1395 static final CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = new CompileTimeE
rrorCode('NON_CONSTANT_LIST_ELEMENT', 97, "'const' lists must have all constant
values"); | 1476 static final CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = new CompileTimeE
rrorCode('NON_CONSTANT_LIST_ELEMENT', 102, "'const' lists must have all constant
values"); |
| 1396 | 1477 |
| 1397 /** | 1478 /** |
| 1398 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map | 1479 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map |
| 1399 * literal is not a compile-time constant. | 1480 * literal is not a compile-time constant. |
| 1400 */ | 1481 */ |
| 1401 static final CompileTimeErrorCode NON_CONSTANT_MAP_KEY = new CompileTimeErrorC
ode('NON_CONSTANT_MAP_KEY', 98, "The keys in a map must be constant"); | 1482 static final CompileTimeErrorCode NON_CONSTANT_MAP_KEY = new CompileTimeErrorC
ode('NON_CONSTANT_MAP_KEY', 103, "The keys in a map must be constant"); |
| 1402 | 1483 |
| 1403 /** | 1484 /** |
| 1404 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map | 1485 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map |
| 1405 * literal is not a compile-time constant. | 1486 * literal is not a compile-time constant. |
| 1406 */ | 1487 */ |
| 1407 static final CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = new CompileTimeErro
rCode('NON_CONSTANT_MAP_VALUE', 99, "The values in a 'const' map must be constan
t"); | 1488 static final CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = new CompileTimeErro
rCode('NON_CONSTANT_MAP_VALUE', 104, "The values in a 'const' map must be consta
nt"); |
| 1408 | 1489 |
| 1409 /** | 1490 /** |
| 1410 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the | 1491 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the |
| 1411 * character @, followed by a constant expression that must be either a refere
nce to a | 1492 * character @, followed by a constant expression that must be either a refere
nce to a |
| 1412 * compile-time constant variable, or a call to a constant constructor. | 1493 * compile-time constant variable, or a call to a constant constructor. |
| 1413 */ | 1494 */ |
| 1414 static final CompileTimeErrorCode NON_CONSTANT_ANNOTATION_CONSTRUCTOR = new Co
mpileTimeErrorCode('NON_CONSTANT_ANNOTATION_CONSTRUCTOR', 100, "Annotation creat
ion can use only 'const' constructor"); | 1495 static final CompileTimeErrorCode NON_CONSTANT_ANNOTATION_CONSTRUCTOR = new Co
mpileTimeErrorCode('NON_CONSTANT_ANNOTATION_CONSTRUCTOR', 105, "Annotation creat
ion can use only 'const' constructor"); |
| 1415 | 1496 |
| 1416 /** | 1497 /** |
| 1417 * 7.6.3 Constant Constructors: Any expression that appears within the initial
izer list of a | 1498 * 7.6.3 Constant Constructors: Any expression that appears within the initial
izer list of a |
| 1418 * constant constructor must be a potentially constant expression, or a compil
e-time error occurs. | 1499 * constant constructor must be a potentially constant expression, or a compil
e-time error occurs. |
| 1419 */ | 1500 */ |
| 1420 static final CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = new Comp
ileTimeErrorCode('NON_CONSTANT_VALUE_IN_INITIALIZER', 101, "Initializer expressi
ons in constant constructors must be constants"); | 1501 static final CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = new Comp
ileTimeErrorCode('NON_CONSTANT_VALUE_IN_INITIALIZER', 106, "Initializer expressi
ons in constant constructors must be constants"); |
| 1421 | 1502 |
| 1422 /** | 1503 /** |
| 1423 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i>
or if <i>m > n</i>. | 1504 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i>
or if <i>m > n</i>. |
| 1424 * | 1505 * |
| 1425 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 1506 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 1426 * uncaught exception being thrown. | 1507 * uncaught exception being thrown. |
| 1427 * | 1508 * |
| 1428 * @param requiredCount the expected number of required arguments | 1509 * @param requiredCount the expected number of required arguments |
| 1429 * @param argumentCount the actual number of positional arguments given | 1510 * @param argumentCount the actual number of positional arguments given |
| 1430 */ | 1511 */ |
| 1431 static final CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new CompileT
imeErrorCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', 102, "%d required argument(s) expe
cted, but %d found"); | 1512 static final CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new CompileT
imeErrorCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', 107, "%d required argument(s) expe
cted, but %d found"); |
| 1432 | 1513 |
| 1433 /** | 1514 /** |
| 1434 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears | 1515 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears |
| 1435 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is | 1516 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is |
| 1436 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> | 1517 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> |
| 1437 * (respectively <i>S.id</i>) | 1518 * (respectively <i>S.id</i>) |
| 1438 */ | 1519 */ |
| 1439 static final CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR = new CompileTime
ErrorCode('NON_GENERATIVE_CONSTRUCTOR', 103, "The generative constructor '%s' ex
pected, but factory found"); | 1520 static final CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR = new CompileTime
ErrorCode('NON_GENERATIVE_CONSTRUCTOR', 108, "The generative constructor '%s' ex
pected, but factory found"); |
| 1440 | 1521 |
| 1441 /** | 1522 /** |
| 1442 * 7.9 Superclasses: It is a compile-time error to specify an extends clause f
or class Object. | 1523 * 7.9 Superclasses: It is a compile-time error to specify an extends clause f
or class Object. |
| 1443 */ | 1524 */ |
| 1444 static final CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = new Com
pileTimeErrorCode('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 104, ""); | 1525 static final CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = new Com
pileTimeErrorCode('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 109, ""); |
| 1445 | 1526 |
| 1446 /** | 1527 /** |
| 1447 * 7.1.1 Operators: It is a compile-time error to declare an optional paramete
r in an operator. | 1528 * 7.1.1 Operators: It is a compile-time error to declare an optional paramete
r in an operator. |
| 1448 */ | 1529 */ |
| 1449 static final CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = new Compile
TimeErrorCode('OPTIONAL_PARAMETER_IN_OPERATOR', 105, "Optional parameters are no
t allowed when defining an operator"); | 1530 static final CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = new Compile
TimeErrorCode('OPTIONAL_PARAMETER_IN_OPERATOR', 110, "Optional parameters are no
t allowed when defining an operator"); |
| 1450 | 1531 |
| 1451 /** | 1532 /** |
| 1452 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part | 1533 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part |
| 1453 * declaration. | 1534 * declaration. |
| 1454 * | 1535 * |
| 1455 * @param uri the uri pointing to a non-library declaration | 1536 * @param uri the uri pointing to a non-library declaration |
| 1456 */ | 1537 */ |
| 1457 static final CompileTimeErrorCode PART_OF_NON_PART = new CompileTimeErrorCode(
'PART_OF_NON_PART', 106, "The included part '%s' must have a part-of directive")
; | 1538 static final CompileTimeErrorCode PART_OF_NON_PART = new CompileTimeErrorCode(
'PART_OF_NON_PART', 111, "The included part '%s' must have a part-of directive")
; |
| 1458 | 1539 |
| 1459 /** | 1540 /** |
| 1460 * 14.1 Imports: It is a compile-time error if the current library declares a
top-level member | 1541 * 14.1 Imports: It is a compile-time error if the current library declares a
top-level member |
| 1461 * named <i>p</i>. | 1542 * named <i>p</i>. |
| 1462 */ | 1543 */ |
| 1463 static final CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = new
CompileTimeErrorCode('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 107, "The name '%s
' is already used as an import prefix and cannot be used to name a top-level ele
ment"); | 1544 static final CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = new
CompileTimeErrorCode('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 112, "The name '%s
' is already used as an import prefix and cannot be used to name a top-level ele
ment"); |
| 1464 | 1545 |
| 1465 /** | 1546 /** |
| 1466 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named o
ptional parameter | 1547 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named o
ptional parameter |
| 1467 * begins with an '_' character. | 1548 * begins with an '_' character. |
| 1468 */ | 1549 */ |
| 1469 static final CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = new CompileTime
ErrorCode('PRIVATE_OPTIONAL_PARAMETER', 108, "Named optional parameters cannot s
tart with an underscore"); | 1550 static final CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = new CompileTime
ErrorCode('PRIVATE_OPTIONAL_PARAMETER', 113, "Named optional parameters cannot s
tart with an underscore"); |
| 1470 | 1551 |
| 1471 /** | 1552 /** |
| 1472 * 12.1 Constants: It is a compile-time error if the value of a compile-time c
onstant expression | 1553 * 12.1 Constants: It is a compile-time error if the value of a compile-time c
onstant expression |
| 1473 * depends on itself. | 1554 * depends on itself. |
| 1474 */ | 1555 */ |
| 1475 static final CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = new Compil
eTimeErrorCode('RECURSIVE_COMPILE_TIME_CONSTANT', 109, ""); | 1556 static final CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = new Compil
eTimeErrorCode('RECURSIVE_COMPILE_TIME_CONSTANT', 114, ""); |
| 1476 | 1557 |
| 1477 /** | 1558 /** |
| 1478 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 1559 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
| 1479 * only action is to invoke another generative constructor. | 1560 * only action is to invoke another generative constructor. |
| 1480 * | 1561 * |
| 1481 * TODO(scheglov) review this later, there are no explicit "it is a compile-ti
me error" in | 1562 * TODO(scheglov) review this later, there are no explicit "it is a compile-ti
me error" in |
| 1482 * specification. But it was added to the co19 and there is same error for fac
tories. | 1563 * specification. But it was added to the co19 and there is same error for fac
tories. |
| 1483 * | 1564 * |
| 1484 * https://code.google.com/p/dart/issues/detail?id=954 | 1565 * https://code.google.com/p/dart/issues/detail?id=954 |
| 1485 */ | 1566 */ |
| 1486 static final CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = new Compile
TimeErrorCode('RECURSIVE_CONSTRUCTOR_REDIRECT', 110, "Cycle in redirecting gener
ative constructors"); | 1567 static final CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = new Compile
TimeErrorCode('RECURSIVE_CONSTRUCTOR_REDIRECT', 115, "Cycle in redirecting gener
ative constructors"); |
| 1487 | 1568 |
| 1488 /** | 1569 /** |
| 1489 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr
uctor redirects to | 1570 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr
uctor redirects to |
| 1490 * itself, either directly or indirectly via a sequence of redirections. | 1571 * itself, either directly or indirectly via a sequence of redirections. |
| 1491 */ | 1572 */ |
| 1492 static final CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = new CompileTime
ErrorCode('RECURSIVE_FACTORY_REDIRECT', 111, "Cycle in redirecting factory const
ructors"); | 1573 static final CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = new CompileTime
ErrorCode('RECURSIVE_FACTORY_REDIRECT', 116, "Cycle in redirecting factory const
ructors"); |
| 1493 | |
| 1494 /** | |
| 1495 * 15.3.1 Typedef: It is a compile-time error if a typedef refers to itself vi
a a chain of | |
| 1496 * references that does not include a class type. | |
| 1497 */ | |
| 1498 static final CompileTimeErrorCode RECURSIVE_FUNCTION_TYPE_ALIAS = new CompileT
imeErrorCode('RECURSIVE_FUNCTION_TYPE_ALIAS', 112, ""); | |
| 1499 | 1574 |
| 1500 /** | 1575 /** |
| 1501 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a | 1576 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a |
| 1502 * superinterface of itself. | 1577 * superinterface of itself. |
| 1503 * | 1578 * |
| 1504 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. | 1579 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. |
| 1505 * | 1580 * |
| 1506 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. | 1581 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. |
| 1507 * | 1582 * |
| 1508 * @param className the name of the class that implements itself recursively | 1583 * @param className the name of the class that implements itself recursively |
| 1509 * @param strImplementsPath a string representation of the implements loop | 1584 * @param strImplementsPath a string representation of the implements loop |
| 1510 */ | 1585 */ |
| 1511 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = new Compil
eTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE', 113, "'%s' cannot be a superin
terface of itself: %s"); | 1586 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = new Compil
eTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE', 117, "'%s' cannot be a superin
terface of itself: %s"); |
| 1512 | 1587 |
| 1513 /** | 1588 /** |
| 1514 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a | 1589 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a |
| 1515 * superinterface of itself. | 1590 * superinterface of itself. |
| 1516 * | 1591 * |
| 1517 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. | 1592 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. |
| 1518 * | 1593 * |
| 1519 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. | 1594 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. |
| 1520 * | 1595 * |
| 1521 * @param className the name of the class that implements itself recursively | 1596 * @param className the name of the class that implements itself recursively |
| 1522 */ | 1597 */ |
| 1523 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EX
TENDS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTE
NDS', 114, "'%s' cannot extend itself"); | 1598 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EX
TENDS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTE
NDS', 118, "'%s' cannot extend itself"); |
| 1524 | 1599 |
| 1525 /** | 1600 /** |
| 1526 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a | 1601 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a |
| 1527 * superinterface of itself. | 1602 * superinterface of itself. |
| 1528 * | 1603 * |
| 1529 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. | 1604 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. |
| 1530 * | 1605 * |
| 1531 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. | 1606 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. |
| 1532 * | 1607 * |
| 1533 * @param className the name of the class that implements itself recursively | 1608 * @param className the name of the class that implements itself recursively |
| 1534 */ | 1609 */ |
| 1535 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IM
PLEMENTS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_I
MPLEMENTS', 115, "'%s' cannot implement itself"); | 1610 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IM
PLEMENTS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_I
MPLEMENTS', 119, "'%s' cannot implement itself"); |
| 1536 | 1611 |
| 1537 /** | 1612 /** |
| 1538 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th
e const modifier but | 1613 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th
e const modifier but |
| 1539 * <i>k'</i> is not a constant constructor. | 1614 * <i>k'</i> is not a constant constructor. |
| 1540 */ | 1615 */ |
| 1541 static final CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = new Comp
ileTimeErrorCode('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 116, "Constant factory con
structor cannot delegate to a non-constant constructor"); | 1616 static final CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = new Comp
ileTimeErrorCode('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 120, "Constant factory con
structor cannot delegate to a non-constant constructor"); |
| 1542 | 1617 |
| 1543 /** | 1618 /** |
| 1544 * 13.3 Local Variable Declaration: It is a compile-time error if <i>e</i> ref
ers to the name | 1619 * 13.3 Local Variable Declaration: It is a compile-time error if <i>e</i> ref
ers to the name |
| 1545 * <i>v</i> or the name <i>v=</i>. | 1620 * <i>v</i> or the name <i>v=</i>. |
| 1546 */ | 1621 */ |
| 1547 static final CompileTimeErrorCode REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZE
R = new CompileTimeErrorCode('REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER', 11
7, "The name '%s' cannot be referenced in the initializer of a variable with the
same name"); | 1622 static final CompileTimeErrorCode REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZE
R = new CompileTimeErrorCode('REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER', 12
1, "The name '%s' cannot be referenced in the initializer of a variable with the
same name"); |
| 1548 | |
| 1549 /** | |
| 1550 * 16.1.1 Reserved Words: A reserved word may not be used as an identifier; it
is a compile-time | |
| 1551 * error if a reserved word is used where an identifier is expected. | |
| 1552 */ | |
| 1553 static final CompileTimeErrorCode RESERVED_WORD_AS_IDENTIFIER = new CompileTim
eErrorCode('RESERVED_WORD_AS_IDENTIFIER', 118, ""); | |
| 1554 | 1623 |
| 1555 /** | 1624 /** |
| 1556 * 12.8.1 Rethrow: It is a compile-time error if an expression of the form <i>
rethrow;</i> is not | 1625 * 12.8.1 Rethrow: It is a compile-time error if an expression of the form <i>
rethrow;</i> is not |
| 1557 * enclosed within a on-catch clause. | 1626 * enclosed within a on-catch clause. |
| 1558 */ | 1627 */ |
| 1559 static final CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = new CompileTimeError
Code('RETHROW_OUTSIDE_CATCH', 119, "rethrow must be inside of a catch clause"); | 1628 static final CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = new CompileTimeError
Code('RETHROW_OUTSIDE_CATCH', 122, "rethrow must be inside of a catch clause"); |
| 1560 | 1629 |
| 1561 /** | 1630 /** |
| 1562 * 13.11 Return: It is a compile-time error if a return statement of the form
<i>return e;</i> | 1631 * 13.11 Return: It is a compile-time error if a return statement of the form
<i>return e;</i> |
| 1563 * appears in a generative constructor. | 1632 * appears in a generative constructor. |
| 1564 */ | 1633 */ |
| 1565 static final CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = new Compi
leTimeErrorCode('RETURN_IN_GENERATIVE_CONSTRUCTOR', 120, "Constructors cannot re
turn a value"); | 1634 static final CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = new Compi
leTimeErrorCode('RETURN_IN_GENERATIVE_CONSTRUCTOR', 123, "Constructors cannot re
turn a value"); |
| 1566 | |
| 1567 /** | |
| 1568 * 6.1 Function Declarations: It is a compile-time error to preface a function
declaration with | |
| 1569 * the built-in identifier static. | |
| 1570 */ | |
| 1571 static final CompileTimeErrorCode STATIC_TOP_LEVEL_FUNCTION = new CompileTimeE
rrorCode('STATIC_TOP_LEVEL_FUNCTION', 121, ""); | |
| 1572 | |
| 1573 /** | |
| 1574 * 5 Variables: It is a compile-time error to preface a top level variable dec
laration with the | |
| 1575 * built-in identifier static. | |
| 1576 */ | |
| 1577 static final CompileTimeErrorCode STATIC_TOP_LEVEL_VARIABLE = new CompileTimeE
rrorCode('STATIC_TOP_LEVEL_VARIABLE', 122, ""); | |
| 1578 | 1635 |
| 1579 /** | 1636 /** |
| 1580 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form | 1637 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form |
| 1581 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … | 1638 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … |
| 1582 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe
r method invocation | 1639 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe
r method invocation |
| 1583 * occurs in a top-level function or variable initializer, in an instance vari
able initializer or | 1640 * occurs in a top-level function or variable initializer, in an instance vari
able initializer or |
| 1584 * initializer list, in class Object, in a factory constructor, or in a static
method or variable | 1641 * initializer list, in class Object, in a factory constructor, or in a static
method or variable |
| 1585 * initializer. | 1642 * initializer. |
| 1586 */ | 1643 */ |
| 1587 static final CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = new CompileTimeEr
rorCode('SUPER_IN_INVALID_CONTEXT', 123, "Invalid context for 'super' invocation
"); | 1644 static final CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = new CompileTimeEr
rorCode('SUPER_IN_INVALID_CONTEXT', 124, "Invalid context for 'super' invocation
"); |
| 1588 | 1645 |
| 1589 /** | 1646 /** |
| 1590 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 1647 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
| 1591 * only action is to invoke another generative constructor. | 1648 * only action is to invoke another generative constructor. |
| 1592 */ | 1649 */ |
| 1593 static final CompileTimeErrorCode SUPER_IN_REDIRECTING_CONSTRUCTOR = new Compi
leTimeErrorCode('SUPER_IN_REDIRECTING_CONSTRUCTOR', 124, "The redirecting constr
uctor cannot have a 'super' initializer"); | 1650 static final CompileTimeErrorCode SUPER_IN_REDIRECTING_CONSTRUCTOR = new Compi
leTimeErrorCode('SUPER_IN_REDIRECTING_CONSTRUCTOR', 125, "The redirecting constr
uctor cannot have a 'super' initializer"); |
| 1594 | 1651 |
| 1595 /** | 1652 /** |
| 1596 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time | 1653 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time |
| 1597 * error if a generative constructor of class Object includes a superinitializ
er. | 1654 * error if a generative constructor of class Object includes a superinitializ
er. |
| 1598 */ | 1655 */ |
| 1599 static final CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = new CompileTim
eErrorCode('SUPER_INITIALIZER_IN_OBJECT', 125, ""); | 1656 static final CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = new CompileTim
eErrorCode('SUPER_INITIALIZER_IN_OBJECT', 126, ""); |
| 1600 | 1657 |
| 1601 /** | 1658 /** |
| 1602 * 12.11 Instance Creation: It is a static type warning if any of the type arg
uments to a | 1659 * 12.11 Instance Creation: It is a static type warning if any of the type arg
uments to a |
| 1603 * constructor of a generic type <i>G</i> invoked by a new expression or a con
stant object | 1660 * constructor of a generic type <i>G</i> invoked by a new expression or a con
stant object |
| 1604 * expression are not subtypes of the bounds of the corresponding formal type
parameters of | 1661 * expression are not subtypes of the bounds of the corresponding formal type
parameters of |
| 1605 * <i>G</i>. | 1662 * <i>G</i>. |
| 1606 * | 1663 * |
| 1607 * 12.11.1 New: If T is malformed a dynamic error occurs. In checked mode, if
T is mal-bounded a | 1664 * 12.11.1 New: If T is malformed a dynamic error occurs. In checked mode, if
T is mal-bounded a |
| 1608 * dynamic error occurs. | 1665 * dynamic error occurs. |
| 1609 * | 1666 * |
| 1610 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time
constant would raise | 1667 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time
constant would raise |
| 1611 * an exception. | 1668 * an exception. |
| 1612 * | 1669 * |
| 1613 * @param boundedTypeName the name of the type used in the instance creation t
hat should be | 1670 * @param boundedTypeName the name of the type used in the instance creation t
hat should be |
| 1614 * limited by the bound as specified in the class declaration | 1671 * limited by the bound as specified in the class declaration |
| 1615 * @param boundingTypeName the name of the bounding type | 1672 * @param boundingTypeName the name of the bounding type |
| 1616 * @see StaticTypeWarningCode#TYPE_ARGUMENT_NOT_MATCHING_BOUNDS | 1673 * @see StaticTypeWarningCode#TYPE_ARGUMENT_NOT_MATCHING_BOUNDS |
| 1617 */ | 1674 */ |
| 1618 static final CompileTimeErrorCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = new Comp
ileTimeErrorCode('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 126, "'%s' does not extend
'%s'"); | 1675 static final CompileTimeErrorCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = new Comp
ileTimeErrorCode('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 127, "'%s' does not extend
'%s'"); |
| 1619 | 1676 |
| 1620 /** | 1677 /** |
| 1621 * 15.3.1 Typedef: It is a compile-time error if a typedef refers to itself vi
a a chain of | 1678 * 15.3.1 Typedef: It is a compile-time error if a typedef refers to itself vi
a a chain of |
| 1622 * references that does not include a class declaration. | 1679 * references that does not include a class declaration. |
| 1623 */ | 1680 */ |
| 1624 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"); | 1681 static final CompileTimeErrorCode TYPE_ALIAS_CANNOT_REFERENCE_ITSELF = new Com
pileTimeErrorCode('TYPE_ALIAS_CANNOT_REFERENCE_ITSELF', 128, "Type alias cannot
reference itself directly or via other typedefs"); |
| 1625 | 1682 |
| 1626 /** | 1683 /** |
| 1627 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current | 1684 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current |
| 1628 * scope, optionally followed by type arguments. | 1685 * scope, optionally followed by type arguments. |
| 1629 */ | 1686 */ |
| 1630 static final CompileTimeErrorCode UNDEFINED_CLASS = new CompileTimeErrorCode('
UNDEFINED_CLASS', 128, "Undefined class '%s'"); | 1687 static final CompileTimeErrorCode UNDEFINED_CLASS = new CompileTimeErrorCode('
UNDEFINED_CLASS', 129, "Undefined class '%s'"); |
| 1631 | 1688 |
| 1632 /** | 1689 /** |
| 1633 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears | 1690 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears |
| 1634 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is | 1691 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is |
| 1635 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> | 1692 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> |
| 1636 * (respectively <i>S.id</i>) | 1693 * (respectively <i>S.id</i>) |
| 1637 */ | 1694 */ |
| 1638 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'"); | 1695 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = new C
ompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 130, "The class '%s'
does not have a generative constructor '%s'"); |
| 1639 | 1696 |
| 1640 /** | 1697 /** |
| 1641 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears | 1698 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears |
| 1642 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is | 1699 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is |
| 1643 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> | 1700 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> |
| 1644 * (respectively <i>S.id</i>) | 1701 * (respectively <i>S.id</i>) |
| 1645 */ | 1702 */ |
| 1646 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"); | 1703 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT
= new CompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT', 131,
"The class '%s' does not have a default generative constructor"); |
| 1647 | |
| 1648 /** | |
| 1649 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Ea
ch final instance | |
| 1650 * variable <i>f</i> declared in the immediately enclosing class must have an
initializer in | |
| 1651 * <i>k</i>'s initializer list unless it has already been initialized by one o
f the following | |
| 1652 * means: | |
| 1653 * <ol> | |
| 1654 * * Initialization at the declaration of <i>f</i>. | |
| 1655 * * Initialization by means of an initializing formal of <i>k</i>. | |
| 1656 * </ol> | |
| 1657 * or a compile-time error occurs. | |
| 1658 */ | |
| 1659 static final CompileTimeErrorCode UNINITIALIZED_FINAL_FIELD = new CompileTimeE
rrorCode('UNINITIALIZED_FINAL_FIELD', 131, ""); | |
| 1660 | 1704 |
| 1661 /** | 1705 /** |
| 1662 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>,
<i>1<=i<=l</i>, | 1706 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>,
<i>1<=i<=l</i>, |
| 1663 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i
> ... | 1707 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i
> ... |
| 1664 * <i>p<sub>n+k</sub></i>} or a static warning occurs. | 1708 * <i>p<sub>n+k</sub></i>} or a static warning occurs. |
| 1665 * | 1709 * |
| 1666 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 1710 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 1667 * uncaught exception being thrown. | 1711 * uncaught exception being thrown. |
| 1668 * | 1712 * |
| 1669 * @param name the name of the requested named parameter | 1713 * @param name the name of the requested named parameter |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1716 * | 1760 * |
| 1717 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration | 1761 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration |
| 1718 */ | 1762 */ |
| 1719 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINU
S = new CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS', 13
6, "Operator '-' should declare 0 or 1 parameter, but %d found"); | 1763 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINU
S = new CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS', 13
6, "Operator '-' should declare 0 or 1 parameter, but %d found"); |
| 1720 | 1764 |
| 1721 /** | 1765 /** |
| 1722 * 7.3 Setters: It is a compile-time error if a setter's formal parameter list
does not include | 1766 * 7.3 Setters: It is a compile-time error if a setter's formal parameter list
does not include |
| 1723 * exactly one required formal parameter <i>p</i>. | 1767 * exactly one required formal parameter <i>p</i>. |
| 1724 */ | 1768 */ |
| 1725 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = new
CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 137, "Setters shou
ld declare exactly one required parameter"); | 1769 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = new
CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 137, "Setters shou
ld declare exactly one required parameter"); |
| 1726 static final List<CompileTimeErrorCode> values = [AMBIGUOUS_EXPORT, AMBIGUOUS_
IMPORT, ARGUMENT_DEFINITION_TEST_NON_PARAMETER, BUILT_IN_IDENTIFIER_AS_TYPE, BUI
LT_IN_IDENTIFIER_AS_TYPE_NAME, BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, BUILT_IN_IDE
NTIFIER_AS_TYPE_VARIABLE_NAME, CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, COMPILE_T
IME_CONSTANT_RAISES_EXCEPTION, CONFLICTING_GETTER_AND_METHOD, CONFLICTING_METHOD
_AND_GETTER, CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, CONFLICTING_CONSTRUCTOR_NAM
E_AND_METHOD, CONST_CONSTRUCTOR_THROWS_EXCEPTION, CONST_CONSTRUCTOR_WITH_NON_FIN
AL_FIELD, CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE, CONST_FORMAL_PARAMETER, CONST_
INITIALIZED_WITH_NON_CONSTANT_VALUE, CONST_INSTANCE_FIELD, CONST_EVAL_TYPE_BOOL,
CONST_EVAL_TYPE_BOOL_NUM_STRING, CONST_EVAL_TYPE_INT, CONST_EVAL_TYPE_NUM, CONS
T_EVAL_THROWS_EXCEPTION, CONST_EVAL_THROWS_IDBZE, CONST_WITH_INVALID_TYPE_PARAME
TERS, CONST_WITH_NON_CONST, CONST_WITH_NON_CONSTANT_ARGUMENT, CONST_WITH_NON_TYP
E, CONST_WITH_TYPE_PARAMETERS, CONST_WITH_UNDEFINED_CONSTRUCTOR, CONST_WITH_UNDE
FINED_CONSTRUCTOR_DEFAULT, DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS, DUPLICATE_CONST
RUCTOR_DEFAULT, DUPLICATE_CONSTRUCTOR_NAME, DUPLICATE_DEFINITION, DUPLICATE_DEFI
NITION_INHERITANCE, DUPLICATE_NAMED_ARGUMENT, EXPORT_INTERNAL_LIBRARY, EXPORT_OF
_NON_LIBRARY, EXTENDS_NON_CLASS, EXTENDS_DISALLOWED_CLASS, EXTRA_POSITIONAL_ARGU
MENTS, FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS, FIELD_INITIALIZED_IN_INITIALI
ZER_AND_DECLARATION, FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER, FINAL_INITI
ALIZED_IN_DECLARATION_AND_CONSTRUCTOR, FINAL_INITIALIZED_MULTIPLE_TIMES, FIELD_I
NITIALIZER_FACTORY_CONSTRUCTOR, FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR, FIELD_INI
TIALIZER_REDIRECTING_CONSTRUCTOR, GETTER_AND_METHOD_WITH_SAME_NAME, IMPLEMENTS_D
ISALLOWED_CLASS, IMPLEMENTS_DYNAMIC, IMPLEMENTS_NON_CLASS, IMPLEMENTS_REPEATED,
IMPLICIT_THIS_REFERENCE_IN_INITIALIZER, IMPORT_INTERNAL_LIBRARY, IMPORT_OF_NON_L
IBRARY, INCONSISTENT_CASE_EXPRESSION_TYPES, INITIALIZER_FOR_NON_EXISTANT_FIELD,
INITIALIZER_FOR_STATIC_FIELD, INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD, INITIA
LIZING_FORMAL_FOR_STATIC_FIELD, INSTANCE_MEMBER_ACCESS_FROM_STATIC, INVALID_ANNO
TATION, INVALID_CONSTANT, INVALID_CONSTRUCTOR_NAME, INVALID_FACTORY_NAME_NOT_A_C
LASS, INVALID_OVERRIDE_NAMED, INVALID_OVERRIDE_POSITIONAL, INVALID_OVERRIDE_REQU
IRED, INVALID_REFERENCE_TO_THIS, INVALID_TYPE_ARGUMENT_FOR_KEY, INVALID_TYPE_ARG
UMENT_IN_CONST_LIST, INVALID_TYPE_ARGUMENT_IN_CONST_MAP, INVALID_URI, LABEL_IN_O
UTER_SCOPE, LABEL_UNDEFINED, MEMBER_WITH_CLASS_NAME, METHOD_AND_GETTER_WITH_SAME
_NAME, MISSING_CONST_IN_LIST_LITERAL, MISSING_CONST_IN_MAP_LITERAL, MIXIN_DECLAR
ES_CONSTRUCTOR, MIXIN_INHERITS_FROM_NOT_OBJECT, MIXIN_OF_NON_CLASS, MIXIN_REFERE
NCES_SUPER, MIXIN_WITH_NON_CLASS_SUPERCLASS, MULTIPLE_REDIRECTING_CONSTRUCTOR_IN
VOCATIONS, MULTIPLE_SUPER_INITIALIZERS, NEW_WITH_INVALID_TYPE_PARAMETERS, NO_ANN
OTATION_CONSTRUCTOR_ARGUMENTS, NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT, NO_DEFAULT
_SUPER_CONSTRUCTOR_IMPLICIT, NON_CONST_MAP_AS_EXPRESSION_STATEMENT, NON_CONSTANT
_CASE_EXPRESSION, NON_CONSTANT_DEFAULT_VALUE, NON_CONSTANT_LIST_ELEMENT, NON_CON
STANT_MAP_KEY, NON_CONSTANT_MAP_VALUE, NON_CONSTANT_ANNOTATION_CONSTRUCTOR, NON_
CONSTANT_VALUE_IN_INITIALIZER, NOT_ENOUGH_REQUIRED_ARGUMENTS, NON_GENERATIVE_CON
STRUCTOR, OBJECT_CANNOT_EXTEND_ANOTHER_CLASS, OPTIONAL_PARAMETER_IN_OPERATOR, PA
RT_OF_NON_PART, PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER, PRIVATE_OPTIONAL_PARAMETE
R, RECURSIVE_COMPILE_TIME_CONSTANT, RECURSIVE_CONSTRUCTOR_REDIRECT, RECURSIVE_FA
CTORY_REDIRECT, RECURSIVE_FUNCTION_TYPE_ALIAS, RECURSIVE_INTERFACE_INHERITANCE,
RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS, RECURSIVE_INTERFACE_INHERITAN
CE_BASE_CASE_IMPLEMENTS, REDIRECT_TO_NON_CONST_CONSTRUCTOR, REFERENCE_TO_DECLARE
D_VARIABLE_IN_INITIALIZER, RESERVED_WORD_AS_IDENTIFIER, RETHROW_OUTSIDE_CATCH, R
ETURN_IN_GENERATIVE_CONSTRUCTOR, STATIC_TOP_LEVEL_FUNCTION, STATIC_TOP_LEVEL_VAR
IABLE, SUPER_IN_INVALID_CONTEXT, SUPER_IN_REDIRECTING_CONSTRUCTOR, SUPER_INITIAL
IZER_IN_OBJECT, TYPE_ARGUMENT_NOT_MATCHING_BOUNDS, TYPE_ALIAS_CANNOT_REFERENCE_I
TSELF, UNDEFINED_CLASS, UNDEFINED_CONSTRUCTOR_IN_INITIALIZER, UNDEFINED_CONSTRUC
TOR_IN_INITIALIZER_DEFAULT, UNINITIALIZED_FINAL_FIELD, UNDEFINED_NAMED_PARAMETER
, URI_DOES_NOT_EXIST, URI_WITH_INTERPOLATION, WRONG_NUMBER_OF_PARAMETERS_FOR_OPE
RATOR, WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS, WRONG_NUMBER_OF_PARAMETERS
_FOR_SETTER]; | 1770 static final List<CompileTimeErrorCode> values = [ |
| 1771 AMBIGUOUS_EXPORT, |
| 1772 AMBIGUOUS_IMPORT, |
| 1773 ARGUMENT_DEFINITION_TEST_NON_PARAMETER, |
| 1774 ARGUMENT_TYPE_NOT_ASSIGNABLE, |
| 1775 BUILT_IN_IDENTIFIER_AS_TYPE, |
| 1776 BUILT_IN_IDENTIFIER_AS_TYPE_NAME, |
| 1777 BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, |
| 1778 BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME, |
| 1779 CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, |
| 1780 COMPILE_TIME_CONSTANT_RAISES_EXCEPTION, |
| 1781 CONFLICTING_GETTER_AND_METHOD, |
| 1782 CONFLICTING_METHOD_AND_GETTER, |
| 1783 CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, |
| 1784 CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD, |
| 1785 CONST_CONSTRUCTOR_THROWS_EXCEPTION, |
| 1786 CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, |
| 1787 CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE, |
| 1788 CONST_FORMAL_PARAMETER, |
| 1789 CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, |
| 1790 CONST_INSTANCE_FIELD, |
| 1791 CONST_EVAL_TYPE_BOOL, |
| 1792 CONST_EVAL_TYPE_BOOL_NUM_STRING, |
| 1793 CONST_EVAL_TYPE_INT, |
| 1794 CONST_EVAL_TYPE_NUM, |
| 1795 CONST_EVAL_THROWS_EXCEPTION, |
| 1796 CONST_EVAL_THROWS_IDBZE, |
| 1797 CONST_WITH_INVALID_TYPE_PARAMETERS, |
| 1798 CONST_WITH_NON_CONST, |
| 1799 CONST_WITH_NON_CONSTANT_ARGUMENT, |
| 1800 CONST_WITH_NON_TYPE, |
| 1801 CONST_WITH_TYPE_PARAMETERS, |
| 1802 CONST_WITH_UNDEFINED_CONSTRUCTOR, |
| 1803 CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT, |
| 1804 DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS, |
| 1805 DUPLICATE_CONSTRUCTOR_DEFAULT, |
| 1806 DUPLICATE_CONSTRUCTOR_NAME, |
| 1807 DUPLICATE_DEFINITION, |
| 1808 DUPLICATE_DEFINITION_INHERITANCE, |
| 1809 DUPLICATE_NAMED_ARGUMENT, |
| 1810 EXPORT_INTERNAL_LIBRARY, |
| 1811 EXPORT_OF_NON_LIBRARY, |
| 1812 EXTENDS_NON_CLASS, |
| 1813 EXTENDS_DISALLOWED_CLASS, |
| 1814 EXTRA_POSITIONAL_ARGUMENTS, |
| 1815 FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS, |
| 1816 FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION, |
| 1817 FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER, |
| 1818 FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR, |
| 1819 FINAL_INITIALIZED_MULTIPLE_TIMES, |
| 1820 FIELD_INITIALIZER_FACTORY_CONSTRUCTOR, |
| 1821 FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR, |
| 1822 FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR, |
| 1823 GETTER_AND_METHOD_WITH_SAME_NAME, |
| 1824 IMPLEMENTS_DISALLOWED_CLASS, |
| 1825 IMPLEMENTS_DYNAMIC, |
| 1826 IMPLEMENTS_NON_CLASS, |
| 1827 IMPLEMENTS_REPEATED, |
| 1828 IMPLEMENTS_SUPER_CLASS, |
| 1829 IMPLICIT_THIS_REFERENCE_IN_INITIALIZER, |
| 1830 IMPORT_INTERNAL_LIBRARY, |
| 1831 IMPORT_OF_NON_LIBRARY, |
| 1832 INCONSISTENT_CASE_EXPRESSION_TYPES, |
| 1833 INITIALIZER_FOR_NON_EXISTANT_FIELD, |
| 1834 INITIALIZER_FOR_STATIC_FIELD, |
| 1835 INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD, |
| 1836 INITIALIZING_FORMAL_FOR_STATIC_FIELD, |
| 1837 INSTANCE_MEMBER_ACCESS_FROM_STATIC, |
| 1838 INVALID_ANNOTATION, |
| 1839 INVALID_CONSTANT, |
| 1840 INVALID_CONSTRUCTOR_NAME, |
| 1841 INVALID_FACTORY_NAME_NOT_A_CLASS, |
| 1842 INVALID_OVERRIDE_NAMED, |
| 1843 INVALID_OVERRIDE_POSITIONAL, |
| 1844 INVALID_OVERRIDE_REQUIRED, |
| 1845 INVALID_REFERENCE_TO_THIS, |
| 1846 INVALID_TYPE_ARGUMENT_FOR_KEY, |
| 1847 INVALID_TYPE_ARGUMENT_IN_CONST_LIST, |
| 1848 INVALID_TYPE_ARGUMENT_IN_CONST_MAP, |
| 1849 INVALID_URI, |
| 1850 LABEL_IN_OUTER_SCOPE, |
| 1851 LABEL_UNDEFINED, |
| 1852 LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, |
| 1853 MAP_KEY_TYPE_NOT_ASSIGNABLE, |
| 1854 MAP_VALUE_TYPE_NOT_ASSIGNABLE, |
| 1855 MEMBER_WITH_CLASS_NAME, |
| 1856 METHOD_AND_GETTER_WITH_SAME_NAME, |
| 1857 MISSING_CONST_IN_LIST_LITERAL, |
| 1858 MISSING_CONST_IN_MAP_LITERAL, |
| 1859 MIXIN_DECLARES_CONSTRUCTOR, |
| 1860 MIXIN_INHERITS_FROM_NOT_OBJECT, |
| 1861 MIXIN_OF_NON_CLASS, |
| 1862 MIXIN_REFERENCES_SUPER, |
| 1863 MIXIN_WITH_NON_CLASS_SUPERCLASS, |
| 1864 MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS, |
| 1865 MULTIPLE_SUPER_INITIALIZERS, |
| 1866 NEW_WITH_INVALID_TYPE_PARAMETERS, |
| 1867 NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS, |
| 1868 NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT, |
| 1869 NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT, |
| 1870 NON_CONST_MAP_AS_EXPRESSION_STATEMENT, |
| 1871 NON_CONSTANT_CASE_EXPRESSION, |
| 1872 NON_CONSTANT_DEFAULT_VALUE, |
| 1873 NON_CONSTANT_LIST_ELEMENT, |
| 1874 NON_CONSTANT_MAP_KEY, |
| 1875 NON_CONSTANT_MAP_VALUE, |
| 1876 NON_CONSTANT_ANNOTATION_CONSTRUCTOR, |
| 1877 NON_CONSTANT_VALUE_IN_INITIALIZER, |
| 1878 NOT_ENOUGH_REQUIRED_ARGUMENTS, |
| 1879 NON_GENERATIVE_CONSTRUCTOR, |
| 1880 OBJECT_CANNOT_EXTEND_ANOTHER_CLASS, |
| 1881 OPTIONAL_PARAMETER_IN_OPERATOR, |
| 1882 PART_OF_NON_PART, |
| 1883 PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER, |
| 1884 PRIVATE_OPTIONAL_PARAMETER, |
| 1885 RECURSIVE_COMPILE_TIME_CONSTANT, |
| 1886 RECURSIVE_CONSTRUCTOR_REDIRECT, |
| 1887 RECURSIVE_FACTORY_REDIRECT, |
| 1888 RECURSIVE_INTERFACE_INHERITANCE, |
| 1889 RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS, |
| 1890 RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS, |
| 1891 REDIRECT_TO_NON_CONST_CONSTRUCTOR, |
| 1892 REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER, |
| 1893 RETHROW_OUTSIDE_CATCH, |
| 1894 RETURN_IN_GENERATIVE_CONSTRUCTOR, |
| 1895 SUPER_IN_INVALID_CONTEXT, |
| 1896 SUPER_IN_REDIRECTING_CONSTRUCTOR, |
| 1897 SUPER_INITIALIZER_IN_OBJECT, |
| 1898 TYPE_ARGUMENT_NOT_MATCHING_BOUNDS, |
| 1899 TYPE_ALIAS_CANNOT_REFERENCE_ITSELF, |
| 1900 UNDEFINED_CLASS, |
| 1901 UNDEFINED_CONSTRUCTOR_IN_INITIALIZER, |
| 1902 UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT, |
| 1903 UNDEFINED_NAMED_PARAMETER, |
| 1904 URI_DOES_NOT_EXIST, |
| 1905 URI_WITH_INTERPOLATION, |
| 1906 WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR, |
| 1907 WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS, |
| 1908 WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]; |
| 1727 | 1909 |
| 1728 /// The name of this enum constant, as declared in the enum declaration. | 1910 /// The name of this enum constant, as declared in the enum declaration. |
| 1729 final String name; | 1911 final String name; |
| 1730 | 1912 |
| 1731 /// The position in the enum declaration. | 1913 /// The position in the enum declaration. |
| 1732 final int ordinal; | 1914 final int ordinal; |
| 1733 | 1915 |
| 1734 /** | 1916 /** |
| 1735 * The message template used to create the message to be displayed for this er
ror. | 1917 * The message template used to create the message to be displayed for this er
ror. |
| 1736 */ | 1918 */ |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1774 * the lib directory. | 1956 * the lib directory. |
| 1775 */ | 1957 */ |
| 1776 static final PubSuggestionCode FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE
= new PubSuggestionCode('FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE', 1, "A
file outside the 'lib' directory hierarchy should not reference a file inside th
at hierarchy. Use a package: reference instead."); | 1958 static final PubSuggestionCode FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE
= new PubSuggestionCode('FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE', 1, "A
file outside the 'lib' directory hierarchy should not reference a file inside th
at hierarchy. Use a package: reference instead."); |
| 1777 | 1959 |
| 1778 /** | 1960 /** |
| 1779 * It is a bad practice for a package import to reference anything outside the
given package, or | 1961 * It is a bad practice for a package import to reference anything outside the
given package, or |
| 1780 * more generally, it is bad practice for a package import to contain a "..".
For example, a | 1962 * more generally, it is bad practice for a package import to contain a "..".
For example, a |
| 1781 * source file should not contain a directive such as `import 'package:foo/../
some.dart'`. | 1963 * source file should not contain a directive such as `import 'package:foo/../
some.dart'`. |
| 1782 */ | 1964 */ |
| 1783 static final PubSuggestionCode PACKAGE_IMPORT_CONTAINS_DOT_DOT = new PubSugges
tionCode('PACKAGE_IMPORT_CONTAINS_DOT_DOT', 2, "A package import should not cont
ain '..'"); | 1965 static final PubSuggestionCode PACKAGE_IMPORT_CONTAINS_DOT_DOT = new PubSugges
tionCode('PACKAGE_IMPORT_CONTAINS_DOT_DOT', 2, "A package import should not cont
ain '..'"); |
| 1784 static final List<PubSuggestionCode> values = [FILE_IMPORT_INSIDE_LIB_REFERENC
ES_FILE_OUTSIDE, FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE, PACKAGE_IMPORT_
CONTAINS_DOT_DOT]; | 1966 static final List<PubSuggestionCode> values = [ |
| 1967 FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE, |
| 1968 FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE, |
| 1969 PACKAGE_IMPORT_CONTAINS_DOT_DOT]; |
| 1785 | 1970 |
| 1786 /// The name of this enum constant, as declared in the enum declaration. | 1971 /// The name of this enum constant, as declared in the enum declaration. |
| 1787 final String name; | 1972 final String name; |
| 1788 | 1973 |
| 1789 /// The position in the enum declaration. | 1974 /// The position in the enum declaration. |
| 1790 final int ordinal; | 1975 final int ordinal; |
| 1791 | 1976 |
| 1792 /** | 1977 /** |
| 1793 * The message template used to create the message to be displayed for this er
ror. | 1978 * The message template used to create the message to be displayed for this er
ror. |
| 1794 */ | 1979 */ |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1859 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'"); | 2044 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'"); |
| 1860 | 2045 |
| 1861 /** | 2046 /** |
| 1862 * 5 Variables: Attempting to assign to a final variable elsewhere will cause
a NoSuchMethodError | 2047 * 5 Variables: Attempting to assign to a final variable elsewhere will cause
a NoSuchMethodError |
| 1863 * to be thrown, because no setter is defined for it. The assignment will also
give rise to a | 2048 * to be thrown, because no setter is defined for it. The assignment will also
give rise to a |
| 1864 * static warning for the same reason. | 2049 * static warning for the same reason. |
| 1865 */ | 2050 */ |
| 1866 static final StaticWarningCode ASSIGNMENT_TO_FINAL = new StaticWarningCode('AS
SIGNMENT_TO_FINAL', 2, "Final variables cannot be assigned a value"); | 2051 static final StaticWarningCode ASSIGNMENT_TO_FINAL = new StaticWarningCode('AS
SIGNMENT_TO_FINAL', 2, "Final variables cannot be assigned a value"); |
| 1867 | 2052 |
| 1868 /** | 2053 /** |
| 2054 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
It is a static type |
| 2055 * warning if <i>T</i> does not have an accessible instance setter named <i>v
=</i>. |
| 2056 */ |
| 2057 static final StaticWarningCode ASSIGNMENT_TO_METHOD = new StaticWarningCode('A
SSIGNMENT_TO_METHOD', 3, "Methods cannot be assigned a value"); |
| 2058 |
| 2059 /** |
| 1869 * 13.9 Switch: It is a static warning if the last statement of the statement
sequence | 2060 * 13.9 Switch: It is a static warning if the last statement of the statement
sequence |
| 1870 * <i>s<sub>k</sub></i> is not a break, continue, return or throw statement. | 2061 * <i>s<sub>k</sub></i> is not a break, continue, return or throw statement. |
| 1871 */ | 2062 */ |
| 1872 static final StaticWarningCode CASE_BLOCK_NOT_TERMINATED = new StaticWarningCo
de('CASE_BLOCK_NOT_TERMINATED', 3, "The last statement of the 'case' should be '
break', 'continue', 'return' or 'throw'"); | 2063 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'"); |
| 1873 | 2064 |
| 1874 /** | 2065 /** |
| 1875 * 12.32 Type Cast: It is a static warning if <i>T</i> does not denote a type
available in the | 2066 * 12.32 Type Cast: It is a static warning if <i>T</i> does not denote a type
available in the |
| 1876 * current lexical scope. | 2067 * current lexical scope. |
| 1877 */ | 2068 */ |
| 1878 static final StaticWarningCode CAST_TO_NON_TYPE = new StaticWarningCode('CAST_
TO_NON_TYPE', 4, "The name '%s' is not a type and cannot be used in an 'as' expr
ession"); | 2069 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"); |
| 1879 | 2070 |
| 1880 /** | 2071 /** |
| 1881 * 16.1.2 Comments: A token of the form <i>[new c](uri)</i> will be replaced b
y a link in the | 2072 * 16.1.2 Comments: A token of the form <i>[new c](uri)</i> will be replaced b
y a link in the |
| 1882 * formatted output. The link will point at the constructor named <i>c</i> in
<i>L</i>. The title | 2073 * formatted output. The link will point at the constructor named <i>c</i> in
<i>L</i>. The title |
| 1883 * of the link will be <i>c</i>. It is a static warning if uri is not the URI
of a dart library | 2074 * of the link will be <i>c</i>. It is a static warning if uri is not the URI
of a dart library |
| 1884 * <i>L</i>, or if <i>c</i> is not the name of a constructor of a class declar
ed in the exported | 2075 * <i>L</i>, or if <i>c</i> is not the name of a constructor of a class declar
ed in the exported |
| 1885 * namespace of <i>L</i>. | 2076 * namespace of <i>L</i>. |
| 1886 */ | 2077 */ |
| 1887 static final StaticWarningCode COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE = new
StaticWarningCode('COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE', 5, ""); | 2078 static final StaticWarningCode COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE = new
StaticWarningCode('COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE', 6, ""); |
| 1888 | 2079 |
| 1889 /** | 2080 /** |
| 1890 * 16.1.2 Comments: A token of the form <i>[id](uri)</i> will be replaced by a
link in the | 2081 * 16.1.2 Comments: A token of the form <i>[id](uri)</i> will be replaced by a
link in the |
| 1891 * formatted output. The link will point at the declaration named <i>id</i> in
<i>L</i>. The title | 2082 * formatted output. The link will point at the declaration named <i>id</i> in
<i>L</i>. The title |
| 1892 * of the link will be <i>id</i>. It is a static warning if uri is not the URI
of a dart library | 2083 * of the link will be <i>id</i>. It is a static warning if uri is not the URI
of a dart library |
| 1893 * <i>L</i>, or if <i>id</i> is not a name declared in the exported namespace
of <i>L</i>. | 2084 * <i>L</i>, or if <i>id</i> is not a name declared in the exported namespace
of <i>L</i>. |
| 1894 */ | 2085 */ |
| 1895 static final StaticWarningCode COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE = new
StaticWarningCode('COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE', 6, ""); | 2086 static final StaticWarningCode COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE = new
StaticWarningCode('COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE', 7, ""); |
| 1896 | 2087 |
| 1897 /** | 2088 /** |
| 1898 * 16.1.2 Comments: It is a static warning if <i>c</i> does not denote a const
ructor that | 2089 * 16.1.2 Comments: It is a static warning if <i>c</i> does not denote a const
ructor that |
| 1899 * available in the scope of the documentation comment. | 2090 * available in the scope of the documentation comment. |
| 1900 */ | 2091 */ |
| 1901 static final StaticWarningCode COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR = new
StaticWarningCode('COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR', 7, ""); | 2092 static final StaticWarningCode COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR = new
StaticWarningCode('COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR', 8, ""); |
| 1902 | 2093 |
| 1903 /** | 2094 /** |
| 1904 * 16.1.2 Comments: It is a static warning if <i>id</i> does not denote a decl
aration that | 2095 * 16.1.2 Comments: It is a static warning if <i>id</i> does not denote a decl
aration that |
| 1905 * available in the scope of the documentation comment. | 2096 * available in the scope of the documentation comment. |
| 1906 */ | 2097 */ |
| 1907 static final StaticWarningCode COMMENT_REFERENCE_UNDECLARED_IDENTIFIER = new S
taticWarningCode('COMMENT_REFERENCE_UNDECLARED_IDENTIFIER', 8, ""); | 2098 static final StaticWarningCode COMMENT_REFERENCE_UNDECLARED_IDENTIFIER = new S
taticWarningCode('COMMENT_REFERENCE_UNDECLARED_IDENTIFIER', 9, ""); |
| 1908 | 2099 |
| 1909 /** | 2100 /** |
| 1910 * 16.1.2 Comments: A token of the form <i>[id](uri)</i> will be replaced by a
link in the | 2101 * 16.1.2 Comments: A token of the form <i>[id](uri)</i> will be replaced by a
link in the |
| 1911 * formatted output. The link will point at the declaration named <i>id</i> in
<i>L</i>. The title | 2102 * formatted output. The link will point at the declaration named <i>id</i> in
<i>L</i>. The title |
| 1912 * of the link will be <i>id</i>. It is a static warning if uri is not the URI
of a dart library | 2103 * of the link will be <i>id</i>. It is a static warning if uri is not the URI
of a dart library |
| 1913 * <i>L</i>, or if <i>id</i> is not a name declared in the exported namespace
of <i>L</i>. | 2104 * <i>L</i>, or if <i>id</i> is not a name declared in the exported namespace
of <i>L</i>. |
| 1914 */ | 2105 */ |
| 1915 static final StaticWarningCode COMMENT_REFERENCE_URI_NOT_LIBRARY = new StaticW
arningCode('COMMENT_REFERENCE_URI_NOT_LIBRARY', 9, ""); | 2106 static final StaticWarningCode COMMENT_REFERENCE_URI_NOT_LIBRARY = new StaticW
arningCode('COMMENT_REFERENCE_URI_NOT_LIBRARY', 10, ""); |
| 1916 | 2107 |
| 1917 /** | 2108 /** |
| 1918 * 7.4 Abstract Instance Members: It is a static warning if an abstract member
is declared or | 2109 * 7.4 Abstract Instance Members: It is a static warning if an abstract member
is declared or |
| 1919 * inherited in a concrete class. | 2110 * inherited in a concrete class. |
| 1920 */ | 2111 */ |
| 1921 static final StaticWarningCode CONCRETE_CLASS_WITH_ABSTRACT_MEMBER = new Stati
cWarningCode('CONCRETE_CLASS_WITH_ABSTRACT_MEMBER', 10, "'%s' must have a method
body because '%s' is not abstract"); | 2112 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"); |
| 1922 | 2113 |
| 1923 /** | 2114 /** |
| 1924 * 7.2 Getters: It is a static warning if a class <i>C</i> declares an instanc
e getter named | 2115 * 7.2 Getters: It is a static warning if a class <i>C</i> declares an instanc
e getter named |
| 1925 * <i>v</i> and an accessible static member named <i>v</i> or <i>v=</i> is dec
lared in a | 2116 * <i>v</i> and an accessible static member named <i>v</i> or <i>v=</i> is dec
lared in a |
| 1926 * superclass of <i>C</i>. | 2117 * superclass of <i>C</i>. |
| 1927 * | 2118 * |
| 1928 * @param superName the name of the super class declaring a static member | 2119 * @param superName the name of the super class declaring a static member |
| 1929 */ | 2120 */ |
| 1930 static final StaticWarningCode CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMB
ER = new StaticWarningCode('CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER',
11, "Superclass '%s' declares static member with the same name"); | 2121 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"); |
| 1931 | 2122 |
| 1932 /** | 2123 /** |
| 1933 * 7.3 Setters: It is a static warning if a class <i>C</i> declares an instanc
e setter named | 2124 * 7.3 Setters: It is a static warning if a class <i>C</i> declares an instanc
e setter named |
| 1934 * <i>v=</i> and an accessible static member named <i>v=</i> or <i>v</i> is de
clared in a | 2125 * <i>v=</i> and an accessible static member named <i>v=</i> or <i>v</i> is de
clared in a |
| 1935 * superclass of <i>C</i>. | 2126 * superclass of <i>C</i>. |
| 1936 * | 2127 * |
| 1937 * @param superName the name of the super class declaring a static member | 2128 * @param superName the name of the super class declaring a static member |
| 1938 */ | 2129 */ |
| 1939 static final StaticWarningCode CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMB
ER = new StaticWarningCode('CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER',
12, "Superclass '%s' declares static member with the same name"); | 2130 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"); |
| 1940 | 2131 |
| 1941 /** | 2132 /** |
| 1942 * 7.2 Getters: It is a static warning if a class declares a static getter nam
ed <i>v</i> and also | 2133 * 7.2 Getters: It is a static warning if a class declares a static getter nam
ed <i>v</i> and also |
| 1943 * has a non-static setter named <i>v=</i>. | 2134 * has a non-static setter named <i>v=</i>. |
| 1944 */ | 2135 */ |
| 1945 static final StaticWarningCode CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER =
new StaticWarningCode('CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER', 13, "Cla
ss '%s' declares non-static setter with the same name"); | 2136 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"); |
| 1946 | 2137 |
| 1947 /** | 2138 /** |
| 1948 * 7.3 Setters: It is a static warning if a class declares a static setter nam
ed <i>v=</i> and | 2139 * 7.3 Setters: It is a static warning if a class declares a static setter nam
ed <i>v=</i> and |
| 1949 * also has a non-static member named <i>v</i>. | 2140 * also has a non-static member named <i>v</i>. |
| 1950 */ | 2141 */ |
| 1951 static final StaticWarningCode CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER =
new StaticWarningCode('CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER', 14, "Cla
ss '%s' declares non-static member with the same name"); | 2142 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"); |
| 1952 | 2143 |
| 1953 /** | 2144 /** |
| 1954 * 12.11.2 Const: Given an instance creation expression of the form <i>const q
(a<sub>1</sub>, | 2145 * 12.11.2 Const: Given an instance creation expression of the form <i>const q
(a<sub>1</sub>, |
| 1955 * … a<sub>n</sub>)</i> it is a static warning if <i>q</i> is the const
ructor of an | 2146 * … a<sub>n</sub>)</i> it is a static warning if <i>q</i> is the const
ructor of an |
| 1956 * abstract class but <i>q</i> is not a factory constructor. | 2147 * abstract class but <i>q</i> is not a factory constructor. |
| 1957 */ | 2148 */ |
| 1958 static final StaticWarningCode CONST_WITH_ABSTRACT_CLASS = new StaticWarningCo
de('CONST_WITH_ABSTRACT_CLASS', 15, "Abstract classes cannot be created with a '
const' expression"); | 2149 static final StaticWarningCode CONST_WITH_ABSTRACT_CLASS = new StaticWarningCo
de('CONST_WITH_ABSTRACT_CLASS', 16, "Abstract classes cannot be created with a '
const' expression"); |
| 1959 | 2150 |
| 1960 /** | 2151 /** |
| 1961 * 12.7 Maps: It is a static warning if the values of any two keys in a map li
teral are equal. | 2152 * 12.7 Maps: It is a static warning if the values of any two keys in a map li
teral are equal. |
| 1962 */ | 2153 */ |
| 1963 static final StaticWarningCode EQUAL_KEYS_IN_MAP = new StaticWarningCode('EQUA
L_KEYS_IN_MAP', 16, "Keys in a map cannot be equal"); | 2154 static final StaticWarningCode EQUAL_KEYS_IN_MAP = new StaticWarningCode('EQUA
L_KEYS_IN_MAP', 17, "Keys in a map cannot be equal"); |
| 1964 | 2155 |
| 1965 /** | 2156 /** |
| 1966 * 14.2 Exports: It is a static warning to export two different libraries with
the same name. | 2157 * 14.2 Exports: It is a static warning to export two different libraries with
the same name. |
| 1967 * | 2158 * |
| 1968 * @param uri1 the uri pointing to a first library | 2159 * @param uri1 the uri pointing to a first library |
| 1969 * @param uri2 the uri pointing to a second library | 2160 * @param uri2 the uri pointing to a second library |
| 1970 * @param name the shared name of the exported libraries | 2161 * @param name the shared name of the exported libraries |
| 1971 */ | 2162 */ |
| 1972 static final StaticWarningCode EXPORT_DUPLICATED_LIBRARY_NAME = new StaticWarn
ingCode('EXPORT_DUPLICATED_LIBRARY_NAME', 17, "The exported libraries '%s' and '
%s' should not have the same name '%s'"); | 2163 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'"); |
| 1973 | 2164 |
| 1974 /** | 2165 /** |
| 1975 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > | 2166 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > |
| 1976 * n</i>. | 2167 * n</i>. |
| 1977 * | 2168 * |
| 1978 * @param requiredCount the maximum number of positional arguments | 2169 * @param requiredCount the maximum number of positional arguments |
| 1979 * @param argumentCount the actual number of positional arguments given | 2170 * @param argumentCount the actual number of positional arguments given |
| 1980 * @see #NOT_ENOUGH_REQUIRED_ARGUMENTS | 2171 * @see #NOT_ENOUGH_REQUIRED_ARGUMENTS |
| 1981 */ | 2172 */ |
| 1982 static final StaticWarningCode EXTRA_POSITIONAL_ARGUMENTS = new StaticWarningC
ode('EXTRA_POSITIONAL_ARGUMENTS', 18, "%d positional arguments expected, but %d
found"); | 2173 static final StaticWarningCode EXTRA_POSITIONAL_ARGUMENTS = new StaticWarningC
ode('EXTRA_POSITIONAL_ARGUMENTS', 19, "%d positional arguments expected, but %d
found"); |
| 1983 | 2174 |
| 1984 /** | 2175 /** |
| 1985 * 7.6.1 Generative Constructors: Execution of an initializer of the form <b>t
his</b>.<i>v</i> = | 2176 * 7.6.1 Generative Constructors: Execution of an initializer of the form <b>t
his</b>.<i>v</i> = |
| 1986 * <i>e</i> proceeds as follows: First, the expression <i>e</i> is evaluated t
o an object | 2177 * <i>e</i> proceeds as follows: First, the expression <i>e</i> is evaluated t
o an object |
| 1987 * <i>o</i>. Then, the instance variable <i>v</i> of the object denoted by thi
s is bound to | 2178 * <i>o</i>. Then, the instance variable <i>v</i> of the object denoted by thi
s is bound to |
| 1988 * <i>o</i>. | 2179 * <i>o</i>. |
| 1989 * | 2180 * |
| 1990 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 2181 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
| 1991 * <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 <= | 2182 * <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 <= |
| 1992 * 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>. | 2183 * 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>. |
| 1993 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 2184 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
| 1994 * j <= m</i>. | 2185 * j <= m</i>. |
| 1995 * | 2186 * |
| 1996 * @param initializerType the name of the type of the initializer expression | 2187 * @param initializerType the name of the type of the initializer expression |
| 1997 * @param fieldType the name of the type of the field | 2188 * @param fieldType the name of the type of the field |
| 1998 */ | 2189 */ |
| 1999 static final StaticWarningCode FIELD_INITIALIZER_NOT_ASSIGNABLE = new StaticWa
rningCode('FIELD_INITIALIZER_NOT_ASSIGNABLE', 19, "The initializer type '%s' can
not be assigned to the field type '%s'"); | 2190 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'"); |
| 2000 | 2191 |
| 2001 /** | 2192 /** |
| 2002 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a | 2193 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a |
| 2003 * static warning if the static type of <i>id</i> is not assignable to <i>T<su
b>id</sub></i>. | 2194 * static warning if the static type of <i>id</i> is not assignable to <i>T<su
b>id</sub></i>. |
| 2004 * | 2195 * |
| 2005 * @param parameterType the name of the type of the field formal parameter | 2196 * @param parameterType the name of the type of the field formal parameter |
| 2006 * @param fieldType the name of the type of the field | 2197 * @param fieldType the name of the type of the field |
| 2007 */ | 2198 */ |
| 2008 static final StaticWarningCode FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE = new
StaticWarningCode('FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE', 20, "The parameter
type '%s' is incompatable with the field type '%s'"); | 2199 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'"); |
| 2009 | 2200 |
| 2010 /** | 2201 /** |
| 2011 * 5 Variables: It is a static warning if a library, static or local variable
<i>v</i> is final | 2202 * 5 Variables: It is a static warning if a library, static or local variable
<i>v</i> is final |
| 2012 * and <i>v</i> is not initialized at its point of declaration. | 2203 * and <i>v</i> is not initialized at its point of declaration. |
| 2013 * | 2204 * |
| 2205 * 7.6.1 Generative Constructors: Each final instance variable <i>f</i> declar
ed in the |
| 2206 * immediately enclosing class must have an initializer in <i>k</i>'s initiali
zer list unless it |
| 2207 * has already been initialized by one of the following means: |
| 2208 * |
| 2209 * * Initialization at the declaration of <i>f</i>. |
| 2210 * * Initialization by means of an initializing formal of <i>k</i>. |
| 2211 * |
| 2212 * or a static warning occurs. |
| 2213 * |
| 2014 * @param name the name of the uninitialized final variable | 2214 * @param name the name of the uninitialized final variable |
| 2015 */ | 2215 */ |
| 2016 static final StaticWarningCode FINAL_NOT_INITIALIZED = new StaticWarningCode('
FINAL_NOT_INITIALIZED', 21, "The final variable '%s' must be initialized"); | 2216 static final StaticWarningCode FINAL_NOT_INITIALIZED = new StaticWarningCode('
FINAL_NOT_INITIALIZED', 22, "The final variable '%s' must be initialized"); |
| 2017 | 2217 |
| 2018 /** | 2218 /** |
| 2019 * 14.1 Imports: It is a static warning to import two different libraries with
the same name. | 2219 * 14.1 Imports: It is a static warning to import two different libraries with
the same name. |
| 2020 * | 2220 * |
| 2021 * @param uri1 the uri pointing to a first library | 2221 * @param uri1 the uri pointing to a first library |
| 2022 * @param uri2 the uri pointing to a second library | 2222 * @param uri2 the uri pointing to a second library |
| 2023 * @param name the shared name of the imported libraries | 2223 * @param name the shared name of the imported libraries |
| 2024 */ | 2224 */ |
| 2025 static final StaticWarningCode IMPORT_DUPLICATED_LIBRARY_NAME = new StaticWarn
ingCode('IMPORT_DUPLICATED_LIBRARY_NAME', 22, "The imported libraries '%s' and '
%s' should not have the same name '%s'"); | 2225 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'"); |
| 2026 | 2226 |
| 2027 /** | 2227 /** |
| 2028 * 8.1.1 Inheritance and Overriding: However, if there are multiple members <i
>m<sub>1</sub>, | 2228 * 8.1.1 Inheritance and Overriding: However, if there are multiple members <i
>m<sub>1</sub>, |
| 2029 * … m<sub>k</sub></i> with the same name <i>n</i> that would be inheri
ted (because | 2229 * … m<sub>k</sub></i> with the same name <i>n</i> that would be inheri
ted (because |
| 2030 * identically named members existed in several superinterfaces) then at most
one member is | 2230 * identically named members existed in several superinterfaces) then at most
one member is |
| 2031 * inherited. | 2231 * inherited. |
| 2032 * | 2232 * |
| 2033 * If some but not all of the <i>m<sub>i</sub>, 1 <= i <= k</i>, are get
ters, or if some but | 2233 * If some but not all of the <i>m<sub>i</sub>, 1 <= i <= k</i>, are get
ters, or if some but |
| 2034 * not all of the <i>m<sub>i</sub></i> are setters, none of the <i>m<sub>i</su
b></i> are | 2234 * not all of the <i>m<sub>i</sub></i> are setters, none of the <i>m<sub>i</su
b></i> are |
| 2035 * inherited, and a static warning is issued. | 2235 * inherited, and a static warning is issued. |
| 2036 */ | 2236 */ |
| 2037 static final StaticWarningCode INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METH
OD = new StaticWarningCode('INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD',
23, "'%s' is inherited as a getter and also a method"); | 2237 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"); |
| 2038 | 2238 |
| 2039 /** | 2239 /** |
| 2040 * 7.1 Instance Methods: It is a static warning if a class <i>C</i> declares a
n instance method | 2240 * 7.1 Instance Methods: It is a static warning if a class <i>C</i> declares a
n instance method |
| 2041 * named <i>n</i> and an accessible static member named <i>n</i> is declared i
n a superclass of | 2241 * named <i>n</i> and an accessible static member named <i>n</i> is declared i
n a superclass of |
| 2042 * <i>C</i>. | 2242 * <i>C</i>. |
| 2043 * | 2243 * |
| 2044 * @param memberName the name of the member with the name conflict | 2244 * @param memberName the name of the member with the name conflict |
| 2045 * @param superclassName the name of the enclosing class that has the static m
ember | 2245 * @param superclassName the name of the enclosing class that has the static m
ember |
| 2046 */ | 2246 */ |
| 2047 static final StaticWarningCode INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_S
TATIC = new StaticWarningCode('INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STA
TIC', 24, "'%s' collides with a static member in the superclass '%s'"); | 2247 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'"); |
| 2048 | 2248 |
| 2049 /** | 2249 /** |
| 2050 * 7.6.2 Factories: It is a static warning if <i>M.id</i> is not a constructor
name. | 2250 * 7.6.2 Factories: It is a static warning if <i>M.id</i> is not a constructor
name. |
| 2051 */ | 2251 */ |
| 2052 static final StaticWarningCode INVALID_FACTORY_NAME = new StaticWarningCode('I
NVALID_FACTORY_NAME', 25, ""); | 2252 static final StaticWarningCode INVALID_FACTORY_NAME = new StaticWarningCode('I
NVALID_FACTORY_NAME', 26, ""); |
| 2053 | 2253 |
| 2054 /** | 2254 /** |
| 2055 * 7.2 Getters: It is a static warning if a getter <i>m1</i> overrides a gette
r <i>m2</i> and the | 2255 * 7.2 Getters: It is a static warning if a getter <i>m1</i> overrides a gette
r <i>m2</i> and the |
| 2056 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>. | 2256 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>. |
| 2057 * | 2257 * |
| 2058 * @param actualReturnTypeName the name of the expected return type | 2258 * @param actualReturnTypeName the name of the expected return type |
| 2059 * @param expectedReturnType the name of the actual return type, not assignabl
e to the | 2259 * @param expectedReturnType the name of the actual return type, not assignabl
e to the |
| 2060 * actualReturnTypeName | 2260 * actualReturnTypeName |
| 2061 * @param className the name of the class where the overridden getter is decla
red | 2261 * @param className the name of the class where the overridden getter is decla
red |
| 2062 * @see #INVALID_METHOD_OVERRIDE_RETURN_TYPE | 2262 * @see #INVALID_METHOD_OVERRIDE_RETURN_TYPE |
| 2063 */ | 2263 */ |
| 2064 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'"); | 2264 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'"); |
| 2065 | 2265 |
| 2066 /** | 2266 /** |
| 2067 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 2267 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
| 2068 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. | 2268 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. |
| 2069 * | 2269 * |
| 2070 * @param actualParamTypeName the name of the expected parameter type | 2270 * @param actualParamTypeName the name of the expected parameter type |
| 2071 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the | 2271 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the |
| 2072 * actualParamTypeName | 2272 * actualParamTypeName |
| 2073 * @param className the name of the class where the overridden method is decla
red | 2273 * @param className the name of the class where the overridden method is decla
red |
| 2074 */ | 2274 */ |
| 2075 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'"); | 2275 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'"); |
| 2076 | 2276 |
| 2077 /** | 2277 /** |
| 2078 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 2278 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
| 2079 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. | 2279 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. |
| 2080 * | 2280 * |
| 2081 * @param actualParamTypeName the name of the expected parameter type | 2281 * @param actualParamTypeName the name of the expected parameter type |
| 2082 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the | 2282 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the |
| 2083 * actualParamTypeName | 2283 * actualParamTypeName |
| 2084 * @param className the name of the class where the overridden method is decla
red | 2284 * @param className the name of the class where the overridden method is decla
red |
| 2085 * @see #INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE | 2285 * @see #INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE |
| 2086 */ | 2286 */ |
| 2087 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'"); | 2287 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'"); |
| 2088 | 2288 |
| 2089 /** | 2289 /** |
| 2090 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 2290 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
| 2091 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. | 2291 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. |
| 2092 * | 2292 * |
| 2093 * @param actualParamTypeName the name of the expected parameter type | 2293 * @param actualParamTypeName the name of the expected parameter type |
| 2094 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the | 2294 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the |
| 2095 * actualParamTypeName | 2295 * actualParamTypeName |
| 2096 * @param className the name of the class where the overridden method is decla
red | 2296 * @param className the name of the class where the overridden method is decla
red |
| 2097 */ | 2297 */ |
| 2098 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'"); | 2298 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'"); |
| 2099 | 2299 |
| 2100 /** | 2300 /** |
| 2101 * 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 |
| 2102 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. | 2302 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. |
| 2103 * | 2303 * |
| 2104 * @param actualReturnTypeName the name of the expected return type | 2304 * @param actualReturnTypeName the name of the expected return type |
| 2105 * @param expectedReturnType the name of the actual return type, not assignabl
e to the | 2305 * @param expectedReturnType the name of the actual return type, not assignabl
e to the |
| 2106 * actualReturnTypeName | 2306 * actualReturnTypeName |
| 2107 * @param className the name of the class where the overridden method is decla
red | 2307 * @param className the name of the class where the overridden method is decla
red |
| 2108 * @see #INVALID_GETTER_OVERRIDE_RETURN_TYPE | 2308 * @see #INVALID_GETTER_OVERRIDE_RETURN_TYPE |
| 2109 */ | 2309 */ |
| 2110 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'"); | 2310 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'"); |
| 2111 | 2311 |
| 2112 /** | 2312 /** |
| 2113 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 2313 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
| 2114 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies
a default value for | 2314 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies
a default value for |
| 2115 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff
erent default value | 2315 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff
erent default value |
| 2116 * for <i>p</i>. | 2316 * for <i>p</i>. |
| 2117 */ | 2317 */ |
| 2118 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"); | 2318 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"); |
| 2119 | 2319 |
| 2120 /** | 2320 /** |
| 2121 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 2321 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
| 2122 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies
a default value for | 2322 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies
a default value for |
| 2123 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff
erent default value | 2323 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff
erent default value |
| 2124 * for <i>p</i>. | 2324 * for <i>p</i>. |
| 2125 */ | 2325 */ |
| 2126 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"); | 2326 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"); |
| 2127 | 2327 |
| 2128 /** | 2328 /** |
| 2129 * 7.3 Setters: It is a static warning if a setter <i>m1</i> overrides a sette
r <i>m2</i> and the | 2329 * 7.3 Setters: It is a static warning if a setter <i>m1</i> overrides a sette
r <i>m2</i> and the |
| 2130 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>. | 2330 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>. |
| 2131 * | 2331 * |
| 2132 * @param actualParamTypeName the name of the expected parameter type | 2332 * @param actualParamTypeName the name of the expected parameter type |
| 2133 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the | 2333 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the |
| 2134 * actualParamTypeName | 2334 * actualParamTypeName |
| 2135 * @param className the name of the class where the overridden setter is decla
red | 2335 * @param className the name of the class where the overridden setter is decla
red |
| 2136 * @see #INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE | 2336 * @see #INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE |
| 2137 */ | 2337 */ |
| 2138 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'"); | 2338 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'"); |
| 2139 | 2339 |
| 2140 /** | 2340 /** |
| 2141 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form | 2341 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form |
| 2142 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … | 2342 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … |
| 2143 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. If <i>S.m</i> exists, it is a static
warning if the type | 2343 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. If <i>S.m</i> exists, it is a static
warning if the type |
| 2144 * <i>F</i> of <i>S.m</i> may not be assigned to a function type. | 2344 * <i>F</i> of <i>S.m</i> may not be assigned to a function type. |
| 2145 */ | 2345 */ |
| 2146 static final StaticWarningCode INVOCATION_OF_NON_FUNCTION = new StaticWarningC
ode('INVOCATION_OF_NON_FUNCTION', 34, ""); | 2346 static final StaticWarningCode INVOCATION_OF_NON_FUNCTION = new StaticWarningC
ode('INVOCATION_OF_NON_FUNCTION', 35, ""); |
| 2347 |
| 2348 /** |
| 2349 * 12.6 Lists: A run-time list literal <<i>E</i>> [<i>e<sub>1</sub></i>
... |
| 2350 * <i>e<sub>n</sub></i>] is evaluated as follows: |
| 2351 * |
| 2352 * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and
second argument |
| 2353 * <i>o<sub>i+1</sub></i><i>, 1 <= i <= n</i> |
| 2354 * |
| 2355 * |
| 2356 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
| 2357 * <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 <= |
| 2358 * 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>. |
| 2359 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
| 2360 * j <= m</i>. |
| 2361 */ |
| 2362 static final StaticWarningCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = new StaticWa
rningCode('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 36, "The element type '%s' cannot
be assigned to the list type '%s'"); |
| 2363 |
| 2364 /** |
| 2365 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : |
| 2366 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: |
| 2367 * |
| 2368 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second |
| 2369 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> |
| 2370 * |
| 2371 * |
| 2372 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
| 2373 * <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 <= |
| 2374 * 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>. |
| 2375 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
| 2376 * j <= m</i>. |
| 2377 */ |
| 2378 static final StaticWarningCode MAP_KEY_TYPE_NOT_ASSIGNABLE = new StaticWarning
Code('MAP_KEY_TYPE_NOT_ASSIGNABLE', 37, "The element type '%s' cannot be assigne
d to the map key type '%s'"); |
| 2379 |
| 2380 /** |
| 2381 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : |
| 2382 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: |
| 2383 * |
| 2384 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second |
| 2385 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> |
| 2386 * |
| 2387 * |
| 2388 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
| 2389 * <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 <= |
| 2390 * 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>. |
| 2391 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
| 2392 * j <= m</i>. |
| 2393 */ |
| 2394 static final StaticWarningCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = new StaticWarni
ngCode('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 38, "The element type '%s' cannot be ass
igned to the map value type '%s'"); |
| 2147 | 2395 |
| 2148 /** | 2396 /** |
| 2149 * 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i>
with argument type | 2397 * 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i>
with argument type |
| 2150 * <i>T</i> and a getter named <i>v</i> with return type <i>S</i>, and <i>T</i
> may not be | 2398 * <i>T</i> and a getter named <i>v</i> with return type <i>S</i>, and <i>T</i
> may not be |
| 2151 * assigned to <i>S</i>. | 2399 * assigned to <i>S</i>. |
| 2152 */ | 2400 */ |
| 2153 static final StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES = new Static
WarningCode('MISMATCHED_GETTER_AND_SETTER_TYPES', 35, "The parameter type for se
tter '%s' is %s which is not assignable to its getter (of type %s)"); | 2401 static final StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES = new Static
WarningCode('MISMATCHED_GETTER_AND_SETTER_TYPES', 39, "The parameter type for se
tter '%s' is %s which is not assignable to its getter (of type %s)"); |
| 2154 | 2402 |
| 2155 /** | 2403 /** |
| 2156 * 12.11.1 New: It is a static warning if <i>q</i> is a constructor of an abst
ract class and | 2404 * 12.11.1 New: It is a static warning if <i>q</i> is a constructor of an abst
ract class and |
| 2157 * <i>q</i> is not a factory constructor. | 2405 * <i>q</i> is not a factory constructor. |
| 2158 */ | 2406 */ |
| 2159 static final StaticWarningCode NEW_WITH_ABSTRACT_CLASS = new StaticWarningCode
('NEW_WITH_ABSTRACT_CLASS', 36, "Abstract classes cannot be created with a 'new'
expression"); | 2407 static final StaticWarningCode NEW_WITH_ABSTRACT_CLASS = new StaticWarningCode
('NEW_WITH_ABSTRACT_CLASS', 40, "Abstract classes cannot be created with a 'new'
expression"); |
| 2160 | 2408 |
| 2161 /** | 2409 /** |
| 2162 * 12.11.1 New: It is a static warning if <i>T</i> is not a class accessible i
n the current scope, | 2410 * 12.11.1 New: It is a static warning if <i>T</i> is not a class accessible i
n the current scope, |
| 2163 * optionally followed by type arguments. | 2411 * optionally followed by type arguments. |
| 2164 * | 2412 * |
| 2165 * @param name the name of the non-type element | 2413 * @param name the name of the non-type element |
| 2166 */ | 2414 */ |
| 2167 static final StaticWarningCode NEW_WITH_NON_TYPE = new StaticWarningCode('NEW_
WITH_NON_TYPE', 37, "The name '%s' is not a class"); | 2415 static final StaticWarningCode NEW_WITH_NON_TYPE = new StaticWarningCode('NEW_
WITH_NON_TYPE', 41, "The name '%s' is not a class"); |
| 2168 | 2416 |
| 2169 /** | 2417 /** |
| 2170 * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the
current scope then: | 2418 * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the
current scope then: |
| 2171 * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, …, a<sub>n<
/sub>, | 2419 * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, …, a<sub>n<
/sub>, |
| 2172 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a | 2420 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a |
| 2173 * static warning if <i>T.id</i> is not the name of a constructor declared by
the type <i>T</i>. | 2421 * static warning if <i>T.id</i> is not the name of a constructor declared by
the type <i>T</i>. |
| 2174 * If <i>e</i> of the form <i>new T(a<sub>1</sub>, …, a<sub>n</sub>, x<
sub>n+1</sub>: | 2422 * If <i>e</i> of the form <i>new T(a<sub>1</sub>, …, a<sub>n</sub>, x<
sub>n+1</sub>: |
| 2175 * a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a sta
tic warning if the | 2423 * a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a sta
tic warning if the |
| 2176 * type <i>T</i> does not declare a constructor with the same name as the decl
aration of <i>T</i>. | 2424 * type <i>T</i> does not declare a constructor with the same name as the decl
aration of <i>T</i>. |
| 2177 */ | 2425 */ |
| 2178 static final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR = new StaticWarn
ingCode('NEW_WITH_UNDEFINED_CONSTRUCTOR', 38, "The class '%s' does not have a co
nstructor '%s'"); | 2426 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'"); |
| 2179 | 2427 |
| 2180 /** | 2428 /** |
| 2181 * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the
current scope then: | 2429 * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the
current scope then: |
| 2182 * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, …, a<sub>n<
/sub>, | 2430 * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, …, a<sub>n<
/sub>, |
| 2183 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a | 2431 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a |
| 2184 * static warning if <i>T.id</i> is not the name of a constructor declared by
the type <i>T</i>. | 2432 * static warning if <i>T.id</i> is not the name of a constructor declared by
the type <i>T</i>. |
| 2185 * If <i>e</i> of the form <i>new T(a<sub>1</sub>, …, a<sub>n</sub>, x<
sub>n+1</sub>: | 2433 * If <i>e</i> of the form <i>new T(a<sub>1</sub>, …, a<sub>n</sub>, x<
sub>n+1</sub>: |
| 2186 * a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a sta
tic warning if the | 2434 * a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a sta
tic warning if the |
| 2187 * type <i>T</i> does not declare a constructor with the same name as the decl
aration of <i>T</i>. | 2435 * type <i>T</i> does not declare a constructor with the same name as the decl
aration of <i>T</i>. |
| 2188 */ | 2436 */ |
| 2189 static final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = new St
aticWarningCode('NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 39, "The class '%s' do
es not have a default constructor"); | 2437 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"); |
| 2190 | 2438 |
| 2191 /** | 2439 /** |
| 2192 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an | 2440 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an |
| 2193 * abstract method. | 2441 * abstract method. |
| 2194 * | 2442 * |
| 2195 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class | 2443 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class |
| 2196 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a | 2444 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a |
| 2197 * corresponding instance member <i>m</i>. | 2445 * corresponding instance member <i>m</i>. |
| 2198 * | 2446 * |
| 2199 * @param memberName the name of the first member | 2447 * @param memberName the name of the first member |
| 2200 * @param memberName the name of the second member | 2448 * @param memberName the name of the second member |
| 2201 * @param memberName the name of the third member | 2449 * @param memberName the name of the third member |
| 2202 * @param memberName the name of the fourth member | 2450 * @param memberName the name of the fourth member |
| 2203 * @param additionalCount the number of additional missing members that aren't
listed | 2451 * @param additionalCount the number of additional missing members that aren't
listed |
| 2204 */ | 2452 */ |
| 2205 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIV
E_PLUS = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE
_PLUS', 40, "Missing inherited members: '%s', '%s', '%s', '%s' and %d more"); | 2453 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"); |
| 2206 | 2454 |
| 2207 /** | 2455 /** |
| 2208 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an | 2456 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an |
| 2209 * abstract method. | 2457 * abstract method. |
| 2210 * | 2458 * |
| 2211 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class | 2459 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class |
| 2212 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a | 2460 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a |
| 2213 * corresponding instance member <i>m</i>. | 2461 * corresponding instance member <i>m</i>. |
| 2214 * | 2462 * |
| 2215 * @param memberName the name of the first member | 2463 * @param memberName the name of the first member |
| 2216 * @param memberName the name of the second member | 2464 * @param memberName the name of the second member |
| 2217 * @param memberName the name of the third member | 2465 * @param memberName the name of the third member |
| 2218 * @param memberName the name of the fourth member | 2466 * @param memberName the name of the fourth member |
| 2219 */ | 2467 */ |
| 2220 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOU
R = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR', 41
, "Missing inherited members: '%s', '%s', '%s' and '%s'"); | 2468 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'"); |
| 2221 | 2469 |
| 2222 /** | 2470 /** |
| 2223 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an | 2471 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an |
| 2224 * abstract method. | 2472 * abstract method. |
| 2225 * | 2473 * |
| 2226 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class | 2474 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class |
| 2227 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a | 2475 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a |
| 2228 * corresponding instance member <i>m</i>. | 2476 * corresponding instance member <i>m</i>. |
| 2229 * | 2477 * |
| 2230 * @param memberName the name of the member | 2478 * @param memberName the name of the member |
| 2231 */ | 2479 */ |
| 2232 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE
= new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE', 42,
"Missing inherited member '%s'"); | 2480 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE
= new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE', 46,
"Missing inherited member '%s'"); |
| 2233 | 2481 |
| 2234 /** | 2482 /** |
| 2235 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an | 2483 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an |
| 2236 * abstract method. | 2484 * abstract method. |
| 2237 * | 2485 * |
| 2238 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class | 2486 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class |
| 2239 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a | 2487 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a |
| 2240 * corresponding instance member <i>m</i>. | 2488 * corresponding instance member <i>m</i>. |
| 2241 * | 2489 * |
| 2242 * @param memberName the name of the first member | 2490 * @param memberName the name of the first member |
| 2243 * @param memberName the name of the second member | 2491 * @param memberName the name of the second member |
| 2244 * @param memberName the name of the third member | 2492 * @param memberName the name of the third member |
| 2245 */ | 2493 */ |
| 2246 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THR
EE = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE',
43, "Missing inherited members: '%s', '%s' and '%s'"); | 2494 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'"); |
| 2247 | 2495 |
| 2248 /** | 2496 /** |
| 2249 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an | 2497 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an |
| 2250 * abstract method. | 2498 * abstract method. |
| 2251 * | 2499 * |
| 2252 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class | 2500 * 7.10 Superinterfaces: It is a static warning if the implicit interface of a
non-abstract class |
| 2253 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a | 2501 * <i>C</i> includes an instance member <i>m</i> and <i>C</i> does not declare
or inherit a |
| 2254 * corresponding instance member <i>m</i>. | 2502 * corresponding instance member <i>m</i>. |
| 2255 * | 2503 * |
| 2256 * @param memberName the name of the first member | 2504 * @param memberName the name of the first member |
| 2257 * @param memberName the name of the second member | 2505 * @param memberName the name of the second member |
| 2258 */ | 2506 */ |
| 2259 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO
= new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO', 44,
"Missing inherited members: '%s' and '%s'"); | 2507 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'"); |
| 2260 | 2508 |
| 2261 /** | 2509 /** |
| 2262 * 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 | 2510 * 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 |
| 2263 * <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 | 2511 * <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 |
| 2264 * is a static warning if <i>T</i> does not denote a type available in the lex
ical scope of the | 2512 * is a static warning if <i>T</i> does not denote a type available in the lex
ical scope of the |
| 2265 * catch clause. | 2513 * catch clause. |
| 2266 * | 2514 * |
| 2267 * @param name the name of the non-type element | 2515 * @param name the name of the non-type element |
| 2268 */ | 2516 */ |
| 2269 static final StaticWarningCode NON_TYPE_IN_CATCH_CLAUSE = new StaticWarningCod
e('NON_TYPE_IN_CATCH_CLAUSE', 45, "The name '%s' is not a type and cannot be use
d in an on-catch clause"); | 2517 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"); |
| 2270 | 2518 |
| 2271 /** | 2519 /** |
| 2272 * 7.1.1 Operators: It is a static warning if the return type of the user-decl
ared operator []= is | 2520 * 7.1.1 Operators: It is a static warning if the return type of the user-decl
ared operator []= is |
| 2273 * explicitly declared and not void. | 2521 * explicitly declared and not void. |
| 2274 */ | 2522 */ |
| 2275 static final StaticWarningCode NON_VOID_RETURN_FOR_OPERATOR = new StaticWarnin
gCode('NON_VOID_RETURN_FOR_OPERATOR', 46, "The return type of the operator []= m
ust be 'void'"); | 2523 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'"); |
| 2276 | 2524 |
| 2277 /** | 2525 /** |
| 2278 * 7.3 Setters: It is a static warning if a setter declares a return type othe
r than void. | 2526 * 7.3 Setters: It is a static warning if a setter declares a return type othe
r than void. |
| 2279 */ | 2527 */ |
| 2280 static final StaticWarningCode NON_VOID_RETURN_FOR_SETTER = new StaticWarningC
ode('NON_VOID_RETURN_FOR_SETTER', 47, "The return type of the setter must be 'vo
id'"); | 2528 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'"); |
| 2281 | 2529 |
| 2282 /** | 2530 /** |
| 2283 * 15.1 Static Types: A type <i>T</i> is malformed iff: * <i>T</i> has the for
m <i>id</i> or the | 2531 * 15.1 Static Types: A type <i>T</i> is malformed iff: * <i>T</i> has the for
m <i>id</i> or the |
| 2284 * form <i>prefix.id</i>, and in the enclosing lexical scope, the name <i>id</
i> (respectively | 2532 * form <i>prefix.id</i>, and in the enclosing lexical scope, the name <i>id</
i> (respectively |
| 2285 * <i>prefix.id</i>) does not denote a type. * <i>T</i> denotes a type variabl
e in the | 2533 * <i>prefix.id</i>) does not denote a type. * <i>T</i> denotes a type variabl
e in the |
| 2286 * enclosing lexical scope, but occurs in the signature or body of a static me
mber. * | 2534 * enclosing lexical scope, but occurs in the signature or body of a static me
mber. * |
| 2287 * <i>T</i> is a parameterized type of the form <i>G<S<sub>1</sub>, .., S<s
ub>n</sub>></i>, | 2535 * <i>T</i> is a parameterized type of the form <i>G<S<sub>1</sub>, .., S<s
ub>n</sub>></i>, |
| 2288 * and <i>G</i> is malformed. | 2536 * and <i>G</i> is malformed. |
| 2289 * | 2537 * |
| 2290 * Any use of a malformed type gives rise to a static warning. | 2538 * Any use of a malformed type gives rise to a static warning. |
| 2291 * | 2539 * |
| 2292 * @param nonTypeName the name that is not a type | 2540 * @param nonTypeName the name that is not a type |
| 2293 */ | 2541 */ |
| 2294 static final StaticWarningCode NOT_A_TYPE = new StaticWarningCode('NOT_A_TYPE'
, 48, "%s is not a type"); | 2542 static final StaticWarningCode NOT_A_TYPE = new StaticWarningCode('NOT_A_TYPE'
, 52, "%s is not a type"); |
| 2295 | 2543 |
| 2296 /** | 2544 /** |
| 2297 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > | 2545 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > |
| 2298 * n</i>. | 2546 * n</i>. |
| 2299 * | 2547 * |
| 2300 * @param requiredCount the expected number of required arguments | 2548 * @param requiredCount the expected number of required arguments |
| 2301 * @param argumentCount the actual number of positional arguments given | 2549 * @param argumentCount the actual number of positional arguments given |
| 2302 * @see #EXTRA_POSITIONAL_ARGUMENTS | 2550 * @see #EXTRA_POSITIONAL_ARGUMENTS |
| 2303 */ | 2551 */ |
| 2304 static final StaticWarningCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new StaticWarni
ngCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', 49, "%d required argument(s) expected, b
ut %d found"); | 2552 static final StaticWarningCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new StaticWarni
ngCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', 53, "%d required argument(s) expected, b
ut %d found"); |
| 2305 | 2553 |
| 2306 /** | 2554 /** |
| 2307 * 14.3 Parts: It is a static warning if the referenced part declaration <i>p<
/i> names a library | 2555 * 14.3 Parts: It is a static warning if the referenced part declaration <i>p<
/i> names a library |
| 2308 * other than the current library as the library to which <i>p</i> belongs. | 2556 * other than the current library as the library to which <i>p</i> belongs. |
| 2309 * | 2557 * |
| 2310 * @param expectedLibraryName the name of expected library name | 2558 * @param expectedLibraryName the name of expected library name |
| 2311 * @param actualLibraryName the non-matching actual library name from the "par
t of" declaration | 2559 * @param actualLibraryName the non-matching actual library name from the "par
t of" declaration |
| 2312 */ | 2560 */ |
| 2313 static final StaticWarningCode PART_OF_DIFFERENT_LIBRARY = new StaticWarningCo
de('PART_OF_DIFFERENT_LIBRARY', 50, "Expected this library to be part of '%s', n
ot '%s'"); | 2561 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'"); |
| 2314 | 2562 |
| 2315 /** | 2563 /** |
| 2316 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> i
s not a subtype of | 2564 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> i
s not a subtype of |
| 2317 * the type of <i>k</i>. | 2565 * the type of <i>k</i>. |
| 2318 * | 2566 * |
| 2319 * @param redirectedName the name of the redirected constructor | 2567 * @param redirectedName the name of the redirected constructor |
| 2320 * @param redirectingName the name of the redirecting constructor | 2568 * @param redirectingName the name of the redirecting constructor |
| 2321 */ | 2569 */ |
| 2322 static final StaticWarningCode REDIRECT_TO_INVALID_FUNCTION_TYPE = new StaticW
arningCode('REDIRECT_TO_INVALID_FUNCTION_TYPE', 51, "The redirected constructor
'%s' has incompatible parameters with '%s'"); | 2570 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'"); |
| 2323 | 2571 |
| 2324 /** | 2572 /** |
| 2325 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> i
s not a subtype of | 2573 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> i
s not a subtype of |
| 2326 * the type of <i>k</i>. | 2574 * the type of <i>k</i>. |
| 2327 * | 2575 * |
| 2328 * @param redirectedName the name of the redirected constructor return type | 2576 * @param redirectedName the name of the redirected constructor return type |
| 2329 * @param redirectingName the name of the redirecting constructor return type | 2577 * @param redirectingName the name of the redirecting constructor return type |
| 2330 */ | 2578 */ |
| 2331 static final StaticWarningCode REDIRECT_TO_INVALID_RETURN_TYPE = new StaticWar
ningCode('REDIRECT_TO_INVALID_RETURN_TYPE', 52, "The return type '%s' of the red
irected constructor is not a subclass of '%s'"); | 2579 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'"); |
| 2332 | 2580 |
| 2333 /** | 2581 /** |
| 2334 * 7.6.2 Factories: It is a static warning if type does not denote a class acc
essible in the | 2582 * 7.6.2 Factories: It is a static warning if type does not denote a class acc
essible in the |
| 2335 * current scope; if type does denote such a class <i>C</i> it is a static war
ning if the | 2583 * current scope; if type does denote such a class <i>C</i> it is a static war
ning if the |
| 2336 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const
ructor of <i>C</i>. | 2584 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const
ructor of <i>C</i>. |
| 2337 */ | 2585 */ |
| 2338 static final StaticWarningCode REDIRECT_TO_MISSING_CONSTRUCTOR = new StaticWar
ningCode('REDIRECT_TO_MISSING_CONSTRUCTOR', 53, "The constructor '%s' could not
be found in '%s'"); | 2586 static final StaticWarningCode REDIRECT_TO_MISSING_CONSTRUCTOR = new StaticWar
ningCode('REDIRECT_TO_MISSING_CONSTRUCTOR', 57, "The constructor '%s' could not
be found in '%s'"); |
| 2339 | 2587 |
| 2340 /** | 2588 /** |
| 2341 * 7.6.2 Factories: It is a static warning if type does not denote a class acc
essible in the | 2589 * 7.6.2 Factories: It is a static warning if type does not denote a class acc
essible in the |
| 2342 * current scope; if type does denote such a class <i>C</i> it is a static war
ning if the | 2590 * current scope; if type does denote such a class <i>C</i> it is a static war
ning if the |
| 2343 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const
ructor of <i>C</i>. | 2591 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const
ructor of <i>C</i>. |
| 2344 */ | 2592 */ |
| 2345 static final StaticWarningCode REDIRECT_TO_NON_CLASS = new StaticWarningCode('
REDIRECT_TO_NON_CLASS', 54, "The name '%s' is not a type and cannot be used in a
redirected constructor"); | 2593 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"); |
| 2346 | 2594 |
| 2347 /** | 2595 /** |
| 2348 * 13.11 Return: Let <i>f</i> be the function immediately enclosing a return s
tatement of the form | 2596 * 13.11 Return: Let <i>f</i> be the function immediately enclosing a return s
tatement of the form |
| 2349 * <i>return;</i> It is a static warning if both of the following conditions h
old: | 2597 * <i>return;</i> It is a static warning if both of the following conditions h
old: |
| 2350 * <ol> | 2598 * <ol> |
| 2351 * * <i>f</i> is not a generative constructor. | 2599 * * <i>f</i> is not a generative constructor. |
| 2352 * * The return type of <i>f</i> may not be assigned to void. | 2600 * * The return type of <i>f</i> may not be assigned to void. |
| 2353 * </ol> | 2601 * </ol> |
| 2354 */ | 2602 */ |
| 2355 static final StaticWarningCode RETURN_WITHOUT_VALUE = new StaticWarningCode('R
ETURN_WITHOUT_VALUE', 55, "Missing return value after 'return'"); | 2603 static final StaticWarningCode RETURN_WITHOUT_VALUE = new StaticWarningCode('R
ETURN_WITHOUT_VALUE', 59, "Missing return value after 'return'"); |
| 2356 | 2604 |
| 2357 /** | 2605 /** |
| 2358 * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not decl
are a static method | 2606 * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not decl
are a static method |
| 2359 * or getter <i>m</i>. | 2607 * or getter <i>m</i>. |
| 2360 * | 2608 * |
| 2361 * @param memberName the name of the instance member | 2609 * @param memberName the name of the instance member |
| 2362 */ | 2610 */ |
| 2363 static final StaticWarningCode STATIC_ACCESS_TO_INSTANCE_MEMBER = new StaticWa
rningCode('STATIC_ACCESS_TO_INSTANCE_MEMBER', 56, "Instance member '%s' cannot b
e accessed using static access"); | 2611 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"); |
| 2364 | 2612 |
| 2365 /** | 2613 /** |
| 2366 * 13.9 Switch: It is a static warning if the type of <i>e</i> may not be assi
gned to the type of | 2614 * 13.9 Switch: It is a static warning if the type of <i>e</i> may not be assi
gned to the type of |
| 2367 * <i>e<sub>k</sub></i>. | 2615 * <i>e<sub>k</sub></i>. |
| 2368 */ | 2616 */ |
| 2369 static final StaticWarningCode SWITCH_EXPRESSION_NOT_ASSIGNABLE = new StaticWa
rningCode('SWITCH_EXPRESSION_NOT_ASSIGNABLE', 57, "Type '%s' of the switch expre
ssion is not assignable to the type '%s' of case expressions"); | 2617 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"); |
| 2370 | 2618 |
| 2371 /** | 2619 /** |
| 2372 * 12.31 Type Test: It is a static warning if <i>T</i> does not denote a type
available in the | 2620 * 12.31 Type Test: It is a static warning if <i>T</i> does not denote a type
available in the |
| 2373 * current lexical scope. | 2621 * current lexical scope. |
| 2374 */ | 2622 */ |
| 2375 static final StaticWarningCode TYPE_TEST_NON_TYPE = new StaticWarningCode('TYP
E_TEST_NON_TYPE', 58, "The name '%s' is not a type and cannot be used in an 'is'
expression"); | 2623 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"); |
| 2376 | 2624 |
| 2377 /** | 2625 /** |
| 2378 * 10 Generics: However, a type parameter is considered to be a malformed type
when referenced by | 2626 * 10 Generics: However, a type parameter is considered to be a malformed type
when referenced by |
| 2379 * a static member. | 2627 * a static member. |
| 2380 * | 2628 * |
| 2381 * 15.1 Static Types: Any use of a malformed type gives rise to a static warni
ng. A malformed type | 2629 * 15.1 Static Types: Any use of a malformed type gives rise to a static warni
ng. A malformed type |
| 2382 * is then interpreted as dynamic by the static type checker and the runtime. | 2630 * is then interpreted as dynamic by the static type checker and the runtime. |
| 2383 */ | 2631 */ |
| 2384 static final StaticWarningCode TYPE_PARAMETER_REFERENCED_BY_STATIC = new Stati
cWarningCode('TYPE_PARAMETER_REFERENCED_BY_STATIC', 59, "Static members cannot r
eference type parameters"); | 2632 static final StaticWarningCode TYPE_PARAMETER_REFERENCED_BY_STATIC = new Stati
cWarningCode('TYPE_PARAMETER_REFERENCED_BY_STATIC', 63, "Static members cannot r
eference type parameters"); |
| 2385 | 2633 |
| 2386 /** | 2634 /** |
| 2387 * 15.1 Static Types: A type <i>T</i> is malformed iff: * <i>T</i> has the for
m <i>id</i> or the | 2635 * 15.1 Static Types: A type <i>T</i> is malformed iff: * <i>T</i> has the for
m <i>id</i> or the |
| 2388 * form <i>prefix.id</i>, and in the enclosing lexical scope, the name <i>id</
i> (respectively | 2636 * form <i>prefix.id</i>, and in the enclosing lexical scope, the name <i>id</
i> (respectively |
| 2389 * <i>prefix.id</i>) does not denote a type. * <i>T</i> denotes a type variabl
e in the | 2637 * <i>prefix.id</i>) does not denote a type. * <i>T</i> denotes a type variabl
e in the |
| 2390 * enclosing lexical scope, but occurs in the signature or body of a static me
mber. * | 2638 * enclosing lexical scope, but occurs in the signature or body of a static me
mber. * |
| 2391 * <i>T</i> is a parameterized type of the form <i>G<S<sub>1</sub>, .., S<s
ub>n</sub>></i>, | 2639 * <i>T</i> is a parameterized type of the form <i>G<S<sub>1</sub>, .., S<s
ub>n</sub>></i>, |
| 2392 * and <i>G</i> is malformed. | 2640 * and <i>G</i> is malformed. |
| 2393 * | 2641 * |
| 2394 * Any use of a malformed type gives rise to a static warning. | 2642 * Any use of a malformed type gives rise to a static warning. |
| 2395 */ | 2643 */ |
| 2396 static final StaticWarningCode TYPE_VARIABLE_IN_STATIC_SCOPE = new StaticWarni
ngCode('TYPE_VARIABLE_IN_STATIC_SCOPE', 60, ""); | 2644 static final StaticWarningCode TYPE_VARIABLE_IN_STATIC_SCOPE = new StaticWarni
ngCode('TYPE_VARIABLE_IN_STATIC_SCOPE', 64, ""); |
| 2397 | 2645 |
| 2398 /** | 2646 /** |
| 2399 * 12.15.3 Static Invocation: A static method invocation <i>i</i> has the form | 2647 * 12.15.3 Static Invocation: A static method invocation <i>i</i> has the form |
| 2400 * <i>C.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</
sub>, … | 2648 * <i>C.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</
sub>, … |
| 2401 * 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 | 2649 * 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 |
| 2402 * class in the current scope. | 2650 * class in the current scope. |
| 2403 * | 2651 * |
| 2404 * @param undefinedClassName the name of the undefined class | 2652 * @param undefinedClassName the name of the undefined class |
| 2405 */ | 2653 */ |
| 2406 static final StaticWarningCode UNDEFINED_CLASS = new StaticWarningCode('UNDEFI
NED_CLASS', 61, "Undefined class '%s'"); | 2654 static final StaticWarningCode UNDEFINED_CLASS = new StaticWarningCode('UNDEFI
NED_CLASS', 65, "Undefined class '%s'"); |
| 2407 | 2655 |
| 2408 /** | 2656 /** |
| 2409 * Same as [UNDEFINED_CLASS], but to catch using "boolean" instead of "bool". | 2657 * Same as [UNDEFINED_CLASS], but to catch using "boolean" instead of "bool". |
| 2410 */ | 2658 */ |
| 2411 static final StaticWarningCode UNDEFINED_CLASS_BOOLEAN = new StaticWarningCode
('UNDEFINED_CLASS_BOOLEAN', 62, "Undefined class 'boolean'; did you mean 'bool'?
"); | 2659 static final StaticWarningCode UNDEFINED_CLASS_BOOLEAN = new StaticWarningCode
('UNDEFINED_CLASS_BOOLEAN', 66, "Undefined class 'boolean'; did you mean 'bool'?
"); |
| 2412 | 2660 |
| 2413 /** | 2661 /** |
| 2414 * 12.17 Getter Invocation: It is a static warning if there is no class <i>C</
i> in the enclosing | 2662 * 12.17 Getter Invocation: It is a static warning if there is no class <i>C</
i> in the enclosing |
| 2415 * lexical scope of <i>i</i>, or if <i>C</i> does not declare, implicitly or e
xplicitly, a getter | 2663 * lexical scope of <i>i</i>, or if <i>C</i> does not declare, implicitly or e
xplicitly, a getter |
| 2416 * named <i>m</i>. | 2664 * named <i>m</i>. |
| 2417 * | 2665 * |
| 2418 * @param getterName the name of the getter | 2666 * @param getterName the name of the getter |
| 2419 * @param enclosingType the name of the enclosing type where the getter is bei
ng looked for | 2667 * @param enclosingType the name of the enclosing type where the getter is bei
ng looked for |
| 2420 */ | 2668 */ |
| 2421 static final StaticWarningCode UNDEFINED_GETTER = new StaticWarningCode('UNDEF
INED_GETTER', 63, "There is no such getter '%s' in '%s'"); | 2669 static final StaticWarningCode UNDEFINED_GETTER = new StaticWarningCode('UNDEF
INED_GETTER', 67, "There is no such getter '%s' in '%s'"); |
| 2422 | 2670 |
| 2423 /** | 2671 /** |
| 2424 * 12.30 Identifier Reference: It is as static warning if an identifier expres
sion of the form | 2672 * 12.30 Identifier Reference: It is as static warning if an identifier expres
sion of the form |
| 2425 * <i>id</i> occurs inside a top level or static function (be it function, met
hod, getter, or | 2673 * <i>id</i> occurs inside a top level or static function (be it function, met
hod, getter, or |
| 2426 * setter) or variable initializer and there is no declaration <i>d</i> with n
ame <i>id</i> in the | 2674 * setter) or variable initializer and there is no declaration <i>d</i> with n
ame <i>id</i> in the |
| 2427 * lexical scope enclosing the expression. | 2675 * lexical scope enclosing the expression. |
| 2428 */ | 2676 */ |
| 2429 static final StaticWarningCode UNDEFINED_IDENTIFIER = new StaticWarningCode('U
NDEFINED_IDENTIFIER', 64, "Undefined name '%s'"); | 2677 static final StaticWarningCode UNDEFINED_IDENTIFIER = new StaticWarningCode('U
NDEFINED_IDENTIFIER', 68, "Undefined name '%s'"); |
| 2430 | 2678 |
| 2431 /** | 2679 /** |
| 2432 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>,
<i>1<=i<=l</i>, | 2680 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>,
<i>1<=i<=l</i>, |
| 2433 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i
> ... | 2681 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i
> ... |
| 2434 * <i>p<sub>n+k</sub></i>} or a static warning occurs. | 2682 * <i>p<sub>n+k</sub></i>} or a static warning occurs. |
| 2435 * | 2683 * |
| 2436 * @param name the name of the requested named parameter | 2684 * @param name the name of the requested named parameter |
| 2437 */ | 2685 */ |
| 2438 static final StaticWarningCode UNDEFINED_NAMED_PARAMETER = new StaticWarningCo
de('UNDEFINED_NAMED_PARAMETER', 65, "The named parameter '%s' is not defined"); | 2686 static final StaticWarningCode UNDEFINED_NAMED_PARAMETER = new StaticWarningCo
de('UNDEFINED_NAMED_PARAMETER', 69, "The named parameter '%s' is not defined"); |
| 2439 | 2687 |
| 2440 /** | 2688 /** |
| 2441 * 12.18 Assignment: It is as static warning if an assignment of the form <i>v
= e</i> occurs | 2689 * 12.18 Assignment: It is as static warning if an assignment of the form <i>v
= e</i> occurs |
| 2442 * inside a top level or static function (be it function, method, getter, or s
etter) or variable | 2690 * inside a top level or static function (be it function, method, getter, or s
etter) or variable |
| 2443 * initializer and there is no declaration <i>d</i> with name <i>v=</i> in the
lexical scope | 2691 * initializer and there is no declaration <i>d</i> with name <i>v=</i> in the
lexical scope |
| 2444 * enclosing the assignment. | 2692 * enclosing the assignment. |
| 2445 * | 2693 * |
| 2446 * 12.18 Assignment: It is a static warning if there is no class <i>C</i> in t
he enclosing lexical | 2694 * 12.18 Assignment: It is a static warning if there is no class <i>C</i> in t
he enclosing lexical |
| 2447 * scope of the assignment, or if <i>C</i> does not declare, implicitly or exp
licitly, a setter | 2695 * scope of the assignment, or if <i>C</i> does not declare, implicitly or exp
licitly, a setter |
| 2448 * <i>v=</i>. | 2696 * <i>v=</i>. |
| 2449 * | 2697 * |
| 2450 * @param setterName the name of the getter | 2698 * @param setterName the name of the getter |
| 2451 * @param enclosingType the name of the enclosing type where the setter is bei
ng looked for | 2699 * @param enclosingType the name of the enclosing type where the setter is bei
ng looked for |
| 2452 */ | 2700 */ |
| 2453 static final StaticWarningCode UNDEFINED_SETTER = new StaticWarningCode('UNDEF
INED_SETTER', 66, "There is no such setter '%s' in '%s'"); | 2701 static final StaticWarningCode UNDEFINED_SETTER = new StaticWarningCode('UNDEF
INED_SETTER', 70, "There is no such setter '%s' in '%s'"); |
| 2454 | 2702 |
| 2455 /** | 2703 /** |
| 2456 * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not decl
are a static method | 2704 * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not decl
are a static method |
| 2457 * or getter <i>m</i>. | 2705 * or getter <i>m</i>. |
| 2458 * | 2706 * |
| 2459 * @param methodName the name of the method | 2707 * @param methodName the name of the method |
| 2460 * @param enclosingType the name of the enclosing type where the method is bei
ng looked for | 2708 * @param enclosingType the name of the enclosing type where the method is bei
ng looked for |
| 2461 */ | 2709 */ |
| 2462 static final StaticWarningCode UNDEFINED_STATIC_METHOD_OR_GETTER = new StaticW
arningCode('UNDEFINED_STATIC_METHOD_OR_GETTER', 67, "There is no such static met
hod '%s' in '%s'"); | 2710 static final StaticWarningCode UNDEFINED_STATIC_METHOD_OR_GETTER = new StaticW
arningCode('UNDEFINED_STATIC_METHOD_OR_GETTER', 71, "There is no such static met
hod '%s' in '%s'"); |
| 2463 static final List<StaticWarningCode> values = [AMBIGUOUS_IMPORT, ARGUMENT_TYPE
_NOT_ASSIGNABLE, ASSIGNMENT_TO_FINAL, CASE_BLOCK_NOT_TERMINATED, CAST_TO_NON_TYP
E, COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE, COMMENT_REFERENCE_IDENTIFIER_NOT_V
ISIBLE, COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR, COMMENT_REFERENCE_UNDECLARED_I
DENTIFIER, COMMENT_REFERENCE_URI_NOT_LIBRARY, CONCRETE_CLASS_WITH_ABSTRACT_MEMBE
R, CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER, CONFLICTING_INSTANCE_SETTE
R_AND_SUPERCLASS_MEMBER, CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER, CONFLICT
ING_STATIC_SETTER_AND_INSTANCE_MEMBER, CONST_WITH_ABSTRACT_CLASS, EQUAL_KEYS_IN_
MAP, EXPORT_DUPLICATED_LIBRARY_NAME, EXTRA_POSITIONAL_ARGUMENTS, FIELD_INITIALIZ
ER_NOT_ASSIGNABLE, FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE, FINAL_NOT_INITIALIZ
ED, IMPORT_DUPLICATED_LIBRARY_NAME, INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_M
ETHOD, INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC, INVALID_FACTORY_NAM
E, INVALID_GETTER_OVERRIDE_RETURN_TYPE, INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE
, INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE, INVALID_METHOD_OVERRIDE_OPTIONAL_PA
RAM_TYPE, INVALID_METHOD_OVERRIDE_RETURN_TYPE, INVALID_OVERRIDE_DIFFERENT_DEFAUL
T_VALUES_NAMED, INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL, INVALID_SE
TTER_OVERRIDE_NORMAL_PARAM_TYPE, INVOCATION_OF_NON_FUNCTION, MISMATCHED_GETTER_A
ND_SETTER_TYPES, NEW_WITH_ABSTRACT_CLASS, NEW_WITH_NON_TYPE, NEW_WITH_UNDEFINED_
CONSTRUCTOR, NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT, NON_ABSTRACT_CLASS_INHERITS
_ABSTRACT_MEMBER_FIVE_PLUS, NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR, NO
N_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE, NON_ABSTRACT_CLASS_INHERITS_ABSTR
ACT_MEMBER_THREE, NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO, NON_TYPE_IN_C
ATCH_CLAUSE, NON_VOID_RETURN_FOR_OPERATOR, NON_VOID_RETURN_FOR_SETTER, NOT_A_TYP
E, NOT_ENOUGH_REQUIRED_ARGUMENTS, PART_OF_DIFFERENT_LIBRARY, REDIRECT_TO_INVALID
_FUNCTION_TYPE, REDIRECT_TO_INVALID_RETURN_TYPE, REDIRECT_TO_MISSING_CONSTRUCTOR
, REDIRECT_TO_NON_CLASS, RETURN_WITHOUT_VALUE, STATIC_ACCESS_TO_INSTANCE_MEMBER,
SWITCH_EXPRESSION_NOT_ASSIGNABLE, TYPE_TEST_NON_TYPE, TYPE_PARAMETER_REFERENCED
_BY_STATIC, TYPE_VARIABLE_IN_STATIC_SCOPE, UNDEFINED_CLASS, UNDEFINED_CLASS_BOOL
EAN, UNDEFINED_GETTER, UNDEFINED_IDENTIFIER, UNDEFINED_NAMED_PARAMETER, UNDEFINE
D_SETTER, UNDEFINED_STATIC_METHOD_OR_GETTER]; | 2711 static final List<StaticWarningCode> values = [ |
| 2712 AMBIGUOUS_IMPORT, |
| 2713 ARGUMENT_TYPE_NOT_ASSIGNABLE, |
| 2714 ASSIGNMENT_TO_FINAL, |
| 2715 ASSIGNMENT_TO_METHOD, |
| 2716 CASE_BLOCK_NOT_TERMINATED, |
| 2717 CAST_TO_NON_TYPE, |
| 2718 COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE, |
| 2719 COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE, |
| 2720 COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR, |
| 2721 COMMENT_REFERENCE_UNDECLARED_IDENTIFIER, |
| 2722 COMMENT_REFERENCE_URI_NOT_LIBRARY, |
| 2723 CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, |
| 2724 CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER, |
| 2725 CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER, |
| 2726 CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER, |
| 2727 CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER, |
| 2728 CONST_WITH_ABSTRACT_CLASS, |
| 2729 EQUAL_KEYS_IN_MAP, |
| 2730 EXPORT_DUPLICATED_LIBRARY_NAME, |
| 2731 EXTRA_POSITIONAL_ARGUMENTS, |
| 2732 FIELD_INITIALIZER_NOT_ASSIGNABLE, |
| 2733 FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE, |
| 2734 FINAL_NOT_INITIALIZED, |
| 2735 IMPORT_DUPLICATED_LIBRARY_NAME, |
| 2736 INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD, |
| 2737 INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC, |
| 2738 INVALID_FACTORY_NAME, |
| 2739 INVALID_GETTER_OVERRIDE_RETURN_TYPE, |
| 2740 INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE, |
| 2741 INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE, |
| 2742 INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE, |
| 2743 INVALID_METHOD_OVERRIDE_RETURN_TYPE, |
| 2744 INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED, |
| 2745 INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL, |
| 2746 INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE, |
| 2747 INVOCATION_OF_NON_FUNCTION, |
| 2748 LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, |
| 2749 MAP_KEY_TYPE_NOT_ASSIGNABLE, |
| 2750 MAP_VALUE_TYPE_NOT_ASSIGNABLE, |
| 2751 MISMATCHED_GETTER_AND_SETTER_TYPES, |
| 2752 NEW_WITH_ABSTRACT_CLASS, |
| 2753 NEW_WITH_NON_TYPE, |
| 2754 NEW_WITH_UNDEFINED_CONSTRUCTOR, |
| 2755 NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT, |
| 2756 NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS, |
| 2757 NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR, |
| 2758 NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE, |
| 2759 NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE, |
| 2760 NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO, |
| 2761 NON_TYPE_IN_CATCH_CLAUSE, |
| 2762 NON_VOID_RETURN_FOR_OPERATOR, |
| 2763 NON_VOID_RETURN_FOR_SETTER, |
| 2764 NOT_A_TYPE, |
| 2765 NOT_ENOUGH_REQUIRED_ARGUMENTS, |
| 2766 PART_OF_DIFFERENT_LIBRARY, |
| 2767 REDIRECT_TO_INVALID_FUNCTION_TYPE, |
| 2768 REDIRECT_TO_INVALID_RETURN_TYPE, |
| 2769 REDIRECT_TO_MISSING_CONSTRUCTOR, |
| 2770 REDIRECT_TO_NON_CLASS, |
| 2771 RETURN_WITHOUT_VALUE, |
| 2772 STATIC_ACCESS_TO_INSTANCE_MEMBER, |
| 2773 SWITCH_EXPRESSION_NOT_ASSIGNABLE, |
| 2774 TYPE_TEST_NON_TYPE, |
| 2775 TYPE_PARAMETER_REFERENCED_BY_STATIC, |
| 2776 TYPE_VARIABLE_IN_STATIC_SCOPE, |
| 2777 UNDEFINED_CLASS, |
| 2778 UNDEFINED_CLASS_BOOLEAN, |
| 2779 UNDEFINED_GETTER, |
| 2780 UNDEFINED_IDENTIFIER, |
| 2781 UNDEFINED_NAMED_PARAMETER, |
| 2782 UNDEFINED_SETTER, |
| 2783 UNDEFINED_STATIC_METHOD_OR_GETTER]; |
| 2464 | 2784 |
| 2465 /// The name of this enum constant, as declared in the enum declaration. | 2785 /// The name of this enum constant, as declared in the enum declaration. |
| 2466 final String name; | 2786 final String name; |
| 2467 | 2787 |
| 2468 /// The position in the enum declaration. | 2788 /// The position in the enum declaration. |
| 2469 final int ordinal; | 2789 final int ordinal; |
| 2470 | 2790 |
| 2471 /** | 2791 /** |
| 2472 * The message template used to create the message to be displayed for this er
ror. | 2792 * The message template used to create the message to be displayed for this er
ror. |
| 2473 */ | 2793 */ |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2778 * 15.8 Parameterized Types: It is a static type warning if <i>G</i> is not a
generic type with | 3098 * 15.8 Parameterized Types: It is a static type warning if <i>G</i> is not a
generic type with |
| 2779 * exactly <i>n</i> type parameters. | 3099 * exactly <i>n</i> type parameters. |
| 2780 * | 3100 * |
| 2781 * @param typeName the name of the type being referenced (<i>G</i>) | 3101 * @param typeName the name of the type being referenced (<i>G</i>) |
| 2782 * @param parameterCount the number of type parameters that were declared | 3102 * @param parameterCount the number of type parameters that were declared |
| 2783 * @param argumentCount the number of type arguments provided | 3103 * @param argumentCount the number of type arguments provided |
| 2784 * @see CompileTimeErrorCode#CONST_WITH_INVALID_TYPE_PARAMETERS | 3104 * @see CompileTimeErrorCode#CONST_WITH_INVALID_TYPE_PARAMETERS |
| 2785 * @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS | 3105 * @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS |
| 2786 */ | 3106 */ |
| 2787 static final StaticTypeWarningCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = new Static
TypeWarningCode('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 16, "The type '%s' is declared
with %d type parameters, but %d type arguments were given"); | 3107 static final StaticTypeWarningCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = new Static
TypeWarningCode('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 16, "The type '%s' is declared
with %d type parameters, but %d type arguments were given"); |
| 2788 static final List<StaticTypeWarningCode> values = [INACCESSIBLE_SETTER, INCONS
ISTENT_METHOD_INHERITANCE, INVALID_ASSIGNMENT, INVOCATION_OF_NON_FUNCTION, NON_B
OOL_CONDITION, NON_BOOL_EXPRESSION, NON_TYPE_AS_TYPE_ARGUMENT, REDIRECT_WITH_INV
ALID_TYPE_PARAMETERS, RETURN_OF_INVALID_TYPE, TYPE_ARGUMENT_NOT_MATCHING_BOUNDS,
UNDEFINED_FUNCTION, UNDEFINED_GETTER, UNDEFINED_METHOD, UNDEFINED_OPERATOR, UND
EFINED_SETTER, UNDEFINED_SUPER_METHOD, WRONG_NUMBER_OF_TYPE_ARGUMENTS]; | 3108 static final List<StaticTypeWarningCode> values = [ |
| 3109 INACCESSIBLE_SETTER, |
| 3110 INCONSISTENT_METHOD_INHERITANCE, |
| 3111 INVALID_ASSIGNMENT, |
| 3112 INVOCATION_OF_NON_FUNCTION, |
| 3113 NON_BOOL_CONDITION, |
| 3114 NON_BOOL_EXPRESSION, |
| 3115 NON_TYPE_AS_TYPE_ARGUMENT, |
| 3116 REDIRECT_WITH_INVALID_TYPE_PARAMETERS, |
| 3117 RETURN_OF_INVALID_TYPE, |
| 3118 TYPE_ARGUMENT_NOT_MATCHING_BOUNDS, |
| 3119 UNDEFINED_FUNCTION, |
| 3120 UNDEFINED_GETTER, |
| 3121 UNDEFINED_METHOD, |
| 3122 UNDEFINED_OPERATOR, |
| 3123 UNDEFINED_SETTER, |
| 3124 UNDEFINED_SUPER_METHOD, |
| 3125 WRONG_NUMBER_OF_TYPE_ARGUMENTS]; |
| 2789 | 3126 |
| 2790 /// The name of this enum constant, as declared in the enum declaration. | 3127 /// The name of this enum constant, as declared in the enum declaration. |
| 2791 final String name; | 3128 final String name; |
| 2792 | 3129 |
| 2793 /// The position in the enum declaration. | 3130 /// The position in the enum declaration. |
| 2794 final int ordinal; | 3131 final int ordinal; |
| 2795 | 3132 |
| 2796 /** | 3133 /** |
| 2797 * The message template used to create the message to be displayed for this er
ror. | 3134 * The message template used to create the message to be displayed for this er
ror. |
| 2798 */ | 3135 */ |
| 2799 String _message; | 3136 String _message; |
| 2800 | 3137 |
| 2801 /** | 3138 /** |
| 2802 * Initialize a newly created error code to have the given type and message. | 3139 * Initialize a newly created error code to have the given type and message. |
| 2803 * | 3140 * |
| 2804 * @param message the message template used to create the message to be displa
yed for the error | 3141 * @param message the message template used to create the message to be displa
yed for the error |
| 2805 */ | 3142 */ |
| 2806 StaticTypeWarningCode(this.name, this.ordinal, String message) { | 3143 StaticTypeWarningCode(this.name, this.ordinal, String message) { |
| 2807 this._message = message; | 3144 this._message = message; |
| 2808 } | 3145 } |
| 2809 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; | 3146 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; |
| 2810 String get message => _message; | 3147 String get message => _message; |
| 2811 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; | 3148 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; |
| 2812 int compareTo(StaticTypeWarningCode other) => ordinal - other.ordinal; | 3149 int compareTo(StaticTypeWarningCode other) => ordinal - other.ordinal; |
| 2813 int get hashCode => ordinal; | 3150 int get hashCode => ordinal; |
| 2814 String toString() => name; | 3151 String toString() => name; |
| 2815 } | 3152 } |
| OLD | NEW |