| 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 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 | 650 |
| 651 /** | 651 /** |
| 652 * Task (todo) comments in user code. | 652 * Task (todo) comments in user code. |
| 653 */ | 653 */ |
| 654 static final ErrorType TODO = new ErrorType('TODO', 0, ErrorSeverity.INFO); | 654 static final ErrorType TODO = new ErrorType('TODO', 0, ErrorSeverity.INFO); |
| 655 | 655 |
| 656 /** | 656 /** |
| 657 * Extra analysis run over the code to follow best practices, which are not in
the Dart Language | 657 * Extra analysis run over the code to follow best practices, which are not in
the Dart Language |
| 658 * Specification. | 658 * Specification. |
| 659 */ | 659 */ |
| 660 static final ErrorType HINT = new ErrorType('HINT', 1, ErrorSeverity.WARNING); | 660 static final ErrorType HINT = new ErrorType('HINT', 1, ErrorSeverity.INFO); |
| 661 | 661 |
| 662 /** | 662 /** |
| 663 * Compile-time errors are errors that preclude execution. A compile time erro
r must be reported | 663 * Compile-time errors are errors that preclude execution. A compile time erro
r must be reported |
| 664 * by a Dart compiler before the erroneous code is executed. | 664 * by a Dart compiler before the erroneous code is executed. |
| 665 */ | 665 */ |
| 666 static final ErrorType COMPILE_TIME_ERROR = new ErrorType('COMPILE_TIME_ERROR'
, 2, ErrorSeverity.ERROR); | 666 static final ErrorType COMPILE_TIME_ERROR = new ErrorType('COMPILE_TIME_ERROR'
, 2, ErrorSeverity.ERROR); |
| 667 | 667 |
| 668 /** | 668 /** |
| 669 * Suggestions made in situations where the user has deviated from recommended
pub programming | 669 * Suggestions made in situations where the user has deviated from recommended
pub programming |
| 670 * practices. | 670 * practices. |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 | 734 |
| 735 /** | 735 /** |
| 736 * 12.33 Argument Definition Test: It is a compile time error if <i>v</i> does
not denote a formal | 736 * 12.33 Argument Definition Test: It is a compile time error if <i>v</i> does
not denote a formal |
| 737 * parameter. | 737 * parameter. |
| 738 * | 738 * |
| 739 * @param the name of the identifier in the argument definition test that is n
ot a parameter | 739 * @param the name of the identifier in the argument definition test that is n
ot a parameter |
| 740 */ | 740 */ |
| 741 static final CompileTimeErrorCode ARGUMENT_DEFINITION_TEST_NON_PARAMETER = new
CompileTimeErrorCode.con1('ARGUMENT_DEFINITION_TEST_NON_PARAMETER', 1, "'%s' is
not a parameter"); | 741 static final CompileTimeErrorCode ARGUMENT_DEFINITION_TEST_NON_PARAMETER = new
CompileTimeErrorCode.con1('ARGUMENT_DEFINITION_TEST_NON_PARAMETER', 1, "'%s' is
not a parameter"); |
| 742 | 742 |
| 743 /** | 743 /** |
| 744 * 12.14.2 Binding Actuals to Formals: In checked mode, it is a dynamic type e
rror if | |
| 745 * <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 | |
| 746 * supertype of the type of <i>o<sub>i</sub></i>, i = 1..m. | |
| 747 * | |
| 748 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | |
| 749 * uncaught exception being thrown. | |
| 750 * | |
| 751 * @param requiredCount the maximum number of positional arguments | |
| 752 * @param argumentCount the actual number of positional arguments given | |
| 753 */ | |
| 754 static final CompileTimeErrorCode ARGUMENT_TYPE_NOT_ASSIGNABLE = new CompileTi
meErrorCode.con1('ARGUMENT_TYPE_NOT_ASSIGNABLE', 2, "The argument type '%s' cann
ot be assigned to the parameter type '%s'"); | |
| 755 | |
| 756 /** | |
| 757 * 12.30 Identifier Reference: It is a compile-time error to use a built-in id
entifier other than | 744 * 12.30 Identifier Reference: It is a compile-time error to use a built-in id
entifier other than |
| 758 * dynamic as a type annotation. | 745 * dynamic as a type annotation. |
| 759 */ | 746 */ |
| 760 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE = new CompileTim
eErrorCode.con1('BUILT_IN_IDENTIFIER_AS_TYPE', 3, "The built-in identifier '%s'
cannot be as a type"); | 747 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE = new CompileTim
eErrorCode.con1('BUILT_IN_IDENTIFIER_AS_TYPE', 2, "The built-in identifier '%s'
cannot be as a type"); |
| 761 | 748 |
| 762 /** | 749 /** |
| 763 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the | 750 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the |
| 764 * declared name of a class, type parameter or type alias. | 751 * declared name of a class, type parameter or type alias. |
| 765 */ | 752 */ |
| 766 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_NAME = new Compi
leTimeErrorCode.con1('BUILT_IN_IDENTIFIER_AS_TYPE_NAME', 4, "The built-in identi
fier '%s' cannot be used as a type name"); | 753 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_NAME = new Compi
leTimeErrorCode.con1('BUILT_IN_IDENTIFIER_AS_TYPE_NAME', 3, "The built-in identi
fier '%s' cannot be used as a type name"); |
| 767 | 754 |
| 768 /** | 755 /** |
| 769 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the | 756 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the |
| 770 * declared name of a class, type parameter or type alias. | 757 * declared name of a class, type parameter or type alias. |
| 771 */ | 758 */ |
| 772 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME = new Co
mpileTimeErrorCode.con1('BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME', 5, "The built-in
identifier '%s' cannot be used as a type alias name"); | 759 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME = new Co
mpileTimeErrorCode.con1('BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME', 4, "The built-in
identifier '%s' cannot be used as a type alias name"); |
| 773 | 760 |
| 774 /** | 761 /** |
| 775 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the | 762 * 12.30 Identifier Reference: It is a compile-time error if a built-in identi
fier is used as the |
| 776 * declared name of a class, type parameter or type alias. | 763 * declared name of a class, type parameter or type alias. |
| 777 */ | 764 */ |
| 778 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME =
new CompileTimeErrorCode.con1('BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME', 6,
"The built-in identifier '%s' cannot be used as a type parameter name"); | 765 static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME =
new CompileTimeErrorCode.con1('BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME', 5,
"The built-in identifier '%s' cannot be used as a type parameter name"); |
| 779 | 766 |
| 780 /** | 767 /** |
| 781 * 13.9 Switch: It is a compile-time error if the class <i>C</i> implements th
e operator | 768 * 13.9 Switch: It is a compile-time error if the class <i>C</i> implements th
e operator |
| 782 * <i>==</i>. | 769 * <i>==</i>. |
| 783 */ | 770 */ |
| 784 static final CompileTimeErrorCode CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS = new
CompileTimeErrorCode.con1('CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS', 7, "The swi
tch case expression type '%s' cannot override the == operator"); | 771 static final CompileTimeErrorCode CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS = new
CompileTimeErrorCode.con1('CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS', 6, "The swi
tch case expression type '%s' cannot override the == operator"); |
| 785 | 772 |
| 786 /** | 773 /** |
| 787 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time
constant would raise | 774 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time
constant would raise |
| 788 * an exception. | 775 * an exception. |
| 789 */ | 776 */ |
| 790 static final CompileTimeErrorCode COMPILE_TIME_CONSTANT_RAISES_EXCEPTION = new
CompileTimeErrorCode.con1('COMPILE_TIME_CONSTANT_RAISES_EXCEPTION', 8, ""); | 777 static final CompileTimeErrorCode COMPILE_TIME_CONSTANT_RAISES_EXCEPTION = new
CompileTimeErrorCode.con1('COMPILE_TIME_CONSTANT_RAISES_EXCEPTION', 7, ""); |
| 791 | 778 |
| 792 /** | 779 /** |
| 793 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same | 780 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same |
| 794 * name. This restriction holds regardless of whether the getter is defined ex
plicitly or | 781 * name. This restriction holds regardless of whether the getter is defined ex
plicitly or |
| 795 * implicitly, or whether the getter or the method are inherited or not. | 782 * implicitly, or whether the getter or the method are inherited or not. |
| 796 */ | 783 */ |
| 797 static final CompileTimeErrorCode CONFLICTING_GETTER_AND_METHOD = new CompileT
imeErrorCode.con1('CONFLICTING_GETTER_AND_METHOD', 9, "Class '%s' cannot have bo
th getter '%s.%s' and method with the same name"); | 784 static final CompileTimeErrorCode CONFLICTING_GETTER_AND_METHOD = new CompileT
imeErrorCode.con1('CONFLICTING_GETTER_AND_METHOD', 8, "Class '%s' cannot have bo
th getter '%s.%s' and method with the same name"); |
| 798 | 785 |
| 799 /** | 786 /** |
| 800 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same | 787 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same |
| 801 * name. This restriction holds regardless of whether the getter is defined ex
plicitly or | 788 * name. This restriction holds regardless of whether the getter is defined ex
plicitly or |
| 802 * implicitly, or whether the getter or the method are inherited or not. | 789 * implicitly, or whether the getter or the method are inherited or not. |
| 803 */ | 790 */ |
| 804 static final CompileTimeErrorCode CONFLICTING_METHOD_AND_GETTER = new CompileT
imeErrorCode.con1('CONFLICTING_METHOD_AND_GETTER', 10, "Class '%s' cannot have b
oth method '%s.%s' and getter with the same name"); | 791 static final CompileTimeErrorCode CONFLICTING_METHOD_AND_GETTER = new CompileT
imeErrorCode.con1('CONFLICTING_METHOD_AND_GETTER', 9, "Class '%s' cannot have bo
th method '%s.%s' and getter with the same name"); |
| 805 | 792 |
| 806 /** | 793 /** |
| 807 * 7.6 Constructors: A constructor name always begins with the name of its imm
ediately enclosing | 794 * 7.6 Constructors: A constructor name always begins with the name of its imm
ediately enclosing |
| 808 * class, and may optionally be followed by a dot and an identifier <i>id</i>.
It is a | 795 * class, and may optionally be followed by a dot and an identifier <i>id</i>.
It is a |
| 809 * compile-time error if <i>id</i> is the name of a member declared in the imm
ediately enclosing | 796 * compile-time error if <i>id</i> is the name of a member declared in the imm
ediately enclosing |
| 810 * class. | 797 * class. |
| 811 */ | 798 */ |
| 812 static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD = new
CompileTimeErrorCode.con1('CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD', 11, "'%s' c
annot be used to name a constructor and a field in this class"); | 799 static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD = new
CompileTimeErrorCode.con1('CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD', 10, "'%s' c
annot be used to name a constructor and a field in this class"); |
| 813 | 800 |
| 814 /** | 801 /** |
| 815 * 7.6 Constructors: A constructor name always begins with the name of its imm
ediately enclosing | 802 * 7.6 Constructors: A constructor name always begins with the name of its imm
ediately enclosing |
| 816 * class, and may optionally be followed by a dot and an identifier <i>id</i>.
It is a | 803 * class, and may optionally be followed by a dot and an identifier <i>id</i>.
It is a |
| 817 * compile-time error if <i>id</i> is the name of a member declared in the imm
ediately enclosing | 804 * compile-time error if <i>id</i> is the name of a member declared in the imm
ediately enclosing |
| 818 * class. | 805 * class. |
| 819 */ | 806 */ |
| 820 static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD = ne
w CompileTimeErrorCode.con1('CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD', 12, "'%s'
cannot be used to name a constructor and a method in this class"); | 807 static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD = ne
w CompileTimeErrorCode.con1('CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD', 11, "'%s'
cannot be used to name a constructor and a method in this class"); |
| 821 | 808 |
| 822 /** | 809 /** |
| 823 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 810 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 824 * uncaught exception being thrown. | 811 * uncaught exception being thrown. |
| 825 */ | 812 */ |
| 826 static final CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION = new Com
pileTimeErrorCode.con1('CONST_CONSTRUCTOR_THROWS_EXCEPTION', 13, "'const' constr
uctors cannot throw exceptions"); | 813 static final CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION = new Com
pileTimeErrorCode.con1('CONST_CONSTRUCTOR_THROWS_EXCEPTION', 12, "'const' constr
uctors cannot throw exceptions"); |
| 827 | 814 |
| 828 /** | 815 /** |
| 829 * 7.6.3 Constant Constructors: The superinitializer that appears, explicitly
or implicitly, in | 816 * 7.6.3 Constant Constructors: The superinitializer that appears, explicitly
or implicitly, in |
| 830 * the initializer list of a constant constructor must specify a constant cons
tructor of the | 817 * the initializer list of a constant constructor must specify a constant cons
tructor of the |
| 831 * superclass of the immediately enclosing class or a compile-time error occur
s. | 818 * superclass of the immediately enclosing class or a compile-time error occur
s. |
| 832 */ | 819 */ |
| 833 static final CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER = new
CompileTimeErrorCode.con1('CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER', 14, "Consta
nt constructor cannot call non-constant super constructor"); | 820 static final CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER = new
CompileTimeErrorCode.con1('CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER', 13, "Consta
nt constructor cannot call non-constant super constructor"); |
| 834 | 821 |
| 835 /** | 822 /** |
| 836 * 7.6.3 Constant Constructors: It is a compile-time error if a constant const
ructor is declared | 823 * 7.6.3 Constant Constructors: It is a compile-time error if a constant const
ructor is declared |
| 837 * by a class that has a non-final instance variable. | 824 * by a class that has a non-final instance variable. |
| 838 * | 825 * |
| 839 * The above refers to both locally declared and inherited instance variables. | 826 * The above refers to both locally declared and inherited instance variables. |
| 840 */ | 827 */ |
| 841 static final CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD = new
CompileTimeErrorCode.con1('CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD', 15, "Cannot
define the 'const' constructor for a class with non-final fields"); | 828 static final CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD = new
CompileTimeErrorCode.con1('CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD', 14, "Cannot
define the 'const' constructor for a class with non-final fields"); |
| 842 | 829 |
| 843 /** | 830 /** |
| 844 * 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error
if o is not | 831 * 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error
if o is not |
| 845 * <b>null</b> and the interface of the class of <i>o</i> is not a subtype of
the static type of | 832 * <b>null</b> and the interface of the class of <i>o</i> is not a subtype of
the static type of |
| 846 * the field <i>v</i>. | 833 * the field <i>v</i>. |
| 847 * | 834 * |
| 848 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 835 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 849 * uncaught exception being thrown. | 836 * uncaught exception being thrown. |
| 850 * | 837 * |
| 851 * @param initializerType the name of the type of the initializer expression | 838 * @param initializerType the name of the type of the initializer expression |
| 852 * @param fieldType the name of the type of the field | 839 * @param fieldType the name of the type of the field |
| 853 */ | 840 */ |
| 854 static final CompileTimeErrorCode CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE = new
CompileTimeErrorCode.con1('CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE', 16, "The in
itializer type '%s' cannot be assigned to the field type '%s'"); | 841 static final CompileTimeErrorCode CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE = new
CompileTimeErrorCode.con1('CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE', 15, "The in
itializer type '%s' cannot be assigned to the field type '%s'"); |
| 855 | 842 |
| 856 /** | 843 /** |
| 857 * 6.2 Formal Parameters: It is a compile-time error if a formal parameter is
declared as a | 844 * 6.2 Formal Parameters: It is a compile-time error if a formal parameter is
declared as a |
| 858 * constant variable. | 845 * constant variable. |
| 859 */ | 846 */ |
| 860 static final CompileTimeErrorCode CONST_FORMAL_PARAMETER = new CompileTimeErro
rCode.con1('CONST_FORMAL_PARAMETER', 17, "Parameters cannot be 'const'"); | 847 static final CompileTimeErrorCode CONST_FORMAL_PARAMETER = new CompileTimeErro
rCode.con1('CONST_FORMAL_PARAMETER', 16, "Parameters cannot be 'const'"); |
| 861 | 848 |
| 862 /** | 849 /** |
| 863 * 5 Variables: A constant variable must be initialized to a compile-time cons
tant or a | 850 * 5 Variables: A constant variable must be initialized to a compile-time cons
tant or a |
| 864 * compile-time error occurs. | 851 * compile-time error occurs. |
| 865 */ | 852 */ |
| 866 static final CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE =
new CompileTimeErrorCode.con1('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', 18, "
'const' variables must be constant value"); | 853 static final CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE =
new CompileTimeErrorCode.con1('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', 17, "
'const' variables must be constant value"); |
| 867 | 854 |
| 868 /** | 855 /** |
| 869 * 7.5 Instance Variables: It is a compile-time error if an instance variable
is declared to be | 856 * 7.5 Instance Variables: It is a compile-time error if an instance variable
is declared to be |
| 870 * constant. | 857 * constant. |
| 871 */ | 858 */ |
| 872 static final CompileTimeErrorCode CONST_INSTANCE_FIELD = new CompileTimeErrorC
ode.con1('CONST_INSTANCE_FIELD', 19, "Only static fields can be declared as 'con
st'"); | 859 static final CompileTimeErrorCode CONST_INSTANCE_FIELD = new CompileTimeErrorC
ode.con1('CONST_INSTANCE_FIELD', 18, "Only static fields can be declared as 'con
st'"); |
| 873 | 860 |
| 874 /** | 861 /** |
| 875 * 5 Variables: A constant variable must be initialized to a compile-time cons
tant (12.1) or a | 862 * 5 Variables: A constant variable must be initialized to a compile-time cons
tant (12.1) or a |
| 876 * compile-time error occurs. | 863 * compile-time error occurs. |
| 877 * | 864 * |
| 878 * @param name the name of the uninitialized final variable | 865 * @param name the name of the uninitialized final variable |
| 879 */ | 866 */ |
| 880 static final CompileTimeErrorCode CONST_NOT_INITIALIZED = new CompileTimeError
Code.con1('CONST_NOT_INITIALIZED', 20, "The const variable '%s' must be initiali
zed"); | 867 static final CompileTimeErrorCode CONST_NOT_INITIALIZED = new CompileTimeError
Code.con1('CONST_NOT_INITIALIZED', 19, "The const variable '%s' must be initiali
zed"); |
| 881 | 868 |
| 882 /** | 869 /** |
| 883 * 12.11.2 Const: An expression of one of the forms !e, e1 && e2 or e1 || e2,
where e, e1 and e2 | 870 * 12.11.2 Const: An expression of one of the forms !e, e1 && e2 or e1 || e2,
where e, e1 and e2 |
| 884 * are constant expressions that evaluate to a boolean value. | 871 * are constant expressions that evaluate to a boolean value. |
| 885 */ | 872 */ |
| 886 static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = new CompileTimeErrorC
ode.con1('CONST_EVAL_TYPE_BOOL', 21, "An expression of type 'bool' was expected"
); | 873 static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = new CompileTimeErrorC
ode.con1('CONST_EVAL_TYPE_BOOL', 20, "An expression of type 'bool' was expected"
); |
| 887 | 874 |
| 888 /** | 875 /** |
| 889 * 12.11.2 Const: An expression of one of the forms e1 == e2 or e1 != e2 where
e1 and e2 are | 876 * 12.11.2 Const: An expression of one of the forms e1 == e2 or e1 != e2 where
e1 and e2 are |
| 890 * constant expressions that evaluate to a numeric, string or boolean value or
to null. | 877 * constant expressions that evaluate to a numeric, string or boolean value or
to null. |
| 891 */ | 878 */ |
| 892 static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_NUM_STRING = new Compil
eTimeErrorCode.con1('CONST_EVAL_TYPE_BOOL_NUM_STRING', 22, "An expression of typ
e 'bool', 'num', 'String' or 'null' was expected"); | 879 static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_NUM_STRING = new Compil
eTimeErrorCode.con1('CONST_EVAL_TYPE_BOOL_NUM_STRING', 21, "An expression of typ
e 'bool', 'num', 'String' or 'null' was expected"); |
| 893 | 880 |
| 894 /** | 881 /** |
| 895 * 12.11.2 Const: An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 |
e2, e1 >> e2 or e1 | 882 * 12.11.2 Const: An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 |
e2, e1 >> e2 or e1 |
| 896 * << e2, where e, e1 and e2 are constant expressions that evaluate to an inte
ger value or to | 883 * << e2, where e, e1 and e2 are constant expressions that evaluate to an inte
ger value or to |
| 897 * null. | 884 * null. |
| 898 */ | 885 */ |
| 899 static final CompileTimeErrorCode CONST_EVAL_TYPE_INT = new CompileTimeErrorCo
de.con1('CONST_EVAL_TYPE_INT', 23, "An expression of type 'int' was expected"); | 886 static final CompileTimeErrorCode CONST_EVAL_TYPE_INT = new CompileTimeErrorCo
de.con1('CONST_EVAL_TYPE_INT', 22, "An expression of type 'int' was expected"); |
| 900 | 887 |
| 901 /** | 888 /** |
| 902 * 12.11.2 Const: An expression of one of the forms e, e1 + e2, e1 - e2, e1 *
e2, e1 / e2, e1 ~/ | 889 * 12.11.2 Const: An expression of one of the forms e, e1 + e2, e1 - e2, e1 *
e2, e1 / e2, e1 ~/ |
| 903 * e2, e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are
constant | 890 * e2, e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are
constant |
| 904 * expressions that evaluate to a numeric value or to null.. | 891 * expressions that evaluate to a numeric value or to null.. |
| 905 */ | 892 */ |
| 906 static final CompileTimeErrorCode CONST_EVAL_TYPE_NUM = new CompileTimeErrorCo
de.con1('CONST_EVAL_TYPE_NUM', 24, "An expression of type 'num' was expected"); | 893 static final CompileTimeErrorCode CONST_EVAL_TYPE_NUM = new CompileTimeErrorCo
de.con1('CONST_EVAL_TYPE_NUM', 23, "An expression of type 'num' was expected"); |
| 907 | 894 |
| 908 /** | 895 /** |
| 909 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 896 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 910 * uncaught exception being thrown. | 897 * uncaught exception being thrown. |
| 911 */ | 898 */ |
| 912 static final CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = new CompileTim
eErrorCode.con1('CONST_EVAL_THROWS_EXCEPTION', 25, "Evaluation of this constant
expression causes exception"); | 899 static final CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = new CompileTim
eErrorCode.con1('CONST_EVAL_THROWS_EXCEPTION', 24, "Evaluation of this constant
expression causes exception"); |
| 913 | 900 |
| 914 /** | 901 /** |
| 915 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 902 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 916 * uncaught exception being thrown. | 903 * uncaught exception being thrown. |
| 917 */ | 904 */ |
| 918 static final CompileTimeErrorCode CONST_EVAL_THROWS_IDBZE = new CompileTimeErr
orCode.con1('CONST_EVAL_THROWS_IDBZE', 26, "Evaluation of this constant expressi
on throws IntegerDivisionByZeroException"); | 905 static final CompileTimeErrorCode CONST_EVAL_THROWS_IDBZE = new CompileTimeErr
orCode.con1('CONST_EVAL_THROWS_IDBZE', 25, "Evaluation of this constant expressi
on throws IntegerDivisionByZeroException"); |
| 919 | 906 |
| 920 /** | 907 /** |
| 921 * 12.11.2 Const: If <i>T</i> is a parameterized type <i>S<U<sub>1</sub>, &
hellip;, | 908 * 12.11.2 Const: If <i>T</i> is a parameterized type <i>S<U<sub>1</sub>, &
hellip;, |
| 922 * U<sub>m</sub>></i>, let <i>R = S</i>; It is a compile time error if <i>S
</i> is not a | 909 * U<sub>m</sub>></i>, let <i>R = S</i>; It is a compile time error if <i>S
</i> is not a |
| 923 * generic type with <i>m</i> type parameters. | 910 * generic type with <i>m</i> type parameters. |
| 924 * | 911 * |
| 925 * @param typeName the name of the type being referenced (<i>S</i>) | 912 * @param typeName the name of the type being referenced (<i>S</i>) |
| 926 * @param parameterCount the number of type parameters that were declared | 913 * @param parameterCount the number of type parameters that were declared |
| 927 * @param argumentCount the number of type arguments provided | 914 * @param argumentCount the number of type arguments provided |
| 928 * @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS | 915 * @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS |
| 929 * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS | 916 * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS |
| 930 */ | 917 */ |
| 931 static final CompileTimeErrorCode CONST_WITH_INVALID_TYPE_PARAMETERS = new Com
pileTimeErrorCode.con1('CONST_WITH_INVALID_TYPE_PARAMETERS', 27, "The type '%s'
is declared with %d type parameters, but %d type arguments were given"); | 918 static final CompileTimeErrorCode CONST_WITH_INVALID_TYPE_PARAMETERS = new Com
pileTimeErrorCode.con1('CONST_WITH_INVALID_TYPE_PARAMETERS', 26, "The type '%s'
is declared with %d type parameters, but %d type arguments were given"); |
| 932 | 919 |
| 933 /** | 920 /** |
| 934 * 12.11.2 Const: If <i>e</i> is of the form <i>const T(a<sub>1</sub>, &hellip
;, a<sub>n</sub>, | 921 * 12.11.2 Const: If <i>e</i> is of the form <i>const T(a<sub>1</sub>, &hellip
;, a<sub>n</sub>, |
| 935 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a | 922 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a |
| 936 * compile-time error if the type <i>T</i> does not declare a constant constru
ctor with the same | 923 * compile-time error if the type <i>T</i> does not declare a constant constru
ctor with the same |
| 937 * name as the declaration of <i>T</i>. | 924 * name as the declaration of <i>T</i>. |
| 938 */ | 925 */ |
| 939 static final CompileTimeErrorCode CONST_WITH_NON_CONST = new CompileTimeErrorC
ode.con1('CONST_WITH_NON_CONST', 28, "The constructor being called is not a 'con
st' constructor"); | 926 static final CompileTimeErrorCode CONST_WITH_NON_CONST = new CompileTimeErrorC
ode.con1('CONST_WITH_NON_CONST', 27, "The constructor being called is not a 'con
st' constructor"); |
| 940 | 927 |
| 941 /** | 928 /** |
| 942 * 12.11.2 Const: In all of the above cases, it is a compile-time error if <i>
a<sub>i</sub>, 1 | 929 * 12.11.2 Const: In all of the above cases, it is a compile-time error if <i>
a<sub>i</sub>, 1 |
| 943 * <= i <= n + k</i>, is not a compile-time constant expression. | 930 * <= i <= n + k</i>, is not a compile-time constant expression. |
| 944 */ | 931 */ |
| 945 static final CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = new Compi
leTimeErrorCode.con1('CONST_WITH_NON_CONSTANT_ARGUMENT', 29, "Arguments of a con
stant creation must be constant expressions"); | 932 static final CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = new Compi
leTimeErrorCode.con1('CONST_WITH_NON_CONSTANT_ARGUMENT', 28, "Arguments of a con
stant creation must be constant expressions"); |
| 946 | 933 |
| 947 /** | 934 /** |
| 948 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current | 935 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current |
| 949 * scope, optionally followed by type arguments. | 936 * scope, optionally followed by type arguments. |
| 950 * | 937 * |
| 951 * 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>, | 938 * 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>, |
| 952 * x<sub>n+1</sub>: a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+k</sub>
)</i> it is a | 939 * x<sub>n+1</sub>: a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+k</sub>
)</i> it is a |
| 953 * compile-time error if <i>T</i> is not a class accessible in the current sco
pe, optionally | 940 * compile-time error if <i>T</i> is not a class accessible in the current sco
pe, optionally |
| 954 * followed by type arguments. | 941 * followed by type arguments. |
| 955 * | 942 * |
| 956 * @param name the name of the non-type element | 943 * @param name the name of the non-type element |
| 957 */ | 944 */ |
| 958 static final CompileTimeErrorCode CONST_WITH_NON_TYPE = new CompileTimeErrorCo
de.con1('CONST_WITH_NON_TYPE', 30, "The name '%s' is not a class"); | 945 static final CompileTimeErrorCode CONST_WITH_NON_TYPE = new CompileTimeErrorCo
de.con1('CONST_WITH_NON_TYPE', 29, "The name '%s' is not a class"); |
| 959 | 946 |
| 960 /** | 947 /** |
| 961 * 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type par
ameters. | 948 * 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type par
ameters. |
| 962 */ | 949 */ |
| 963 static final CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = new CompileTime
ErrorCode.con1('CONST_WITH_TYPE_PARAMETERS', 31, "The constant creation cannot u
se a type parameter"); | 950 static final CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = new CompileTime
ErrorCode.con1('CONST_WITH_TYPE_PARAMETERS', 30, "The constant creation cannot u
se a type parameter"); |
| 964 | 951 |
| 965 /** | 952 /** |
| 966 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant | 953 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant |
| 967 * constructor declared by the type <i>T</i>. | 954 * constructor declared by the type <i>T</i>. |
| 968 * | 955 * |
| 969 * @param typeName the name of the type | 956 * @param typeName the name of the type |
| 970 * @param constructorName the name of the requested constant constructor | 957 * @param constructorName the name of the requested constant constructor |
| 971 */ | 958 */ |
| 972 static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR = new Compi
leTimeErrorCode.con1('CONST_WITH_UNDEFINED_CONSTRUCTOR', 32, "The class '%s' doe
s not have a constant constructor '%s'"); | 959 static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR = new Compi
leTimeErrorCode.con1('CONST_WITH_UNDEFINED_CONSTRUCTOR', 31, "The class '%s' doe
s not have a constant constructor '%s'"); |
| 973 | 960 |
| 974 /** | 961 /** |
| 975 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant | 962 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant |
| 976 * constructor declared by the type <i>T</i>. | 963 * constructor declared by the type <i>T</i>. |
| 977 * | 964 * |
| 978 * @param typeName the name of the type | 965 * @param typeName the name of the type |
| 979 */ | 966 */ |
| 980 static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = n
ew CompileTimeErrorCode.con1('CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 33, "Th
e class '%s' does not have a default constant constructor"); | 967 static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = n
ew CompileTimeErrorCode.con1('CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 32, "Th
e class '%s' does not have a default constant constructor"); |
| 981 | 968 |
| 982 /** | 969 /** |
| 983 * 15.3.1 Typedef: It is a compile-time error if any default values are specif
ied in the signature | 970 * 15.3.1 Typedef: It is a compile-time error if any default values are specif
ied in the signature |
| 984 * of a function type alias. | 971 * of a function type alias. |
| 985 */ | 972 */ |
| 986 static final CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS = new C
ompileTimeErrorCode.con1('DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS', 34, "Default va
lues aren't allowed in typedefs"); | 973 static final CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS = new C
ompileTimeErrorCode.con1('DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS', 33, "Default va
lues aren't allowed in typedefs"); |
| 987 | 974 |
| 988 /** | 975 /** |
| 989 * 6.2.1 Required Formals: By means of a function signature that names the par
ameter and describes | 976 * 6.2.1 Required Formals: By means of a function signature that names the par
ameter and describes |
| 990 * its type as a function type. It is a compile-time error if any default valu
es are specified in | 977 * its type as a function type. It is a compile-time error if any default valu
es are specified in |
| 991 * the signature of such a function type. | 978 * the signature of such a function type. |
| 992 */ | 979 */ |
| 993 static final CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER =
new CompileTimeErrorCode.con1('DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER', 35, "
Default values aren't allowed in function type parameters"); | 980 static final CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER =
new CompileTimeErrorCode.con1('DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER', 34, "
Default values aren't allowed in function type parameters"); |
| 994 | 981 |
| 995 /** | 982 /** |
| 996 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name | 983 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name |
| 997 * declared in the same scope. | 984 * declared in the same scope. |
| 998 */ | 985 */ |
| 999 static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT = new CompileT
imeErrorCode.con1('DUPLICATE_CONSTRUCTOR_DEFAULT', 36, "The default constructor
is already defined"); | 986 static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT = new CompileT
imeErrorCode.con1('DUPLICATE_CONSTRUCTOR_DEFAULT', 35, "The default constructor
is already defined"); |
| 1000 | 987 |
| 1001 /** | 988 /** |
| 1002 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name | 989 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name |
| 1003 * declared in the same scope. | 990 * declared in the same scope. |
| 1004 * | 991 * |
| 1005 * @param duplicateName the name of the duplicate entity | 992 * @param duplicateName the name of the duplicate entity |
| 1006 */ | 993 */ |
| 1007 static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME = new CompileTime
ErrorCode.con1('DUPLICATE_CONSTRUCTOR_NAME', 37, "The constructor with name '%s'
is already defined"); | 994 static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME = new CompileTime
ErrorCode.con1('DUPLICATE_CONSTRUCTOR_NAME', 36, "The constructor with name '%s'
is already defined"); |
| 1008 | 995 |
| 1009 /** | 996 /** |
| 1010 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name | 997 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name |
| 1011 * declared in the same scope. | 998 * declared in the same scope. |
| 1012 * | 999 * |
| 1013 * 7 Classes: It is a compile-time error if a class declares two members of th
e same name. | 1000 * 7 Classes: It is a compile-time error if a class declares two members of th
e same name. |
| 1014 * | 1001 * |
| 1015 * 7 Classes: It is a compile-time error if a class has an instance member and
a static member | 1002 * 7 Classes: It is a compile-time error if a class has an instance member and
a static member |
| 1016 * with the same name. | 1003 * with the same name. |
| 1017 * | 1004 * |
| 1018 * @param duplicateName the name of the duplicate entity | 1005 * @param duplicateName the name of the duplicate entity |
| 1019 */ | 1006 */ |
| 1020 static final CompileTimeErrorCode DUPLICATE_DEFINITION = new CompileTimeErrorC
ode.con1('DUPLICATE_DEFINITION', 38, "The name '%s' is already defined"); | 1007 static final CompileTimeErrorCode DUPLICATE_DEFINITION = new CompileTimeErrorC
ode.con1('DUPLICATE_DEFINITION', 37, "The name '%s' is already defined"); |
| 1021 | 1008 |
| 1022 /** | 1009 /** |
| 1023 * 7. Classes: It is a compile-time error if a class has an instance member an
d a static member | 1010 * 7. Classes: It is a compile-time error if a class has an instance member an
d a static member |
| 1024 * with the same name. | 1011 * with the same name. |
| 1025 * | 1012 * |
| 1026 * This covers the additional duplicate definition cases where inheritance has
to be considered. | 1013 * This covers the additional duplicate definition cases where inheritance has
to be considered. |
| 1027 * | 1014 * |
| 1028 * @param className the name of the class that has conflicting instance/static
members | 1015 * @param className the name of the class that has conflicting instance/static
members |
| 1029 * @param name the name of the conflicting members | 1016 * @param name the name of the conflicting members |
| 1030 * @see #DUPLICATE_DEFINITION | 1017 * @see #DUPLICATE_DEFINITION |
| 1031 */ | 1018 */ |
| 1032 static final CompileTimeErrorCode DUPLICATE_DEFINITION_INHERITANCE = new Compi
leTimeErrorCode.con1('DUPLICATE_DEFINITION_INHERITANCE', 39, "The name '%s' is a
lready defined in '%s'"); | 1019 static final CompileTimeErrorCode DUPLICATE_DEFINITION_INHERITANCE = new Compi
leTimeErrorCode.con1('DUPLICATE_DEFINITION_INHERITANCE', 38, "The name '%s' is a
lready defined in '%s'"); |
| 1033 | 1020 |
| 1034 /** | 1021 /** |
| 1035 * 12.14.2 Binding Actuals to Formals: It is a compile-time error if <i>q<sub>
i</sub> = | 1022 * 12.14.2 Binding Actuals to Formals: It is a compile-time error if <i>q<sub>
i</sub> = |
| 1036 * q<sub>j</sub></i> for any <i>i != j</i> [where <i>q<sub>i</sub></i> is the
label for a named | 1023 * q<sub>j</sub></i> for any <i>i != j</i> [where <i>q<sub>i</sub></i> is the
label for a named |
| 1037 * argument]. | 1024 * argument]. |
| 1038 */ | 1025 */ |
| 1039 static final CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = new CompileTimeEr
rorCode.con1('DUPLICATE_NAMED_ARGUMENT', 40, "The argument for the named paramet
er '%s' was already specified"); | 1026 static final CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = new CompileTimeEr
rorCode.con1('DUPLICATE_NAMED_ARGUMENT', 39, "The argument for the named paramet
er '%s' was already specified"); |
| 1040 | 1027 |
| 1041 /** | 1028 /** |
| 1042 * SDK implementation libraries can be exported only by other SDK libraries. | 1029 * SDK implementation libraries can be exported only by other SDK libraries. |
| 1043 * | 1030 * |
| 1044 * @param uri the uri pointing to a library | 1031 * @param uri the uri pointing to a library |
| 1045 */ | 1032 */ |
| 1046 static final CompileTimeErrorCode EXPORT_INTERNAL_LIBRARY = new CompileTimeErr
orCode.con1('EXPORT_INTERNAL_LIBRARY', 41, "The library '%s' is internal and can
not be exported"); | 1033 static final CompileTimeErrorCode EXPORT_INTERNAL_LIBRARY = new CompileTimeErr
orCode.con1('EXPORT_INTERNAL_LIBRARY', 40, "The library '%s' is internal and can
not be exported"); |
| 1047 | 1034 |
| 1048 /** | 1035 /** |
| 1049 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1036 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 1050 * not a library declaration. | 1037 * not a library declaration. |
| 1051 * | 1038 * |
| 1052 * @param uri the uri pointing to a non-library declaration | 1039 * @param uri the uri pointing to a non-library declaration |
| 1053 */ | 1040 */ |
| 1054 static final CompileTimeErrorCode EXPORT_OF_NON_LIBRARY = new CompileTimeError
Code.con1('EXPORT_OF_NON_LIBRARY', 42, "The exported library '%s' must not have
a part-of directive"); | 1041 static final CompileTimeErrorCode EXPORT_OF_NON_LIBRARY = new CompileTimeError
Code.con1('EXPORT_OF_NON_LIBRARY', 41, "The exported library '%s' must not have
a part-of directive"); |
| 1055 | 1042 |
| 1056 /** | 1043 /** |
| 1057 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla
ss <i>C</i> includes | 1044 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla
ss <i>C</i> includes |
| 1058 * a type expression that does not denote a class available in the lexical sco
pe of <i>C</i>. | 1045 * a type expression that does not denote a class available in the lexical sco
pe of <i>C</i>. |
| 1059 * | 1046 * |
| 1060 * @param typeName the name of the superclass that was not found | 1047 * @param typeName the name of the superclass that was not found |
| 1061 */ | 1048 */ |
| 1062 static final CompileTimeErrorCode EXTENDS_NON_CLASS = new CompileTimeErrorCode
.con1('EXTENDS_NON_CLASS', 43, "Classes can only extend other classes"); | 1049 static final CompileTimeErrorCode EXTENDS_NON_CLASS = new CompileTimeErrorCode
.con1('EXTENDS_NON_CLASS', 42, "Classes can only extend other classes"); |
| 1063 | 1050 |
| 1064 /** | 1051 /** |
| 1065 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. | 1052 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. |
| 1066 * | 1053 * |
| 1067 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. | 1054 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. |
| 1068 * | 1055 * |
| 1069 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. | 1056 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. |
| 1070 * | 1057 * |
| 1071 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to | 1058 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to |
| 1072 * attempt to extend or implement num. | 1059 * attempt to extend or implement num. |
| 1073 * | 1060 * |
| 1074 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. | 1061 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. |
| 1075 * | 1062 * |
| 1076 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. | 1063 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. |
| 1077 * | 1064 * |
| 1078 * @param typeName the name of the type that cannot be extended | 1065 * @param typeName the name of the type that cannot be extended |
| 1079 * @see #IMPLEMENTS_DISALLOWED_CLASS | 1066 * @see #IMPLEMENTS_DISALLOWED_CLASS |
| 1080 */ | 1067 */ |
| 1081 static final CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = new CompileTimeEr
rorCode.con1('EXTENDS_DISALLOWED_CLASS', 44, "Classes cannot extend '%s'"); | 1068 static final CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = new CompileTimeEr
rorCode.con1('EXTENDS_DISALLOWED_CLASS', 43, "Classes cannot extend '%s'"); |
| 1082 | 1069 |
| 1083 /** | 1070 /** |
| 1084 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > | 1071 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > |
| 1085 * n</i>. | 1072 * n</i>. |
| 1086 * | 1073 * |
| 1087 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 1074 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 1088 * uncaught exception being thrown. | 1075 * uncaught exception being thrown. |
| 1089 * | 1076 * |
| 1090 * @param requiredCount the maximum number of positional arguments | 1077 * @param requiredCount the maximum number of positional arguments |
| 1091 * @param argumentCount the actual number of positional arguments given | 1078 * @param argumentCount the actual number of positional arguments given |
| 1092 */ | 1079 */ |
| 1093 static final CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS = new CompileTime
ErrorCode.con1('EXTRA_POSITIONAL_ARGUMENTS', 45, "%d positional arguments expect
ed, but %d found"); | 1080 static final CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS = new CompileTime
ErrorCode.con1('EXTRA_POSITIONAL_ARGUMENTS', 44, "%d positional arguments expect
ed, but %d found"); |
| 1094 | 1081 |
| 1095 /** | 1082 /** |
| 1096 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time | 1083 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time |
| 1097 * error if more than one initializer corresponding to a given instance variab
le appears in | 1084 * error if more than one initializer corresponding to a given instance variab
le appears in |
| 1098 * <i>k</i>'s list. | 1085 * <i>k</i>'s list. |
| 1099 */ | 1086 */ |
| 1100 static final CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS =
new CompileTimeErrorCode.con1('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 46,
"The field '%s' cannot be initialized twice in the same constructor"); | 1087 static final CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS =
new CompileTimeErrorCode.con1('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 45,
"The field '%s' cannot be initialized twice in the same constructor"); |
| 1101 | 1088 |
| 1102 /** | 1089 /** |
| 1103 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time | 1090 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time |
| 1104 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is initialized | 1091 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is initialized |
| 1105 * by means of an initializing formal of <i>k</i>. | 1092 * by means of an initializing formal of <i>k</i>. |
| 1106 */ | 1093 */ |
| 1107 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ
ER = new CompileTimeErrorCode.con1('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ
ER', 47, "Fields cannot be initialized in both the parameter list and the initia
lizers"); | 1094 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ
ER = new CompileTimeErrorCode.con1('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ
ER', 46, "Fields cannot be initialized in both the parameter list and the initia
lizers"); |
| 1108 | 1095 |
| 1109 /** | 1096 /** |
| 1110 * 5 Variables: It is a compile-time error if a final instance variable that h
as is initialized by | 1097 * 5 Variables: It is a compile-time error if a final instance variable that h
as is initialized by |
| 1111 * means of an initializing formal of a constructor is also initialized elsewh
ere in the same | 1098 * means of an initializing formal of a constructor is also initialized elsewh
ere in the same |
| 1112 * constructor. | 1099 * constructor. |
| 1113 * | 1100 * |
| 1114 * @param name the name of the field in question | 1101 * @param name the name of the field in question |
| 1115 */ | 1102 */ |
| 1116 static final CompileTimeErrorCode FINAL_INITIALIZED_MULTIPLE_TIMES = new Compi
leTimeErrorCode.con1('FINAL_INITIALIZED_MULTIPLE_TIMES', 48, "'%s' is a final fi
eld and so can only be set once"); | 1103 static final CompileTimeErrorCode FINAL_INITIALIZED_MULTIPLE_TIMES = new Compi
leTimeErrorCode.con1('FINAL_INITIALIZED_MULTIPLE_TIMES', 47, "'%s' is a final fi
eld and so can only be set once"); |
| 1117 | 1104 |
| 1118 /** | 1105 /** |
| 1119 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by | 1106 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by |
| 1120 * a function other than a non-redirecting generative constructor. | 1107 * a function other than a non-redirecting generative constructor. |
| 1121 */ | 1108 */ |
| 1122 static final CompileTimeErrorCode FIELD_INITIALIZER_FACTORY_CONSTRUCTOR = new
CompileTimeErrorCode.con1('FIELD_INITIALIZER_FACTORY_CONSTRUCTOR', 49, "Initiali
zing formal fields cannot be used in factory constructors"); | 1109 static final CompileTimeErrorCode FIELD_INITIALIZER_FACTORY_CONSTRUCTOR = new
CompileTimeErrorCode.con1('FIELD_INITIALIZER_FACTORY_CONSTRUCTOR', 48, "Initiali
zing formal fields cannot be used in factory constructors"); |
| 1123 | 1110 |
| 1124 /** | 1111 /** |
| 1125 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by | 1112 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by |
| 1126 * a function other than a non-redirecting generative constructor. | 1113 * a function other than a non-redirecting generative constructor. |
| 1127 */ | 1114 */ |
| 1128 static final CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new
CompileTimeErrorCode.con1('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 50, "Initiali
zing formal fields can only be used in constructors"); | 1115 static final CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new
CompileTimeErrorCode.con1('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 49, "Initiali
zing formal fields can only be used in constructors"); |
| 1129 | 1116 |
| 1130 /** | 1117 /** |
| 1131 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 1118 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
| 1132 * only action is to invoke another generative constructor. | 1119 * only action is to invoke another generative constructor. |
| 1133 * | 1120 * |
| 1134 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by | 1121 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by |
| 1135 * a function other than a non-redirecting generative constructor. | 1122 * a function other than a non-redirecting generative constructor. |
| 1136 */ | 1123 */ |
| 1137 static final CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR =
new CompileTimeErrorCode.con1('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', 51, "
The redirecting constructor cannot have a field initializer"); | 1124 static final CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR =
new CompileTimeErrorCode.con1('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', 50, "
The redirecting constructor cannot have a field initializer"); |
| 1138 | 1125 |
| 1139 /** | 1126 /** |
| 1140 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same | 1127 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same |
| 1141 * name. | 1128 * name. |
| 1142 * | 1129 * |
| 1143 * @param name the conflicting name of the getter and method | 1130 * @param name the conflicting name of the getter and method |
| 1144 */ | 1131 */ |
| 1145 static final CompileTimeErrorCode GETTER_AND_METHOD_WITH_SAME_NAME = new Compi
leTimeErrorCode.con1('GETTER_AND_METHOD_WITH_SAME_NAME', 52, "'%s' cannot be use
d to name a getter, there is already a method with the same name"); | 1132 static final CompileTimeErrorCode GETTER_AND_METHOD_WITH_SAME_NAME = new Compi
leTimeErrorCode.con1('GETTER_AND_METHOD_WITH_SAME_NAME', 51, "'%s' cannot be use
d to name a getter, there is already a method with the same name"); |
| 1146 | 1133 |
| 1147 /** | 1134 /** |
| 1148 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. | 1135 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. |
| 1149 * | 1136 * |
| 1150 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. | 1137 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. |
| 1151 * | 1138 * |
| 1152 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. | 1139 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. |
| 1153 * | 1140 * |
| 1154 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to | 1141 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to |
| 1155 * attempt to extend or implement num. | 1142 * attempt to extend or implement num. |
| 1156 * | 1143 * |
| 1157 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. | 1144 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. |
| 1158 * | 1145 * |
| 1159 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. | 1146 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. |
| 1160 * | 1147 * |
| 1161 * @param typeName the name of the type that cannot be implemented | 1148 * @param typeName the name of the type that cannot be implemented |
| 1162 * @see #EXTENDS_DISALLOWED_CLASS | 1149 * @see #EXTENDS_DISALLOWED_CLASS |
| 1163 */ | 1150 */ |
| 1164 static final CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = new CompileTim
eErrorCode.con1('IMPLEMENTS_DISALLOWED_CLASS', 53, "Classes cannot implement '%s
'"); | 1151 static final CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = new CompileTim
eErrorCode.con1('IMPLEMENTS_DISALLOWED_CLASS', 52, "Classes cannot implement '%s
'"); |
| 1165 | 1152 |
| 1166 /** | 1153 /** |
| 1167 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class includes | 1154 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class includes |
| 1168 * type dynamic. | 1155 * type dynamic. |
| 1169 */ | 1156 */ |
| 1170 static final CompileTimeErrorCode IMPLEMENTS_DYNAMIC = new CompileTimeErrorCod
e.con1('IMPLEMENTS_DYNAMIC', 54, "Classes cannot implement 'dynamic'"); | 1157 static final CompileTimeErrorCode IMPLEMENTS_DYNAMIC = new CompileTimeErrorCod
e.con1('IMPLEMENTS_DYNAMIC', 53, "Classes cannot implement 'dynamic'"); |
| 1171 | 1158 |
| 1172 /** | 1159 /** |
| 1173 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class <i>C</i> | 1160 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class <i>C</i> |
| 1174 * includes a type expression that does not denote a class available in the le
xical scope of | 1161 * includes a type expression that does not denote a class available in the le
xical scope of |
| 1175 * <i>C</i>. | 1162 * <i>C</i>. |
| 1176 * | 1163 * |
| 1177 * @param typeName the name of the interface that was not found | 1164 * @param typeName the name of the interface that was not found |
| 1178 */ | 1165 */ |
| 1179 static final CompileTimeErrorCode IMPLEMENTS_NON_CLASS = new CompileTimeErrorC
ode.con1('IMPLEMENTS_NON_CLASS', 55, "Classes can only implement other classes")
; | 1166 static final CompileTimeErrorCode IMPLEMENTS_NON_CLASS = new CompileTimeErrorC
ode.con1('IMPLEMENTS_NON_CLASS', 54, "Classes can only implement other classes")
; |
| 1180 | 1167 |
| 1181 /** | 1168 /** |
| 1182 * 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears
more than once in | 1169 * 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears
more than once in |
| 1183 * the implements clause of a class. | 1170 * the implements clause of a class. |
| 1184 * | 1171 * |
| 1185 * @param className the name of the class that is implemented more than once | 1172 * @param className the name of the class that is implemented more than once |
| 1186 */ | 1173 */ |
| 1187 static final CompileTimeErrorCode IMPLEMENTS_REPEATED = new CompileTimeErrorCo
de.con1('IMPLEMENTS_REPEATED', 56, "'%s' can only be implemented once"); | 1174 static final CompileTimeErrorCode IMPLEMENTS_REPEATED = new CompileTimeErrorCo
de.con1('IMPLEMENTS_REPEATED', 55, "'%s' can only be implemented once"); |
| 1188 | 1175 |
| 1189 /** | 1176 /** |
| 1190 * 7.10 Superinterfaces: It is a compile-time error if the superclass of a cla
ss <i>C</i> appears | 1177 * 7.10 Superinterfaces: It is a compile-time error if the superclass of a cla
ss <i>C</i> appears |
| 1191 * in the implements clause of <i>C</i>. | 1178 * in the implements clause of <i>C</i>. |
| 1192 * | 1179 * |
| 1193 * @param className the name of the class that appears in both "extends" and "
implements" clauses | 1180 * @param className the name of the class that appears in both "extends" and "
implements" clauses |
| 1194 */ | 1181 */ |
| 1195 static final CompileTimeErrorCode IMPLEMENTS_SUPER_CLASS = new CompileTimeErro
rCode.con1('IMPLEMENTS_SUPER_CLASS', 57, "'%s' cannot be used in both 'extends'
and 'implements' clauses"); | 1182 static final CompileTimeErrorCode IMPLEMENTS_SUPER_CLASS = new CompileTimeErro
rCode.con1('IMPLEMENTS_SUPER_CLASS', 56, "'%s' cannot be used in both 'extends'
and 'implements' clauses"); |
| 1196 | 1183 |
| 1197 /** | 1184 /** |
| 1198 * 7.6.1 Generative Constructors: Note that <b>this</b> is not in scope on the
right hand side of | 1185 * 7.6.1 Generative Constructors: Note that <b>this</b> is not in scope on the
right hand side of |
| 1199 * an initializer. | 1186 * an initializer. |
| 1200 * | 1187 * |
| 1201 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable | 1188 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable |
| 1202 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the | 1189 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the |
| 1203 * initializer of an instance variable. | 1190 * initializer of an instance variable. |
| 1204 * | 1191 * |
| 1205 * @param name the name of the type in question | 1192 * @param name the name of the type in question |
| 1206 */ | 1193 */ |
| 1207 static final CompileTimeErrorCode IMPLICIT_THIS_REFERENCE_IN_INITIALIZER = new
CompileTimeErrorCode.con1('IMPLICIT_THIS_REFERENCE_IN_INITIALIZER', 58, "Only s
tatic members can be accessed in initializers"); | 1194 static final CompileTimeErrorCode IMPLICIT_THIS_REFERENCE_IN_INITIALIZER = new
CompileTimeErrorCode.con1('IMPLICIT_THIS_REFERENCE_IN_INITIALIZER', 57, "Only s
tatic members can be accessed in initializers"); |
| 1208 | 1195 |
| 1209 /** | 1196 /** |
| 1210 * SDK implementation libraries can be imported only by other SDK libraries. | 1197 * SDK implementation libraries can be imported only by other SDK libraries. |
| 1211 * | 1198 * |
| 1212 * @param uri the uri pointing to a library | 1199 * @param uri the uri pointing to a library |
| 1213 */ | 1200 */ |
| 1214 static final CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY = new CompileTimeErr
orCode.con1('IMPORT_INTERNAL_LIBRARY', 59, "The library '%s' is internal and can
not be imported"); | 1201 static final CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY = new CompileTimeErr
orCode.con1('IMPORT_INTERNAL_LIBRARY', 58, "The library '%s' is internal and can
not be imported"); |
| 1215 | 1202 |
| 1216 /** | 1203 /** |
| 1217 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1204 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 1218 * not a library declaration. | 1205 * not a library declaration. |
| 1219 * | 1206 * |
| 1220 * @param uri the uri pointing to a non-library declaration | 1207 * @param uri the uri pointing to a non-library declaration |
| 1221 */ | 1208 */ |
| 1222 static final CompileTimeErrorCode IMPORT_OF_NON_LIBRARY = new CompileTimeError
Code.con1('IMPORT_OF_NON_LIBRARY', 60, "The imported library '%s' must not have
a part-of directive"); | 1209 static final CompileTimeErrorCode IMPORT_OF_NON_LIBRARY = new CompileTimeError
Code.con1('IMPORT_OF_NON_LIBRARY', 59, "The imported library '%s' must not have
a part-of directive"); |
| 1223 | 1210 |
| 1224 /** | 1211 /** |
| 1225 * 13.9 Switch: It is a compile-time error if values of the expressions <i>e<s
ub>k</sub></i> are | 1212 * 13.9 Switch: It is a compile-time error if values of the expressions <i>e<s
ub>k</sub></i> are |
| 1226 * not instances of the same class <i>C</i>, for all <i>1 <= k <= n</i>. | 1213 * not instances of the same class <i>C</i>, for all <i>1 <= k <= n</i>. |
| 1227 * | 1214 * |
| 1228 * @param expressionSource the expression source code that is the unexpected t
ype | 1215 * @param expressionSource the expression source code that is the unexpected t
ype |
| 1229 * @param expectedType the name of the expected type | 1216 * @param expectedType the name of the expected type |
| 1230 */ | 1217 */ |
| 1231 static final CompileTimeErrorCode INCONSISTENT_CASE_EXPRESSION_TYPES = new Com
pileTimeErrorCode.con1('INCONSISTENT_CASE_EXPRESSION_TYPES', 61, "Case expressio
ns must have the same types, '%s' is not a %s'"); | 1218 static final CompileTimeErrorCode INCONSISTENT_CASE_EXPRESSION_TYPES = new Com
pileTimeErrorCode.con1('INCONSISTENT_CASE_EXPRESSION_TYPES', 60, "Case expressio
ns must have the same types, '%s' is not a %s'"); |
| 1232 | 1219 |
| 1233 /** | 1220 /** |
| 1234 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time | 1221 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time |
| 1235 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an | 1222 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an |
| 1236 * instance variable declared in the immediately surrounding class. | 1223 * instance variable declared in the immediately surrounding class. |
| 1237 * | 1224 * |
| 1238 * @param id the name of the initializing formal that is not an instance varia
ble in the | 1225 * @param id the name of the initializing formal that is not an instance varia
ble in the |
| 1239 * immediately enclosing class | 1226 * immediately enclosing class |
| 1240 * @see #INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD | 1227 * @see #INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD |
| 1241 */ | 1228 */ |
| 1242 static final CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTANT_FIELD = new Com
pileTimeErrorCode.con1('INITIALIZER_FOR_NON_EXISTANT_FIELD', 62, "'%s' is not a
variable in the enclosing class"); | 1229 static final CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTANT_FIELD = new Com
pileTimeErrorCode.con1('INITIALIZER_FOR_NON_EXISTANT_FIELD', 61, "'%s' is not a
variable in the enclosing class"); |
| 1243 | 1230 |
| 1244 /** | 1231 /** |
| 1245 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time | 1232 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time |
| 1246 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an | 1233 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an |
| 1247 * instance variable declared in the immediately surrounding class. | 1234 * instance variable declared in the immediately surrounding class. |
| 1248 * | 1235 * |
| 1249 * @param id the name of the initializing formal that is a static variable in
the immediately | 1236 * @param id the name of the initializing formal that is a static variable in
the immediately |
| 1250 * enclosing class | 1237 * enclosing class |
| 1251 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD | 1238 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD |
| 1252 */ | 1239 */ |
| 1253 static final CompileTimeErrorCode INITIALIZER_FOR_STATIC_FIELD = new CompileTi
meErrorCode.con1('INITIALIZER_FOR_STATIC_FIELD', 63, "'%s' is a static variable
in the enclosing class, variables initialized in a constructor cannot be static"
); | 1240 static final CompileTimeErrorCode INITIALIZER_FOR_STATIC_FIELD = new CompileTi
meErrorCode.con1('INITIALIZER_FOR_STATIC_FIELD', 62, "'%s' is a static variable
in the enclosing class, variables initialized in a constructor cannot be static"
); |
| 1254 | 1241 |
| 1255 /** | 1242 /** |
| 1256 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a | 1243 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a |
| 1257 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately | 1244 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately |
| 1258 * enclosing class. | 1245 * enclosing class. |
| 1259 * | 1246 * |
| 1260 * @param id the name of the initializing formal that is not an instance varia
ble in the | 1247 * @param id the name of the initializing formal that is not an instance varia
ble in the |
| 1261 * immediately enclosing class | 1248 * immediately enclosing class |
| 1262 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD | 1249 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD |
| 1263 * @see #INITIALIZER_FOR_NON_EXISTANT_FIELD | 1250 * @see #INITIALIZER_FOR_NON_EXISTANT_FIELD |
| 1264 */ | 1251 */ |
| 1265 static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD =
new CompileTimeErrorCode.con1('INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD', 64,
"'%s' is not a variable in the enclosing class"); | 1252 static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD =
new CompileTimeErrorCode.con1('INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD', 63,
"'%s' is not a variable in the enclosing class"); |
| 1266 | 1253 |
| 1267 /** | 1254 /** |
| 1268 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a | 1255 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a |
| 1269 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately | 1256 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately |
| 1270 * enclosing class. | 1257 * enclosing class. |
| 1271 * | 1258 * |
| 1272 * @param id the name of the initializing formal that is a static variable in
the immediately | 1259 * @param id the name of the initializing formal that is a static variable in
the immediately |
| 1273 * enclosing class | 1260 * enclosing class |
| 1274 * @see #INITIALIZER_FOR_STATIC_FIELD | 1261 * @see #INITIALIZER_FOR_STATIC_FIELD |
| 1275 */ | 1262 */ |
| 1276 static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_STATIC_FIELD = new C
ompileTimeErrorCode.con1('INITIALIZING_FORMAL_FOR_STATIC_FIELD', 65, "'%s' is a
static variable in the enclosing class, variables initialized in a constructor c
annot be static"); | 1263 static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_STATIC_FIELD = new C
ompileTimeErrorCode.con1('INITIALIZING_FORMAL_FOR_STATIC_FIELD', 64, "'%s' is a
static variable in the enclosing class, variables initialized in a constructor c
annot be static"); |
| 1277 | 1264 |
| 1278 /** | 1265 /** |
| 1279 * 12.30 Identifier Reference: Otherwise, e is equivalent to the property extr
action | 1266 * 12.30 Identifier Reference: Otherwise, e is equivalent to the property extr
action |
| 1280 * <b>this</b>.<i>id</i>. | 1267 * <b>this</b>.<i>id</i>. |
| 1281 */ | 1268 */ |
| 1282 static final CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_STATIC = new Com
pileTimeErrorCode.con1('INSTANCE_MEMBER_ACCESS_FROM_STATIC', 66, "Instance membe
r cannot be accessed from static method"); | 1269 static final CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_STATIC = new Com
pileTimeErrorCode.con1('INSTANCE_MEMBER_ACCESS_FROM_STATIC', 65, "Instance membe
r cannot be accessed from static method"); |
| 1283 | 1270 |
| 1284 /** | 1271 /** |
| 1285 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the | 1272 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the |
| 1286 * character @, followed by a constant expression that must be either a refere
nce to a | 1273 * character @, followed by a constant expression that must be either a refere
nce to a |
| 1287 * compile-time constant variable, or a call to a constant constructor. | 1274 * compile-time constant variable, or a call to a constant constructor. |
| 1288 */ | 1275 */ |
| 1289 static final CompileTimeErrorCode INVALID_ANNOTATION = new CompileTimeErrorCod
e.con1('INVALID_ANNOTATION', 67, "Annotation can be only constant variable or co
nstant constructor invocation"); | 1276 static final CompileTimeErrorCode INVALID_ANNOTATION = new CompileTimeErrorCod
e.con1('INVALID_ANNOTATION', 66, "Annotation can be only constant variable or co
nstant constructor invocation"); |
| 1290 | 1277 |
| 1291 /** | 1278 /** |
| 1292 * TODO(brianwilkerson) Remove this when we have decided on how to report erro
rs in compile-time | 1279 * TODO(brianwilkerson) Remove this when we have decided on how to report erro
rs in compile-time |
| 1293 * constants. Until then, this acts as a placeholder for more informative erro
rs. | 1280 * constants. Until then, this acts as a placeholder for more informative erro
rs. |
| 1294 * | 1281 * |
| 1295 * See TODOs in ConstantVisitor | 1282 * See TODOs in ConstantVisitor |
| 1296 */ | 1283 */ |
| 1297 static final CompileTimeErrorCode INVALID_CONSTANT = new CompileTimeErrorCode.
con1('INVALID_CONSTANT', 68, "Invalid constant value"); | 1284 static final CompileTimeErrorCode INVALID_CONSTANT = new CompileTimeErrorCode.
con1('INVALID_CONSTANT', 67, "Invalid constant value"); |
| 1298 | 1285 |
| 1299 /** | 1286 /** |
| 1300 * 7.6 Constructors: It is a compile-time error if the name of a constructor i
s not a constructor | 1287 * 7.6 Constructors: It is a compile-time error if the name of a constructor i
s not a constructor |
| 1301 * name. | 1288 * name. |
| 1302 */ | 1289 */ |
| 1303 static final CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = new CompileTimeEr
rorCode.con1('INVALID_CONSTRUCTOR_NAME', 69, "Invalid constructor name"); | 1290 static final CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = new CompileTimeEr
rorCode.con1('INVALID_CONSTRUCTOR_NAME', 68, "Invalid constructor name"); |
| 1304 | 1291 |
| 1305 /** | 1292 /** |
| 1306 * 7.6.2 Factories: It is a compile-time error if <i>M</i> is not the name of
the immediately | 1293 * 7.6.2 Factories: It is a compile-time error if <i>M</i> is not the name of
the immediately |
| 1307 * enclosing class. | 1294 * enclosing class. |
| 1308 */ | 1295 */ |
| 1309 static final CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS = new Compi
leTimeErrorCode.con1('INVALID_FACTORY_NAME_NOT_A_CLASS', 70, "The name of the im
mediately enclosing class expected"); | 1296 static final CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS = new Compi
leTimeErrorCode.con1('INVALID_FACTORY_NAME_NOT_A_CLASS', 69, "The name of the im
mediately enclosing class expected"); |
| 1310 | 1297 |
| 1311 /** | 1298 /** |
| 1312 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable | 1299 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable |
| 1313 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the | 1300 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the |
| 1314 * initializer of an instance variable. | 1301 * initializer of an instance variable. |
| 1315 */ | 1302 */ |
| 1316 static final CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = new CompileTimeE
rrorCode.con1('INVALID_REFERENCE_TO_THIS', 71, "Invalid reference to 'this' expr
ession"); | 1303 static final CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = new CompileTimeE
rrorCode.con1('INVALID_REFERENCE_TO_THIS', 70, "Invalid reference to 'this' expr
ession"); |
| 1317 | 1304 |
| 1318 /** | 1305 /** |
| 1319 * 12.6 Lists: It is a compile time error if the type argument of a constant l
ist literal includes | 1306 * 12.6 Lists: It is a compile time error if the type argument of a constant l
ist literal includes |
| 1320 * a type parameter. | 1307 * a type parameter. |
| 1321 * | 1308 * |
| 1322 * @name the name of the type parameter | 1309 * @name the name of the type parameter |
| 1323 */ | 1310 */ |
| 1324 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST = new Co
mpileTimeErrorCode.con1('INVALID_TYPE_ARGUMENT_IN_CONST_LIST', 72, "Constant lis
t literals cannot include a type parameter as a type argument, such as '%s'"); | 1311 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST = new Co
mpileTimeErrorCode.con1('INVALID_TYPE_ARGUMENT_IN_CONST_LIST', 71, "Constant lis
t literals cannot include a type parameter as a type argument, such as '%s'"); |
| 1325 | 1312 |
| 1326 /** | 1313 /** |
| 1327 * 12.7 Maps: It is a compile time error if the type arguments of a constant m
ap literal include a | 1314 * 12.7 Maps: It is a compile time error if the type arguments of a constant m
ap literal include a |
| 1328 * type parameter. | 1315 * type parameter. |
| 1329 * | 1316 * |
| 1330 * @name the name of the type parameter | 1317 * @name the name of the type parameter |
| 1331 */ | 1318 */ |
| 1332 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = new Com
pileTimeErrorCode.con1('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 73, "Constant map l
iterals cannot include a type parameter as a type argument, such as '%s'"); | 1319 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = new Com
pileTimeErrorCode.con1('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 72, "Constant map l
iterals cannot include a type parameter as a type argument, such as '%s'"); |
| 1333 | 1320 |
| 1334 /** | 1321 /** |
| 1335 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1322 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 1336 * not a library declaration. | 1323 * not a library declaration. |
| 1337 * | 1324 * |
| 1338 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1325 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 1339 * not a library declaration. | 1326 * not a library declaration. |
| 1340 * | 1327 * |
| 1341 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part | 1328 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part |
| 1342 * declaration. | 1329 * declaration. |
| 1343 * | 1330 * |
| 1344 * @param uri the URI that is invalid | 1331 * @param uri the URI that is invalid |
| 1345 * @see #URI_DOES_NOT_EXIST | 1332 * @see #URI_DOES_NOT_EXIST |
| 1346 */ | 1333 */ |
| 1347 static final CompileTimeErrorCode INVALID_URI = new CompileTimeErrorCode.con1(
'INVALID_URI', 74, "Invalid URI syntax: '%s'"); | 1334 static final CompileTimeErrorCode INVALID_URI = new CompileTimeErrorCode.con1(
'INVALID_URI', 73, "Invalid URI syntax: '%s'"); |
| 1348 | 1335 |
| 1349 /** | 1336 /** |
| 1350 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within | 1337 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within |
| 1351 * the innermost function in which <i>s<sub>b</sub></i> occurs. | 1338 * the innermost function in which <i>s<sub>b</sub></i> occurs. |
| 1352 * | 1339 * |
| 1353 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use | 1340 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use |
| 1354 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. | 1341 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. |
| 1355 * | 1342 * |
| 1356 * @param labelName the name of the unresolvable label | 1343 * @param labelName the name of the unresolvable label |
| 1357 */ | 1344 */ |
| 1358 static final CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = new CompileTimeErrorC
ode.con1('LABEL_IN_OUTER_SCOPE', 75, "Cannot reference label '%s' declared in an
outer method"); | 1345 static final CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = new CompileTimeErrorC
ode.con1('LABEL_IN_OUTER_SCOPE', 74, "Cannot reference label '%s' declared in an
outer method"); |
| 1359 | 1346 |
| 1360 /** | 1347 /** |
| 1361 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within | 1348 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within |
| 1362 * the innermost function in which <i>s<sub>b</sub></i> occurs. | 1349 * the innermost function in which <i>s<sub>b</sub></i> occurs. |
| 1363 * | 1350 * |
| 1364 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use | 1351 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use |
| 1365 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. | 1352 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. |
| 1366 * | 1353 * |
| 1367 * @param labelName the name of the unresolvable label | 1354 * @param labelName the name of the unresolvable label |
| 1368 */ | 1355 */ |
| 1369 static final CompileTimeErrorCode LABEL_UNDEFINED = new CompileTimeErrorCode.c
on1('LABEL_UNDEFINED', 76, "Cannot reference undefined label '%s'"); | 1356 static final CompileTimeErrorCode LABEL_UNDEFINED = new CompileTimeErrorCode.c
on1('LABEL_UNDEFINED', 75, "Cannot reference undefined label '%s'"); |
| 1370 | 1357 |
| 1371 /** | 1358 /** |
| 1372 * 12.6 Lists: A run-time list literal <<i>E</i>> [<i>e<sub>1</sub></i>
... | 1359 * 12.6 Lists: A run-time list literal <<i>E</i>> [<i>e<sub>1</sub></i>
... |
| 1373 * <i>e<sub>n</sub></i>] is evaluated as follows: | 1360 * <i>e<sub>n</sub></i>] is evaluated as follows: |
| 1374 * | 1361 * |
| 1375 * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and
second argument | 1362 * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and
second argument |
| 1376 * <i>o<sub>i+1</sub></i><i>, 1 <= i <= n</i> | 1363 * <i>o<sub>i+1</sub></i><i>, 1 <= i <= n</i> |
| 1377 * | 1364 * |
| 1378 * | 1365 * |
| 1379 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 1366 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
| 1380 * <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 <= | 1367 * <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 <= |
| 1381 * 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>. | 1368 * 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>. |
| 1382 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 1369 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
| 1383 * j <= m</i>. | 1370 * j <= m</i>. |
| 1384 */ | 1371 */ |
| 1385 static final CompileTimeErrorCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = new Compi
leTimeErrorCode.con1('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 77, "The element type '
%s' cannot be assigned to the list type '%s'"); | 1372 static final CompileTimeErrorCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = new Compi
leTimeErrorCode.con1('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 76, "The element type '
%s' cannot be assigned to the list type '%s'"); |
| 1386 | 1373 |
| 1387 /** | 1374 /** |
| 1388 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : | 1375 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : |
| 1389 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: | 1376 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: |
| 1390 * | 1377 * |
| 1391 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second | 1378 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second |
| 1392 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> | 1379 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> |
| 1393 * | 1380 * |
| 1394 * | 1381 * |
| 1395 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 1382 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
| 1396 * <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 <= | 1383 * <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 <= |
| 1397 * 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>. | 1384 * 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>. |
| 1398 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 1385 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
| 1399 * j <= m</i>. | 1386 * j <= m</i>. |
| 1400 */ | 1387 */ |
| 1401 static final CompileTimeErrorCode MAP_KEY_TYPE_NOT_ASSIGNABLE = new CompileTim
eErrorCode.con1('MAP_KEY_TYPE_NOT_ASSIGNABLE', 78, "The element type '%s' cannot
be assigned to the map key type '%s'"); | 1388 static final CompileTimeErrorCode MAP_KEY_TYPE_NOT_ASSIGNABLE = new CompileTim
eErrorCode.con1('MAP_KEY_TYPE_NOT_ASSIGNABLE', 77, "The element type '%s' cannot
be assigned to the map key type '%s'"); |
| 1402 | 1389 |
| 1403 /** | 1390 /** |
| 1404 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : | 1391 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : |
| 1405 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: | 1392 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: |
| 1406 * | 1393 * |
| 1407 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second | 1394 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second |
| 1408 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> | 1395 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> |
| 1409 * | 1396 * |
| 1410 * | 1397 * |
| 1411 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 1398 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
| 1412 * <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 <= | 1399 * <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 <= |
| 1413 * 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>. | 1400 * 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>. |
| 1414 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 1401 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
| 1415 * j <= m</i>. | 1402 * j <= m</i>. |
| 1416 */ | 1403 */ |
| 1417 static final CompileTimeErrorCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = new CompileT
imeErrorCode.con1('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 79, "The element type '%s' ca
nnot be assigned to the map value type '%s'"); | 1404 static final CompileTimeErrorCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = new CompileT
imeErrorCode.con1('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 78, "The element type '%s' ca
nnot be assigned to the map value type '%s'"); |
| 1418 | 1405 |
| 1419 /** | 1406 /** |
| 1420 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member
with the same name | 1407 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member
with the same name |
| 1421 * as <i>C</i>. | 1408 * as <i>C</i>. |
| 1422 */ | 1409 */ |
| 1423 static final CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = new CompileTimeErro
rCode.con1('MEMBER_WITH_CLASS_NAME', 80, "Class members cannot have the same nam
e as the enclosing class"); | 1410 static final CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = new CompileTimeErro
rCode.con1('MEMBER_WITH_CLASS_NAME', 79, "Class members cannot have the same nam
e as the enclosing class"); |
| 1424 | 1411 |
| 1425 /** | 1412 /** |
| 1426 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same | 1413 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same |
| 1427 * name. | 1414 * name. |
| 1428 * | 1415 * |
| 1429 * @param name the conflicting name of the getter and method | 1416 * @param name the conflicting name of the getter and method |
| 1430 */ | 1417 */ |
| 1431 static final CompileTimeErrorCode METHOD_AND_GETTER_WITH_SAME_NAME = new Compi
leTimeErrorCode.con1('METHOD_AND_GETTER_WITH_SAME_NAME', 81, "'%s' cannot be use
d to name a method, there is already a getter with the same name"); | 1418 static final CompileTimeErrorCode METHOD_AND_GETTER_WITH_SAME_NAME = new Compi
leTimeErrorCode.con1('METHOD_AND_GETTER_WITH_SAME_NAME', 80, "'%s' cannot be use
d to name a method, there is already a getter with the same name"); |
| 1432 | 1419 |
| 1433 /** | 1420 /** |
| 1434 * 12.1 Constants: A constant expression is ... a constant list literal. | 1421 * 12.1 Constants: A constant expression is ... a constant list literal. |
| 1435 */ | 1422 */ |
| 1436 static final CompileTimeErrorCode MISSING_CONST_IN_LIST_LITERAL = new CompileT
imeErrorCode.con1('MISSING_CONST_IN_LIST_LITERAL', 82, "List literals must be pr
efixed with 'const' when used as a constant expression"); | 1423 static final CompileTimeErrorCode MISSING_CONST_IN_LIST_LITERAL = new CompileT
imeErrorCode.con1('MISSING_CONST_IN_LIST_LITERAL', 81, "List literals must be pr
efixed with 'const' when used as a constant expression"); |
| 1437 | 1424 |
| 1438 /** | 1425 /** |
| 1439 * 12.1 Constants: A constant expression is ... a constant map literal. | 1426 * 12.1 Constants: A constant expression is ... a constant map literal. |
| 1440 */ | 1427 */ |
| 1441 static final CompileTimeErrorCode MISSING_CONST_IN_MAP_LITERAL = new CompileTi
meErrorCode.con1('MISSING_CONST_IN_MAP_LITERAL', 83, "Map literals must be prefi
xed with 'const' when used as a constant expression"); | 1428 static final CompileTimeErrorCode MISSING_CONST_IN_MAP_LITERAL = new CompileTi
meErrorCode.con1('MISSING_CONST_IN_MAP_LITERAL', 82, "Map literals must be prefi
xed with 'const' when used as a constant expression"); |
| 1442 | 1429 |
| 1443 /** | 1430 /** |
| 1444 * 9 Mixins: It is a compile-time error if a declared or derived mixin explici
tly declares a | 1431 * 9 Mixins: It is a compile-time error if a declared or derived mixin explici
tly declares a |
| 1445 * constructor. | 1432 * constructor. |
| 1446 * | 1433 * |
| 1447 * @param typeName the name of the mixin that is invalid | 1434 * @param typeName the name of the mixin that is invalid |
| 1448 */ | 1435 */ |
| 1449 static final CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = new CompileTime
ErrorCode.con1('MIXIN_DECLARES_CONSTRUCTOR', 84, "The class '%s' cannot be used
as a mixin because it declares a constructor"); | 1436 static final CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = new CompileTime
ErrorCode.con1('MIXIN_DECLARES_CONSTRUCTOR', 83, "The class '%s' cannot be used
as a mixin because it declares a constructor"); |
| 1450 | 1437 |
| 1451 /** | 1438 /** |
| 1452 * 9 Mixins: It is a compile-time error if a mixin is derived from a class who
se superclass is not | 1439 * 9 Mixins: It is a compile-time error if a mixin is derived from a class who
se superclass is not |
| 1453 * Object. | 1440 * Object. |
| 1454 * | 1441 * |
| 1455 * @param typeName the name of the mixin that is invalid | 1442 * @param typeName the name of the mixin that is invalid |
| 1456 */ | 1443 */ |
| 1457 static final CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = new Compile
TimeErrorCode.con1('MIXIN_INHERITS_FROM_NOT_OBJECT', 85, "The class '%s' cannot
be used as a mixin because it extends a class other than Object"); | 1444 static final CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = new Compile
TimeErrorCode.con1('MIXIN_INHERITS_FROM_NOT_OBJECT', 84, "The class '%s' cannot
be used as a mixin because it extends a class other than Object"); |
| 1458 | 1445 |
| 1459 /** | 1446 /** |
| 1460 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. | 1447 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. |
| 1461 * | 1448 * |
| 1462 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. | 1449 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. |
| 1463 * | 1450 * |
| 1464 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. | 1451 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. |
| 1465 * | 1452 * |
| 1466 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to | 1453 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to |
| 1467 * attempt to extend or implement num. | 1454 * attempt to extend or implement num. |
| 1468 * | 1455 * |
| 1469 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. | 1456 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. |
| 1470 * | 1457 * |
| 1471 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. | 1458 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. |
| 1472 * | 1459 * |
| 1473 * @param typeName the name of the type that cannot be extended | 1460 * @param typeName the name of the type that cannot be extended |
| 1474 * @see #IMPLEMENTS_DISALLOWED_CLASS | 1461 * @see #IMPLEMENTS_DISALLOWED_CLASS |
| 1475 */ | 1462 */ |
| 1476 static final CompileTimeErrorCode MIXIN_OF_DISALLOWED_CLASS = new CompileTimeE
rrorCode.con1('MIXIN_OF_DISALLOWED_CLASS', 86, "Classes cannot mixin '%s'"); | 1463 static final CompileTimeErrorCode MIXIN_OF_DISALLOWED_CLASS = new CompileTimeE
rrorCode.con1('MIXIN_OF_DISALLOWED_CLASS', 85, "Classes cannot mixin '%s'"); |
| 1477 | 1464 |
| 1478 /** | 1465 /** |
| 1479 * 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not deno
te a class or mixin | 1466 * 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not deno
te a class or mixin |
| 1480 * available in the immediately enclosing scope. | 1467 * available in the immediately enclosing scope. |
| 1481 */ | 1468 */ |
| 1482 static final CompileTimeErrorCode MIXIN_OF_NON_CLASS = new CompileTimeErrorCod
e.con1('MIXIN_OF_NON_CLASS', 87, "Classes can only mixin other classes"); | 1469 static final CompileTimeErrorCode MIXIN_OF_NON_CLASS = new CompileTimeErrorCod
e.con1('MIXIN_OF_NON_CLASS', 86, "Classes can only mixin other classes"); |
| 1483 | 1470 |
| 1484 /** | 1471 /** |
| 1485 * 9 Mixins: It is a compile-time error if a declared or derived mixin refers
to super. | 1472 * 9 Mixins: It is a compile-time error if a declared or derived mixin refers
to super. |
| 1486 */ | 1473 */ |
| 1487 static final CompileTimeErrorCode MIXIN_REFERENCES_SUPER = new CompileTimeErro
rCode.con1('MIXIN_REFERENCES_SUPER', 88, "The class '%s' cannot be used as a mix
in because it references 'super'"); | 1474 static final CompileTimeErrorCode MIXIN_REFERENCES_SUPER = new CompileTimeErro
rCode.con1('MIXIN_REFERENCES_SUPER', 87, "The class '%s' cannot be used as a mix
in because it references 'super'"); |
| 1488 | 1475 |
| 1489 /** | 1476 /** |
| 1490 * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not deno
te a class available | 1477 * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not deno
te a class available |
| 1491 * in the immediately enclosing scope. | 1478 * in the immediately enclosing scope. |
| 1492 */ | 1479 */ |
| 1493 static final CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = new Compil
eTimeErrorCode.con1('MIXIN_WITH_NON_CLASS_SUPERCLASS', 89, "Mixin can only be ap
plied to class"); | 1480 static final CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = new Compil
eTimeErrorCode.con1('MIXIN_WITH_NON_CLASS_SUPERCLASS', 88, "Mixin can only be ap
plied to class"); |
| 1494 | 1481 |
| 1495 /** | 1482 /** |
| 1496 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 1483 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
| 1497 * only action is to invoke another generative constructor. | 1484 * only action is to invoke another generative constructor. |
| 1498 */ | 1485 */ |
| 1499 static final CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS
= new CompileTimeErrorCode.con1('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS',
90, "Constructor may have at most one 'this' redirection"); | 1486 static final CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS
= new CompileTimeErrorCode.con1('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS',
89, "Constructor may have at most one 'this' redirection"); |
| 1500 | 1487 |
| 1501 /** | 1488 /** |
| 1502 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Th
en <i>k</i> may | 1489 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Th
en <i>k</i> may |
| 1503 * include at most one superinitializer in its initializer list or a compile t
ime error occurs. | 1490 * include at most one superinitializer in its initializer list or a compile t
ime error occurs. |
| 1504 */ | 1491 */ |
| 1505 static final CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = new CompileTim
eErrorCode.con1('MULTIPLE_SUPER_INITIALIZERS', 91, "Constructor may have at most
one 'super' initializer"); | 1492 static final CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = new CompileTim
eErrorCode.con1('MULTIPLE_SUPER_INITIALIZERS', 90, "Constructor may have at most
one 'super' initializer"); |
| 1506 | 1493 |
| 1507 /** | 1494 /** |
| 1508 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the | 1495 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the |
| 1509 * character @, followed by a constant expression that must be either a refere
nce to a | 1496 * character @, followed by a constant expression that must be either a refere
nce to a |
| 1510 * compile-time constant variable, or a call to a constant constructor. | 1497 * compile-time constant variable, or a call to a constant constructor. |
| 1511 */ | 1498 */ |
| 1512 static final CompileTimeErrorCode NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS = new Co
mpileTimeErrorCode.con1('NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS', 92, "Annotation c
reation must have arguments"); | 1499 static final CompileTimeErrorCode NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS = new Co
mpileTimeErrorCode.con1('NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS', 91, "Annotation c
reation must have arguments"); |
| 1513 | 1500 |
| 1514 /** | 1501 /** |
| 1515 * 7.6.1 Generative Constructors: If no superinitializer is provided, an impli
cit superinitializer | 1502 * 7.6.1 Generative Constructors: If no superinitializer is provided, an impli
cit superinitializer |
| 1516 * of the form <b>super</b>() is added at the end of <i>k</i>'s initializer li
st, unless the | 1503 * of the form <b>super</b>() is added at the end of <i>k</i>'s initializer li
st, unless the |
| 1517 * enclosing class is class <i>Object</i>. | 1504 * enclosing class is class <i>Object</i>. |
| 1518 * | 1505 * |
| 1519 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i>
does not declare a | 1506 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i>
does not declare a |
| 1520 * generative constructor named <i>S</i> (respectively <i>S.id</i>) | 1507 * generative constructor named <i>S</i> (respectively <i>S.id</i>) |
| 1521 */ | 1508 */ |
| 1522 static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT = new
CompileTimeErrorCode.con1('NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT', 93, "The clas
s '%s' does not have a default constructor"); | 1509 static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT = new
CompileTimeErrorCode.con1('NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT', 92, "The clas
s '%s' does not have a default constructor"); |
| 1523 | 1510 |
| 1524 /** | 1511 /** |
| 1525 * 7.6 Constructors: Iff no constructor is specified for a class <i>C</i>, it
implicitly has a | 1512 * 7.6 Constructors: Iff no constructor is specified for a class <i>C</i>, it
implicitly has a |
| 1526 * default constructor C() : <b>super<b>() {}, unless <i>C</i> is class <i>Obj
ect</i>. | 1513 * default constructor C() : <b>super<b>() {}, unless <i>C</i> is class <i>Obj
ect</i>. |
| 1527 * | 1514 * |
| 1528 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i>
does not declare a | 1515 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i>
does not declare a |
| 1529 * generative constructor named <i>S</i> (respectively <i>S.id</i>) | 1516 * generative constructor named <i>S</i> (respectively <i>S.id</i>) |
| 1530 */ | 1517 */ |
| 1531 static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT = new
CompileTimeErrorCode.con1('NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT', 94, "The clas
s '%s' does not have a default constructor"); | 1518 static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT = new
CompileTimeErrorCode.con1('NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT', 93, "The clas
s '%s' does not have a default constructor"); |
| 1532 | 1519 |
| 1533 /** | 1520 /** |
| 1534 * 13.2 Expression Statements: It is a compile-time error if a non-constant ma
p literal that has | 1521 * 13.2 Expression Statements: It is a compile-time error if a non-constant ma
p literal that has |
| 1535 * no explicit type arguments appears in a place where a statement is expected
. | 1522 * no explicit type arguments appears in a place where a statement is expected
. |
| 1536 */ | 1523 */ |
| 1537 static final CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = new
CompileTimeErrorCode.con1('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 95, "A non-co
nstant map literal without type arguments cannot be used as an expression statem
ent"); | 1524 static final CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = new
CompileTimeErrorCode.con1('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 94, "A non-co
nstant map literal without type arguments cannot be used as an expression statem
ent"); |
| 1538 | 1525 |
| 1539 /** | 1526 /** |
| 1540 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub
>11</sub> … | 1527 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub
>11</sub> … |
| 1541 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> … label<sub>n1
</sub> … | 1528 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> … label<sub>n1
</sub> … |
| 1542 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s
ub>}</i> or the form | 1529 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s
ub>}</i> or the form |
| 1543 * <i>switch (e) { label<sub>11</sub> … label<sub>1j1</sub> case e<sub>
1</sub>: | 1530 * <i>switch (e) { label<sub>11</sub> … label<sub>1j1</sub> case e<sub>
1</sub>: |
| 1544 * s<sub>1</sub> … label<sub>n1</sub> … label<sub>njn</sub> case
e<sub>n</sub>: | 1531 * s<sub>1</sub> … label<sub>n1</sub> … label<sub>njn</sub> case
e<sub>n</sub>: |
| 1545 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub>
k</sub></i> are not | 1532 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub>
k</sub></i> are not |
| 1546 * compile-time constants, for all <i>1 <= k <= n</i>. | 1533 * compile-time constants, for all <i>1 <= k <= n</i>. |
| 1547 */ | 1534 */ |
| 1548 static final CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = new CompileTi
meErrorCode.con1('NON_CONSTANT_CASE_EXPRESSION', 96, "Case expressions must be c
onstant"); | 1535 static final CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = new CompileTi
meErrorCode.con1('NON_CONSTANT_CASE_EXPRESSION', 95, "Case expressions must be c
onstant"); |
| 1549 | 1536 |
| 1550 /** | 1537 /** |
| 1551 * 6.2.2 Optional Formals: It is a compile-time error if the default value of
an optional | 1538 * 6.2.2 Optional Formals: It is a compile-time error if the default value of
an optional |
| 1552 * parameter is not a compile-time constant. | 1539 * parameter is not a compile-time constant. |
| 1553 */ | 1540 */ |
| 1554 static final CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = new CompileTime
ErrorCode.con1('NON_CONSTANT_DEFAULT_VALUE', 97, "Default values of an optional
parameter must be constant"); | 1541 static final CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = new CompileTime
ErrorCode.con1('NON_CONSTANT_DEFAULT_VALUE', 96, "Default values of an optional
parameter must be constant"); |
| 1555 | 1542 |
| 1556 /** | 1543 /** |
| 1557 * 12.6 Lists: It is a compile time error if an element of a constant list lit
eral is not a | 1544 * 12.6 Lists: It is a compile time error if an element of a constant list lit
eral is not a |
| 1558 * compile-time constant. | 1545 * compile-time constant. |
| 1559 */ | 1546 */ |
| 1560 static final CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = new CompileTimeE
rrorCode.con1('NON_CONSTANT_LIST_ELEMENT', 98, "'const' lists must have all cons
tant values"); | 1547 static final CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = new CompileTimeE
rrorCode.con1('NON_CONSTANT_LIST_ELEMENT', 97, "'const' lists must have all cons
tant values"); |
| 1561 | 1548 |
| 1562 /** | 1549 /** |
| 1563 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map | 1550 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map |
| 1564 * literal is not a compile-time constant. | 1551 * literal is not a compile-time constant. |
| 1565 */ | 1552 */ |
| 1566 static final CompileTimeErrorCode NON_CONSTANT_MAP_KEY = new CompileTimeErrorC
ode.con1('NON_CONSTANT_MAP_KEY', 99, "The keys in a map must be constant"); | 1553 static final CompileTimeErrorCode NON_CONSTANT_MAP_KEY = new CompileTimeErrorC
ode.con1('NON_CONSTANT_MAP_KEY', 98, "The keys in a map must be constant"); |
| 1567 | 1554 |
| 1568 /** | 1555 /** |
| 1569 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map | 1556 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map |
| 1570 * literal is not a compile-time constant. | 1557 * literal is not a compile-time constant. |
| 1571 */ | 1558 */ |
| 1572 static final CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = new CompileTimeErro
rCode.con1('NON_CONSTANT_MAP_VALUE', 100, "The values in a 'const' map must be c
onstant"); | 1559 static final CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = new CompileTimeErro
rCode.con1('NON_CONSTANT_MAP_VALUE', 99, "The values in a 'const' map must be co
nstant"); |
| 1573 | 1560 |
| 1574 /** | 1561 /** |
| 1575 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the | 1562 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the |
| 1576 * character @, followed by a constant expression that must be either a refere
nce to a | 1563 * character @, followed by a constant expression that must be either a refere
nce to a |
| 1577 * compile-time constant variable, or a call to a constant constructor. | 1564 * compile-time constant variable, or a call to a constant constructor. |
| 1578 */ | 1565 */ |
| 1579 static final CompileTimeErrorCode NON_CONSTANT_ANNOTATION_CONSTRUCTOR = new Co
mpileTimeErrorCode.con1('NON_CONSTANT_ANNOTATION_CONSTRUCTOR', 101, "Annotation
creation can use only 'const' constructor"); | 1566 static final CompileTimeErrorCode NON_CONSTANT_ANNOTATION_CONSTRUCTOR = new Co
mpileTimeErrorCode.con1('NON_CONSTANT_ANNOTATION_CONSTRUCTOR', 100, "Annotation
creation can use only 'const' constructor"); |
| 1580 | 1567 |
| 1581 /** | 1568 /** |
| 1582 * 7.6.3 Constant Constructors: Any expression that appears within the initial
izer list of a | 1569 * 7.6.3 Constant Constructors: Any expression that appears within the initial
izer list of a |
| 1583 * constant constructor must be a potentially constant expression, or a compil
e-time error occurs. | 1570 * constant constructor must be a potentially constant expression, or a compil
e-time error occurs. |
| 1584 */ | 1571 */ |
| 1585 static final CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = new Comp
ileTimeErrorCode.con1('NON_CONSTANT_VALUE_IN_INITIALIZER', 102, "Initializer exp
ressions in constant constructors must be constants"); | 1572 static final CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = new Comp
ileTimeErrorCode.con1('NON_CONSTANT_VALUE_IN_INITIALIZER', 101, "Initializer exp
ressions in constant constructors must be constants"); |
| 1586 | 1573 |
| 1587 /** | 1574 /** |
| 1588 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i>
or if <i>m > n</i>. | 1575 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i>
or if <i>m > n</i>. |
| 1589 * | 1576 * |
| 1590 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 1577 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 1591 * uncaught exception being thrown. | 1578 * uncaught exception being thrown. |
| 1592 * | 1579 * |
| 1593 * @param requiredCount the expected number of required arguments | 1580 * @param requiredCount the expected number of required arguments |
| 1594 * @param argumentCount the actual number of positional arguments given | 1581 * @param argumentCount the actual number of positional arguments given |
| 1595 */ | 1582 */ |
| 1596 static final CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new CompileT
imeErrorCode.con1('NOT_ENOUGH_REQUIRED_ARGUMENTS', 103, "%d required argument(s)
expected, but %d found"); | 1583 static final CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new CompileT
imeErrorCode.con1('NOT_ENOUGH_REQUIRED_ARGUMENTS', 102, "%d required argument(s)
expected, but %d found"); |
| 1597 | 1584 |
| 1598 /** | 1585 /** |
| 1599 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears | 1586 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears |
| 1600 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is | 1587 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is |
| 1601 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> | 1588 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> |
| 1602 * (respectively <i>S.id</i>) | 1589 * (respectively <i>S.id</i>) |
| 1603 */ | 1590 */ |
| 1604 static final CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR = new CompileTime
ErrorCode.con1('NON_GENERATIVE_CONSTRUCTOR', 104, "The generative constructor '%
s' expected, but factory found"); | 1591 static final CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR = new CompileTime
ErrorCode.con1('NON_GENERATIVE_CONSTRUCTOR', 103, "The generative constructor '%
s' expected, but factory found"); |
| 1605 | 1592 |
| 1606 /** | 1593 /** |
| 1607 * 7.9 Superclasses: It is a compile-time error to specify an extends clause f
or class Object. | 1594 * 7.9 Superclasses: It is a compile-time error to specify an extends clause f
or class Object. |
| 1608 */ | 1595 */ |
| 1609 static final CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = new Com
pileTimeErrorCode.con1('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 105, ""); | 1596 static final CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = new Com
pileTimeErrorCode.con1('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 104, ""); |
| 1610 | 1597 |
| 1611 /** | 1598 /** |
| 1612 * 7.1.1 Operators: It is a compile-time error to declare an optional paramete
r in an operator. | 1599 * 7.1.1 Operators: It is a compile-time error to declare an optional paramete
r in an operator. |
| 1613 */ | 1600 */ |
| 1614 static final CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = new Compile
TimeErrorCode.con1('OPTIONAL_PARAMETER_IN_OPERATOR', 106, "Optional parameters a
re not allowed when defining an operator"); | 1601 static final CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = new Compile
TimeErrorCode.con1('OPTIONAL_PARAMETER_IN_OPERATOR', 105, "Optional parameters a
re not allowed when defining an operator"); |
| 1615 | 1602 |
| 1616 /** | 1603 /** |
| 1617 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part | 1604 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part |
| 1618 * declaration. | 1605 * declaration. |
| 1619 * | 1606 * |
| 1620 * @param uri the uri pointing to a non-library declaration | 1607 * @param uri the uri pointing to a non-library declaration |
| 1621 */ | 1608 */ |
| 1622 static final CompileTimeErrorCode PART_OF_NON_PART = new CompileTimeErrorCode.
con1('PART_OF_NON_PART', 107, "The included part '%s' must have a part-of direct
ive"); | 1609 static final CompileTimeErrorCode PART_OF_NON_PART = new CompileTimeErrorCode.
con1('PART_OF_NON_PART', 106, "The included part '%s' must have a part-of direct
ive"); |
| 1623 | 1610 |
| 1624 /** | 1611 /** |
| 1625 * 14.1 Imports: It is a compile-time error if the current library declares a
top-level member | 1612 * 14.1 Imports: It is a compile-time error if the current library declares a
top-level member |
| 1626 * named <i>p</i>. | 1613 * named <i>p</i>. |
| 1627 */ | 1614 */ |
| 1628 static final CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = new
CompileTimeErrorCode.con1('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 108, "The nam
e '%s' is already used as an import prefix and cannot be used to name a top-leve
l element"); | 1615 static final CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = new
CompileTimeErrorCode.con1('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 107, "The nam
e '%s' is already used as an import prefix and cannot be used to name a top-leve
l element"); |
| 1629 | 1616 |
| 1630 /** | 1617 /** |
| 1631 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named o
ptional parameter | 1618 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named o
ptional parameter |
| 1632 * begins with an '_' character. | 1619 * begins with an '_' character. |
| 1633 */ | 1620 */ |
| 1634 static final CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = new CompileTime
ErrorCode.con1('PRIVATE_OPTIONAL_PARAMETER', 109, "Named optional parameters can
not start with an underscore"); | 1621 static final CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = new CompileTime
ErrorCode.con1('PRIVATE_OPTIONAL_PARAMETER', 108, "Named optional parameters can
not start with an underscore"); |
| 1635 | 1622 |
| 1636 /** | 1623 /** |
| 1637 * 12.1 Constants: It is a compile-time error if the value of a compile-time c
onstant expression | 1624 * 12.1 Constants: It is a compile-time error if the value of a compile-time c
onstant expression |
| 1638 * depends on itself. | 1625 * depends on itself. |
| 1639 */ | 1626 */ |
| 1640 static final CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = new Compil
eTimeErrorCode.con1('RECURSIVE_COMPILE_TIME_CONSTANT', 110, ""); | 1627 static final CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = new Compil
eTimeErrorCode.con1('RECURSIVE_COMPILE_TIME_CONSTANT', 109, ""); |
| 1641 | 1628 |
| 1642 /** | 1629 /** |
| 1643 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 1630 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
| 1644 * only action is to invoke another generative constructor. | 1631 * only action is to invoke another generative constructor. |
| 1645 * | 1632 * |
| 1646 * TODO(scheglov) review this later, there are no explicit "it is a compile-ti
me error" in | 1633 * TODO(scheglov) review this later, there are no explicit "it is a compile-ti
me error" in |
| 1647 * specification. But it was added to the co19 and there is same error for fac
tories. | 1634 * specification. But it was added to the co19 and there is same error for fac
tories. |
| 1648 * | 1635 * |
| 1649 * https://code.google.com/p/dart/issues/detail?id=954 | 1636 * https://code.google.com/p/dart/issues/detail?id=954 |
| 1650 */ | 1637 */ |
| 1651 static final CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = new Compile
TimeErrorCode.con1('RECURSIVE_CONSTRUCTOR_REDIRECT', 111, "Cycle in redirecting
generative constructors"); | 1638 static final CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = new Compile
TimeErrorCode.con1('RECURSIVE_CONSTRUCTOR_REDIRECT', 110, "Cycle in redirecting
generative constructors"); |
| 1652 | 1639 |
| 1653 /** | 1640 /** |
| 1654 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr
uctor redirects to | 1641 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr
uctor redirects to |
| 1655 * itself, either directly or indirectly via a sequence of redirections. | 1642 * itself, either directly or indirectly via a sequence of redirections. |
| 1656 */ | 1643 */ |
| 1657 static final CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = new CompileTime
ErrorCode.con1('RECURSIVE_FACTORY_REDIRECT', 112, "Cycle in redirecting factory
constructors"); | 1644 static final CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = new CompileTime
ErrorCode.con1('RECURSIVE_FACTORY_REDIRECT', 111, "Cycle in redirecting factory
constructors"); |
| 1658 | 1645 |
| 1659 /** | 1646 /** |
| 1660 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a | 1647 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a |
| 1661 * superinterface of itself. | 1648 * superinterface of itself. |
| 1662 * | 1649 * |
| 1663 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. | 1650 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. |
| 1664 * | 1651 * |
| 1665 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. | 1652 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. |
| 1666 * | 1653 * |
| 1667 * @param className the name of the class that implements itself recursively | 1654 * @param className the name of the class that implements itself recursively |
| 1668 * @param strImplementsPath a string representation of the implements loop | 1655 * @param strImplementsPath a string representation of the implements loop |
| 1669 */ | 1656 */ |
| 1670 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = new Compil
eTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE', 113, "'%s' cannot be a su
perinterface of itself: %s"); | 1657 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = new Compil
eTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE', 112, "'%s' cannot be a su
perinterface of itself: %s"); |
| 1671 | 1658 |
| 1672 /** | 1659 /** |
| 1673 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a | 1660 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a |
| 1674 * superinterface of itself. | 1661 * superinterface of itself. |
| 1675 * | 1662 * |
| 1676 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. | 1663 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. |
| 1677 * | 1664 * |
| 1678 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. | 1665 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. |
| 1679 * | 1666 * |
| 1680 * @param className the name of the class that implements itself recursively | 1667 * @param className the name of the class that implements itself recursively |
| 1681 */ | 1668 */ |
| 1682 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EX
TENDS = new CompileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE
_EXTENDS', 114, "'%s' cannot extend itself"); | 1669 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EX
TENDS = new CompileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE
_EXTENDS', 113, "'%s' cannot extend itself"); |
| 1683 | 1670 |
| 1684 /** | 1671 /** |
| 1685 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a | 1672 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a |
| 1686 * superinterface of itself. | 1673 * superinterface of itself. |
| 1687 * | 1674 * |
| 1688 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. | 1675 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. |
| 1689 * | 1676 * |
| 1690 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. | 1677 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. |
| 1691 * | 1678 * |
| 1692 * @param className the name of the class that implements itself recursively | 1679 * @param className the name of the class that implements itself recursively |
| 1693 */ | 1680 */ |
| 1694 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IM
PLEMENTS = new CompileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE_BASE_C
ASE_IMPLEMENTS', 115, "'%s' cannot implement itself"); | 1681 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IM
PLEMENTS = new CompileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE_BASE_C
ASE_IMPLEMENTS', 114, "'%s' cannot implement itself"); |
| 1695 | 1682 |
| 1696 /** | 1683 /** |
| 1697 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th
e const modifier but | 1684 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th
e const modifier but |
| 1698 * <i>k'</i> is not a constant constructor. | 1685 * <i>k'</i> is not a constant constructor. |
| 1699 */ | 1686 */ |
| 1700 static final CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = new Comp
ileTimeErrorCode.con1('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 116, "Constant factor
y constructor cannot delegate to a non-constant constructor"); | 1687 static final CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = new Comp
ileTimeErrorCode.con1('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 115, "Constant factor
y constructor cannot delegate to a non-constant constructor"); |
| 1701 | 1688 |
| 1702 /** | 1689 /** |
| 1703 * 13.3 Local Variable Declaration: It is a compile-time error if <i>e</i> ref
ers to the name | 1690 * 13.3 Local Variable Declaration: It is a compile-time error if <i>e</i> ref
ers to the name |
| 1704 * <i>v</i> or the name <i>v=</i>. | 1691 * <i>v</i> or the name <i>v=</i>. |
| 1705 */ | 1692 */ |
| 1706 static final CompileTimeErrorCode REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZE
R = new CompileTimeErrorCode.con1('REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER
', 117, "The name '%s' cannot be referenced in the initializer of a variable wit
h the same name"); | 1693 static final CompileTimeErrorCode REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZE
R = new CompileTimeErrorCode.con1('REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER
', 116, "The name '%s' cannot be referenced in the initializer of a variable wit
h the same name"); |
| 1707 | 1694 |
| 1708 /** | 1695 /** |
| 1709 * 12.8.1 Rethrow: It is a compile-time error if an expression of the form <i>
rethrow;</i> is not | 1696 * 12.8.1 Rethrow: It is a compile-time error if an expression of the form <i>
rethrow;</i> is not |
| 1710 * enclosed within a on-catch clause. | 1697 * enclosed within a on-catch clause. |
| 1711 */ | 1698 */ |
| 1712 static final CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = new CompileTimeError
Code.con1('RETHROW_OUTSIDE_CATCH', 118, "rethrow must be inside of a catch claus
e"); | 1699 static final CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = new CompileTimeError
Code.con1('RETHROW_OUTSIDE_CATCH', 117, "rethrow must be inside of a catch claus
e"); |
| 1713 | 1700 |
| 1714 /** | 1701 /** |
| 1715 * 13.11 Return: It is a compile-time error if a return statement of the form
<i>return e;</i> | 1702 * 13.11 Return: It is a compile-time error if a return statement of the form
<i>return e;</i> |
| 1716 * appears in a generative constructor. | 1703 * appears in a generative constructor. |
| 1717 */ | 1704 */ |
| 1718 static final CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = new Compi
leTimeErrorCode.con1('RETURN_IN_GENERATIVE_CONSTRUCTOR', 119, "Constructors cann
ot return a value"); | 1705 static final CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = new Compi
leTimeErrorCode.con1('RETURN_IN_GENERATIVE_CONSTRUCTOR', 118, "Constructors cann
ot return a value"); |
| 1719 | 1706 |
| 1720 /** | 1707 /** |
| 1721 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form | 1708 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form |
| 1722 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … | 1709 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … |
| 1723 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe
r method invocation | 1710 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe
r method invocation |
| 1724 * occurs in a top-level function or variable initializer, in an instance vari
able initializer or | 1711 * occurs in a top-level function or variable initializer, in an instance vari
able initializer or |
| 1725 * initializer list, in class Object, in a factory constructor, or in a static
method or variable | 1712 * initializer list, in class Object, in a factory constructor, or in a static
method or variable |
| 1726 * initializer. | 1713 * initializer. |
| 1727 */ | 1714 */ |
| 1728 static final CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = new CompileTimeEr
rorCode.con1('SUPER_IN_INVALID_CONTEXT', 120, "Invalid context for 'super' invoc
ation"); | 1715 static final CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = new CompileTimeEr
rorCode.con1('SUPER_IN_INVALID_CONTEXT', 119, "Invalid context for 'super' invoc
ation"); |
| 1729 | 1716 |
| 1730 /** | 1717 /** |
| 1731 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 1718 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
| 1732 * only action is to invoke another generative constructor. | 1719 * only action is to invoke another generative constructor. |
| 1733 */ | 1720 */ |
| 1734 static final CompileTimeErrorCode SUPER_IN_REDIRECTING_CONSTRUCTOR = new Compi
leTimeErrorCode.con1('SUPER_IN_REDIRECTING_CONSTRUCTOR', 121, "The redirecting c
onstructor cannot have a 'super' initializer"); | 1721 static final CompileTimeErrorCode SUPER_IN_REDIRECTING_CONSTRUCTOR = new Compi
leTimeErrorCode.con1('SUPER_IN_REDIRECTING_CONSTRUCTOR', 120, "The redirecting c
onstructor cannot have a 'super' initializer"); |
| 1735 | 1722 |
| 1736 /** | 1723 /** |
| 1737 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time | 1724 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time |
| 1738 * error if a generative constructor of class Object includes a superinitializ
er. | 1725 * error if a generative constructor of class Object includes a superinitializ
er. |
| 1739 */ | 1726 */ |
| 1740 static final CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = new CompileTim
eErrorCode.con1('SUPER_INITIALIZER_IN_OBJECT', 122, ""); | 1727 static final CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = new CompileTim
eErrorCode.con1('SUPER_INITIALIZER_IN_OBJECT', 121, ""); |
| 1741 | 1728 |
| 1742 /** | 1729 /** |
| 1743 * 12.11 Instance Creation: It is a static type warning if any of the type arg
uments to a | 1730 * 12.11 Instance Creation: It is a static type warning if any of the type arg
uments to a |
| 1744 * constructor of a generic type <i>G</i> invoked by a new expression or a con
stant object | 1731 * constructor of a generic type <i>G</i> invoked by a new expression or a con
stant object |
| 1745 * expression are not subtypes of the bounds of the corresponding formal type
parameters of | 1732 * expression are not subtypes of the bounds of the corresponding formal type
parameters of |
| 1746 * <i>G</i>. | 1733 * <i>G</i>. |
| 1747 * | 1734 * |
| 1748 * 12.11.1 New: If T is malformed a dynamic error occurs. In checked mode, if
T is mal-bounded a | 1735 * 12.11.1 New: If T is malformed a dynamic error occurs. In checked mode, if
T is mal-bounded a |
| 1749 * dynamic error occurs. | 1736 * dynamic error occurs. |
| 1750 * | 1737 * |
| 1751 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time
constant would raise | 1738 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time
constant would raise |
| 1752 * an exception. | 1739 * an exception. |
| 1753 * | 1740 * |
| 1754 * @param boundedTypeName the name of the type used in the instance creation t
hat should be | 1741 * @param boundedTypeName the name of the type used in the instance creation t
hat should be |
| 1755 * limited by the bound as specified in the class declaration | 1742 * limited by the bound as specified in the class declaration |
| 1756 * @param boundingTypeName the name of the bounding type | 1743 * @param boundingTypeName the name of the bounding type |
| 1757 * @see StaticTypeWarningCode#TYPE_ARGUMENT_NOT_MATCHING_BOUNDS | 1744 * @see StaticTypeWarningCode#TYPE_ARGUMENT_NOT_MATCHING_BOUNDS |
| 1758 */ | 1745 */ |
| 1759 static final CompileTimeErrorCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = new Comp
ileTimeErrorCode.con1('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 123, "'%s' does not e
xtend '%s'"); | 1746 static final CompileTimeErrorCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = new Comp
ileTimeErrorCode.con1('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 122, "'%s' does not e
xtend '%s'"); |
| 1760 | 1747 |
| 1761 /** | 1748 /** |
| 1762 * 15.3.1 Typedef: It is a compile-time error if a typedef refers to itself vi
a a chain of | 1749 * 15.3.1 Typedef: It is a compile-time error if a typedef refers to itself vi
a a chain of |
| 1763 * references that does not include a class declaration. | 1750 * references that does not include a class declaration. |
| 1764 */ | 1751 */ |
| 1765 static final CompileTimeErrorCode TYPE_ALIAS_CANNOT_REFERENCE_ITSELF = new Com
pileTimeErrorCode.con1('TYPE_ALIAS_CANNOT_REFERENCE_ITSELF', 124, "Type alias ca
n reference itself only via the bounds of its generic parameters"); | 1752 static final CompileTimeErrorCode TYPE_ALIAS_CANNOT_REFERENCE_ITSELF = new Com
pileTimeErrorCode.con1('TYPE_ALIAS_CANNOT_REFERENCE_ITSELF', 123, "Type alias ca
n reference itself only via the bounds of its generic parameters"); |
| 1766 | 1753 |
| 1767 /** | 1754 /** |
| 1768 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current | 1755 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current |
| 1769 * scope, optionally followed by type arguments. | 1756 * scope, optionally followed by type arguments. |
| 1770 */ | 1757 */ |
| 1771 static final CompileTimeErrorCode UNDEFINED_CLASS = new CompileTimeErrorCode.c
on1('UNDEFINED_CLASS', 125, "Undefined class '%s'"); | 1758 static final CompileTimeErrorCode UNDEFINED_CLASS = new CompileTimeErrorCode.c
on1('UNDEFINED_CLASS', 124, "Undefined class '%s'"); |
| 1772 | 1759 |
| 1773 /** | 1760 /** |
| 1774 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears | 1761 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears |
| 1775 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is | 1762 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is |
| 1776 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> | 1763 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> |
| 1777 * (respectively <i>S.id</i>) | 1764 * (respectively <i>S.id</i>) |
| 1778 */ | 1765 */ |
| 1779 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = new C
ompileTimeErrorCode.con1('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 126, "The class
'%s' does not have a generative constructor '%s'"); | 1766 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = new C
ompileTimeErrorCode.con1('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 125, "The class
'%s' does not have a generative constructor '%s'"); |
| 1780 | 1767 |
| 1781 /** | 1768 /** |
| 1782 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears | 1769 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears |
| 1783 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is | 1770 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is |
| 1784 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> | 1771 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> |
| 1785 * (respectively <i>S.id</i>) | 1772 * (respectively <i>S.id</i>) |
| 1786 */ | 1773 */ |
| 1787 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT
= new CompileTimeErrorCode.con1('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT',
127, "The class '%s' does not have a default generative constructor"); | 1774 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT
= new CompileTimeErrorCode.con1('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT',
126, "The class '%s' does not have a default generative constructor"); |
| 1788 | 1775 |
| 1789 /** | 1776 /** |
| 1790 * 12.14.3 Unqualified Invocation: If there exists a lexically visible declara
tion named | 1777 * 12.14.3 Unqualified Invocation: If there exists a lexically visible declara
tion named |
| 1791 * <i>id</i>, let <i>f<sub>id</sub></i> be the innermost such declaration. The
n: [skip]. | 1778 * <i>id</i>, let <i>f<sub>id</sub></i> be the innermost such declaration. The
n: [skip]. |
| 1792 * Otherwise, <i>i</i> is equivalent to <b>this</b>.<i>id</i>(<i>a<sub>1</sub>
</i>; ... | 1779 * Otherwise, <i>i</i> is equivalent to <b>this</b>.<i>id</i>(<i>a<sub>1</sub>
</i>; ... |
| 1793 * <i>x<sub>n+k</sub></i> : <i>a<sub>n+k</sub></i>). | 1780 * <i>x<sub>n+k</sub></i> : <i>a<sub>n+k</sub></i>). |
| 1794 * | 1781 * |
| 1795 * @param methodName the name of the method that is undefined | 1782 * @param methodName the name of the method that is undefined |
| 1796 */ | 1783 */ |
| 1797 static final CompileTimeErrorCode UNDEFINED_FUNCTION = new CompileTimeErrorCod
e.con1('UNDEFINED_FUNCTION', 128, "The function '%s' is not defined"); | 1784 static final CompileTimeErrorCode UNDEFINED_FUNCTION = new CompileTimeErrorCod
e.con1('UNDEFINED_FUNCTION', 127, "The function '%s' is not defined"); |
| 1798 | 1785 |
| 1799 /** | 1786 /** |
| 1800 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>,
<i>1<=i<=l</i>, | 1787 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>,
<i>1<=i<=l</i>, |
| 1801 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i
> ... | 1788 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i
> ... |
| 1802 * <i>p<sub>n+k</sub></i>} or a static warning occurs. | 1789 * <i>p<sub>n+k</sub></i>} or a static warning occurs. |
| 1803 * | 1790 * |
| 1804 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 1791 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 1805 * uncaught exception being thrown. | 1792 * uncaught exception being thrown. |
| 1806 * | 1793 * |
| 1807 * @param name the name of the requested named parameter | 1794 * @param name the name of the requested named parameter |
| 1808 */ | 1795 */ |
| 1809 static final CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER = new CompileTimeE
rrorCode.con1('UNDEFINED_NAMED_PARAMETER', 129, "The named parameter '%s' is not
defined"); | 1796 static final CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER = new CompileTimeE
rrorCode.con1('UNDEFINED_NAMED_PARAMETER', 128, "The named parameter '%s' is not
defined"); |
| 1810 | 1797 |
| 1811 /** | 1798 /** |
| 1812 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1799 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 1813 * not a library declaration. | 1800 * not a library declaration. |
| 1814 * | 1801 * |
| 1815 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1802 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 1816 * not a library declaration. | 1803 * not a library declaration. |
| 1817 * | 1804 * |
| 1818 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part | 1805 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part |
| 1819 * declaration. | 1806 * declaration. |
| 1820 * | 1807 * |
| 1821 * @param uri the URI pointing to a non-existent file | 1808 * @param uri the URI pointing to a non-existent file |
| 1822 * @see #INVALID_URI | 1809 * @see #INVALID_URI |
| 1823 */ | 1810 */ |
| 1824 static final CompileTimeErrorCode URI_DOES_NOT_EXIST = new CompileTimeErrorCod
e.con1('URI_DOES_NOT_EXIST', 130, "Target of URI does not exist: '%s'"); | 1811 static final CompileTimeErrorCode URI_DOES_NOT_EXIST = new CompileTimeErrorCod
e.con1('URI_DOES_NOT_EXIST', 129, "Target of URI does not exist: '%s'"); |
| 1825 | 1812 |
| 1826 /** | 1813 /** |
| 1827 * 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time
constant, or if | 1814 * 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time
constant, or if |
| 1828 * <i>x</i> involves string interpolation. | 1815 * <i>x</i> involves string interpolation. |
| 1829 * | 1816 * |
| 1830 * 14.3 Parts: It is a compile-time error if <i>s</i> is not a compile-time co
nstant, or if | 1817 * 14.3 Parts: It is a compile-time error if <i>s</i> is not a compile-time co
nstant, or if |
| 1831 * <i>s</i> involves string interpolation. | 1818 * <i>s</i> involves string interpolation. |
| 1832 * | 1819 * |
| 1833 * 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that d
escribes a URI is | 1820 * 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that d
escribes a URI is |
| 1834 * not a compile-time constant, or if <i>x</i> involves string interpolation. | 1821 * not a compile-time constant, or if <i>x</i> involves string interpolation. |
| 1835 */ | 1822 */ |
| 1836 static final CompileTimeErrorCode URI_WITH_INTERPOLATION = new CompileTimeErro
rCode.con1('URI_WITH_INTERPOLATION', 131, "URIs cannot use string interpolation"
); | 1823 static final CompileTimeErrorCode URI_WITH_INTERPOLATION = new CompileTimeErro
rCode.con1('URI_WITH_INTERPOLATION', 130, "URIs cannot use string interpolation"
); |
| 1837 | 1824 |
| 1838 /** | 1825 /** |
| 1839 * 7.1.1 Operators: It is a compile-time error if the arity of the user-declar
ed operator []= is | 1826 * 7.1.1 Operators: It is a compile-time error if the arity of the user-declar
ed operator []= is |
| 1840 * not 2. It is a compile time error if the arity of a user-declared operator
with one of the | 1827 * not 2. It is a compile time error if the arity of a user-declared operator
with one of the |
| 1841 * names: <, >, <=, >=, ==, +, /, ~/, *, %, |, ^, &, <<, >
;>, [] is not 1. | 1828 * names: <, >, <=, >=, ==, +, /, ~/, *, %, |, ^, &, <<, >
;>, [] is not 1. |
| 1842 * It is a compile time error if the arity of the user-declared operator - is
not 0 or 1. It is a | 1829 * It is a compile time error if the arity of the user-declared operator - is
not 0 or 1. It is a |
| 1843 * compile time error if the arity of the user-declared operator ~ is not 0. | 1830 * compile time error if the arity of the user-declared operator ~ is not 0. |
| 1844 * | 1831 * |
| 1845 * @param operatorName the name of the declared operator | 1832 * @param operatorName the name of the declared operator |
| 1846 * @param expectedNumberOfParameters the number of parameters expected | 1833 * @param expectedNumberOfParameters the number of parameters expected |
| 1847 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration | 1834 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration |
| 1848 */ | 1835 */ |
| 1849 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = ne
w CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 132, "Ope
rator '%s' should declare exactly %d parameter(s), but %d found"); | 1836 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = ne
w CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 131, "Ope
rator '%s' should declare exactly %d parameter(s), but %d found"); |
| 1850 | 1837 |
| 1851 /** | 1838 /** |
| 1852 * 7.1.1 Operators: It is a compile time error if the arity of the user-declar
ed operator - is not | 1839 * 7.1.1 Operators: It is a compile time error if the arity of the user-declar
ed operator - is not |
| 1853 * 0 or 1. | 1840 * 0 or 1. |
| 1854 * | 1841 * |
| 1855 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration | 1842 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration |
| 1856 */ | 1843 */ |
| 1857 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINU
S = new CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS
', 133, "Operator '-' should declare 0 or 1 parameter, but %d found"); | 1844 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINU
S = new CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS
', 132, "Operator '-' should declare 0 or 1 parameter, but %d found"); |
| 1858 | 1845 |
| 1859 /** | 1846 /** |
| 1860 * 7.3 Setters: It is a compile-time error if a setter's formal parameter list
does not include | 1847 * 7.3 Setters: It is a compile-time error if a setter's formal parameter list
does not include |
| 1861 * exactly one required formal parameter <i>p</i>. | 1848 * exactly one required formal parameter <i>p</i>. |
| 1862 */ | 1849 */ |
| 1863 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = new
CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 134, "Setters
should declare exactly one required parameter"); | 1850 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = new
CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 133, "Setters
should declare exactly one required parameter"); |
| 1864 static final List<CompileTimeErrorCode> values = [ | 1851 static final List<CompileTimeErrorCode> values = [ |
| 1865 AMBIGUOUS_EXPORT, | 1852 AMBIGUOUS_EXPORT, |
| 1866 ARGUMENT_DEFINITION_TEST_NON_PARAMETER, | 1853 ARGUMENT_DEFINITION_TEST_NON_PARAMETER, |
| 1867 ARGUMENT_TYPE_NOT_ASSIGNABLE, | |
| 1868 BUILT_IN_IDENTIFIER_AS_TYPE, | 1854 BUILT_IN_IDENTIFIER_AS_TYPE, |
| 1869 BUILT_IN_IDENTIFIER_AS_TYPE_NAME, | 1855 BUILT_IN_IDENTIFIER_AS_TYPE_NAME, |
| 1870 BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, | 1856 BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, |
| 1871 BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME, | 1857 BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME, |
| 1872 CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, | 1858 CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, |
| 1873 COMPILE_TIME_CONSTANT_RAISES_EXCEPTION, | 1859 COMPILE_TIME_CONSTANT_RAISES_EXCEPTION, |
| 1874 CONFLICTING_GETTER_AND_METHOD, | 1860 CONFLICTING_GETTER_AND_METHOD, |
| 1875 CONFLICTING_METHOD_AND_GETTER, | 1861 CONFLICTING_METHOD_AND_GETTER, |
| 1876 CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, | 1862 CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, |
| 1877 CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD, | 1863 CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD, |
| (...skipping 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3361 */ | 3347 */ |
| 3362 StaticTypeWarningCode.con2(String name, int ordinal, String message, String co
rrection) : super(name, ordinal) { | 3348 StaticTypeWarningCode.con2(String name, int ordinal, String message, String co
rrection) : super(name, ordinal) { |
| 3363 this._message = message; | 3349 this._message = message; |
| 3364 this.correction6 = correction; | 3350 this.correction6 = correction; |
| 3365 } | 3351 } |
| 3366 String get correction => correction6; | 3352 String get correction => correction6; |
| 3367 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; | 3353 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; |
| 3368 String get message => _message; | 3354 String get message => _message; |
| 3369 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; | 3355 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; |
| 3370 } | 3356 } |
| OLD | NEW |