Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: pkg/analyzer_experimental/lib/src/generated/error.dart

Issue 27278004: New analyzer_experimental snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 800
801 /** 801 /**
802 * 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
803 * 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
804 * 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
805 * class. 805 * class.
806 */ 806 */
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"); 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");
808 808
809 /** 809 /**
810 * 7. Classes: It is a compile time error if a generic class declares a type v ariable with the
811 * same name as the class or any of its members or constructors.
812 */
813 static final CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_CLASS = new Co mpileTimeErrorCode.con1('CONFLICTING_TYPE_VARIABLE_AND_CLASS', 12, "'%s' cannot be used to name a type varaible in a class with the same name");
814
815 /**
816 * 7. Classes: It is a compile time error if a generic class declares a type v ariable with the
817 * same name as the class or any of its members or constructors.
818 */
819 static final CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_MEMBER = new C ompileTimeErrorCode.con1('CONFLICTING_TYPE_VARIABLE_AND_MEMBER', 13, "'%s' canno t be used to name a type varaible and member in this class");
820
821 /**
810 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an 822 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an
811 * uncaught exception being thrown. 823 * uncaught exception being thrown.
812 */ 824 */
813 static final CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION = new Com pileTimeErrorCode.con1('CONST_CONSTRUCTOR_THROWS_EXCEPTION', 12, "'const' constr uctors cannot throw exceptions"); 825 static final CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION = new Com pileTimeErrorCode.con1('CONST_CONSTRUCTOR_THROWS_EXCEPTION', 14, "'const' constr uctors cannot throw exceptions");
814 826
815 /** 827 /**
816 * 7.6.3 Constant Constructors: The superinitializer that appears, explicitly or implicitly, in 828 * 7.6.3 Constant Constructors: The superinitializer that appears, explicitly or implicitly, in
817 * the initializer list of a constant constructor must specify a constant cons tructor of the 829 * the initializer list of a constant constructor must specify a constant cons tructor of the
818 * superclass of the immediately enclosing class or a compile-time error occur s. 830 * superclass of the immediately enclosing class or a compile-time error occur s.
819 */ 831 */
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"); 832 static final CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER = new CompileTimeErrorCode.con1('CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER', 15, "Consta nt constructor cannot call non-constant super constructor");
821 833
822 /** 834 /**
823 * 7.6.3 Constant Constructors: It is a compile-time error if a constant const ructor is declared 835 * 7.6.3 Constant Constructors: It is a compile-time error if a constant const ructor is declared
824 * by a class that has a non-final instance variable. 836 * by a class that has a non-final instance variable.
825 * 837 *
826 * The above refers to both locally declared and inherited instance variables. 838 * The above refers to both locally declared and inherited instance variables.
827 */ 839 */
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"); 840 static final CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD = new CompileTimeErrorCode.con1('CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD', 16, "Cannot define the 'const' constructor for a class with non-final fields");
829 841
830 /** 842 /**
831 * 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error if o is not 843 * 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error if o is not
832 * <b>null</b> and the interface of the class of <i>o</i> is not a subtype of the static type of 844 * <b>null</b> and the interface of the class of <i>o</i> is not a subtype of the static type of
833 * the field <i>v</i>. 845 * the field <i>v</i>.
834 * 846 *
835 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an 847 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an
836 * uncaught exception being thrown. 848 * uncaught exception being thrown.
837 * 849 *
838 * @param initializerType the name of the type of the initializer expression 850 * @param initializerType the name of the type of the initializer expression
839 * @param fieldType the name of the type of the field 851 * @param fieldType the name of the type of the field
840 */ 852 */
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'"); 853 static final CompileTimeErrorCode CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE = new CompileTimeErrorCode.con1('CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE', 17, "The in itializer type '%s' cannot be assigned to the field type '%s'");
842 854
843 /** 855 /**
844 * 6.2 Formal Parameters: It is a compile-time error if a formal parameter is declared as a 856 * 6.2 Formal Parameters: It is a compile-time error if a formal parameter is declared as a
845 * constant variable. 857 * constant variable.
846 */ 858 */
847 static final CompileTimeErrorCode CONST_FORMAL_PARAMETER = new CompileTimeErro rCode.con1('CONST_FORMAL_PARAMETER', 16, "Parameters cannot be 'const'"); 859 static final CompileTimeErrorCode CONST_FORMAL_PARAMETER = new CompileTimeErro rCode.con1('CONST_FORMAL_PARAMETER', 18, "Parameters cannot be 'const'");
848 860
849 /** 861 /**
850 * 5 Variables: A constant variable must be initialized to a compile-time cons tant or a 862 * 5 Variables: A constant variable must be initialized to a compile-time cons tant or a
851 * compile-time error occurs. 863 * compile-time error occurs.
852 */ 864 */
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"); 865 static final CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE = new CompileTimeErrorCode.con1('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', 19, " 'const' variables must be constant value");
854 866
855 /** 867 /**
856 * 7.5 Instance Variables: It is a compile-time error if an instance variable is declared to be 868 * 7.5 Instance Variables: It is a compile-time error if an instance variable is declared to be
857 * constant. 869 * constant.
858 */ 870 */
859 static final CompileTimeErrorCode CONST_INSTANCE_FIELD = new CompileTimeErrorC ode.con1('CONST_INSTANCE_FIELD', 18, "Only static fields can be declared as 'con st'"); 871 static final CompileTimeErrorCode CONST_INSTANCE_FIELD = new CompileTimeErrorC ode.con1('CONST_INSTANCE_FIELD', 20, "Only static fields can be declared as 'con st'");
872
873 /**
874 * 12.8 Maps: It is a compile-time error if the key of an entry in a constant map literal is an
875 * instance of a class that implements the operator <i>==</i> unless the key i s a string or
876 * integer.
877 */
878 static final CompileTimeErrorCode CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQU ALS = new CompileTimeErrorCode.con1('CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQ UALS', 21, "The constant map entry key expression type '%s' cannot override the == operator");
860 879
861 /** 880 /**
862 * 5 Variables: A constant variable must be initialized to a compile-time cons tant (12.1) or a 881 * 5 Variables: A constant variable must be initialized to a compile-time cons tant (12.1) or a
863 * compile-time error occurs. 882 * compile-time error occurs.
864 * 883 *
865 * @param name the name of the uninitialized final variable 884 * @param name the name of the uninitialized final variable
866 */ 885 */
867 static final CompileTimeErrorCode CONST_NOT_INITIALIZED = new CompileTimeError Code.con1('CONST_NOT_INITIALIZED', 19, "The const variable '%s' must be initiali zed"); 886 static final CompileTimeErrorCode CONST_NOT_INITIALIZED = new CompileTimeError Code.con1('CONST_NOT_INITIALIZED', 22, "The const variable '%s' must be initiali zed");
868 887
869 /** 888 /**
870 * 12.11.2 Const: An expression of one of the forms !e, e1 && e2 or e1 || e2, where e, e1 and e2 889 * 12.11.2 Const: An expression of one of the forms !e, e1 && e2 or e1 || e2, where e, e1 and e2
871 * are constant expressions that evaluate to a boolean value. 890 * are constant expressions that evaluate to a boolean value.
872 */ 891 */
873 static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = new CompileTimeErrorC ode.con1('CONST_EVAL_TYPE_BOOL', 20, "An expression of type 'bool' was expected" ); 892 static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = new CompileTimeErrorC ode.con1('CONST_EVAL_TYPE_BOOL', 23, "An expression of type 'bool' was expected" );
874 893
875 /** 894 /**
876 * 12.11.2 Const: An expression of one of the forms e1 == e2 or e1 != e2 where e1 and e2 are 895 * 12.11.2 Const: An expression of one of the forms e1 == e2 or e1 != e2 where e1 and e2 are
877 * constant expressions that evaluate to a numeric, string or boolean value or to null. 896 * constant expressions that evaluate to a numeric, string or boolean value or to null.
878 */ 897 */
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"); 898 static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_NUM_STRING = new Compil eTimeErrorCode.con1('CONST_EVAL_TYPE_BOOL_NUM_STRING', 24, "An expression of typ e 'bool', 'num', 'String' or 'null' was expected");
880 899
881 /** 900 /**
882 * 12.11.2 Const: An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 | e2, e1 >> e2 or e1 901 * 12.11.2 Const: An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 | e2, e1 >> e2 or e1
883 * << e2, where e, e1 and e2 are constant expressions that evaluate to an inte ger value or to 902 * << e2, where e, e1 and e2 are constant expressions that evaluate to an inte ger value or to
884 * null. 903 * null.
885 */ 904 */
886 static final CompileTimeErrorCode CONST_EVAL_TYPE_INT = new CompileTimeErrorCo de.con1('CONST_EVAL_TYPE_INT', 22, "An expression of type 'int' was expected"); 905 static final CompileTimeErrorCode CONST_EVAL_TYPE_INT = new CompileTimeErrorCo de.con1('CONST_EVAL_TYPE_INT', 25, "An expression of type 'int' was expected");
887 906
888 /** 907 /**
889 * 12.11.2 Const: An expression of one of the forms e, e1 + e2, e1 - e2, e1 * e2, e1 / e2, e1 ~/ 908 * 12.11.2 Const: An expression of one of the forms e, e1 + e2, e1 - e2, e1 * e2, e1 / e2, e1 ~/
890 * e2, e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are constant 909 * e2, e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are constant
891 * expressions that evaluate to a numeric value or to null.. 910 * expressions that evaluate to a numeric value or to null..
892 */ 911 */
893 static final CompileTimeErrorCode CONST_EVAL_TYPE_NUM = new CompileTimeErrorCo de.con1('CONST_EVAL_TYPE_NUM', 23, "An expression of type 'num' was expected"); 912 static final CompileTimeErrorCode CONST_EVAL_TYPE_NUM = new CompileTimeErrorCo de.con1('CONST_EVAL_TYPE_NUM', 26, "An expression of type 'num' was expected");
894 913
895 /** 914 /**
896 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an 915 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an
897 * uncaught exception being thrown. 916 * uncaught exception being thrown.
898 */ 917 */
899 static final CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = new CompileTim eErrorCode.con1('CONST_EVAL_THROWS_EXCEPTION', 24, "Evaluation of this constant expression causes exception"); 918 static final CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = new CompileTim eErrorCode.con1('CONST_EVAL_THROWS_EXCEPTION', 27, "Evaluation of this constant expression causes exception");
900 919
901 /** 920 /**
902 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an 921 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an
903 * uncaught exception being thrown. 922 * uncaught exception being thrown.
904 */ 923 */
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"); 924 static final CompileTimeErrorCode CONST_EVAL_THROWS_IDBZE = new CompileTimeErr orCode.con1('CONST_EVAL_THROWS_IDBZE', 28, "Evaluation of this constant expressi on throws IntegerDivisionByZeroException");
906 925
907 /** 926 /**
908 * 12.11.2 Const: If <i>T</i> is a parameterized type <i>S&lt;U<sub>1</sub>, & hellip;, 927 * 12.11.2 Const: If <i>T</i> is a parameterized type <i>S&lt;U<sub>1</sub>, & hellip;,
909 * U<sub>m</sub>&gt;</i>, let <i>R = S</i>; It is a compile time error if <i>S </i> is not a 928 * U<sub>m</sub>&gt;</i>, let <i>R = S</i>; It is a compile time error if <i>S </i> is not a
910 * generic type with <i>m</i> type parameters. 929 * generic type with <i>m</i> type parameters.
911 * 930 *
912 * @param typeName the name of the type being referenced (<i>S</i>) 931 * @param typeName the name of the type being referenced (<i>S</i>)
913 * @param parameterCount the number of type parameters that were declared 932 * @param parameterCount the number of type parameters that were declared
914 * @param argumentCount the number of type arguments provided 933 * @param argumentCount the number of type arguments provided
915 * @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS 934 * @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS
916 * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS 935 * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS
917 */ 936 */
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"); 937 static final CompileTimeErrorCode CONST_WITH_INVALID_TYPE_PARAMETERS = new Com pileTimeErrorCode.con1('CONST_WITH_INVALID_TYPE_PARAMETERS', 29, "The type '%s' is declared with %d type parameters, but %d type arguments were given");
919 938
920 /** 939 /**
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>, 940 * 12.11.2 Const: If <i>e</i> is of the form <i>const T(a<sub>1</sub>, &hellip ;, a<sub>n</sub>,
922 * x<sub>n+1</sub>: a<sub>n+1</sub>, &hellip;, x<sub>n+k</sub>: a<sub>n+k</sub >)</i> it is a 941 * x<sub>n+1</sub>: a<sub>n+1</sub>, &hellip;, x<sub>n+k</sub>: a<sub>n+k</sub >)</i> it is a
923 * compile-time error if the type <i>T</i> does not declare a constant constru ctor with the same 942 * compile-time error if the type <i>T</i> does not declare a constant constru ctor with the same
924 * name as the declaration of <i>T</i>. 943 * name as the declaration of <i>T</i>.
925 */ 944 */
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"); 945 static final CompileTimeErrorCode CONST_WITH_NON_CONST = new CompileTimeErrorC ode.con1('CONST_WITH_NON_CONST', 30, "The constructor being called is not a 'con st' constructor");
927 946
928 /** 947 /**
929 * 12.11.2 Const: In all of the above cases, it is a compile-time error if <i> a<sub>i</sub>, 1 948 * 12.11.2 Const: In all of the above cases, it is a compile-time error if <i> a<sub>i</sub>, 1
930 * &lt;= i &lt;= n + k</i>, is not a compile-time constant expression. 949 * &lt;= i &lt;= n + k</i>, is not a compile-time constant expression.
931 */ 950 */
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"); 951 static final CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = new Compi leTimeErrorCode.con1('CONST_WITH_NON_CONSTANT_ARGUMENT', 31, "Arguments of a con stant creation must be constant expressions");
933 952
934 /** 953 /**
935 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access ible in the current 954 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access ible in the current
936 * scope, optionally followed by type arguments. 955 * scope, optionally followed by type arguments.
937 * 956 *
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>, 957 * 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>,
939 * x<sub>n+1</sub>: a<sub>n+1</sub>, &hellip; x<sub>n+k</sub>: a<sub>n+k</sub> )</i> it is a 958 * x<sub>n+1</sub>: a<sub>n+1</sub>, &hellip; x<sub>n+k</sub>: a<sub>n+k</sub> )</i> it is a
940 * compile-time error if <i>T</i> is not a class accessible in the current sco pe, optionally 959 * compile-time error if <i>T</i> is not a class accessible in the current sco pe, optionally
941 * followed by type arguments. 960 * followed by type arguments.
942 * 961 *
943 * @param name the name of the non-type element 962 * @param name the name of the non-type element
944 */ 963 */
945 static final CompileTimeErrorCode CONST_WITH_NON_TYPE = new CompileTimeErrorCo de.con1('CONST_WITH_NON_TYPE', 29, "The name '%s' is not a class"); 964 static final CompileTimeErrorCode CONST_WITH_NON_TYPE = new CompileTimeErrorCo de.con1('CONST_WITH_NON_TYPE', 32, "The name '%s' is not a class");
946 965
947 /** 966 /**
948 * 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type par ameters. 967 * 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type par ameters.
949 */ 968 */
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"); 969 static final CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = new CompileTime ErrorCode.con1('CONST_WITH_TYPE_PARAMETERS', 33, "The constant creation cannot u se a type parameter");
951 970
952 /** 971 /**
953 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of a constant 972 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of a constant
954 * constructor declared by the type <i>T</i>. 973 * constructor declared by the type <i>T</i>.
955 * 974 *
956 * @param typeName the name of the type 975 * @param typeName the name of the type
957 * @param constructorName the name of the requested constant constructor 976 * @param constructorName the name of the requested constant constructor
958 */ 977 */
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'"); 978 static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR = new Compi leTimeErrorCode.con1('CONST_WITH_UNDEFINED_CONSTRUCTOR', 34, "The class '%s' doe s not have a constant constructor '%s'");
960 979
961 /** 980 /**
962 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of a constant 981 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of a constant
963 * constructor declared by the type <i>T</i>. 982 * constructor declared by the type <i>T</i>.
964 * 983 *
965 * @param typeName the name of the type 984 * @param typeName the name of the type
966 */ 985 */
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"); 986 static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = n ew CompileTimeErrorCode.con1('CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 35, "Th e class '%s' does not have a default constant constructor");
968 987
969 /** 988 /**
970 * 15.3.1 Typedef: It is a compile-time error if any default values are specif ied in the signature 989 * 15.3.1 Typedef: It is a compile-time error if any default values are specif ied in the signature
971 * of a function type alias. 990 * of a function type alias.
972 */ 991 */
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"); 992 static final CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS = new C ompileTimeErrorCode.con1('DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS', 36, "Default va lues aren't allowed in typedefs");
974 993
975 /** 994 /**
976 * 6.2.1 Required Formals: By means of a function signature that names the par ameter and describes 995 * 6.2.1 Required Formals: By means of a function signature that names the par ameter and describes
977 * its type as a function type. It is a compile-time error if any default valu es are specified in 996 * its type as a function type. It is a compile-time error if any default valu es are specified in
978 * the signature of such a function type. 997 * the signature of such a function type.
979 */ 998 */
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"); 999 static final CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER = new CompileTimeErrorCode.con1('DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER', 37, " Default values aren't allowed in function type parameters");
981 1000
982 /** 1001 /**
983 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi th the same name 1002 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi th the same name
984 * declared in the same scope. 1003 * declared in the same scope.
985 */ 1004 */
986 static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT = new CompileT imeErrorCode.con1('DUPLICATE_CONSTRUCTOR_DEFAULT', 35, "The default constructor is already defined"); 1005 static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT = new CompileT imeErrorCode.con1('DUPLICATE_CONSTRUCTOR_DEFAULT', 38, "The default constructor is already defined");
987 1006
988 /** 1007 /**
989 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi th the same name 1008 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi th the same name
990 * declared in the same scope. 1009 * declared in the same scope.
991 * 1010 *
992 * @param duplicateName the name of the duplicate entity 1011 * @param duplicateName the name of the duplicate entity
993 */ 1012 */
994 static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME = new CompileTime ErrorCode.con1('DUPLICATE_CONSTRUCTOR_NAME', 36, "The constructor with name '%s' is already defined"); 1013 static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME = new CompileTime ErrorCode.con1('DUPLICATE_CONSTRUCTOR_NAME', 39, "The constructor with name '%s' is already defined");
995 1014
996 /** 1015 /**
997 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi th the same name 1016 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi th the same name
998 * declared in the same scope. 1017 * declared in the same scope.
999 * 1018 *
1000 * 7 Classes: It is a compile-time error if a class declares two members of th e same name. 1019 * 7 Classes: It is a compile-time error if a class declares two members of th e same name.
1001 * 1020 *
1002 * 7 Classes: It is a compile-time error if a class has an instance member and a static member 1021 * 7 Classes: It is a compile-time error if a class has an instance member and a static member
1003 * with the same name. 1022 * with the same name.
1004 * 1023 *
1005 * @param duplicateName the name of the duplicate entity 1024 * @param duplicateName the name of the duplicate entity
1006 */ 1025 */
1007 static final CompileTimeErrorCode DUPLICATE_DEFINITION = new CompileTimeErrorC ode.con1('DUPLICATE_DEFINITION', 37, "The name '%s' is already defined"); 1026 static final CompileTimeErrorCode DUPLICATE_DEFINITION = new CompileTimeErrorC ode.con1('DUPLICATE_DEFINITION', 40, "The name '%s' is already defined");
1008 1027
1009 /** 1028 /**
1010 * 7. Classes: It is a compile-time error if a class has an instance member an d a static member 1029 * 7. Classes: It is a compile-time error if a class has an instance member an d a static member
1011 * with the same name. 1030 * with the same name.
1012 * 1031 *
1013 * This covers the additional duplicate definition cases where inheritance has to be considered. 1032 * This covers the additional duplicate definition cases where inheritance has to be considered.
1014 * 1033 *
1015 * @param className the name of the class that has conflicting instance/static members 1034 * @param className the name of the class that has conflicting instance/static members
1016 * @param name the name of the conflicting members 1035 * @param name the name of the conflicting members
1017 * @see #DUPLICATE_DEFINITION 1036 * @see #DUPLICATE_DEFINITION
1018 */ 1037 */
1019 static final CompileTimeErrorCode DUPLICATE_DEFINITION_INHERITANCE = new Compi leTimeErrorCode.con1('DUPLICATE_DEFINITION_INHERITANCE', 38, "The name '%s' is a lready defined in '%s'"); 1038 static final CompileTimeErrorCode DUPLICATE_DEFINITION_INHERITANCE = new Compi leTimeErrorCode.con1('DUPLICATE_DEFINITION_INHERITANCE', 41, "The name '%s' is a lready defined in '%s'");
1020 1039
1021 /** 1040 /**
1022 * 12.14.2 Binding Actuals to Formals: It is a compile-time error if <i>q<sub> i</sub> = 1041 * 12.14.2 Binding Actuals to Formals: It is a compile-time error if <i>q<sub> i</sub> =
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 1042 * q<sub>j</sub></i> for any <i>i != j</i> [where <i>q<sub>i</sub></i> is the label for a named
1024 * argument]. 1043 * argument].
1025 */ 1044 */
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"); 1045 static final CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = new CompileTimeEr rorCode.con1('DUPLICATE_NAMED_ARGUMENT', 42, "The argument for the named paramet er '%s' was already specified");
1027 1046
1028 /** 1047 /**
1029 * SDK implementation libraries can be exported only by other SDK libraries. 1048 * SDK implementation libraries can be exported only by other SDK libraries.
1030 * 1049 *
1031 * @param uri the uri pointing to a library 1050 * @param uri the uri pointing to a library
1032 */ 1051 */
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"); 1052 static final CompileTimeErrorCode EXPORT_INTERNAL_LIBRARY = new CompileTimeErr orCode.con1('EXPORT_INTERNAL_LIBRARY', 43, "The library '%s' is internal and can not be exported");
1034 1053
1035 /** 1054 /**
1036 * 14.2 Exports: It is a compile-time error if the compilation unit found at t he specified URI is 1055 * 14.2 Exports: It is a compile-time error if the compilation unit found at t he specified URI is
1037 * not a library declaration. 1056 * not a library declaration.
1038 * 1057 *
1039 * @param uri the uri pointing to a non-library declaration 1058 * @param uri the uri pointing to a non-library declaration
1040 */ 1059 */
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"); 1060 static final CompileTimeErrorCode EXPORT_OF_NON_LIBRARY = new CompileTimeError Code.con1('EXPORT_OF_NON_LIBRARY', 44, "The exported library '%s' must not have a part-of directive");
1042 1061
1043 /** 1062 /**
1044 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla ss <i>C</i> includes 1063 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla ss <i>C</i> includes
1045 * a type expression that does not denote a class available in the lexical sco pe of <i>C</i>. 1064 * a type expression that does not denote a class available in the lexical sco pe of <i>C</i>.
1046 * 1065 *
1047 * @param typeName the name of the superclass that was not found 1066 * @param typeName the name of the superclass that was not found
1048 */ 1067 */
1049 static final CompileTimeErrorCode EXTENDS_NON_CLASS = new CompileTimeErrorCode .con1('EXTENDS_NON_CLASS', 42, "Classes can only extend other classes"); 1068 static final CompileTimeErrorCode EXTENDS_NON_CLASS = new CompileTimeErrorCode .con1('EXTENDS_NON_CLASS', 45, "Classes can only extend other classes");
1050 1069
1051 /** 1070 /**
1052 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i mplement Null. 1071 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i mplement Null.
1053 * 1072 *
1054 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement int. 1073 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement int.
1055 * 1074 *
1056 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement double. 1075 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement double.
1057 * 1076 *
1058 * 12.3 Numbers: It is a compile-time error for any type other than the types int and double to 1077 * 12.3 Numbers: It is a compile-time error for any type other than the types int and double to
1059 * attempt to extend or implement num. 1078 * attempt to extend or implement num.
1060 * 1079 *
1061 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend or implement bool. 1080 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend or implement bool.
1062 * 1081 *
1063 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o r implement String. 1082 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o r implement String.
1064 * 1083 *
1065 * @param typeName the name of the type that cannot be extended 1084 * @param typeName the name of the type that cannot be extended
1066 * @see #IMPLEMENTS_DISALLOWED_CLASS 1085 * @see #IMPLEMENTS_DISALLOWED_CLASS
1067 */ 1086 */
1068 static final CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = new CompileTimeEr rorCode.con1('EXTENDS_DISALLOWED_CLASS', 43, "Classes cannot extend '%s'"); 1087 static final CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = new CompileTimeEr rorCode.con1('EXTENDS_DISALLOWED_CLASS', 46, "Classes cannot extend '%s'");
1069 1088
1070 /** 1089 /**
1071 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m &lt; h</ i> or if <i>m &gt; 1090 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m &lt; h</ i> or if <i>m &gt;
1072 * n</i>. 1091 * n</i>.
1073 * 1092 *
1074 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an 1093 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an
1075 * uncaught exception being thrown. 1094 * uncaught exception being thrown.
1076 * 1095 *
1077 * @param requiredCount the maximum number of positional arguments 1096 * @param requiredCount the maximum number of positional arguments
1078 * @param argumentCount the actual number of positional arguments given 1097 * @param argumentCount the actual number of positional arguments given
1079 */ 1098 */
1080 static final CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS = new CompileTime ErrorCode.con1('EXTRA_POSITIONAL_ARGUMENTS', 44, "%d positional arguments expect ed, but %d found"); 1099 static final CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS = new CompileTime ErrorCode.con1('EXTRA_POSITIONAL_ARGUMENTS', 47, "%d positional arguments expect ed, but %d found");
1081 1100
1082 /** 1101 /**
1083 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile time 1102 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile time
1084 * error if more than one initializer corresponding to a given instance variab le appears in 1103 * error if more than one initializer corresponding to a given instance variab le appears in
1085 * <i>k</i>'s list. 1104 * <i>k</i>'s list.
1086 */ 1105 */
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"); 1106 static final CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS = new CompileTimeErrorCode.con1('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 48, "The field '%s' cannot be initialized twice in the same constructor");
1088 1107
1089 /** 1108 /**
1090 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile time 1109 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile time
1091 * error if <i>k</i>'s initializer list contains an initializer for a variable that is initialized 1110 * error if <i>k</i>'s initializer list contains an initializer for a variable that is initialized
1092 * by means of an initializing formal of <i>k</i>. 1111 * by means of an initializing formal of <i>k</i>.
1093 */ 1112 */
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"); 1113 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ ER = new CompileTimeErrorCode.con1('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ ER', 49, "Fields cannot be initialized in both the parameter list and the initia lizers");
1095 1114
1096 /** 1115 /**
1097 * 5 Variables: It is a compile-time error if a final instance variable that h as is initialized by 1116 * 5 Variables: It is a compile-time error if a final instance variable that h as is initialized by
1098 * means of an initializing formal of a constructor is also initialized elsewh ere in the same 1117 * means of an initializing formal of a constructor is also initialized elsewh ere in the same
1099 * constructor. 1118 * constructor.
1100 * 1119 *
1101 * @param name the name of the field in question 1120 * @param name the name of the field in question
1102 */ 1121 */
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"); 1122 static final CompileTimeErrorCode FINAL_INITIALIZED_MULTIPLE_TIMES = new Compi leTimeErrorCode.con1('FINAL_INITIALIZED_MULTIPLE_TIMES', 50, "'%s' is a final fi eld and so can only be set once");
1104 1123
1105 /** 1124 /**
1106 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin g formal is used by 1125 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin g formal is used by
1107 * a function other than a non-redirecting generative constructor. 1126 * a function other than a non-redirecting generative constructor.
1108 */ 1127 */
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"); 1128 static final CompileTimeErrorCode FIELD_INITIALIZER_FACTORY_CONSTRUCTOR = new CompileTimeErrorCode.con1('FIELD_INITIALIZER_FACTORY_CONSTRUCTOR', 51, "Initiali zing formal fields cannot be used in factory constructors");
1110 1129
1111 /** 1130 /**
1112 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin g formal is used by 1131 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin g formal is used by
1113 * a function other than a non-redirecting generative constructor. 1132 * a function other than a non-redirecting generative constructor.
1114 */ 1133 */
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"); 1134 static final CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new CompileTimeErrorCode.con1('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 52, "Initiali zing formal fields can only be used in constructors");
1116 1135
1117 /** 1136 /**
1118 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its 1137 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its
1119 * only action is to invoke another generative constructor. 1138 * only action is to invoke another generative constructor.
1120 * 1139 *
1121 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin g formal is used by 1140 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin g formal is used by
1122 * a function other than a non-redirecting generative constructor. 1141 * a function other than a non-redirecting generative constructor.
1123 */ 1142 */
1124 static final CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR = new CompileTimeErrorCode.con1('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', 50, " The redirecting constructor cannot have a field initializer"); 1143 static final CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR = new CompileTimeErrorCode.con1('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', 53, " The redirecting constructor cannot have a field initializer");
1125 1144
1126 /** 1145 /**
1127 * 7.2 Getters: It is a compile-time error if a class has both a getter and a method with the same 1146 * 7.2 Getters: It is a compile-time error if a class has both a getter and a method with the same
1128 * name. 1147 * name.
1129 * 1148 *
1130 * @param name the conflicting name of the getter and method 1149 * @param name the conflicting name of the getter and method
1131 */ 1150 */
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"); 1151 static final CompileTimeErrorCode GETTER_AND_METHOD_WITH_SAME_NAME = new Compi leTimeErrorCode.con1('GETTER_AND_METHOD_WITH_SAME_NAME', 54, "'%s' cannot be use d to name a getter, there is already a method with the same name");
1133 1152
1134 /** 1153 /**
1135 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i mplement Null. 1154 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i mplement Null.
1136 * 1155 *
1137 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement int. 1156 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement int.
1138 * 1157 *
1139 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement double. 1158 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement double.
1140 * 1159 *
1141 * 12.3 Numbers: It is a compile-time error for any type other than the types int and double to 1160 * 12.3 Numbers: It is a compile-time error for any type other than the types int and double to
1142 * attempt to extend or implement num. 1161 * attempt to extend or implement num.
1143 * 1162 *
1144 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend or implement bool. 1163 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend or implement bool.
1145 * 1164 *
1146 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o r implement String. 1165 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o r implement String.
1147 * 1166 *
1148 * @param typeName the name of the type that cannot be implemented 1167 * @param typeName the name of the type that cannot be implemented
1149 * @see #EXTENDS_DISALLOWED_CLASS 1168 * @see #EXTENDS_DISALLOWED_CLASS
1150 */ 1169 */
1151 static final CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = new CompileTim eErrorCode.con1('IMPLEMENTS_DISALLOWED_CLASS', 52, "Classes cannot implement '%s '"); 1170 static final CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = new CompileTim eErrorCode.con1('IMPLEMENTS_DISALLOWED_CLASS', 55, "Classes cannot implement '%s '");
1152 1171
1153 /** 1172 /**
1154 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o f a class includes 1173 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o f a class includes
1155 * type dynamic. 1174 * type dynamic.
1156 */ 1175 */
1157 static final CompileTimeErrorCode IMPLEMENTS_DYNAMIC = new CompileTimeErrorCod e.con1('IMPLEMENTS_DYNAMIC', 53, "Classes cannot implement 'dynamic'"); 1176 static final CompileTimeErrorCode IMPLEMENTS_DYNAMIC = new CompileTimeErrorCod e.con1('IMPLEMENTS_DYNAMIC', 56, "Classes cannot implement 'dynamic'");
1158 1177
1159 /** 1178 /**
1160 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o f a class <i>C</i> 1179 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o f a class <i>C</i>
1161 * includes a type expression that does not denote a class available in the le xical scope of 1180 * includes a type expression that does not denote a class available in the le xical scope of
1162 * <i>C</i>. 1181 * <i>C</i>.
1163 * 1182 *
1164 * @param typeName the name of the interface that was not found 1183 * @param typeName the name of the interface that was not found
1165 */ 1184 */
1166 static final CompileTimeErrorCode IMPLEMENTS_NON_CLASS = new CompileTimeErrorC ode.con1('IMPLEMENTS_NON_CLASS', 54, "Classes can only implement other classes") ; 1185 static final CompileTimeErrorCode IMPLEMENTS_NON_CLASS = new CompileTimeErrorC ode.con1('IMPLEMENTS_NON_CLASS', 57, "Classes can only implement other classes") ;
1167 1186
1168 /** 1187 /**
1169 * 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears more than once in 1188 * 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears more than once in
1170 * the implements clause of a class. 1189 * the implements clause of a class.
1171 * 1190 *
1172 * @param className the name of the class that is implemented more than once 1191 * @param className the name of the class that is implemented more than once
1173 */ 1192 */
1174 static final CompileTimeErrorCode IMPLEMENTS_REPEATED = new CompileTimeErrorCo de.con1('IMPLEMENTS_REPEATED', 55, "'%s' can only be implemented once"); 1193 static final CompileTimeErrorCode IMPLEMENTS_REPEATED = new CompileTimeErrorCo de.con1('IMPLEMENTS_REPEATED', 58, "'%s' can only be implemented once");
1175 1194
1176 /** 1195 /**
1177 * 7.10 Superinterfaces: It is a compile-time error if the superclass of a cla ss <i>C</i> appears 1196 * 7.10 Superinterfaces: It is a compile-time error if the superclass of a cla ss <i>C</i> appears
1178 * in the implements clause of <i>C</i>. 1197 * in the implements clause of <i>C</i>.
1179 * 1198 *
1180 * @param className the name of the class that appears in both "extends" and " implements" clauses 1199 * @param className the name of the class that appears in both "extends" and " implements" clauses
1181 */ 1200 */
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"); 1201 static final CompileTimeErrorCode IMPLEMENTS_SUPER_CLASS = new CompileTimeErro rCode.con1('IMPLEMENTS_SUPER_CLASS', 59, "'%s' cannot be used in both 'extends' and 'implements' clauses");
1183 1202
1184 /** 1203 /**
1185 * 7.6.1 Generative Constructors: Note that <b>this</b> is not in scope on the right hand side of 1204 * 7.6.1 Generative Constructors: Note that <b>this</b> is not in scope on the right hand side of
1186 * an initializer. 1205 * an initializer.
1187 * 1206 *
1188 * 12.10 This: It is a compile-time error if this appears in a top-level funct ion or variable 1207 * 12.10 This: It is a compile-time error if this appears in a top-level funct ion or variable
1189 * initializer, in a factory constructor, or in a static method or variable in itializer, or in the 1208 * initializer, in a factory constructor, or in a static method or variable in itializer, or in the
1190 * initializer of an instance variable. 1209 * initializer of an instance variable.
1191 * 1210 *
1192 * @param name the name of the type in question 1211 * @param name the name of the type in question
1193 */ 1212 */
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"); 1213 static final CompileTimeErrorCode IMPLICIT_THIS_REFERENCE_IN_INITIALIZER = new CompileTimeErrorCode.con1('IMPLICIT_THIS_REFERENCE_IN_INITIALIZER', 60, "Only s tatic members can be accessed in initializers");
1195 1214
1196 /** 1215 /**
1197 * SDK implementation libraries can be imported only by other SDK libraries. 1216 * SDK implementation libraries can be imported only by other SDK libraries.
1198 * 1217 *
1199 * @param uri the uri pointing to a library 1218 * @param uri the uri pointing to a library
1200 */ 1219 */
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"); 1220 static final CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY = new CompileTimeErr orCode.con1('IMPORT_INTERNAL_LIBRARY', 61, "The library '%s' is internal and can not be imported");
1202 1221
1203 /** 1222 /**
1204 * 14.1 Imports: It is a compile-time error if the compilation unit found at t he specified URI is 1223 * 14.1 Imports: It is a compile-time error if the compilation unit found at t he specified URI is
1205 * not a library declaration. 1224 * not a library declaration.
1206 * 1225 *
1207 * @param uri the uri pointing to a non-library declaration 1226 * @param uri the uri pointing to a non-library declaration
1208 */ 1227 */
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"); 1228 static final CompileTimeErrorCode IMPORT_OF_NON_LIBRARY = new CompileTimeError Code.con1('IMPORT_OF_NON_LIBRARY', 62, "The imported library '%s' must not have a part-of directive");
1210 1229
1211 /** 1230 /**
1212 * 13.9 Switch: It is a compile-time error if values of the expressions <i>e<s ub>k</sub></i> are 1231 * 13.9 Switch: It is a compile-time error if values of the expressions <i>e<s ub>k</sub></i> are
1213 * not instances of the same class <i>C</i>, for all <i>1 &lt;= k &lt;= n</i>. 1232 * not instances of the same class <i>C</i>, for all <i>1 &lt;= k &lt;= n</i>.
1214 * 1233 *
1215 * @param expressionSource the expression source code that is the unexpected t ype 1234 * @param expressionSource the expression source code that is the unexpected t ype
1216 * @param expectedType the name of the expected type 1235 * @param expectedType the name of the expected type
1217 */ 1236 */
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'"); 1237 static final CompileTimeErrorCode INCONSISTENT_CASE_EXPRESSION_TYPES = new Com pileTimeErrorCode.con1('INCONSISTENT_CASE_EXPRESSION_TYPES', 63, "Case expressio ns must have the same types, '%s' is not a %s'");
1219 1238
1220 /** 1239 /**
1221 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile-time 1240 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile-time
1222 * error if <i>k</i>'s initializer list contains an initializer for a variable that is not an 1241 * error if <i>k</i>'s initializer list contains an initializer for a variable that is not an
1223 * instance variable declared in the immediately surrounding class. 1242 * instance variable declared in the immediately surrounding class.
1224 * 1243 *
1225 * @param id the name of the initializing formal that is not an instance varia ble in the 1244 * @param id the name of the initializing formal that is not an instance varia ble in the
1226 * immediately enclosing class 1245 * immediately enclosing class
1227 * @see #INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD 1246 * @see #INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD
1228 */ 1247 */
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"); 1248 static final CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTANT_FIELD = new Com pileTimeErrorCode.con1('INITIALIZER_FOR_NON_EXISTANT_FIELD', 64, "'%s' is not a variable in the enclosing class");
1230 1249
1231 /** 1250 /**
1232 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile-time 1251 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile-time
1233 * error if <i>k</i>'s initializer list contains an initializer for a variable that is not an 1252 * error if <i>k</i>'s initializer list contains an initializer for a variable that is not an
1234 * instance variable declared in the immediately surrounding class. 1253 * instance variable declared in the immediately surrounding class.
1235 * 1254 *
1236 * @param id the name of the initializing formal that is a static variable in the immediately 1255 * @param id the name of the initializing formal that is a static variable in the immediately
1237 * enclosing class 1256 * enclosing class
1238 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD 1257 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD
1239 */ 1258 */
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" ); 1259 static final CompileTimeErrorCode INITIALIZER_FOR_STATIC_FIELD = new CompileTi meErrorCode.con1('INITIALIZER_FOR_STATIC_FIELD', 65, "'%s' is a static variable in the enclosing class, variables initialized in a constructor cannot be static" );
1241 1260
1242 /** 1261 /**
1243 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this. id</i>. It is a 1262 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this. id</i>. It is a
1244 * compile-time error if <i>id</i> is not the name of an instance variable of the immediately 1263 * compile-time error if <i>id</i> is not the name of an instance variable of the immediately
1245 * enclosing class. 1264 * enclosing class.
1246 * 1265 *
1247 * @param id the name of the initializing formal that is not an instance varia ble in the 1266 * @param id the name of the initializing formal that is not an instance varia ble in the
1248 * immediately enclosing class 1267 * immediately enclosing class
1249 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD 1268 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD
1250 * @see #INITIALIZER_FOR_NON_EXISTANT_FIELD 1269 * @see #INITIALIZER_FOR_NON_EXISTANT_FIELD
1251 */ 1270 */
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"); 1271 static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD = new CompileTimeErrorCode.con1('INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD', 66, "'%s' is not a variable in the enclosing class");
1253 1272
1254 /** 1273 /**
1255 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this. id</i>. It is a 1274 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this. id</i>. It is a
1256 * compile-time error if <i>id</i> is not the name of an instance variable of the immediately 1275 * compile-time error if <i>id</i> is not the name of an instance variable of the immediately
1257 * enclosing class. 1276 * enclosing class.
1258 * 1277 *
1259 * @param id the name of the initializing formal that is a static variable in the immediately 1278 * @param id the name of the initializing formal that is a static variable in the immediately
1260 * enclosing class 1279 * enclosing class
1261 * @see #INITIALIZER_FOR_STATIC_FIELD 1280 * @see #INITIALIZER_FOR_STATIC_FIELD
1262 */ 1281 */
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"); 1282 static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_STATIC_FIELD = new C ompileTimeErrorCode.con1('INITIALIZING_FORMAL_FOR_STATIC_FIELD', 67, "'%s' is a static variable in the enclosing class, variables initialized in a constructor c annot be static");
1264 1283
1265 /** 1284 /**
1266 * 12.30 Identifier Reference: Otherwise, e is equivalent to the property extr action 1285 * 12.30 Identifier Reference: Otherwise, e is equivalent to the property extr action
1267 * <b>this</b>.<i>id</i>. 1286 * <b>this</b>.<i>id</i>.
1268 */ 1287 */
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"); 1288 static final CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_STATIC = new Com pileTimeErrorCode.con1('INSTANCE_MEMBER_ACCESS_FROM_STATIC', 68, "Instance membe r cannot be accessed from static method");
1270 1289
1271 /** 1290 /**
1272 * 11 Metadata: Metadata consists of a series of annotations, each of which be gin with the 1291 * 11 Metadata: Metadata consists of a series of annotations, each of which be gin with the
1273 * character @, followed by a constant expression that must be either a refere nce to a 1292 * character @, followed by a constant expression that must be either a refere nce to a
1274 * compile-time constant variable, or a call to a constant constructor. 1293 * compile-time constant variable, or a call to a constant constructor.
1275 */ 1294 */
1276 static final CompileTimeErrorCode INVALID_ANNOTATION = new CompileTimeErrorCod e.con1('INVALID_ANNOTATION', 66, "Annotation can be only constant variable or co nstant constructor invocation"); 1295 static final CompileTimeErrorCode INVALID_ANNOTATION = new CompileTimeErrorCod e.con1('INVALID_ANNOTATION', 69, "Annotation can be only constant variable or co nstant constructor invocation");
1277 1296
1278 /** 1297 /**
1279 * TODO(brianwilkerson) Remove this when we have decided on how to report erro rs in compile-time 1298 * TODO(brianwilkerson) Remove this when we have decided on how to report erro rs in compile-time
1280 * constants. Until then, this acts as a placeholder for more informative erro rs. 1299 * constants. Until then, this acts as a placeholder for more informative erro rs.
1281 * 1300 *
1282 * See TODOs in ConstantVisitor 1301 * See TODOs in ConstantVisitor
1283 */ 1302 */
1284 static final CompileTimeErrorCode INVALID_CONSTANT = new CompileTimeErrorCode. con1('INVALID_CONSTANT', 67, "Invalid constant value"); 1303 static final CompileTimeErrorCode INVALID_CONSTANT = new CompileTimeErrorCode. con1('INVALID_CONSTANT', 70, "Invalid constant value");
1285 1304
1286 /** 1305 /**
1287 * 7.6 Constructors: It is a compile-time error if the name of a constructor i s not a constructor 1306 * 7.6 Constructors: It is a compile-time error if the name of a constructor i s not a constructor
1288 * name. 1307 * name.
1289 */ 1308 */
1290 static final CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = new CompileTimeEr rorCode.con1('INVALID_CONSTRUCTOR_NAME', 68, "Invalid constructor name"); 1309 static final CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = new CompileTimeEr rorCode.con1('INVALID_CONSTRUCTOR_NAME', 71, "Invalid constructor name");
1291 1310
1292 /** 1311 /**
1293 * 7.6.2 Factories: It is a compile-time error if <i>M</i> is not the name of the immediately 1312 * 7.6.2 Factories: It is a compile-time error if <i>M</i> is not the name of the immediately
1294 * enclosing class. 1313 * enclosing class.
1295 */ 1314 */
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"); 1315 static final CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS = new Compi leTimeErrorCode.con1('INVALID_FACTORY_NAME_NOT_A_CLASS', 72, "The name of the im mediately enclosing class expected");
1297 1316
1298 /** 1317 /**
1299 * 12.10 This: It is a compile-time error if this appears in a top-level funct ion or variable 1318 * 12.10 This: It is a compile-time error if this appears in a top-level funct ion or variable
1300 * initializer, in a factory constructor, or in a static method or variable in itializer, or in the 1319 * initializer, in a factory constructor, or in a static method or variable in itializer, or in the
1301 * initializer of an instance variable. 1320 * initializer of an instance variable.
1302 */ 1321 */
1303 static final CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = new CompileTimeE rrorCode.con1('INVALID_REFERENCE_TO_THIS', 70, "Invalid reference to 'this' expr ession"); 1322 static final CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = new CompileTimeE rrorCode.con1('INVALID_REFERENCE_TO_THIS', 73, "Invalid reference to 'this' expr ession");
1304 1323
1305 /** 1324 /**
1306 * 12.6 Lists: It is a compile time error if the type argument of a constant l ist literal includes 1325 * 12.6 Lists: It is a compile time error if the type argument of a constant l ist literal includes
1307 * a type parameter. 1326 * a type parameter.
1308 * 1327 *
1309 * @name the name of the type parameter 1328 * @name the name of the type parameter
1310 */ 1329 */
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'"); 1330 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST = new Co mpileTimeErrorCode.con1('INVALID_TYPE_ARGUMENT_IN_CONST_LIST', 74, "Constant lis t literals cannot include a type parameter as a type argument, such as '%s'");
1312 1331
1313 /** 1332 /**
1314 * 12.7 Maps: It is a compile time error if the type arguments of a constant m ap literal include a 1333 * 12.7 Maps: It is a compile time error if the type arguments of a constant m ap literal include a
1315 * type parameter. 1334 * type parameter.
1316 * 1335 *
1317 * @name the name of the type parameter 1336 * @name the name of the type parameter
1318 */ 1337 */
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'"); 1338 static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = new Com pileTimeErrorCode.con1('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 75, "Constant map l iterals cannot include a type parameter as a type argument, such as '%s'");
1320 1339
1321 /** 1340 /**
1322 * 14.2 Exports: It is a compile-time error if the compilation unit found at t he specified URI is 1341 * 14.2 Exports: It is a compile-time error if the compilation unit found at t he specified URI is
1323 * not a library declaration. 1342 * not a library declaration.
1324 * 1343 *
1325 * 14.1 Imports: It is a compile-time error if the compilation unit found at t he specified URI is 1344 * 14.1 Imports: It is a compile-time error if the compilation unit found at t he specified URI is
1326 * not a library declaration. 1345 * not a library declaration.
1327 * 1346 *
1328 * 14.3 Parts: It is a compile time error if the contents of the URI are not a valid part 1347 * 14.3 Parts: It is a compile time error if the contents of the URI are not a valid part
1329 * declaration. 1348 * declaration.
1330 * 1349 *
1331 * @param uri the URI that is invalid 1350 * @param uri the URI that is invalid
1332 * @see #URI_DOES_NOT_EXIST 1351 * @see #URI_DOES_NOT_EXIST
1333 */ 1352 */
1334 static final CompileTimeErrorCode INVALID_URI = new CompileTimeErrorCode.con1( 'INVALID_URI', 73, "Invalid URI syntax: '%s'"); 1353 static final CompileTimeErrorCode INVALID_URI = new CompileTimeErrorCode.con1( 'INVALID_URI', 76, "Invalid URI syntax: '%s'");
1335 1354
1336 /** 1355 /**
1337 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su b></i> exists within 1356 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su b></i> exists within
1338 * the innermost function in which <i>s<sub>b</sub></i> occurs. 1357 * the innermost function in which <i>s<sub>b</sub></i> occurs.
1339 * 1358 *
1340 * 13.14 Continue: It is a compile-time error if no such statement or case cla use 1359 * 13.14 Continue: It is a compile-time error if no such statement or case cla use
1341 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub >c</sub></i> occurs. 1360 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub >c</sub></i> occurs.
1342 * 1361 *
1343 * @param labelName the name of the unresolvable label 1362 * @param labelName the name of the unresolvable label
1344 */ 1363 */
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"); 1364 static final CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = new CompileTimeErrorC ode.con1('LABEL_IN_OUTER_SCOPE', 77, "Cannot reference label '%s' declared in an outer method");
1346 1365
1347 /** 1366 /**
1348 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su b></i> exists within 1367 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su b></i> exists within
1349 * the innermost function in which <i>s<sub>b</sub></i> occurs. 1368 * the innermost function in which <i>s<sub>b</sub></i> occurs.
1350 * 1369 *
1351 * 13.14 Continue: It is a compile-time error if no such statement or case cla use 1370 * 13.14 Continue: It is a compile-time error if no such statement or case cla use
1352 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub >c</sub></i> occurs. 1371 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub >c</sub></i> occurs.
1353 * 1372 *
1354 * @param labelName the name of the unresolvable label 1373 * @param labelName the name of the unresolvable label
1355 */ 1374 */
1356 static final CompileTimeErrorCode LABEL_UNDEFINED = new CompileTimeErrorCode.c on1('LABEL_UNDEFINED', 75, "Cannot reference undefined label '%s'"); 1375 static final CompileTimeErrorCode LABEL_UNDEFINED = new CompileTimeErrorCode.c on1('LABEL_UNDEFINED', 78, "Cannot reference undefined label '%s'");
1357 1376
1358 /** 1377 /**
1359 * 12.6 Lists: A run-time list literal &lt;<i>E</i>&gt; [<i>e<sub>1</sub></i> ... 1378 * 12.6 Lists: A run-time list literal &lt;<i>E</i>&gt; [<i>e<sub>1</sub></i> ...
1360 * <i>e<sub>n</sub></i>] is evaluated as follows: 1379 * <i>e<sub>n</sub></i>] is evaluated as follows:
1361 * 1380 *
1362 * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and second argument 1381 * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and second argument
1363 * <i>o<sub>i+1</sub></i><i>, 1 &lt;= i &lt;= n</i> 1382 * <i>o<sub>i+1</sub></i><i>, 1 &lt;= i &lt;= n</i>
1364 * 1383 *
1365 * 1384 *
1366 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of 1385 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of
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 &lt;= i &lt;= 1386 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s ub>, 1 &lt;= i &lt;=
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>. 1387 * 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>.
1369 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S< sub>j</sub>, 1 &lt;= 1388 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S< sub>j</sub>, 1 &lt;=
1370 * j &lt;= m</i>. 1389 * j &lt;= m</i>.
1371 */ 1390 */
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'"); 1391 static final CompileTimeErrorCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = new Compi leTimeErrorCode.con1('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 79, "The element type ' %s' cannot be assigned to the list type '%s'");
1373 1392
1374 /** 1393 /**
1375 * 12.7 Map: A run-time map literal &lt;<i>K</i>, <i>V</i>&gt; [<i>k<sub>1</su b></i> : 1394 * 12.7 Map: A run-time map literal &lt;<i>K</i>, <i>V</i>&gt; [<i>k<sub>1</su b></i> :
1376 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev aluated as follows: 1395 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev aluated as follows:
1377 * 1396 *
1378 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s ub></i> and second 1397 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s ub></i> and second
1379 * argument <i>e<sub>i</sub></i><i>, 1 &lt;= i &lt;= n</i> 1398 * argument <i>e<sub>i</sub></i><i>, 1 &lt;= i &lt;= n</i>
1380 * 1399 *
1381 * 1400 *
1382 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of 1401 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of
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 &lt;= i &lt;= 1402 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s ub>, 1 &lt;= i &lt;=
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>. 1403 * 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>.
1385 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S< sub>j</sub>, 1 &lt;= 1404 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S< sub>j</sub>, 1 &lt;=
1386 * j &lt;= m</i>. 1405 * j &lt;= m</i>.
1387 */ 1406 */
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'"); 1407 static final CompileTimeErrorCode MAP_KEY_TYPE_NOT_ASSIGNABLE = new CompileTim eErrorCode.con1('MAP_KEY_TYPE_NOT_ASSIGNABLE', 80, "The element type '%s' cannot be assigned to the map key type '%s'");
1389 1408
1390 /** 1409 /**
1391 * 12.7 Map: A run-time map literal &lt;<i>K</i>, <i>V</i>&gt; [<i>k<sub>1</su b></i> : 1410 * 12.7 Map: A run-time map literal &lt;<i>K</i>, <i>V</i>&gt; [<i>k<sub>1</su b></i> :
1392 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev aluated as follows: 1411 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev aluated as follows:
1393 * 1412 *
1394 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s ub></i> and second 1413 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s ub></i> and second
1395 * argument <i>e<sub>i</sub></i><i>, 1 &lt;= i &lt;= n</i> 1414 * argument <i>e<sub>i</sub></i><i>, 1 &lt;= i &lt;= n</i>
1396 * 1415 *
1397 * 1416 *
1398 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of 1417 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of
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 &lt;= i &lt;= 1418 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s ub>, 1 &lt;= i &lt;=
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>. 1419 * 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>.
1401 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S< sub>j</sub>, 1 &lt;= 1420 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S< sub>j</sub>, 1 &lt;=
1402 * j &lt;= m</i>. 1421 * j &lt;= m</i>.
1403 */ 1422 */
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'"); 1423 static final CompileTimeErrorCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = new CompileT imeErrorCode.con1('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 81, "The element type '%s' ca nnot be assigned to the map value type '%s'");
1405 1424
1406 /** 1425 /**
1407 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member with the same name 1426 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member with the same name
1408 * as <i>C</i>. 1427 * as <i>C</i>.
1409 */ 1428 */
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"); 1429 static final CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = new CompileTimeErro rCode.con1('MEMBER_WITH_CLASS_NAME', 82, "Class members cannot have the same nam e as the enclosing class");
1411 1430
1412 /** 1431 /**
1413 * 7.2 Getters: It is a compile-time error if a class has both a getter and a method with the same 1432 * 7.2 Getters: It is a compile-time error if a class has both a getter and a method with the same
1414 * name. 1433 * name.
1415 * 1434 *
1416 * @param name the conflicting name of the getter and method 1435 * @param name the conflicting name of the getter and method
1417 */ 1436 */
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"); 1437 static final CompileTimeErrorCode METHOD_AND_GETTER_WITH_SAME_NAME = new Compi leTimeErrorCode.con1('METHOD_AND_GETTER_WITH_SAME_NAME', 83, "'%s' cannot be use d to name a method, there is already a getter with the same name");
1419 1438
1420 /** 1439 /**
1421 * 12.1 Constants: A constant expression is ... a constant list literal. 1440 * 12.1 Constants: A constant expression is ... a constant list literal.
1422 */ 1441 */
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"); 1442 static final CompileTimeErrorCode MISSING_CONST_IN_LIST_LITERAL = new CompileT imeErrorCode.con1('MISSING_CONST_IN_LIST_LITERAL', 84, "List literals must be pr efixed with 'const' when used as a constant expression");
1424 1443
1425 /** 1444 /**
1426 * 12.1 Constants: A constant expression is ... a constant map literal. 1445 * 12.1 Constants: A constant expression is ... a constant map literal.
1427 */ 1446 */
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"); 1447 static final CompileTimeErrorCode MISSING_CONST_IN_MAP_LITERAL = new CompileTi meErrorCode.con1('MISSING_CONST_IN_MAP_LITERAL', 85, "Map literals must be prefi xed with 'const' when used as a constant expression");
1429 1448
1430 /** 1449 /**
1431 * 9 Mixins: It is a compile-time error if a declared or derived mixin explici tly declares a 1450 * 9 Mixins: It is a compile-time error if a declared or derived mixin explici tly declares a
1432 * constructor. 1451 * constructor.
1433 * 1452 *
1434 * @param typeName the name of the mixin that is invalid 1453 * @param typeName the name of the mixin that is invalid
1435 */ 1454 */
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"); 1455 static final CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = new CompileTime ErrorCode.con1('MIXIN_DECLARES_CONSTRUCTOR', 86, "The class '%s' cannot be used as a mixin because it declares a constructor");
1437 1456
1438 /** 1457 /**
1439 * 9 Mixins: It is a compile-time error if a mixin is derived from a class who se superclass is not 1458 * 9 Mixins: It is a compile-time error if a mixin is derived from a class who se superclass is not
1440 * Object. 1459 * Object.
1441 * 1460 *
1442 * @param typeName the name of the mixin that is invalid 1461 * @param typeName the name of the mixin that is invalid
1443 */ 1462 */
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"); 1463 static final CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = new Compile TimeErrorCode.con1('MIXIN_INHERITS_FROM_NOT_OBJECT', 87, "The class '%s' cannot be used as a mixin because it extends a class other than Object");
1445 1464
1446 /** 1465 /**
1447 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i mplement Null. 1466 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i mplement Null.
1448 * 1467 *
1449 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement int. 1468 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement int.
1450 * 1469 *
1451 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement double. 1470 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement double.
1452 * 1471 *
1453 * 12.3 Numbers: It is a compile-time error for any type other than the types int and double to 1472 * 12.3 Numbers: It is a compile-time error for any type other than the types int and double to
1454 * attempt to extend or implement num. 1473 * attempt to extend or implement num.
1455 * 1474 *
1456 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend or implement bool. 1475 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend or implement bool.
1457 * 1476 *
1458 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o r implement String. 1477 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o r implement String.
1459 * 1478 *
1460 * @param typeName the name of the type that cannot be extended 1479 * @param typeName the name of the type that cannot be extended
1461 * @see #IMPLEMENTS_DISALLOWED_CLASS 1480 * @see #IMPLEMENTS_DISALLOWED_CLASS
1462 */ 1481 */
1463 static final CompileTimeErrorCode MIXIN_OF_DISALLOWED_CLASS = new CompileTimeE rrorCode.con1('MIXIN_OF_DISALLOWED_CLASS', 85, "Classes cannot mixin '%s'"); 1482 static final CompileTimeErrorCode MIXIN_OF_DISALLOWED_CLASS = new CompileTimeE rrorCode.con1('MIXIN_OF_DISALLOWED_CLASS', 88, "Classes cannot mixin '%s'");
1464 1483
1465 /** 1484 /**
1466 * 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not deno te a class or mixin 1485 * 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not deno te a class or mixin
1467 * available in the immediately enclosing scope. 1486 * available in the immediately enclosing scope.
1468 */ 1487 */
1469 static final CompileTimeErrorCode MIXIN_OF_NON_CLASS = new CompileTimeErrorCod e.con1('MIXIN_OF_NON_CLASS', 86, "Classes can only mixin other classes"); 1488 static final CompileTimeErrorCode MIXIN_OF_NON_CLASS = new CompileTimeErrorCod e.con1('MIXIN_OF_NON_CLASS', 89, "Classes can only mixin other classes");
1470 1489
1471 /** 1490 /**
1472 * 9 Mixins: It is a compile-time error if a declared or derived mixin refers to super. 1491 * 9 Mixins: It is a compile-time error if a declared or derived mixin refers to super.
1473 */ 1492 */
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'"); 1493 static final CompileTimeErrorCode MIXIN_REFERENCES_SUPER = new CompileTimeErro rCode.con1('MIXIN_REFERENCES_SUPER', 90, "The class '%s' cannot be used as a mix in because it references 'super'");
1475 1494
1476 /** 1495 /**
1477 * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not deno te a class available 1496 * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not deno te a class available
1478 * in the immediately enclosing scope. 1497 * in the immediately enclosing scope.
1479 */ 1498 */
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"); 1499 static final CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = new Compil eTimeErrorCode.con1('MIXIN_WITH_NON_CLASS_SUPERCLASS', 91, "Mixin can only be ap plied to class");
1481 1500
1482 /** 1501 /**
1483 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its 1502 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its
1484 * only action is to invoke another generative constructor. 1503 * only action is to invoke another generative constructor.
1485 */ 1504 */
1486 static final CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS = new CompileTimeErrorCode.con1('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS', 89, "Constructor may have at most one 'this' redirection"); 1505 static final CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS = new CompileTimeErrorCode.con1('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS', 92, "Constructor may have at most one 'this' redirection");
1487 1506
1488 /** 1507 /**
1489 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Th en <i>k</i> may 1508 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Th en <i>k</i> may
1490 * include at most one superinitializer in its initializer list or a compile t ime error occurs. 1509 * include at most one superinitializer in its initializer list or a compile t ime error occurs.
1491 */ 1510 */
1492 static final CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = new CompileTim eErrorCode.con1('MULTIPLE_SUPER_INITIALIZERS', 90, "Constructor may have at most one 'super' initializer"); 1511 static final CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = new CompileTim eErrorCode.con1('MULTIPLE_SUPER_INITIALIZERS', 93, "Constructor may have at most one 'super' initializer");
1493 1512
1494 /** 1513 /**
1495 * 11 Metadata: Metadata consists of a series of annotations, each of which be gin with the 1514 * 11 Metadata: Metadata consists of a series of annotations, each of which be gin with the
1496 * character @, followed by a constant expression that must be either a refere nce to a 1515 * character @, followed by a constant expression that must be either a refere nce to a
1497 * compile-time constant variable, or a call to a constant constructor. 1516 * compile-time constant variable, or a call to a constant constructor.
1498 */ 1517 */
1499 static final CompileTimeErrorCode NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS = new Co mpileTimeErrorCode.con1('NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS', 91, "Annotation c reation must have arguments"); 1518 static final CompileTimeErrorCode NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS = new Co mpileTimeErrorCode.con1('NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS', 94, "Annotation c reation must have arguments");
1500 1519
1501 /** 1520 /**
1502 * 7.6.1 Generative Constructors: If no superinitializer is provided, an impli cit superinitializer 1521 * 7.6.1 Generative Constructors: If no superinitializer is provided, an impli cit superinitializer
1503 * of the form <b>super</b>() is added at the end of <i>k</i>'s initializer li st, unless the 1522 * of the form <b>super</b>() is added at the end of <i>k</i>'s initializer li st, unless the
1504 * enclosing class is class <i>Object</i>. 1523 * enclosing class is class <i>Object</i>.
1505 * 1524 *
1506 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i> does not declare a 1525 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i> does not declare a
1507 * generative constructor named <i>S</i> (respectively <i>S.id</i>) 1526 * generative constructor named <i>S</i> (respectively <i>S.id</i>)
1508 */ 1527 */
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"); 1528 static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT = new CompileTimeErrorCode.con1('NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT', 95, "The clas s '%s' does not have a default constructor");
1510 1529
1511 /** 1530 /**
1512 * 7.6 Constructors: Iff no constructor is specified for a class <i>C</i>, it implicitly has a 1531 * 7.6 Constructors: Iff no constructor is specified for a class <i>C</i>, it implicitly has a
1513 * default constructor C() : <b>super<b>() {}, unless <i>C</i> is class <i>Obj ect</i>. 1532 * default constructor C() : <b>super<b>() {}, unless <i>C</i> is class <i>Obj ect</i>.
1514 * 1533 *
1515 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i> does not declare a 1534 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i> does not declare a
1516 * generative constructor named <i>S</i> (respectively <i>S.id</i>) 1535 * generative constructor named <i>S</i> (respectively <i>S.id</i>)
1517 */ 1536 */
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"); 1537 static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT = new CompileTimeErrorCode.con1('NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT', 96, "The clas s '%s' does not have a default constructor");
1519 1538
1520 /** 1539 /**
1521 * 13.2 Expression Statements: It is a compile-time error if a non-constant ma p literal that has 1540 * 13.2 Expression Statements: It is a compile-time error if a non-constant ma p literal that has
1522 * no explicit type arguments appears in a place where a statement is expected . 1541 * no explicit type arguments appears in a place where a statement is expected .
1523 */ 1542 */
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"); 1543 static final CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = new CompileTimeErrorCode.con1('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 97, "A non-co nstant map literal without type arguments cannot be used as an expression statem ent");
1525 1544
1526 /** 1545 /**
1527 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub >11</sub> &hellip; 1546 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub >11</sub> &hellip;
1528 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> &hellip; label<sub>n1 </sub> &hellip; 1547 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> &hellip; label<sub>n1 </sub> &hellip;
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 1548 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s ub>}</i> or the form
1530 * <i>switch (e) { label<sub>11</sub> &hellip; label<sub>1j1</sub> case e<sub> 1</sub>: 1549 * <i>switch (e) { label<sub>11</sub> &hellip; label<sub>1j1</sub> case e<sub> 1</sub>:
1531 * s<sub>1</sub> &hellip; label<sub>n1</sub> &hellip; label<sub>njn</sub> case e<sub>n</sub>: 1550 * s<sub>1</sub> &hellip; label<sub>n1</sub> &hellip; label<sub>njn</sub> case e<sub>n</sub>:
1532 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub> k</sub></i> are not 1551 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub> k</sub></i> are not
1533 * compile-time constants, for all <i>1 &lt;= k &lt;= n</i>. 1552 * compile-time constants, for all <i>1 &lt;= k &lt;= n</i>.
1534 */ 1553 */
1535 static final CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = new CompileTi meErrorCode.con1('NON_CONSTANT_CASE_EXPRESSION', 95, "Case expressions must be c onstant"); 1554 static final CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = new CompileTi meErrorCode.con1('NON_CONSTANT_CASE_EXPRESSION', 98, "Case expressions must be c onstant");
1536 1555
1537 /** 1556 /**
1538 * 6.2.2 Optional Formals: It is a compile-time error if the default value of an optional 1557 * 6.2.2 Optional Formals: It is a compile-time error if the default value of an optional
1539 * parameter is not a compile-time constant. 1558 * parameter is not a compile-time constant.
1540 */ 1559 */
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"); 1560 static final CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = new CompileTime ErrorCode.con1('NON_CONSTANT_DEFAULT_VALUE', 99, "Default values of an optional parameter must be constant");
1542 1561
1543 /** 1562 /**
1544 * 12.6 Lists: It is a compile time error if an element of a constant list lit eral is not a 1563 * 12.6 Lists: It is a compile time error if an element of a constant list lit eral is not a
1545 * compile-time constant. 1564 * compile-time constant.
1546 */ 1565 */
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"); 1566 static final CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = new CompileTimeE rrorCode.con1('NON_CONSTANT_LIST_ELEMENT', 100, "'const' lists must have all con stant values");
1548 1567
1549 /** 1568 /**
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 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
1551 * literal is not a compile-time constant. 1570 * literal is not a compile-time constant.
1552 */ 1571 */
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"); 1572 static final CompileTimeErrorCode NON_CONSTANT_MAP_KEY = new CompileTimeErrorC ode.con1('NON_CONSTANT_MAP_KEY', 101, "The keys in a map must be constant");
1554 1573
1555 /** 1574 /**
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 1575 * 12.7 Maps: It is a compile time error if either a key or a value of an entr y in a constant map
1557 * literal is not a compile-time constant. 1576 * literal is not a compile-time constant.
1558 */ 1577 */
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"); 1578 static final CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = new CompileTimeErro rCode.con1('NON_CONSTANT_MAP_VALUE', 102, "The values in a 'const' map must be c onstant");
1560 1579
1561 /** 1580 /**
1562 * 11 Metadata: Metadata consists of a series of annotations, each of which be gin with the 1581 * 11 Metadata: Metadata consists of a series of annotations, each of which be gin with the
1563 * character @, followed by a constant expression that must be either a refere nce to a 1582 * character @, followed by a constant expression that must be either a refere nce to a
1564 * compile-time constant variable, or a call to a constant constructor. 1583 * compile-time constant variable, or a call to a constant constructor.
1565 */ 1584 */
1566 static final CompileTimeErrorCode NON_CONSTANT_ANNOTATION_CONSTRUCTOR = new Co mpileTimeErrorCode.con1('NON_CONSTANT_ANNOTATION_CONSTRUCTOR', 100, "Annotation creation can use only 'const' constructor"); 1585 static final CompileTimeErrorCode NON_CONSTANT_ANNOTATION_CONSTRUCTOR = new Co mpileTimeErrorCode.con1('NON_CONSTANT_ANNOTATION_CONSTRUCTOR', 103, "Annotation creation can use only 'const' constructor");
1567 1586
1568 /** 1587 /**
1569 * 7.6.3 Constant Constructors: Any expression that appears within the initial izer list of a 1588 * 7.6.3 Constant Constructors: Any expression that appears within the initial izer list of a
1570 * constant constructor must be a potentially constant expression, or a compil e-time error occurs. 1589 * constant constructor must be a potentially constant expression, or a compil e-time error occurs.
1571 */ 1590 */
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"); 1591 static final CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = new Comp ileTimeErrorCode.con1('NON_CONSTANT_VALUE_IN_INITIALIZER', 104, "Initializer exp ressions in constant constructors must be constants");
1573 1592
1574 /** 1593 /**
1575 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i> or if <i>m > n</i>. 1594 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i> or if <i>m > n</i>.
1576 * 1595 *
1577 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an 1596 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an
1578 * uncaught exception being thrown. 1597 * uncaught exception being thrown.
1579 * 1598 *
1580 * @param requiredCount the expected number of required arguments 1599 * @param requiredCount the expected number of required arguments
1581 * @param argumentCount the actual number of positional arguments given 1600 * @param argumentCount the actual number of positional arguments given
1582 */ 1601 */
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"); 1602 static final CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new CompileT imeErrorCode.con1('NOT_ENOUGH_REQUIRED_ARGUMENTS', 105, "%d required argument(s) expected, but %d found");
1584 1603
1585 /** 1604 /**
1586 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super initializer appears 1605 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super initializer appears
1587 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ e constructor. It is 1606 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ e constructor. It is
1588 * a compile-time error if class <i>S</i> does not declare a generative constr uctor named <i>S</i> 1607 * a compile-time error if class <i>S</i> does not declare a generative constr uctor named <i>S</i>
1589 * (respectively <i>S.id</i>) 1608 * (respectively <i>S.id</i>)
1590 */ 1609 */
1591 static final CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR = new CompileTime ErrorCode.con1('NON_GENERATIVE_CONSTRUCTOR', 103, "The generative constructor '% s' expected, but factory found"); 1610 static final CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR = new CompileTime ErrorCode.con1('NON_GENERATIVE_CONSTRUCTOR', 106, "The generative constructor '% s' expected, but factory found");
1592 1611
1593 /** 1612 /**
1594 * 7.9 Superclasses: It is a compile-time error to specify an extends clause f or class Object. 1613 * 7.9 Superclasses: It is a compile-time error to specify an extends clause f or class Object.
1595 */ 1614 */
1596 static final CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = new Com pileTimeErrorCode.con1('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 104, ""); 1615 static final CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = new Com pileTimeErrorCode.con1('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 107, "");
1597 1616
1598 /** 1617 /**
1599 * 7.1.1 Operators: It is a compile-time error to declare an optional paramete r in an operator. 1618 * 7.1.1 Operators: It is a compile-time error to declare an optional paramete r in an operator.
1600 */ 1619 */
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"); 1620 static final CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = new Compile TimeErrorCode.con1('OPTIONAL_PARAMETER_IN_OPERATOR', 108, "Optional parameters a re not allowed when defining an operator");
1602 1621
1603 /** 1622 /**
1604 * 14.3 Parts: It is a compile time error if the contents of the URI are not a valid part 1623 * 14.3 Parts: It is a compile time error if the contents of the URI are not a valid part
1605 * declaration. 1624 * declaration.
1606 * 1625 *
1607 * @param uri the uri pointing to a non-library declaration 1626 * @param uri the uri pointing to a non-library declaration
1608 */ 1627 */
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"); 1628 static final CompileTimeErrorCode PART_OF_NON_PART = new CompileTimeErrorCode. con1('PART_OF_NON_PART', 109, "The included part '%s' must have a part-of direct ive");
1610 1629
1611 /** 1630 /**
1612 * 14.1 Imports: It is a compile-time error if the current library declares a top-level member 1631 * 14.1 Imports: It is a compile-time error if the current library declares a top-level member
1613 * named <i>p</i>. 1632 * named <i>p</i>.
1614 */ 1633 */
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"); 1634 static final CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = new CompileTimeErrorCode.con1('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 110, "The nam e '%s' is already used as an import prefix and cannot be used to name a top-leve l element");
1616 1635
1617 /** 1636 /**
1618 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named o ptional parameter 1637 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named o ptional parameter
1619 * begins with an '_' character. 1638 * begins with an '_' character.
1620 */ 1639 */
1621 static final CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = new CompileTime ErrorCode.con1('PRIVATE_OPTIONAL_PARAMETER', 108, "Named optional parameters can not start with an underscore"); 1640 static final CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = new CompileTime ErrorCode.con1('PRIVATE_OPTIONAL_PARAMETER', 111, "Named optional parameters can not start with an underscore");
1622 1641
1623 /** 1642 /**
1624 * 12.1 Constants: It is a compile-time error if the value of a compile-time c onstant expression 1643 * 12.1 Constants: It is a compile-time error if the value of a compile-time c onstant expression
1625 * depends on itself. 1644 * depends on itself.
1626 */ 1645 */
1627 static final CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = new Compil eTimeErrorCode.con1('RECURSIVE_COMPILE_TIME_CONSTANT', 109, ""); 1646 static final CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = new Compil eTimeErrorCode.con1('RECURSIVE_COMPILE_TIME_CONSTANT', 112, "");
1628 1647
1629 /** 1648 /**
1630 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its 1649 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its
1631 * only action is to invoke another generative constructor. 1650 * only action is to invoke another generative constructor.
1632 * 1651 *
1633 * TODO(scheglov) review this later, there are no explicit "it is a compile-ti me error" in 1652 * TODO(scheglov) review this later, there are no explicit "it is a compile-ti me error" in
1634 * specification. But it was added to the co19 and there is same error for fac tories. 1653 * specification. But it was added to the co19 and there is same error for fac tories.
1635 * 1654 *
1636 * https://code.google.com/p/dart/issues/detail?id=954 1655 * https://code.google.com/p/dart/issues/detail?id=954
1637 */ 1656 */
1638 static final CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = new Compile TimeErrorCode.con1('RECURSIVE_CONSTRUCTOR_REDIRECT', 110, "Cycle in redirecting generative constructors"); 1657 static final CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = new Compile TimeErrorCode.con1('RECURSIVE_CONSTRUCTOR_REDIRECT', 113, "Cycle in redirecting generative constructors");
1639 1658
1640 /** 1659 /**
1641 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr uctor redirects to 1660 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr uctor redirects to
1642 * itself, either directly or indirectly via a sequence of redirections. 1661 * itself, either directly or indirectly via a sequence of redirections.
1643 */ 1662 */
1644 static final CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = new CompileTime ErrorCode.con1('RECURSIVE_FACTORY_REDIRECT', 111, "Cycle in redirecting factory constructors"); 1663 static final CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = new CompileTime ErrorCode.con1('RECURSIVE_FACTORY_REDIRECT', 114, "Cycle in redirecting factory constructors");
1645 1664
1646 /** 1665 /**
1647 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas s <i>C</i> is a 1666 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas s <i>C</i> is a
1648 * superinterface of itself. 1667 * superinterface of itself.
1649 * 1668 *
1650 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself. 1669 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself.
1651 * 1670 *
1652 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super class of itself. 1671 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super class of itself.
1653 * 1672 *
1654 * @param className the name of the class that implements itself recursively 1673 * @param className the name of the class that implements itself recursively
1655 * @param strImplementsPath a string representation of the implements loop 1674 * @param strImplementsPath a string representation of the implements loop
1656 */ 1675 */
1657 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = new Compil eTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE', 112, "'%s' cannot be a su perinterface of itself: %s"); 1676 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = new Compil eTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE', 115, "'%s' cannot be a su perinterface of itself: %s");
1658 1677
1659 /** 1678 /**
1660 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas s <i>C</i> is a 1679 * 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. 1680 * superinterface of itself.
1662 * 1681 *
1663 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself. 1682 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself.
1664 * 1683 *
1665 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super class of itself. 1684 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super class of itself.
1666 * 1685 *
1667 * @param className the name of the class that implements itself recursively 1686 * @param className the name of the class that implements itself recursively
1668 */ 1687 */
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"); 1688 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EX TENDS = new CompileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE _EXTENDS', 116, "'%s' cannot extend itself");
1670 1689
1671 /** 1690 /**
1672 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas s <i>C</i> is a 1691 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas s <i>C</i> is a
1673 * superinterface of itself. 1692 * superinterface of itself.
1674 * 1693 *
1675 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself. 1694 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself.
1676 * 1695 *
1677 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super class of itself. 1696 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super class of itself.
1678 * 1697 *
1679 * @param className the name of the class that implements itself recursively 1698 * @param className the name of the class that implements itself recursively
1680 */ 1699 */
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"); 1700 static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IM PLEMENTS = new CompileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE_BASE_C ASE_IMPLEMENTS', 117, "'%s' cannot implement itself");
1682 1701
1683 /** 1702 /**
1684 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th e const modifier but 1703 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th e const modifier but
1685 * <i>k'</i> is not a constant constructor. 1704 * <i>k'</i> is not a constant constructor.
1686 */ 1705 */
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"); 1706 static final CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = new Comp ileTimeErrorCode.con1('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 118, "Constant factor y constructor cannot delegate to a non-constant constructor");
1688 1707
1689 /** 1708 /**
1690 * 13.3 Local Variable Declaration: It is a compile-time error if <i>e</i> ref ers to the name 1709 * 13.3 Local Variable Declaration: It is a compile-time error if <i>e</i> ref ers to the name
1691 * <i>v</i> or the name <i>v=</i>. 1710 * <i>v</i> or the name <i>v=</i>.
1692 */ 1711 */
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"); 1712 static final CompileTimeErrorCode REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZE R = new CompileTimeErrorCode.con1('REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER ', 119, "The name '%s' cannot be referenced in the initializer of a variable wit h the same name");
1694 1713
1695 /** 1714 /**
1696 * 12.8.1 Rethrow: It is a compile-time error if an expression of the form <i> rethrow;</i> is not 1715 * 12.8.1 Rethrow: It is a compile-time error if an expression of the form <i> rethrow;</i> is not
1697 * enclosed within a on-catch clause. 1716 * enclosed within a on-catch clause.
1698 */ 1717 */
1699 static final CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = new CompileTimeError Code.con1('RETHROW_OUTSIDE_CATCH', 117, "rethrow must be inside of a catch claus e"); 1718 static final CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = new CompileTimeError Code.con1('RETHROW_OUTSIDE_CATCH', 120, "rethrow must be inside of a catch claus e");
1700 1719
1701 /** 1720 /**
1702 * 13.11 Return: It is a compile-time error if a return statement of the form <i>return e;</i> 1721 * 13.11 Return: It is a compile-time error if a return statement of the form <i>return e;</i>
1703 * appears in a generative constructor. 1722 * appears in a generative constructor.
1704 */ 1723 */
1705 static final CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = new Compi leTimeErrorCode.con1('RETURN_IN_GENERATIVE_CONSTRUCTOR', 118, "Constructors cann ot return a value"); 1724 static final CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = new Compi leTimeErrorCode.con1('RETURN_IN_GENERATIVE_CONSTRUCTOR', 121, "Constructors cann ot return a value");
1706 1725
1707 /** 1726 /**
1708 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form 1727 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form
1709 * <i>super.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n +1</sub>, &hellip; 1728 * <i>super.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n +1</sub>, &hellip;
1710 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe r method invocation 1729 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe r method invocation
1711 * occurs in a top-level function or variable initializer, in an instance vari able initializer or 1730 * occurs in a top-level function or variable initializer, in an instance vari able initializer or
1712 * initializer list, in class Object, in a factory constructor, or in a static method or variable 1731 * initializer list, in class Object, in a factory constructor, or in a static method or variable
1713 * initializer. 1732 * initializer.
1714 */ 1733 */
1715 static final CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = new CompileTimeEr rorCode.con1('SUPER_IN_INVALID_CONTEXT', 119, "Invalid context for 'super' invoc ation"); 1734 static final CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = new CompileTimeEr rorCode.con1('SUPER_IN_INVALID_CONTEXT', 122, "Invalid context for 'super' invoc ation");
1716 1735
1717 /** 1736 /**
1718 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its 1737 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its
1719 * only action is to invoke another generative constructor. 1738 * only action is to invoke another generative constructor.
1720 */ 1739 */
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"); 1740 static final CompileTimeErrorCode SUPER_IN_REDIRECTING_CONSTRUCTOR = new Compi leTimeErrorCode.con1('SUPER_IN_REDIRECTING_CONSTRUCTOR', 123, "The redirecting c onstructor cannot have a 'super' initializer");
1722 1741
1723 /** 1742 /**
1724 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile-time 1743 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile-time
1725 * error if a generative constructor of class Object includes a superinitializ er. 1744 * error if a generative constructor of class Object includes a superinitializ er.
1726 */ 1745 */
1727 static final CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = new CompileTim eErrorCode.con1('SUPER_INITIALIZER_IN_OBJECT', 121, ""); 1746 static final CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = new CompileTim eErrorCode.con1('SUPER_INITIALIZER_IN_OBJECT', 124, "");
1728 1747
1729 /** 1748 /**
1730 * 12.11 Instance Creation: It is a static type warning if any of the type arg uments to a 1749 * 12.11 Instance Creation: It is a static type warning if any of the type arg uments to a
1731 * constructor of a generic type <i>G</i> invoked by a new expression or a con stant object 1750 * constructor of a generic type <i>G</i> invoked by a new expression or a con stant object
1732 * expression are not subtypes of the bounds of the corresponding formal type parameters of 1751 * expression are not subtypes of the bounds of the corresponding formal type parameters of
1733 * <i>G</i>. 1752 * <i>G</i>.
1734 * 1753 *
1735 * 12.11.1 New: If T is malformed a dynamic error occurs. In checked mode, if T is mal-bounded a 1754 * 12.11.1 New: If T is malformed a dynamic error occurs. In checked mode, if T is mal-bounded a
1736 * dynamic error occurs. 1755 * dynamic error occurs.
1737 * 1756 *
1738 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time constant would raise 1757 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time constant would raise
1739 * an exception. 1758 * an exception.
1740 * 1759 *
1741 * @param boundedTypeName the name of the type used in the instance creation t hat should be 1760 * @param boundedTypeName the name of the type used in the instance creation t hat should be
1742 * limited by the bound as specified in the class declaration 1761 * limited by the bound as specified in the class declaration
1743 * @param boundingTypeName the name of the bounding type 1762 * @param boundingTypeName the name of the bounding type
1744 * @see StaticTypeWarningCode#TYPE_ARGUMENT_NOT_MATCHING_BOUNDS 1763 * @see StaticTypeWarningCode#TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
1745 */ 1764 */
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'"); 1765 static final CompileTimeErrorCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = new Comp ileTimeErrorCode.con1('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 125, "'%s' does not e xtend '%s'");
1747 1766
1748 /** 1767 /**
1749 * 15.3.1 Typedef: It is a compile-time error if a typedef refers to itself vi a a chain of 1768 * 15.3.1 Typedef: It is a compile-time error if a typedef refers to itself vi a a chain of
1750 * references that does not include a class declaration. 1769 * references that does not include a class declaration.
1751 */ 1770 */
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"); 1771 static final CompileTimeErrorCode TYPE_ALIAS_CANNOT_REFERENCE_ITSELF = new Com pileTimeErrorCode.con1('TYPE_ALIAS_CANNOT_REFERENCE_ITSELF', 126, "Type alias ca n reference itself only via the bounds of its generic parameters");
1753 1772
1754 /** 1773 /**
1755 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access ible in the current 1774 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access ible in the current
1756 * scope, optionally followed by type arguments. 1775 * scope, optionally followed by type arguments.
1757 */ 1776 */
1758 static final CompileTimeErrorCode UNDEFINED_CLASS = new CompileTimeErrorCode.c on1('UNDEFINED_CLASS', 124, "Undefined class '%s'"); 1777 static final CompileTimeErrorCode UNDEFINED_CLASS = new CompileTimeErrorCode.c on1('UNDEFINED_CLASS', 127, "Undefined class '%s'");
1759 1778
1760 /** 1779 /**
1761 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super initializer appears 1780 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super initializer appears
1762 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ e constructor. It is 1781 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ e constructor. It is
1763 * a compile-time error if class <i>S</i> does not declare a generative constr uctor named <i>S</i> 1782 * a compile-time error if class <i>S</i> does not declare a generative constr uctor named <i>S</i>
1764 * (respectively <i>S.id</i>) 1783 * (respectively <i>S.id</i>)
1765 */ 1784 */
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'"); 1785 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = new C ompileTimeErrorCode.con1('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 128, "The class '%s' does not have a generative constructor '%s'");
1767 1786
1768 /** 1787 /**
1769 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super initializer appears 1788 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super initializer appears
1770 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ e constructor. It is 1789 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ e constructor. It is
1771 * a compile-time error if class <i>S</i> does not declare a generative constr uctor named <i>S</i> 1790 * a compile-time error if class <i>S</i> does not declare a generative constr uctor named <i>S</i>
1772 * (respectively <i>S.id</i>) 1791 * (respectively <i>S.id</i>)
1773 */ 1792 */
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"); 1793 static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT = new CompileTimeErrorCode.con1('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT', 129, "The class '%s' does not have a default generative constructor");
1775 1794
1776 /** 1795 /**
1777 * 12.14.3 Unqualified Invocation: If there exists a lexically visible declara tion named 1796 * 12.14.3 Unqualified Invocation: If there exists a lexically visible declara tion named
1778 * <i>id</i>, let <i>f<sub>id</sub></i> be the innermost such declaration. The n: [skip]. 1797 * <i>id</i>, let <i>f<sub>id</sub></i> be the innermost such declaration. The n: [skip].
1779 * Otherwise, <i>i</i> is equivalent to <b>this</b>.<i>id</i>(<i>a<sub>1</sub> </i>; ... 1798 * Otherwise, <i>i</i> is equivalent to <b>this</b>.<i>id</i>(<i>a<sub>1</sub> </i>; ...
1780 * <i>x<sub>n+k</sub></i> : <i>a<sub>n+k</sub></i>). 1799 * <i>x<sub>n+k</sub></i> : <i>a<sub>n+k</sub></i>).
1781 * 1800 *
1782 * @param methodName the name of the method that is undefined 1801 * @param methodName the name of the method that is undefined
1783 */ 1802 */
1784 static final CompileTimeErrorCode UNDEFINED_FUNCTION = new CompileTimeErrorCod e.con1('UNDEFINED_FUNCTION', 127, "The function '%s' is not defined"); 1803 static final CompileTimeErrorCode UNDEFINED_FUNCTION = new CompileTimeErrorCod e.con1('UNDEFINED_FUNCTION', 130, "The function '%s' is not defined");
1785 1804
1786 /** 1805 /**
1787 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>, <i>1<=i<=l</i>, 1806 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>, <i>1<=i<=l</i>,
1788 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i > ... 1807 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i > ...
1789 * <i>p<sub>n+k</sub></i>} or a static warning occurs. 1808 * <i>p<sub>n+k</sub></i>} or a static warning occurs.
1790 * 1809 *
1791 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an 1810 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an
1792 * uncaught exception being thrown. 1811 * uncaught exception being thrown.
1793 * 1812 *
1794 * @param name the name of the requested named parameter 1813 * @param name the name of the requested named parameter
1795 */ 1814 */
1796 static final CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER = new CompileTimeE rrorCode.con1('UNDEFINED_NAMED_PARAMETER', 128, "The named parameter '%s' is not defined"); 1815 static final CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER = new CompileTimeE rrorCode.con1('UNDEFINED_NAMED_PARAMETER', 131, "The named parameter '%s' is not defined");
1797 1816
1798 /** 1817 /**
1799 * 14.2 Exports: It is a compile-time error if the compilation unit found at t he specified URI is 1818 * 14.2 Exports: It is a compile-time error if the compilation unit found at t he specified URI is
1800 * not a library declaration. 1819 * not a library declaration.
1801 * 1820 *
1802 * 14.1 Imports: It is a compile-time error if the compilation unit found at t he specified URI is 1821 * 14.1 Imports: It is a compile-time error if the compilation unit found at t he specified URI is
1803 * not a library declaration. 1822 * not a library declaration.
1804 * 1823 *
1805 * 14.3 Parts: It is a compile time error if the contents of the URI are not a valid part 1824 * 14.3 Parts: It is a compile time error if the contents of the URI are not a valid part
1806 * declaration. 1825 * declaration.
1807 * 1826 *
1808 * @param uri the URI pointing to a non-existent file 1827 * @param uri the URI pointing to a non-existent file
1809 * @see #INVALID_URI 1828 * @see #INVALID_URI
1810 */ 1829 */
1811 static final CompileTimeErrorCode URI_DOES_NOT_EXIST = new CompileTimeErrorCod e.con1('URI_DOES_NOT_EXIST', 129, "Target of URI does not exist: '%s'"); 1830 static final CompileTimeErrorCode URI_DOES_NOT_EXIST = new CompileTimeErrorCod e.con1('URI_DOES_NOT_EXIST', 132, "Target of URI does not exist: '%s'");
1812 1831
1813 /** 1832 /**
1814 * 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time constant, or if 1833 * 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time constant, or if
1815 * <i>x</i> involves string interpolation. 1834 * <i>x</i> involves string interpolation.
1816 * 1835 *
1817 * 14.3 Parts: It is a compile-time error if <i>s</i> is not a compile-time co nstant, or if 1836 * 14.3 Parts: It is a compile-time error if <i>s</i> is not a compile-time co nstant, or if
1818 * <i>s</i> involves string interpolation. 1837 * <i>s</i> involves string interpolation.
1819 * 1838 *
1820 * 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that d escribes a URI is 1839 * 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that d escribes a URI is
1821 * not a compile-time constant, or if <i>x</i> involves string interpolation. 1840 * not a compile-time constant, or if <i>x</i> involves string interpolation.
1822 */ 1841 */
1823 static final CompileTimeErrorCode URI_WITH_INTERPOLATION = new CompileTimeErro rCode.con1('URI_WITH_INTERPOLATION', 130, "URIs cannot use string interpolation" ); 1842 static final CompileTimeErrorCode URI_WITH_INTERPOLATION = new CompileTimeErro rCode.con1('URI_WITH_INTERPOLATION', 133, "URIs cannot use string interpolation" );
1824 1843
1825 /** 1844 /**
1826 * 7.1.1 Operators: It is a compile-time error if the arity of the user-declar ed operator []= is 1845 * 7.1.1 Operators: It is a compile-time error if the arity of the user-declar ed operator []= is
1827 * not 2. It is a compile time error if the arity of a user-declared operator with one of the 1846 * not 2. It is a compile time error if the arity of a user-declared operator with one of the
1828 * names: &lt;, &gt;, &lt;=, &gt;=, ==, +, /, ~/, *, %, |, ^, &, &lt;&lt;, &gt ;&gt;, [] is not 1. 1847 * names: &lt;, &gt;, &lt;=, &gt;=, ==, +, /, ~/, *, %, |, ^, &, &lt;&lt;, &gt ;&gt;, [] is not 1.
1829 * It is a compile time error if the arity of the user-declared operator - is not 0 or 1. It is a 1848 * It is a compile time error if the arity of the user-declared operator - is not 0 or 1. It is a
1830 * compile time error if the arity of the user-declared operator ~ is not 0. 1849 * compile time error if the arity of the user-declared operator ~ is not 0.
1831 * 1850 *
1832 * @param operatorName the name of the declared operator 1851 * @param operatorName the name of the declared operator
1833 * @param expectedNumberOfParameters the number of parameters expected 1852 * @param expectedNumberOfParameters the number of parameters expected
1834 * @param actualNumberOfParameters the number of parameters found in the opera tor declaration 1853 * @param actualNumberOfParameters the number of parameters found in the opera tor declaration
1835 */ 1854 */
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"); 1855 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = ne w CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 134, "Ope rator '%s' should declare exactly %d parameter(s), but %d found");
1837 1856
1838 /** 1857 /**
1839 * 7.1.1 Operators: It is a compile time error if the arity of the user-declar ed operator - is not 1858 * 7.1.1 Operators: It is a compile time error if the arity of the user-declar ed operator - is not
1840 * 0 or 1. 1859 * 0 or 1.
1841 * 1860 *
1842 * @param actualNumberOfParameters the number of parameters found in the opera tor declaration 1861 * @param actualNumberOfParameters the number of parameters found in the opera tor declaration
1843 */ 1862 */
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"); 1863 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINU S = new CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS ', 135, "Operator '-' should declare 0 or 1 parameter, but %d found");
1845 1864
1846 /** 1865 /**
1847 * 7.3 Setters: It is a compile-time error if a setter's formal parameter list does not include 1866 * 7.3 Setters: It is a compile-time error if a setter's formal parameter list does not include
1848 * exactly one required formal parameter <i>p</i>. 1867 * exactly one required formal parameter <i>p</i>.
1849 */ 1868 */
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"); 1869 static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = new CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 136, "Setters should declare exactly one required parameter");
1851 static final List<CompileTimeErrorCode> values = [ 1870 static final List<CompileTimeErrorCode> values = [
1852 AMBIGUOUS_EXPORT, 1871 AMBIGUOUS_EXPORT,
1853 ARGUMENT_DEFINITION_TEST_NON_PARAMETER, 1872 ARGUMENT_DEFINITION_TEST_NON_PARAMETER,
1854 BUILT_IN_IDENTIFIER_AS_TYPE, 1873 BUILT_IN_IDENTIFIER_AS_TYPE,
1855 BUILT_IN_IDENTIFIER_AS_TYPE_NAME, 1874 BUILT_IN_IDENTIFIER_AS_TYPE_NAME,
1856 BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, 1875 BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME,
1857 BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME, 1876 BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME,
1858 CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, 1877 CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS,
1859 COMPILE_TIME_CONSTANT_RAISES_EXCEPTION, 1878 COMPILE_TIME_CONSTANT_RAISES_EXCEPTION,
1860 CONFLICTING_GETTER_AND_METHOD, 1879 CONFLICTING_GETTER_AND_METHOD,
1861 CONFLICTING_METHOD_AND_GETTER, 1880 CONFLICTING_METHOD_AND_GETTER,
1862 CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, 1881 CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD,
1863 CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD, 1882 CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD,
1883 CONFLICTING_TYPE_VARIABLE_AND_CLASS,
1884 CONFLICTING_TYPE_VARIABLE_AND_MEMBER,
1864 CONST_CONSTRUCTOR_THROWS_EXCEPTION, 1885 CONST_CONSTRUCTOR_THROWS_EXCEPTION,
1865 CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER, 1886 CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER,
1866 CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, 1887 CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD,
1867 CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE, 1888 CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE,
1868 CONST_FORMAL_PARAMETER, 1889 CONST_FORMAL_PARAMETER,
1869 CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, 1890 CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
1870 CONST_INSTANCE_FIELD, 1891 CONST_INSTANCE_FIELD,
1892 CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS,
1871 CONST_NOT_INITIALIZED, 1893 CONST_NOT_INITIALIZED,
1872 CONST_EVAL_TYPE_BOOL, 1894 CONST_EVAL_TYPE_BOOL,
1873 CONST_EVAL_TYPE_BOOL_NUM_STRING, 1895 CONST_EVAL_TYPE_BOOL_NUM_STRING,
1874 CONST_EVAL_TYPE_INT, 1896 CONST_EVAL_TYPE_INT,
1875 CONST_EVAL_TYPE_NUM, 1897 CONST_EVAL_TYPE_NUM,
1876 CONST_EVAL_THROWS_EXCEPTION, 1898 CONST_EVAL_THROWS_EXCEPTION,
1877 CONST_EVAL_THROWS_IDBZE, 1899 CONST_EVAL_THROWS_IDBZE,
1878 CONST_WITH_INVALID_TYPE_PARAMETERS, 1900 CONST_WITH_INVALID_TYPE_PARAMETERS,
1879 CONST_WITH_NON_CONST, 1901 CONST_WITH_NON_CONST,
1880 CONST_WITH_NON_CONSTANT_ARGUMENT, 1902 CONST_WITH_NON_CONSTANT_ARGUMENT,
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
2209 */ 2231 */
2210 static final StaticWarningCode COMMENT_REFERENCE_URI_NOT_LIBRARY = new StaticW arningCode.con1('COMMENT_REFERENCE_URI_NOT_LIBRARY', 11, ""); 2232 static final StaticWarningCode COMMENT_REFERENCE_URI_NOT_LIBRARY = new StaticW arningCode.con1('COMMENT_REFERENCE_URI_NOT_LIBRARY', 11, "");
2211 2233
2212 /** 2234 /**
2213 * 7.4 Abstract Instance Members: It is a static warning if an abstract member is declared or 2235 * 7.4 Abstract Instance Members: It is a static warning if an abstract member is declared or
2214 * inherited in a concrete class. 2236 * inherited in a concrete class.
2215 */ 2237 */
2216 static final StaticWarningCode CONCRETE_CLASS_WITH_ABSTRACT_MEMBER = new Stati cWarningCode.con1('CONCRETE_CLASS_WITH_ABSTRACT_MEMBER', 12, "'%s' must have a m ethod body because '%s' is not abstract"); 2238 static final StaticWarningCode CONCRETE_CLASS_WITH_ABSTRACT_MEMBER = new Stati cWarningCode.con1('CONCRETE_CLASS_WITH_ABSTRACT_MEMBER', 12, "'%s' must have a m ethod body because '%s' is not abstract");
2217 2239
2218 /** 2240 /**
2241 * 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i >N</i> would be
2242 * introduced into the top level scope of <i>L</i> by an import from a library whose URI begins
2243 * with <i>dart:</i> and an import from a library whose URI does not begin wit h <i>dart:</i>:
2244 *
2245 * * The import from <i>dart:</i> is implicitly extended by a hide N clause.
2246 * * A static warning is issued.
2247 *
2248 *
2249 * @param ambiguousName the ambiguous name
2250 * @param sdkLibraryName the name of the dart: library that the element is fou nd
2251 * @param otherLibraryName the name of the non-dart: library that the element is found
2252 */
2253 static final StaticWarningCode CONFLICTING_DART_IMPORT = new StaticWarningCode .con1('CONFLICTING_DART_IMPORT', 13, "Element '%s' from SDK library '%s' is impl icitly hidden by '%s'");
2254
2255 /**
2219 * 7.2 Getters: It is a static warning if a class <i>C</i> declares an instanc e getter named 2256 * 7.2 Getters: It is a static warning if a class <i>C</i> declares an instanc e getter named
2220 * <i>v</i> and an accessible static member named <i>v</i> or <i>v=</i> is dec lared in a 2257 * <i>v</i> and an accessible static member named <i>v</i> or <i>v=</i> is dec lared in a
2221 * superclass of <i>C</i>. 2258 * superclass of <i>C</i>.
2222 * 2259 *
2223 * @param superName the name of the super class declaring a static member 2260 * @param superName the name of the super class declaring a static member
2224 */ 2261 */
2225 static final StaticWarningCode CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMB ER = new StaticWarningCode.con1('CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMB ER', 13, "Superclass '%s' declares static member with the same name"); 2262 static final StaticWarningCode CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMB ER = new StaticWarningCode.con1('CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMB ER', 14, "Superclass '%s' declares static member with the same name");
2226 2263
2227 /** 2264 /**
2228 * 7.3 Setters: It is a static warning if a class <i>C</i> declares an instanc e setter named 2265 * 7.3 Setters: It is a static warning if a class <i>C</i> declares an instanc e setter named
2229 * <i>v=</i> and an accessible static member named <i>v=</i> or <i>v</i> is de clared in a 2266 * <i>v=</i> and an accessible static member named <i>v=</i> or <i>v</i> is de clared in a
2230 * superclass of <i>C</i>. 2267 * superclass of <i>C</i>.
2231 * 2268 *
2232 * @param superName the name of the super class declaring a static member 2269 * @param superName the name of the super class declaring a static member
2233 */ 2270 */
2234 static final StaticWarningCode CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMB ER = new StaticWarningCode.con1('CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMB ER', 14, "Superclass '%s' declares static member with the same name"); 2271 static final StaticWarningCode CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMB ER = new StaticWarningCode.con1('CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMB ER', 15, "Superclass '%s' declares static member with the same name");
2235 2272
2236 /** 2273 /**
2237 * 7.2 Getters: It is a static warning if a class declares a static getter nam ed <i>v</i> and also 2274 * 7.2 Getters: It is a static warning if a class declares a static getter nam ed <i>v</i> and also
2238 * has a non-static setter named <i>v=</i>. 2275 * has a non-static setter named <i>v=</i>.
2239 */ 2276 */
2240 static final StaticWarningCode CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER = new StaticWarningCode.con1('CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER', 15, "Class '%s' declares non-static setter with the same name"); 2277 static final StaticWarningCode CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER = new StaticWarningCode.con1('CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER', 16, "Class '%s' declares non-static setter with the same name");
2241 2278
2242 /** 2279 /**
2243 * 7.3 Setters: It is a static warning if a class declares a static setter nam ed <i>v=</i> and 2280 * 7.3 Setters: It is a static warning if a class declares a static setter nam ed <i>v=</i> and
2244 * also has a non-static member named <i>v</i>. 2281 * also has a non-static member named <i>v</i>.
2245 */ 2282 */
2246 static final StaticWarningCode CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER = new StaticWarningCode.con1('CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER', 16, "Class '%s' declares non-static member with the same name"); 2283 static final StaticWarningCode CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER = new StaticWarningCode.con1('CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER', 17, "Class '%s' declares non-static member with the same name");
2247 2284
2248 /** 2285 /**
2249 * 12.11.2 Const: Given an instance creation expression of the form <i>const q (a<sub>1</sub>, 2286 * 12.11.2 Const: Given an instance creation expression of the form <i>const q (a<sub>1</sub>,
2250 * &hellip; a<sub>n</sub>)</i> it is a static warning if <i>q</i> is the const ructor of an 2287 * &hellip; a<sub>n</sub>)</i> it is a static warning if <i>q</i> is the const ructor of an
2251 * abstract class but <i>q</i> is not a factory constructor. 2288 * abstract class but <i>q</i> is not a factory constructor.
2252 */ 2289 */
2253 static final StaticWarningCode CONST_WITH_ABSTRACT_CLASS = new StaticWarningCo de.con1('CONST_WITH_ABSTRACT_CLASS', 17, "Abstract classes cannot be created wit h a 'const' expression"); 2290 static final StaticWarningCode CONST_WITH_ABSTRACT_CLASS = new StaticWarningCo de.con1('CONST_WITH_ABSTRACT_CLASS', 18, "Abstract classes cannot be created wit h a 'const' expression");
2254 2291
2255 /** 2292 /**
2256 * 12.7 Maps: It is a static warning if the values of any two keys in a map li teral are equal. 2293 * 12.7 Maps: It is a static warning if the values of any two keys in a map li teral are equal.
2257 */ 2294 */
2258 static final StaticWarningCode EQUAL_KEYS_IN_MAP = new StaticWarningCode.con1( 'EQUAL_KEYS_IN_MAP', 18, "Keys in a map cannot be equal"); 2295 static final StaticWarningCode EQUAL_KEYS_IN_MAP = new StaticWarningCode.con1( 'EQUAL_KEYS_IN_MAP', 19, "Keys in a map cannot be equal");
2259 2296
2260 /** 2297 /**
2261 * 14.2 Exports: It is a static warning to export two different libraries with the same name. 2298 * 14.2 Exports: It is a static warning to export two different libraries with the same name.
2262 * 2299 *
2263 * @param uri1 the uri pointing to a first library 2300 * @param uri1 the uri pointing to a first library
2264 * @param uri2 the uri pointing to a second library 2301 * @param uri2 the uri pointing to a second library
2265 * @param name the shared name of the exported libraries 2302 * @param name the shared name of the exported libraries
2266 */ 2303 */
2267 static final StaticWarningCode EXPORT_DUPLICATED_LIBRARY_NAME = new StaticWarn ingCode.con1('EXPORT_DUPLICATED_LIBRARY_NAME', 19, "The exported libraries '%s' and '%s' should not have the same name '%s'"); 2304 static final StaticWarningCode EXPORT_DUPLICATED_LIBRARY_NAME = new StaticWarn ingCode.con1('EXPORT_DUPLICATED_LIBRARY_NAME', 20, "The exported libraries '%s' and '%s' should not have the same name '%s'");
2268 2305
2269 /** 2306 /**
2270 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m &lt; h</ i> or if <i>m &gt; 2307 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m &lt; h</ i> or if <i>m &gt;
2271 * n</i>. 2308 * n</i>.
2272 * 2309 *
2273 * @param requiredCount the maximum number of positional arguments 2310 * @param requiredCount the maximum number of positional arguments
2274 * @param argumentCount the actual number of positional arguments given 2311 * @param argumentCount the actual number of positional arguments given
2275 * @see #NOT_ENOUGH_REQUIRED_ARGUMENTS 2312 * @see #NOT_ENOUGH_REQUIRED_ARGUMENTS
2276 */ 2313 */
2277 static final StaticWarningCode EXTRA_POSITIONAL_ARGUMENTS = new StaticWarningC ode.con1('EXTRA_POSITIONAL_ARGUMENTS', 20, "%d positional arguments expected, bu t %d found"); 2314 static final StaticWarningCode EXTRA_POSITIONAL_ARGUMENTS = new StaticWarningC ode.con1('EXTRA_POSITIONAL_ARGUMENTS', 21, "%d positional arguments expected, bu t %d found");
2278 2315
2279 /** 2316 /**
2280 * 5. Variables: It is a static warning if a final instance variable that has been initialized at 2317 * 5. Variables: It is a static warning if a final instance variable that has been initialized at
2281 * its point of declaration is also initialized in a constructor. 2318 * its point of declaration is also initialized in a constructor.
2282 */ 2319 */
2283 static final StaticWarningCode FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATIO N = new StaticWarningCode.con1('FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION ', 21, "Values cannot be set in the constructor if they are final, and have alre ady been set"); 2320 static final StaticWarningCode FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATIO N = new StaticWarningCode.con1('FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION ', 22, "Values cannot be set in the constructor if they are final, and have alre ady been set");
2284 2321
2285 /** 2322 /**
2286 * 5. Variables: It is a static warning if a final instance variable that has been initialized at 2323 * 5. Variables: It is a static warning if a final instance variable that has been initialized at
2287 * its point of declaration is also initialized in a constructor. 2324 * its point of declaration is also initialized in a constructor.
2288 * 2325 *
2289 * @param name the name of the field in question 2326 * @param name the name of the field in question
2290 */ 2327 */
2291 static final StaticWarningCode FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTO R = new StaticWarningCode.con1('FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR ', 22, "'%s' is final and was given a value when it was declared, so it cannot b e set to a new value"); 2328 static final StaticWarningCode FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTO R = new StaticWarningCode.con1('FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR ', 23, "'%s' is final and was given a value when it was declared, so it cannot b e set to a new value");
2292 2329
2293 /** 2330 /**
2294 * 7.6.1 Generative Constructors: Execution of an initializer of the form <b>t his</b>.<i>v</i> = 2331 * 7.6.1 Generative Constructors: Execution of an initializer of the form <b>t his</b>.<i>v</i> =
2295 * <i>e</i> proceeds as follows: First, the expression <i>e</i> is evaluated t o an object 2332 * <i>e</i> proceeds as follows: First, the expression <i>e</i> is evaluated t o an object
2296 * <i>o</i>. Then, the instance variable <i>v</i> of the object denoted by thi s is bound to 2333 * <i>o</i>. Then, the instance variable <i>v</i> of the object denoted by thi s is bound to
2297 * <i>o</i>. 2334 * <i>o</i>.
2298 * 2335 *
2299 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of 2336 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of
2300 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s ub>, 1 &lt;= i &lt;= 2337 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s ub>, 1 &lt;= i &lt;=
2301 * 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>. 2338 * 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>.
2302 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S< sub>j</sub>, 1 &lt;= 2339 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S< sub>j</sub>, 1 &lt;=
2303 * j &lt;= m</i>. 2340 * j &lt;= m</i>.
2304 * 2341 *
2305 * @param initializerType the name of the type of the initializer expression 2342 * @param initializerType the name of the type of the initializer expression
2306 * @param fieldType the name of the type of the field 2343 * @param fieldType the name of the type of the field
2307 */ 2344 */
2308 static final StaticWarningCode FIELD_INITIALIZER_NOT_ASSIGNABLE = new StaticWa rningCode.con1('FIELD_INITIALIZER_NOT_ASSIGNABLE', 23, "The initializer type '%s ' cannot be assigned to the field type '%s'"); 2345 static final StaticWarningCode FIELD_INITIALIZER_NOT_ASSIGNABLE = new StaticWa rningCode.con1('FIELD_INITIALIZER_NOT_ASSIGNABLE', 24, "The initializer type '%s ' cannot be assigned to the field type '%s'");
2309 2346
2310 /** 2347 /**
2311 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this. id</i>. It is a 2348 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this. id</i>. It is a
2312 * static warning if the static type of <i>id</i> is not assignable to <i>T<su b>id</sub></i>. 2349 * static warning if the static type of <i>id</i> is not assignable to <i>T<su b>id</sub></i>.
2313 * 2350 *
2314 * @param parameterType the name of the type of the field formal parameter 2351 * @param parameterType the name of the type of the field formal parameter
2315 * @param fieldType the name of the type of the field 2352 * @param fieldType the name of the type of the field
2316 */ 2353 */
2317 static final StaticWarningCode FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE = new StaticWarningCode.con1('FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE', 24, "The para meter type '%s' is incompatable with the field type '%s'"); 2354 static final StaticWarningCode FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE = new StaticWarningCode.con1('FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE', 25, "The para meter type '%s' is incompatable with the field type '%s'");
2318 2355
2319 /** 2356 /**
2320 * 5 Variables: It is a static warning if a library, static or local variable <i>v</i> is final 2357 * 5 Variables: It is a static warning if a library, static or local variable <i>v</i> is final
2321 * and <i>v</i> is not initialized at its point of declaration. 2358 * and <i>v</i> is not initialized at its point of declaration.
2322 * 2359 *
2323 * 7.6.1 Generative Constructors: Each final instance variable <i>f</i> declar ed in the 2360 * 7.6.1 Generative Constructors: Each final instance variable <i>f</i> declar ed in the
2324 * immediately enclosing class must have an initializer in <i>k</i>'s initiali zer list unless it 2361 * immediately enclosing class must have an initializer in <i>k</i>'s initiali zer list unless it
2325 * has already been initialized by one of the following means: 2362 * has already been initialized by one of the following means:
2326 * 2363 *
2327 * * Initialization at the declaration of <i>f</i>. 2364 * * Initialization at the declaration of <i>f</i>.
2328 * * Initialization by means of an initializing formal of <i>k</i>. 2365 * * Initialization by means of an initializing formal of <i>k</i>.
2329 * 2366 *
2330 * or a static warning occurs. 2367 * or a static warning occurs.
2331 * 2368 *
2332 * @param name the name of the uninitialized final variable 2369 * @param name the name of the uninitialized final variable
2333 */ 2370 */
2334 static final StaticWarningCode FINAL_NOT_INITIALIZED = new StaticWarningCode.c on1('FINAL_NOT_INITIALIZED', 25, "The final variable '%s' must be initialized"); 2371 static final StaticWarningCode FINAL_NOT_INITIALIZED = new StaticWarningCode.c on1('FINAL_NOT_INITIALIZED', 26, "The final variable '%s' must be initialized");
2335 2372
2336 /** 2373 /**
2337 * 14.1 Imports: It is a static warning to import two different libraries with the same name. 2374 * 14.1 Imports: It is a static warning to import two different libraries with the same name.
2338 * 2375 *
2339 * @param uri1 the uri pointing to a first library 2376 * @param uri1 the uri pointing to a first library
2340 * @param uri2 the uri pointing to a second library 2377 * @param uri2 the uri pointing to a second library
2341 * @param name the shared name of the imported libraries 2378 * @param name the shared name of the imported libraries
2342 */ 2379 */
2343 static final StaticWarningCode IMPORT_DUPLICATED_LIBRARY_NAME = new StaticWarn ingCode.con1('IMPORT_DUPLICATED_LIBRARY_NAME', 26, "The imported libraries '%s' and '%s' should not have the same name '%s'"); 2380 static final StaticWarningCode IMPORT_DUPLICATED_LIBRARY_NAME = new StaticWarn ingCode.con1('IMPORT_DUPLICATED_LIBRARY_NAME', 27, "The imported libraries '%s' and '%s' should not have the same name '%s'");
2344 2381
2345 /** 2382 /**
2346 * 8.1.1 Inheritance and Overriding: However, if there are multiple members <i >m<sub>1</sub>, 2383 * 8.1.1 Inheritance and Overriding: However, if there are multiple members <i >m<sub>1</sub>,
2347 * &hellip; m<sub>k</sub></i> with the same name <i>n</i> that would be inheri ted (because 2384 * &hellip; m<sub>k</sub></i> with the same name <i>n</i> that would be inheri ted (because
2348 * identically named members existed in several superinterfaces) then at most one member is 2385 * identically named members existed in several superinterfaces) then at most one member is
2349 * inherited. 2386 * inherited.
2350 * 2387 *
2351 * If some but not all of the <i>m<sub>i</sub>, 1 &lt;= i &lt;= k</i>, are get ters, or if some but 2388 * If some but not all of the <i>m<sub>i</sub>, 1 &lt;= i &lt;= k</i>, are get ters, or if some but
2352 * not all of the <i>m<sub>i</sub></i> are setters, none of the <i>m<sub>i</su b></i> are 2389 * not all of the <i>m<sub>i</sub></i> are setters, none of the <i>m<sub>i</su b></i> are
2353 * inherited, and a static warning is issued. 2390 * inherited, and a static warning is issued.
2354 */ 2391 */
2355 static final StaticWarningCode INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METH OD = new StaticWarningCode.con1('INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METH OD', 27, "'%s' is inherited as a getter and also a method"); 2392 static final StaticWarningCode INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METH OD = new StaticWarningCode.con1('INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METH OD', 28, "'%s' is inherited as a getter and also a method");
2356 2393
2357 /** 2394 /**
2358 * 7.1 Instance Methods: It is a static warning if a class <i>C</i> declares a n instance method 2395 * 7.1 Instance Methods: It is a static warning if a class <i>C</i> declares a n instance method
2359 * named <i>n</i> and an accessible static member named <i>n</i> is declared i n a superclass of 2396 * named <i>n</i> and an accessible static member named <i>n</i> is declared i n a superclass of
2360 * <i>C</i>. 2397 * <i>C</i>.
2361 * 2398 *
2362 * @param memberName the name of the member with the name conflict 2399 * @param memberName the name of the member with the name conflict
2363 * @param superclassName the name of the enclosing class that has the static m ember 2400 * @param superclassName the name of the enclosing class that has the static m ember
2364 */ 2401 */
2365 static final StaticWarningCode INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_S TATIC = new StaticWarningCode.con1('INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLAS S_STATIC', 28, "'%s' collides with a static member in the superclass '%s'"); 2402 static final StaticWarningCode INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_S TATIC = new StaticWarningCode.con1('INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLAS S_STATIC', 29, "'%s' collides with a static member in the superclass '%s'");
2366 2403
2367 /** 2404 /**
2368 * 7.2 Getters: It is a static warning if a getter <i>m1</i> overrides a gette r <i>m2</i> and the 2405 * 7.2 Getters: It is a static warning if a getter <i>m1</i> overrides a gette r <i>m2</i> and the
2369 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>. 2406 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>.
2370 * 2407 *
2371 * @param actualReturnTypeName the name of the expected return type 2408 * @param actualReturnTypeName the name of the expected return type
2372 * @param expectedReturnType the name of the actual return type, not assignabl e to the 2409 * @param expectedReturnType the name of the actual return type, not assignabl e to the
2373 * actualReturnTypeName 2410 * actualReturnTypeName
2374 * @param className the name of the class where the overridden getter is decla red 2411 * @param className the name of the class where the overridden getter is decla red
2375 * @see #INVALID_METHOD_OVERRIDE_RETURN_TYPE 2412 * @see #INVALID_METHOD_OVERRIDE_RETURN_TYPE
2376 */ 2413 */
2377 static final StaticWarningCode INVALID_GETTER_OVERRIDE_RETURN_TYPE = new Stati cWarningCode.con1('INVALID_GETTER_OVERRIDE_RETURN_TYPE', 29, "The return type '% s' is not assignable to '%s' as required by the getter it is overriding from '%s '"); 2414 static final StaticWarningCode INVALID_GETTER_OVERRIDE_RETURN_TYPE = new Stati cWarningCode.con1('INVALID_GETTER_OVERRIDE_RETURN_TYPE', 30, "The return type '% s' is not assignable to '%s' as required by the getter it is overriding from '%s '");
2378 2415
2379 /** 2416 /**
2380 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i > overrides an 2417 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i > overrides an
2381 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the type of <i>m2</i>. 2418 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the type of <i>m2</i>.
2382 * 2419 *
2383 * @param actualParamTypeName the name of the expected parameter type 2420 * @param actualParamTypeName the name of the expected parameter type
2384 * @param expectedParamType the name of the actual parameter type, not assigna ble to the 2421 * @param expectedParamType the name of the actual parameter type, not assigna ble to the
2385 * actualParamTypeName 2422 * actualParamTypeName
2386 * @param className the name of the class where the overridden method is decla red 2423 * @param className the name of the class where the overridden method is decla red
2387 */ 2424 */
2388 static final StaticWarningCode INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE = new StaticWarningCode.con1('INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE', 30, "The para meter type '%s' is not assignable to '%s' as required by the method it is overri ding from '%s'"); 2425 static final StaticWarningCode INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE = new StaticWarningCode.con1('INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE', 31, "The para meter type '%s' is not assignable to '%s' as required by the method it is overri ding from '%s'");
2389 2426
2390 /** 2427 /**
2391 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i > overrides an 2428 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i > overrides an
2392 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the type of <i>m2</i>. 2429 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the type of <i>m2</i>.
2393 * 2430 *
2394 * @param actualParamTypeName the name of the expected parameter type 2431 * @param actualParamTypeName the name of the expected parameter type
2395 * @param expectedParamType the name of the actual parameter type, not assigna ble to the 2432 * @param expectedParamType the name of the actual parameter type, not assigna ble to the
2396 * actualParamTypeName 2433 * actualParamTypeName
2397 * @param className the name of the class where the overridden method is decla red 2434 * @param className the name of the class where the overridden method is decla red
2398 * @see #INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE 2435 * @see #INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE
2399 */ 2436 */
2400 static final StaticWarningCode INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE = new StaticWarningCode.con1('INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE', 31, "The pa rameter type '%s' is not assignable to '%s' as required by the method it is over riding from '%s'"); 2437 static final StaticWarningCode INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE = new StaticWarningCode.con1('INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE', 32, "The pa rameter type '%s' is not assignable to '%s' as required by the method it is over riding from '%s'");
2401 2438
2402 /** 2439 /**
2403 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i > overrides an 2440 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i > overrides an
2404 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the type of <i>m2</i>. 2441 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the type of <i>m2</i>.
2405 * 2442 *
2406 * @param actualParamTypeName the name of the expected parameter type 2443 * @param actualParamTypeName the name of the expected parameter type
2407 * @param expectedParamType the name of the actual parameter type, not assigna ble to the 2444 * @param expectedParamType the name of the actual parameter type, not assigna ble to the
2408 * actualParamTypeName 2445 * actualParamTypeName
2409 * @param className the name of the class where the overridden method is decla red 2446 * @param className the name of the class where the overridden method is decla red
2410 */ 2447 */
2411 static final StaticWarningCode INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE = n ew StaticWarningCode.con1('INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE', 32, "Th e parameter type '%s' is not assignable to '%s' as required by the method it is overriding from '%s'"); 2448 static final StaticWarningCode INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE = n ew StaticWarningCode.con1('INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE', 33, "Th e parameter type '%s' is not assignable to '%s' as required by the method it is overriding from '%s'");
2412 2449
2413 /** 2450 /**
2414 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i > overrides an 2451 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i > overrides an
2415 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the type of <i>m2</i>. 2452 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the type of <i>m2</i>.
2416 * 2453 *
2417 * @param actualReturnTypeName the name of the expected return type 2454 * @param actualReturnTypeName the name of the expected return type
2418 * @param expectedReturnType the name of the actual return type, not assignabl e to the 2455 * @param expectedReturnType the name of the actual return type, not assignabl e to the
2419 * actualReturnTypeName 2456 * actualReturnTypeName
2420 * @param className the name of the class where the overridden method is decla red 2457 * @param className the name of the class where the overridden method is decla red
2421 * @see #INVALID_GETTER_OVERRIDE_RETURN_TYPE 2458 * @see #INVALID_GETTER_OVERRIDE_RETURN_TYPE
2422 */ 2459 */
2423 static final StaticWarningCode INVALID_METHOD_OVERRIDE_RETURN_TYPE = new Stati cWarningCode.con1('INVALID_METHOD_OVERRIDE_RETURN_TYPE', 33, "The return type '% s' is not assignable to '%s' as required by the method it is overriding from '%s '"); 2460 static final StaticWarningCode INVALID_METHOD_OVERRIDE_RETURN_TYPE = new Stati cWarningCode.con1('INVALID_METHOD_OVERRIDE_RETURN_TYPE', 34, "The return type '% s' is not assignable to '%s' as required by the method it is overriding from '%s '");
2424 2461
2425 /** 2462 /**
2426 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i > overrides an 2463 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i > overrides an
2427 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies a default value for 2464 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies a default value for
2428 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff erent default value 2465 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff erent default value
2429 * for <i>p</i>. 2466 * for <i>p</i>.
2430 */ 2467 */
2431 static final StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED = new StaticWarningCode.con1('INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED', 34, "Parameters cannot override default values, this method overrides '%s.%s' w here '%s' has a different value"); 2468 static final StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED = new StaticWarningCode.con1('INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED', 35, "Parameters cannot override default values, this method overrides '%s.%s' w here '%s' has a different value");
2432 2469
2433 /** 2470 /**
2434 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i > overrides an 2471 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i > overrides an
2435 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies a default value for 2472 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies a default value for
2436 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff erent default value 2473 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff erent default value
2437 * for <i>p</i>. 2474 * for <i>p</i>.
2438 */ 2475 */
2439 static final StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSIT IONAL = new StaticWarningCode.con1('INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_PO SITIONAL', 35, "Parameters cannot override default values, this method overrides '%s.%s' where this positional parameter has a different value"); 2476 static final StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSIT IONAL = new StaticWarningCode.con1('INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_PO SITIONAL', 36, "Parameters cannot override default values, this method overrides '%s.%s' where this positional parameter has a different value");
2440 2477
2441 /** 2478 /**
2442 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i > overrides an 2479 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i > overrides an
2443 * instance member <i>m2</i> and <i>m1</i> does not declare all the named para meters declared by 2480 * instance member <i>m2</i> and <i>m1</i> does not declare all the named para meters declared by
2444 * <i>m2</i>. 2481 * <i>m2</i>.
2445 * 2482 *
2446 * @param paramCount the number of named parameters in the overridden member 2483 * @param paramCount the number of named parameters in the overridden member
2447 * @param className the name of the class from the overridden method 2484 * @param className the name of the class from the overridden method
2448 */ 2485 */
2449 static final StaticWarningCode INVALID_OVERRIDE_NAMED = new StaticWarningCode. con1('INVALID_OVERRIDE_NAMED', 36, "Missing the named parameter '%s' to match th e overridden method from '%s'"); 2486 static final StaticWarningCode INVALID_OVERRIDE_NAMED = new StaticWarningCode. con1('INVALID_OVERRIDE_NAMED', 37, "Missing the named parameter '%s' to match th e overridden method from '%s'");
2450 2487
2451 /** 2488 /**
2452 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i > overrides an 2489 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i > overrides an
2453 * instance member <i>m2</i> and <i>m1</i> has fewer optional positional param eters than 2490 * instance member <i>m2</i> and <i>m1</i> has fewer positional parameters tha n <i>m2</i>.
2454 * <i>m2</i>.
2455 * 2491 *
2456 * @param paramCount the number of positional parameters in the overridden mem ber 2492 * @param paramCount the number of positional parameters in the overridden mem ber
2457 * @param className the name of the class from the overridden method 2493 * @param className the name of the class from the overridden method
2458 */ 2494 */
2459 static final StaticWarningCode INVALID_OVERRIDE_POSITIONAL = new StaticWarning Code.con1('INVALID_OVERRIDE_POSITIONAL', 37, "Must have at least %d optional par ameters to match the overridden method from '%s'"); 2495 static final StaticWarningCode INVALID_OVERRIDE_POSITIONAL = new StaticWarning Code.con1('INVALID_OVERRIDE_POSITIONAL', 38, "Must have at least %d parameters t o match the overridden method from '%s'");
2460 2496
2461 /** 2497 /**
2462 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i > overrides an 2498 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i > overrides an
2463 * instance member <i>m2</i> and <i>m1</i> has a greater number of required pa rameters than 2499 * instance member <i>m2</i> and <i>m1</i> has a greater number of required pa rameters than
2464 * <i>m2</i>. 2500 * <i>m2</i>.
2465 * 2501 *
2466 * @param paramCount the number of required parameters in the overridden membe r 2502 * @param paramCount the number of required parameters in the overridden membe r
2467 * @param className the name of the class from the overridden method 2503 * @param className the name of the class from the overridden method
2468 */ 2504 */
2469 static final StaticWarningCode INVALID_OVERRIDE_REQUIRED = new StaticWarningCo de.con1('INVALID_OVERRIDE_REQUIRED', 38, "Must have %d required parameters or le ss to match the overridden method from '%s'"); 2505 static final StaticWarningCode INVALID_OVERRIDE_REQUIRED = new StaticWarningCo de.con1('INVALID_OVERRIDE_REQUIRED', 39, "Must have %d required parameters or le ss to match the overridden method from '%s'");
2470 2506
2471 /** 2507 /**
2472 * 7.3 Setters: It is a static warning if a setter <i>m1</i> overrides a sette r <i>m2</i> and the 2508 * 7.3 Setters: It is a static warning if a setter <i>m1</i> overrides a sette r <i>m2</i> and the
2473 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>. 2509 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>.
2474 * 2510 *
2475 * @param actualParamTypeName the name of the expected parameter type 2511 * @param actualParamTypeName the name of the expected parameter type
2476 * @param expectedParamType the name of the actual parameter type, not assigna ble to the 2512 * @param expectedParamType the name of the actual parameter type, not assigna ble to the
2477 * actualParamTypeName 2513 * actualParamTypeName
2478 * @param className the name of the class where the overridden setter is decla red 2514 * @param className the name of the class where the overridden setter is decla red
2479 * @see #INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE 2515 * @see #INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE
2480 */ 2516 */
2481 static final StaticWarningCode INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE = new StaticWarningCode.con1('INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE', 39, "The pa rameter type '%s' is not assignable to '%s' as required by the setter it is over riding from '%s'"); 2517 static final StaticWarningCode INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE = new StaticWarningCode.con1('INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE', 40, "The pa rameter type '%s' is not assignable to '%s' as required by the setter it is over riding from '%s'");
2482 2518
2483 /** 2519 /**
2484 * 12.6 Lists: A run-time list literal &lt;<i>E</i>&gt; [<i>e<sub>1</sub></i> ... 2520 * 12.6 Lists: A run-time list literal &lt;<i>E</i>&gt; [<i>e<sub>1</sub></i> ...
2485 * <i>e<sub>n</sub></i>] is evaluated as follows: 2521 * <i>e<sub>n</sub></i>] is evaluated as follows:
2486 * 2522 *
2487 * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and second argument 2523 * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and second argument
2488 * <i>o<sub>i+1</sub></i><i>, 1 &lt;= i &lt;= n</i> 2524 * <i>o<sub>i+1</sub></i><i>, 1 &lt;= i &lt;= n</i>
2489 * 2525 *
2490 * 2526 *
2491 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of 2527 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of
2492 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s ub>, 1 &lt;= i &lt;= 2528 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s ub>, 1 &lt;= i &lt;=
2493 * 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>. 2529 * 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>.
2494 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S< sub>j</sub>, 1 &lt;= 2530 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S< sub>j</sub>, 1 &lt;=
2495 * j &lt;= m</i>. 2531 * j &lt;= m</i>.
2496 */ 2532 */
2497 static final StaticWarningCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = new StaticWa rningCode.con1('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 40, "The element type '%s' ca nnot be assigned to the list type '%s'"); 2533 static final StaticWarningCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = new StaticWa rningCode.con1('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 41, "The element type '%s' ca nnot be assigned to the list type '%s'");
2498 2534
2499 /** 2535 /**
2500 * 12.7 Map: A run-time map literal &lt;<i>K</i>, <i>V</i>&gt; [<i>k<sub>1</su b></i> : 2536 * 12.7 Map: A run-time map literal &lt;<i>K</i>, <i>V</i>&gt; [<i>k<sub>1</su b></i> :
2501 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev aluated as follows: 2537 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev aluated as follows:
2502 * 2538 *
2503 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s ub></i> and second 2539 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s ub></i> and second
2504 * argument <i>e<sub>i</sub></i><i>, 1 &lt;= i &lt;= n</i> 2540 * argument <i>e<sub>i</sub></i><i>, 1 &lt;= i &lt;= n</i>
2505 * 2541 *
2506 * 2542 *
2507 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of 2543 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of
2508 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s ub>, 1 &lt;= i &lt;= 2544 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s ub>, 1 &lt;= i &lt;=
2509 * 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>. 2545 * 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>.
2510 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S< sub>j</sub>, 1 &lt;= 2546 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S< sub>j</sub>, 1 &lt;=
2511 * j &lt;= m</i>. 2547 * j &lt;= m</i>.
2512 */ 2548 */
2513 static final StaticWarningCode MAP_KEY_TYPE_NOT_ASSIGNABLE = new StaticWarning Code.con1('MAP_KEY_TYPE_NOT_ASSIGNABLE', 41, "The element type '%s' cannot be as signed to the map key type '%s'"); 2549 static final StaticWarningCode MAP_KEY_TYPE_NOT_ASSIGNABLE = new StaticWarning Code.con1('MAP_KEY_TYPE_NOT_ASSIGNABLE', 42, "The element type '%s' cannot be as signed to the map key type '%s'");
2514 2550
2515 /** 2551 /**
2516 * 12.7 Map: A run-time map literal &lt;<i>K</i>, <i>V</i>&gt; [<i>k<sub>1</su b></i> : 2552 * 12.7 Map: A run-time map literal &lt;<i>K</i>, <i>V</i>&gt; [<i>k<sub>1</su b></i> :
2517 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev aluated as follows: 2553 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev aluated as follows:
2518 * 2554 *
2519 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s ub></i> and second 2555 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s ub></i> and second
2520 * argument <i>e<sub>i</sub></i><i>, 1 &lt;= i &lt;= n</i> 2556 * argument <i>e<sub>i</sub></i><i>, 1 &lt;= i &lt;= n</i>
2521 * 2557 *
2522 * 2558 *
2523 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of 2559 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of
2524 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s ub>, 1 &lt;= i &lt;= 2560 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s ub>, 1 &lt;= i &lt;=
2525 * 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>. 2561 * 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>.
2526 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S< sub>j</sub>, 1 &lt;= 2562 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S< sub>j</sub>, 1 &lt;=
2527 * j &lt;= m</i>. 2563 * j &lt;= m</i>.
2528 */ 2564 */
2529 static final StaticWarningCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = new StaticWarni ngCode.con1('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 42, "The element type '%s' cannot b e assigned to the map value type '%s'"); 2565 static final StaticWarningCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = new StaticWarni ngCode.con1('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 43, "The element type '%s' cannot b e assigned to the map value type '%s'");
2530 2566
2531 /** 2567 /**
2532 * 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i> with argument type 2568 * 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i> with argument type
2533 * <i>T</i> and a getter named <i>v</i> with return type <i>S</i>, and <i>T</i > may not be 2569 * <i>T</i> and a getter named <i>v</i> with return type <i>S</i>, and <i>T</i > may not be
2534 * assigned to <i>S</i>. 2570 * assigned to <i>S</i>.
2535 */ 2571 */
2536 static final StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES = new Static WarningCode.con1('MISMATCHED_GETTER_AND_SETTER_TYPES', 43, "The parameter type f or setter '%s' is '%s' which is not assignable to its getter (of type '%s')"); 2572 static final StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES = new Static WarningCode.con1('MISMATCHED_GETTER_AND_SETTER_TYPES', 44, "The parameter type f or setter '%s' is '%s' which is not assignable to its getter (of type '%s')");
2537 2573
2538 /** 2574 /**
2539 * 12.11.1 New: It is a static warning if <i>q</i> is a constructor of an abst ract class and 2575 * 12.11.1 New: It is a static warning if <i>q</i> is a constructor of an abst ract class and
2540 * <i>q</i> is not a factory constructor. 2576 * <i>q</i> is not a factory constructor.
2541 */ 2577 */
2542 static final StaticWarningCode NEW_WITH_ABSTRACT_CLASS = new StaticWarningCode .con1('NEW_WITH_ABSTRACT_CLASS', 44, "Abstract classes cannot be created with a 'new' expression"); 2578 static final StaticWarningCode NEW_WITH_ABSTRACT_CLASS = new StaticWarningCode .con1('NEW_WITH_ABSTRACT_CLASS', 45, "Abstract classes cannot be created with a 'new' expression");
2543 2579
2544 /** 2580 /**
2545 * 15.8 Parameterized Types: Any use of a malbounded type gives rise to a stat ic warning. 2581 * 15.8 Parameterized Types: Any use of a malbounded type gives rise to a stat ic warning.
2546 * 2582 *
2547 * @param typeName the name of the type being referenced (<i>S</i>) 2583 * @param typeName the name of the type being referenced (<i>S</i>)
2548 * @param parameterCount the number of type parameters that were declared 2584 * @param parameterCount the number of type parameters that were declared
2549 * @param argumentCount the number of type arguments provided 2585 * @param argumentCount the number of type arguments provided
2550 * @see CompileTimeErrorCode#CONST_WITH_INVALID_TYPE_PARAMETERS 2586 * @see CompileTimeErrorCode#CONST_WITH_INVALID_TYPE_PARAMETERS
2551 * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS 2587 * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS
2552 */ 2588 */
2553 static final StaticWarningCode NEW_WITH_INVALID_TYPE_PARAMETERS = new StaticWa rningCode.con1('NEW_WITH_INVALID_TYPE_PARAMETERS', 45, "The type '%s' is declare d with %d type parameters, but %d type arguments were given"); 2589 static final StaticWarningCode NEW_WITH_INVALID_TYPE_PARAMETERS = new StaticWa rningCode.con1('NEW_WITH_INVALID_TYPE_PARAMETERS', 46, "The type '%s' is declare d with %d type parameters, but %d type arguments were given");
2554 2590
2555 /** 2591 /**
2556 * 12.11.1 New: It is a static warning if <i>T</i> is not a class accessible i n the current scope, 2592 * 12.11.1 New: It is a static warning if <i>T</i> is not a class accessible i n the current scope,
2557 * optionally followed by type arguments. 2593 * optionally followed by type arguments.
2558 * 2594 *
2559 * @param name the name of the non-type element 2595 * @param name the name of the non-type element
2560 */ 2596 */
2561 static final StaticWarningCode NEW_WITH_NON_TYPE = new StaticWarningCode.con1( 'NEW_WITH_NON_TYPE', 46, "The name '%s' is not a class"); 2597 static final StaticWarningCode NEW_WITH_NON_TYPE = new StaticWarningCode.con1( 'NEW_WITH_NON_TYPE', 47, "The name '%s' is not a class");
2562 2598
2563 /** 2599 /**
2564 * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the current scope then: 2600 * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the current scope then:
2565 * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, &hellip;, a<sub>n< /sub>, 2601 * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, &hellip;, a<sub>n< /sub>,
2566 * x<sub>n+1</sub>: a<sub>n+1</sub>, &hellip;, x<sub>n+k</sub>: a<sub>n+k</sub >)</i> it is a 2602 * x<sub>n+1</sub>: a<sub>n+1</sub>, &hellip;, x<sub>n+k</sub>: a<sub>n+k</sub >)</i> it is a
2567 * static warning if <i>T.id</i> is not the name of a constructor declared by the type <i>T</i>. 2603 * static warning if <i>T.id</i> is not the name of a constructor declared by the type <i>T</i>.
2568 * If <i>e</i> of the form <i>new T(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x< sub>n+1</sub>: 2604 * If <i>e</i> of the form <i>new T(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x< sub>n+1</sub>:
2569 * a<sub>n+1</sub>, &hellip; x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a sta tic warning if the 2605 * a<sub>n+1</sub>, &hellip; x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a sta tic warning if the
2570 * type <i>T</i> does not declare a constructor with the same name as the decl aration of <i>T</i>. 2606 * type <i>T</i> does not declare a constructor with the same name as the decl aration of <i>T</i>.
2571 */ 2607 */
2572 static final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR = new StaticWarn ingCode.con1('NEW_WITH_UNDEFINED_CONSTRUCTOR', 47, "The class '%s' does not have a constructor '%s'"); 2608 static final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR = new StaticWarn ingCode.con1('NEW_WITH_UNDEFINED_CONSTRUCTOR', 48, "The class '%s' does not have a constructor '%s'");
2573 2609
2574 /** 2610 /**
2575 * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the current scope then: 2611 * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the current scope then:
2576 * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, &hellip;, a<sub>n< /sub>, 2612 * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, &hellip;, a<sub>n< /sub>,
2577 * x<sub>n+1</sub>: a<sub>n+1</sub>, &hellip;, x<sub>n+k</sub>: a<sub>n+k</sub >)</i> it is a 2613 * x<sub>n+1</sub>: a<sub>n+1</sub>, &hellip;, x<sub>n+k</sub>: a<sub>n+k</sub >)</i> it is a
2578 * static warning if <i>T.id</i> is not the name of a constructor declared by the type <i>T</i>. 2614 * static warning if <i>T.id</i> is not the name of a constructor declared by the type <i>T</i>.
2579 * If <i>e</i> of the form <i>new T(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x< sub>n+1</sub>: 2615 * If <i>e</i> of the form <i>new T(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x< sub>n+1</sub>:
2580 * a<sub>n+1</sub>, &hellip; x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a sta tic warning if the 2616 * a<sub>n+1</sub>, &hellip; x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a sta tic warning if the
2581 * type <i>T</i> does not declare a constructor with the same name as the decl aration of <i>T</i>. 2617 * type <i>T</i> does not declare a constructor with the same name as the decl aration of <i>T</i>.
2582 */ 2618 */
2583 static final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = new St aticWarningCode.con1('NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 48, "The class '% s' does not have a default constructor"); 2619 static final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = new St aticWarningCode.con1('NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 49, "The class '% s' does not have a default constructor");
2584 2620
2585 /** 2621 /**
2586 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an 2622 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an
2587 * abstract method. 2623 * abstract method.
2588 * 2624 *
2589 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not declar e its own 2625 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not declar e its own
2590 * <i>noSuchMethod()</i> method. It is a static warning if the implicit interf ace of <i>C</i> 2626 * <i>noSuchMethod()</i> method. It is a static warning if the implicit interf ace of <i>C</i>
2591 * includes an instance member <i>m</i> of type <i>F</i> and <i>C</i> does not declare or inherit 2627 * includes an instance member <i>m</i> of type <i>F</i> and <i>C</i> does not declare or inherit
2592 * a corresponding instance member <i>m</i> of type <i>F'</i> such that <i>F' <: F</i>. 2628 * a corresponding instance member <i>m</i> of type <i>F'</i> such that <i>F' <: F</i>.
2593 * 2629 *
2594 * 7.4 Abstract Instance Members: It is a static warning if an abstract member is declared or 2630 * 7.4 Abstract Instance Members: It is a static warning if an abstract member is declared or
2595 * inherited in a concrete class unless that member overrides a concrete one. 2631 * inherited in a concrete class unless that member overrides a concrete one.
2596 * 2632 *
2597 * @param memberName the name of the first member 2633 * @param memberName the name of the first member
2598 * @param memberName the name of the second member 2634 * @param memberName the name of the second member
2599 * @param memberName the name of the third member 2635 * @param memberName the name of the third member
2600 * @param memberName the name of the fourth member 2636 * @param memberName the name of the fourth member
2601 * @param additionalCount the number of additional missing members that aren't listed 2637 * @param additionalCount the number of additional missing members that aren't listed
2602 */ 2638 */
2603 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIV E_PLUS = new StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER _FIVE_PLUS', 49, "Missing inherited members: '%s', '%s', '%s', '%s' and %d more" ); 2639 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIV E_PLUS = new StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER _FIVE_PLUS', 50, "Missing inherited members: '%s', '%s', '%s', '%s' and %d more" );
2604 2640
2605 /** 2641 /**
2606 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an 2642 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an
2607 * abstract method. 2643 * abstract method.
2608 * 2644 *
2609 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not declar e its own 2645 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not declar e its own
2610 * <i>noSuchMethod()</i> method. It is a static warning if the implicit interf ace of <i>C</i> 2646 * <i>noSuchMethod()</i> method. It is a static warning if the implicit interf ace of <i>C</i>
2611 * includes an instance member <i>m</i> of type <i>F</i> and <i>C</i> does not declare or inherit 2647 * includes an instance member <i>m</i> of type <i>F</i> and <i>C</i> does not declare or inherit
2612 * a corresponding instance member <i>m</i> of type <i>F'</i> such that <i>F' <: F</i>. 2648 * a corresponding instance member <i>m</i> of type <i>F'</i> such that <i>F' <: F</i>.
2613 * 2649 *
2614 * 7.4 Abstract Instance Members: It is a static warning if an abstract member is declared or 2650 * 7.4 Abstract Instance Members: It is a static warning if an abstract member is declared or
2615 * inherited in a concrete class unless that member overrides a concrete one. 2651 * inherited in a concrete class unless that member overrides a concrete one.
2616 * 2652 *
2617 * @param memberName the name of the first member 2653 * @param memberName the name of the first member
2618 * @param memberName the name of the second member 2654 * @param memberName the name of the second member
2619 * @param memberName the name of the third member 2655 * @param memberName the name of the third member
2620 * @param memberName the name of the fourth member 2656 * @param memberName the name of the fourth member
2621 */ 2657 */
2622 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOU R = new StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR ', 50, "Missing inherited members: '%s', '%s', '%s' and '%s'"); 2658 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOU R = new StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR ', 51, "Missing inherited members: '%s', '%s', '%s' and '%s'");
2623 2659
2624 /** 2660 /**
2625 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an 2661 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an
2626 * abstract method. 2662 * abstract method.
2627 * 2663 *
2628 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not declar e its own 2664 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not declar e its own
2629 * <i>noSuchMethod()</i> method. It is a static warning if the implicit interf ace of <i>C</i> 2665 * <i>noSuchMethod()</i> method. It is a static warning if the implicit interf ace of <i>C</i>
2630 * includes an instance member <i>m</i> of type <i>F</i> and <i>C</i> does not declare or inherit 2666 * includes an instance member <i>m</i> of type <i>F</i> and <i>C</i> does not declare or inherit
2631 * a corresponding instance member <i>m</i> of type <i>F'</i> such that <i>F' <: F</i>. 2667 * a corresponding instance member <i>m</i> of type <i>F'</i> such that <i>F' <: F</i>.
2632 * 2668 *
2633 * 7.4 Abstract Instance Members: It is a static warning if an abstract member is declared or 2669 * 7.4 Abstract Instance Members: It is a static warning if an abstract member is declared or
2634 * inherited in a concrete class unless that member overrides a concrete one. 2670 * inherited in a concrete class unless that member overrides a concrete one.
2635 * 2671 *
2636 * @param memberName the name of the member 2672 * @param memberName the name of the member
2637 */ 2673 */
2638 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE = new StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE', 51, "Missing inherited member '%s'"); 2674 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE = new StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE', 52, "Missing inherited member '%s'");
2639 2675
2640 /** 2676 /**
2641 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an 2677 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an
2642 * abstract method. 2678 * abstract method.
2643 * 2679 *
2644 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not declar e its own 2680 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not declar e its own
2645 * <i>noSuchMethod()</i> method. It is a static warning if the implicit interf ace of <i>C</i> 2681 * <i>noSuchMethod()</i> method. It is a static warning if the implicit interf ace of <i>C</i>
2646 * includes an instance member <i>m</i> of type <i>F</i> and <i>C</i> does not declare or inherit 2682 * includes an instance member <i>m</i> of type <i>F</i> and <i>C</i> does not declare or inherit
2647 * a corresponding instance member <i>m</i> of type <i>F'</i> such that <i>F' <: F</i>. 2683 * a corresponding instance member <i>m</i> of type <i>F'</i> such that <i>F' <: F</i>.
2648 * 2684 *
2649 * 7.4 Abstract Instance Members: It is a static warning if an abstract member is declared or 2685 * 7.4 Abstract Instance Members: It is a static warning if an abstract member is declared or
2650 * inherited in a concrete class unless that member overrides a concrete one. 2686 * inherited in a concrete class unless that member overrides a concrete one.
2651 * 2687 *
2652 * @param memberName the name of the first member 2688 * @param memberName the name of the first member
2653 * @param memberName the name of the second member 2689 * @param memberName the name of the second member
2654 * @param memberName the name of the third member 2690 * @param memberName the name of the third member
2655 */ 2691 */
2656 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THR EE = new StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THR EE', 52, "Missing inherited members: '%s', '%s' and '%s'"); 2692 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THR EE = new StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THR EE', 53, "Missing inherited members: '%s', '%s' and '%s'");
2657 2693
2658 /** 2694 /**
2659 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an 2695 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an
2660 * abstract method. 2696 * abstract method.
2661 * 2697 *
2662 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not declar e its own 2698 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not declar e its own
2663 * <i>noSuchMethod()</i> method. It is a static warning if the implicit interf ace of <i>C</i> 2699 * <i>noSuchMethod()</i> method. It is a static warning if the implicit interf ace of <i>C</i>
2664 * includes an instance member <i>m</i> of type <i>F</i> and <i>C</i> does not declare or inherit 2700 * includes an instance member <i>m</i> of type <i>F</i> and <i>C</i> does not declare or inherit
2665 * a corresponding instance member <i>m</i> of type <i>F'</i> such that <i>F' <: F</i>. 2701 * a corresponding instance member <i>m</i> of type <i>F'</i> such that <i>F' <: F</i>.
2666 * 2702 *
2667 * 7.4 Abstract Instance Members: It is a static warning if an abstract member is declared or 2703 * 7.4 Abstract Instance Members: It is a static warning if an abstract member is declared or
2668 * inherited in a concrete class unless that member overrides a concrete one. 2704 * inherited in a concrete class unless that member overrides a concrete one.
2669 * 2705 *
2670 * @param memberName the name of the first member 2706 * @param memberName the name of the first member
2671 * @param memberName the name of the second member 2707 * @param memberName the name of the second member
2672 */ 2708 */
2673 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO = new StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO', 53, "Missing inherited members: '%s' and '%s'"); 2709 static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO = new StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO', 54, "Missing inherited members: '%s' and '%s'");
2674 2710
2675 /** 2711 /**
2676 * 13.11 Try: An on-catch clause of the form <i>on T catch (p<sub>1</sub>, p<s ub>2</sub>) s</i> or 2712 * 13.11 Try: An on-catch clause of the form <i>on T catch (p<sub>1</sub>, p<s ub>2</sub>) s</i> or
2677 * <i>on T s</i> matches an object <i>o</i> if the type of <i>o</i> is a subty pe of <i>T</i>. It 2713 * <i>on T s</i> matches an object <i>o</i> if the type of <i>o</i> is a subty pe of <i>T</i>. It
2678 * is a static warning if <i>T</i> does not denote a type available in the lex ical scope of the 2714 * is a static warning if <i>T</i> does not denote a type available in the lex ical scope of the
2679 * catch clause. 2715 * catch clause.
2680 * 2716 *
2681 * @param name the name of the non-type element 2717 * @param name the name of the non-type element
2682 */ 2718 */
2683 static final StaticWarningCode NON_TYPE_IN_CATCH_CLAUSE = new StaticWarningCod e.con1('NON_TYPE_IN_CATCH_CLAUSE', 54, "The name '%s' is not a type and cannot b e used in an on-catch clause"); 2719 static final StaticWarningCode NON_TYPE_IN_CATCH_CLAUSE = new StaticWarningCod e.con1('NON_TYPE_IN_CATCH_CLAUSE', 55, "The name '%s' is not a type and cannot b e used in an on-catch clause");
2684 2720
2685 /** 2721 /**
2686 * 7.1.1 Operators: It is a static warning if the return type of the user-decl ared operator []= is 2722 * 7.1.1 Operators: It is a static warning if the return type of the user-decl ared operator []= is
2687 * explicitly declared and not void. 2723 * explicitly declared and not void.
2688 */ 2724 */
2689 static final StaticWarningCode NON_VOID_RETURN_FOR_OPERATOR = new StaticWarnin gCode.con1('NON_VOID_RETURN_FOR_OPERATOR', 55, "The return type of the operator []= must be 'void'"); 2725 static final StaticWarningCode NON_VOID_RETURN_FOR_OPERATOR = new StaticWarnin gCode.con1('NON_VOID_RETURN_FOR_OPERATOR', 56, "The return type of the operator []= must be 'void'");
2690 2726
2691 /** 2727 /**
2692 * 7.3 Setters: It is a static warning if a setter declares a return type othe r than void. 2728 * 7.3 Setters: It is a static warning if a setter declares a return type othe r than void.
2693 */ 2729 */
2694 static final StaticWarningCode NON_VOID_RETURN_FOR_SETTER = new StaticWarningC ode.con1('NON_VOID_RETURN_FOR_SETTER', 56, "The return type of the setter must b e 'void'"); 2730 static final StaticWarningCode NON_VOID_RETURN_FOR_SETTER = new StaticWarningC ode.con1('NON_VOID_RETURN_FOR_SETTER', 57, "The return type of the setter must b e 'void'");
2695 2731
2696 /** 2732 /**
2697 * 15.1 Static Types: A type <i>T</i> is malformed iff: * <i>T</i> has the for m <i>id</i> or the 2733 * 15.1 Static Types: A type <i>T</i> is malformed iff: * <i>T</i> has the for m <i>id</i> or the
2698 * form <i>prefix.id</i>, and in the enclosing lexical scope, the name <i>id</ i> (respectively 2734 * form <i>prefix.id</i>, and in the enclosing lexical scope, the name <i>id</ i> (respectively
2699 * <i>prefix.id</i>) does not denote a type. * <i>T</i> denotes a type paramet er in the 2735 * <i>prefix.id</i>) does not denote a type. * <i>T</i> denotes a type paramet er in the
2700 * enclosing lexical scope, but occurs in the signature or body of a static me mber. * 2736 * enclosing lexical scope, but occurs in the signature or body of a static me mber. *
2701 * <i>T</i> is a parameterized type of the form <i>G&lt;S<sub>1</sub>, .., S<s ub>n</sub>&gt;</i>, 2737 * <i>T</i> is a parameterized type of the form <i>G&lt;S<sub>1</sub>, .., S<s ub>n</sub>&gt;</i>,
2702 * and <i>G</i> is malformed. 2738 * and <i>G</i> is malformed.
2703 * 2739 *
2704 * Any use of a malformed type gives rise to a static warning. 2740 * Any use of a malformed type gives rise to a static warning.
2705 * 2741 *
2706 * @param nonTypeName the name that is not a type 2742 * @param nonTypeName the name that is not a type
2707 */ 2743 */
2708 static final StaticWarningCode NOT_A_TYPE = new StaticWarningCode.con1('NOT_A_ TYPE', 57, "%s is not a type"); 2744 static final StaticWarningCode NOT_A_TYPE = new StaticWarningCode.con1('NOT_A_ TYPE', 58, "%s is not a type");
2709 2745
2710 /** 2746 /**
2711 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m &lt; h</ i> or if <i>m &gt; 2747 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m &lt; h</ i> or if <i>m &gt;
2712 * n</i>. 2748 * n</i>.
2713 * 2749 *
2714 * @param requiredCount the expected number of required arguments 2750 * @param requiredCount the expected number of required arguments
2715 * @param argumentCount the actual number of positional arguments given 2751 * @param argumentCount the actual number of positional arguments given
2716 * @see #EXTRA_POSITIONAL_ARGUMENTS 2752 * @see #EXTRA_POSITIONAL_ARGUMENTS
2717 */ 2753 */
2718 static final StaticWarningCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new StaticWarni ngCode.con1('NOT_ENOUGH_REQUIRED_ARGUMENTS', 58, "%d required argument(s) expect ed, but %d found"); 2754 static final StaticWarningCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new StaticWarni ngCode.con1('NOT_ENOUGH_REQUIRED_ARGUMENTS', 59, "%d required argument(s) expect ed, but %d found");
2719 2755
2720 /** 2756 /**
2721 * 14.3 Parts: It is a static warning if the referenced part declaration <i>p< /i> names a library 2757 * 14.3 Parts: It is a static warning if the referenced part declaration <i>p< /i> names a library
2722 * other than the current library as the library to which <i>p</i> belongs. 2758 * other than the current library as the library to which <i>p</i> belongs.
2723 * 2759 *
2724 * @param expectedLibraryName the name of expected library name 2760 * @param expectedLibraryName the name of expected library name
2725 * @param actualLibraryName the non-matching actual library name from the "par t of" declaration 2761 * @param actualLibraryName the non-matching actual library name from the "par t of" declaration
2726 */ 2762 */
2727 static final StaticWarningCode PART_OF_DIFFERENT_LIBRARY = new StaticWarningCo de.con1('PART_OF_DIFFERENT_LIBRARY', 59, "Expected this library to be part of '% s', not '%s'"); 2763 static final StaticWarningCode PART_OF_DIFFERENT_LIBRARY = new StaticWarningCo de.con1('PART_OF_DIFFERENT_LIBRARY', 60, "Expected this library to be part of '% s', not '%s'");
2728 2764
2729 /** 2765 /**
2730 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> i s not a subtype of 2766 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> i s not a subtype of
2731 * the type of <i>k</i>. 2767 * the type of <i>k</i>.
2732 * 2768 *
2733 * @param redirectedName the name of the redirected constructor 2769 * @param redirectedName the name of the redirected constructor
2734 * @param redirectingName the name of the redirecting constructor 2770 * @param redirectingName the name of the redirecting constructor
2735 */ 2771 */
2736 static final StaticWarningCode REDIRECT_TO_INVALID_FUNCTION_TYPE = new StaticW arningCode.con1('REDIRECT_TO_INVALID_FUNCTION_TYPE', 60, "The redirected constru ctor '%s' has incompatible parameters with '%s'"); 2772 static final StaticWarningCode REDIRECT_TO_INVALID_FUNCTION_TYPE = new StaticW arningCode.con1('REDIRECT_TO_INVALID_FUNCTION_TYPE', 61, "The redirected constru ctor '%s' has incompatible parameters with '%s'");
2737 2773
2738 /** 2774 /**
2739 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> i s not a subtype of 2775 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> i s not a subtype of
2740 * the type of <i>k</i>. 2776 * the type of <i>k</i>.
2741 * 2777 *
2742 * @param redirectedName the name of the redirected constructor return type 2778 * @param redirectedName the name of the redirected constructor return type
2743 * @param redirectingName the name of the redirecting constructor return type 2779 * @param redirectingName the name of the redirecting constructor return type
2744 */ 2780 */
2745 static final StaticWarningCode REDIRECT_TO_INVALID_RETURN_TYPE = new StaticWar ningCode.con1('REDIRECT_TO_INVALID_RETURN_TYPE', 61, "The return type '%s' of th e redirected constructor is not a subclass of '%s'"); 2781 static final StaticWarningCode REDIRECT_TO_INVALID_RETURN_TYPE = new StaticWar ningCode.con1('REDIRECT_TO_INVALID_RETURN_TYPE', 62, "The return type '%s' of th e redirected constructor is not assignable to '%s'");
2746 2782
2747 /** 2783 /**
2748 * 7.6.2 Factories: It is a static warning if type does not denote a class acc essible in the 2784 * 7.6.2 Factories: It is a static warning if type does not denote a class acc essible in the
2749 * current scope; if type does denote such a class <i>C</i> it is a static war ning if the 2785 * current scope; if type does denote such a class <i>C</i> it is a static war ning if the
2750 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const ructor of <i>C</i>. 2786 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const ructor of <i>C</i>.
2751 */ 2787 */
2752 static final StaticWarningCode REDIRECT_TO_MISSING_CONSTRUCTOR = new StaticWar ningCode.con1('REDIRECT_TO_MISSING_CONSTRUCTOR', 62, "The constructor '%s' could not be found in '%s'"); 2788 static final StaticWarningCode REDIRECT_TO_MISSING_CONSTRUCTOR = new StaticWar ningCode.con1('REDIRECT_TO_MISSING_CONSTRUCTOR', 63, "The constructor '%s' could not be found in '%s'");
2753 2789
2754 /** 2790 /**
2755 * 7.6.2 Factories: It is a static warning if type does not denote a class acc essible in the 2791 * 7.6.2 Factories: It is a static warning if type does not denote a class acc essible in the
2756 * current scope; if type does denote such a class <i>C</i> it is a static war ning if the 2792 * current scope; if type does denote such a class <i>C</i> it is a static war ning if the
2757 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const ructor of <i>C</i>. 2793 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const ructor of <i>C</i>.
2758 */ 2794 */
2759 static final StaticWarningCode REDIRECT_TO_NON_CLASS = new StaticWarningCode.c on1('REDIRECT_TO_NON_CLASS', 63, "The name '%s' is not a type and cannot be used in a redirected constructor"); 2795 static final StaticWarningCode REDIRECT_TO_NON_CLASS = new StaticWarningCode.c on1('REDIRECT_TO_NON_CLASS', 64, "The name '%s' is not a type and cannot be used in a redirected constructor");
2760 2796
2761 /** 2797 /**
2762 * 13.11 Return: Let <i>f</i> be the function immediately enclosing a return s tatement of the form 2798 * 13.11 Return: Let <i>f</i> be the function immediately enclosing a return s tatement of the form
2763 * <i>return;</i> It is a static warning if both of the following conditions h old: 2799 * <i>return;</i> It is a static warning if both of the following conditions h old:
2764 * <ol> 2800 * <ol>
2765 * * <i>f</i> is not a generative constructor. 2801 * * <i>f</i> is not a generative constructor.
2766 * * The return type of <i>f</i> may not be assigned to void. 2802 * * The return type of <i>f</i> may not be assigned to void.
2767 * </ol> 2803 * </ol>
2768 */ 2804 */
2769 static final StaticWarningCode RETURN_WITHOUT_VALUE = new StaticWarningCode.co n1('RETURN_WITHOUT_VALUE', 64, "Missing return value after 'return'"); 2805 static final StaticWarningCode RETURN_WITHOUT_VALUE = new StaticWarningCode.co n1('RETURN_WITHOUT_VALUE', 65, "Missing return value after 'return'");
2770 2806
2771 /** 2807 /**
2772 * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not decl are a static method 2808 * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not decl are a static method
2773 * or getter <i>m</i>. 2809 * or getter <i>m</i>.
2774 * 2810 *
2775 * @param memberName the name of the instance member 2811 * @param memberName the name of the instance member
2776 */ 2812 */
2777 static final StaticWarningCode STATIC_ACCESS_TO_INSTANCE_MEMBER = new StaticWa rningCode.con1('STATIC_ACCESS_TO_INSTANCE_MEMBER', 65, "Instance member '%s' can not be accessed using static access"); 2813 static final StaticWarningCode STATIC_ACCESS_TO_INSTANCE_MEMBER = new StaticWa rningCode.con1('STATIC_ACCESS_TO_INSTANCE_MEMBER', 66, "Instance member '%s' can not be accessed using static access");
2778 2814
2779 /** 2815 /**
2780 * 13.9 Switch: It is a static warning if the type of <i>e</i> may not be assi gned to the type of 2816 * 13.9 Switch: It is a static warning if the type of <i>e</i> may not be assi gned to the type of
2781 * <i>e<sub>k</sub></i>. 2817 * <i>e<sub>k</sub></i>.
2782 */ 2818 */
2783 static final StaticWarningCode SWITCH_EXPRESSION_NOT_ASSIGNABLE = new StaticWa rningCode.con1('SWITCH_EXPRESSION_NOT_ASSIGNABLE', 66, "Type '%s' of the switch expression is not assignable to the type '%s' of case expressions"); 2819 static final StaticWarningCode SWITCH_EXPRESSION_NOT_ASSIGNABLE = new StaticWa rningCode.con1('SWITCH_EXPRESSION_NOT_ASSIGNABLE', 67, "Type '%s' of the switch expression is not assignable to the type '%s' of case expressions");
2784 2820
2785 /** 2821 /**
2786 * 12.31 Type Test: It is a static warning if <i>T</i> does not denote a type available in the 2822 * 12.31 Type Test: It is a static warning if <i>T</i> does not denote a type available in the
2787 * current lexical scope. 2823 * current lexical scope.
2788 */ 2824 */
2789 static final StaticWarningCode TYPE_TEST_NON_TYPE = new StaticWarningCode.con1 ('TYPE_TEST_NON_TYPE', 67, "The name '%s' is not a type and cannot be used in an 'is' expression"); 2825 static final StaticWarningCode TYPE_TEST_NON_TYPE = new StaticWarningCode.con1 ('TYPE_TEST_NON_TYPE', 68, "The name '%s' is not a type and cannot be used in an 'is' expression");
2790 2826
2791 /** 2827 /**
2792 * 10 Generics: However, a type parameter is considered to be a malformed type when referenced by 2828 * 10 Generics: However, a type parameter is considered to be a malformed type when referenced by
2793 * a static member. 2829 * a static member.
2794 * 2830 *
2795 * 15.1 Static Types: Any use of a malformed type gives rise to a static warni ng. A malformed type 2831 * 15.1 Static Types: Any use of a malformed type gives rise to a static warni ng. A malformed type
2796 * is then interpreted as dynamic by the static type checker and the runtime. 2832 * is then interpreted as dynamic by the static type checker and the runtime.
2797 */ 2833 */
2798 static final StaticWarningCode TYPE_PARAMETER_REFERENCED_BY_STATIC = new Stati cWarningCode.con1('TYPE_PARAMETER_REFERENCED_BY_STATIC', 68, "Static members can not reference type parameters"); 2834 static final StaticWarningCode TYPE_PARAMETER_REFERENCED_BY_STATIC = new Stati cWarningCode.con1('TYPE_PARAMETER_REFERENCED_BY_STATIC', 69, "Static members can not reference type parameters");
2799 2835
2800 /** 2836 /**
2801 * 12.15.3 Static Invocation: A static method invocation <i>i</i> has the form 2837 * 12.15.3 Static Invocation: A static method invocation <i>i</i> has the form
2802 * <i>C.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</ sub>, &hellip; 2838 * <i>C.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</ sub>, &hellip;
2803 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a static warning if <i>C</i> d oes not denote a 2839 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a static warning if <i>C</i> d oes not denote a
2804 * class in the current scope. 2840 * class in the current scope.
2805 * 2841 *
2806 * @param undefinedClassName the name of the undefined class 2842 * @param undefinedClassName the name of the undefined class
2807 */ 2843 */
2808 static final StaticWarningCode UNDEFINED_CLASS = new StaticWarningCode.con1('U NDEFINED_CLASS', 69, "Undefined class '%s'"); 2844 static final StaticWarningCode UNDEFINED_CLASS = new StaticWarningCode.con1('U NDEFINED_CLASS', 70, "Undefined class '%s'");
2809 2845
2810 /** 2846 /**
2811 * Same as [UNDEFINED_CLASS], but to catch using "boolean" instead of "bool". 2847 * Same as [UNDEFINED_CLASS], but to catch using "boolean" instead of "bool".
2812 */ 2848 */
2813 static final StaticWarningCode UNDEFINED_CLASS_BOOLEAN = new StaticWarningCode .con1('UNDEFINED_CLASS_BOOLEAN', 70, "Undefined class 'boolean'; did you mean 'b ool'?"); 2849 static final StaticWarningCode UNDEFINED_CLASS_BOOLEAN = new StaticWarningCode .con1('UNDEFINED_CLASS_BOOLEAN', 71, "Undefined class 'boolean'; did you mean 'b ool'?");
2814 2850
2815 /** 2851 /**
2816 * 12.17 Getter Invocation: It is a static warning if there is no class <i>C</ i> in the enclosing 2852 * 12.17 Getter Invocation: It is a static warning if there is no class <i>C</ i> in the enclosing
2817 * lexical scope of <i>i</i>, or if <i>C</i> does not declare, implicitly or e xplicitly, a getter 2853 * lexical scope of <i>i</i>, or if <i>C</i> does not declare, implicitly or e xplicitly, a getter
2818 * named <i>m</i>. 2854 * named <i>m</i>.
2819 * 2855 *
2820 * @param getterName the name of the getter 2856 * @param getterName the name of the getter
2821 * @param enclosingType the name of the enclosing type where the getter is bei ng looked for 2857 * @param enclosingType the name of the enclosing type where the getter is bei ng looked for
2822 */ 2858 */
2823 static final StaticWarningCode UNDEFINED_GETTER = new StaticWarningCode.con1(' UNDEFINED_GETTER', 71, "There is no such getter '%s' in '%s'"); 2859 static final StaticWarningCode UNDEFINED_GETTER = new StaticWarningCode.con1(' UNDEFINED_GETTER', 72, "There is no such getter '%s' in '%s'");
2824 2860
2825 /** 2861 /**
2826 * 12.30 Identifier Reference: It is as static warning if an identifier expres sion of the form 2862 * 12.30 Identifier Reference: It is as static warning if an identifier expres sion of the form
2827 * <i>id</i> occurs inside a top level or static function (be it function, met hod, getter, or 2863 * <i>id</i> occurs inside a top level or static function (be it function, met hod, getter, or
2828 * setter) or variable initializer and there is no declaration <i>d</i> with n ame <i>id</i> in the 2864 * setter) or variable initializer and there is no declaration <i>d</i> with n ame <i>id</i> in the
2829 * lexical scope enclosing the expression. 2865 * lexical scope enclosing the expression.
2830 * 2866 *
2831 * @param name the name of the identifier 2867 * @param name the name of the identifier
2832 */ 2868 */
2833 static final StaticWarningCode UNDEFINED_IDENTIFIER = new StaticWarningCode.co n1('UNDEFINED_IDENTIFIER', 72, "Undefined name '%s'"); 2869 static final StaticWarningCode UNDEFINED_IDENTIFIER = new StaticWarningCode.co n1('UNDEFINED_IDENTIFIER', 73, "Undefined name '%s'");
2834 2870
2835 /** 2871 /**
2836 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>, <i>1<=i<=l</i>, 2872 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>, <i>1<=i<=l</i>,
2837 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i > ... 2873 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i > ...
2838 * <i>p<sub>n+k</sub></i>} or a static warning occurs. 2874 * <i>p<sub>n+k</sub></i>} or a static warning occurs.
2839 * 2875 *
2840 * @param name the name of the requested named parameter 2876 * @param name the name of the requested named parameter
2841 */ 2877 */
2842 static final StaticWarningCode UNDEFINED_NAMED_PARAMETER = new StaticWarningCo de.con1('UNDEFINED_NAMED_PARAMETER', 73, "The named parameter '%s' is not define d"); 2878 static final StaticWarningCode UNDEFINED_NAMED_PARAMETER = new StaticWarningCo de.con1('UNDEFINED_NAMED_PARAMETER', 74, "The named parameter '%s' is not define d");
2843 2879
2844 /** 2880 /**
2845 * 12.18 Assignment: It is as static warning if an assignment of the form <i>v = e</i> occurs 2881 * 12.18 Assignment: It is as static warning if an assignment of the form <i>v = e</i> occurs
2846 * inside a top level or static function (be it function, method, getter, or s etter) or variable 2882 * inside a top level or static function (be it function, method, getter, or s etter) or variable
2847 * initializer and there is no declaration <i>d</i> with name <i>v=</i> in the lexical scope 2883 * initializer and there is no declaration <i>d</i> with name <i>v=</i> in the lexical scope
2848 * enclosing the assignment. 2884 * enclosing the assignment.
2849 * 2885 *
2850 * 12.18 Assignment: It is a static warning if there is no class <i>C</i> in t he enclosing lexical 2886 * 12.18 Assignment: It is a static warning if there is no class <i>C</i> in t he enclosing lexical
2851 * scope of the assignment, or if <i>C</i> does not declare, implicitly or exp licitly, a setter 2887 * scope of the assignment, or if <i>C</i> does not declare, implicitly or exp licitly, a setter
2852 * <i>v=</i>. 2888 * <i>v=</i>.
2853 * 2889 *
2854 * @param setterName the name of the getter 2890 * @param setterName the name of the getter
2855 * @param enclosingType the name of the enclosing type where the setter is bei ng looked for 2891 * @param enclosingType the name of the enclosing type where the setter is bei ng looked for
2856 */ 2892 */
2857 static final StaticWarningCode UNDEFINED_SETTER = new StaticWarningCode.con1(' UNDEFINED_SETTER', 74, "There is no such setter '%s' in '%s'"); 2893 static final StaticWarningCode UNDEFINED_SETTER = new StaticWarningCode.con1(' UNDEFINED_SETTER', 75, "There is no such setter '%s' in '%s'");
2858 2894
2859 /** 2895 /**
2860 * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not decl are a static method 2896 * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not decl are a static method
2861 * or getter <i>m</i>. 2897 * or getter <i>m</i>.
2862 * 2898 *
2863 * @param methodName the name of the method 2899 * @param methodName the name of the method
2864 * @param enclosingType the name of the enclosing type where the method is bei ng looked for 2900 * @param enclosingType the name of the enclosing type where the method is bei ng looked for
2865 */ 2901 */
2866 static final StaticWarningCode UNDEFINED_STATIC_METHOD_OR_GETTER = new StaticW arningCode.con1('UNDEFINED_STATIC_METHOD_OR_GETTER', 75, "There is no such stati c method '%s' in '%s'"); 2902 static final StaticWarningCode UNDEFINED_STATIC_METHOD_OR_GETTER = new StaticW arningCode.con1('UNDEFINED_STATIC_METHOD_OR_GETTER', 76, "There is no such stati c method '%s' in '%s'");
2867 static final List<StaticWarningCode> values = [ 2903 static final List<StaticWarningCode> values = [
2868 AMBIGUOUS_IMPORT, 2904 AMBIGUOUS_IMPORT,
2869 ARGUMENT_TYPE_NOT_ASSIGNABLE, 2905 ARGUMENT_TYPE_NOT_ASSIGNABLE,
2870 ASSIGNMENT_TO_CONST, 2906 ASSIGNMENT_TO_CONST,
2871 ASSIGNMENT_TO_FINAL, 2907 ASSIGNMENT_TO_FINAL,
2872 ASSIGNMENT_TO_METHOD, 2908 ASSIGNMENT_TO_METHOD,
2873 CASE_BLOCK_NOT_TERMINATED, 2909 CASE_BLOCK_NOT_TERMINATED,
2874 CAST_TO_NON_TYPE, 2910 CAST_TO_NON_TYPE,
2875 COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE, 2911 COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE,
2876 COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE, 2912 COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE,
2877 COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR, 2913 COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR,
2878 COMMENT_REFERENCE_UNDECLARED_IDENTIFIER, 2914 COMMENT_REFERENCE_UNDECLARED_IDENTIFIER,
2879 COMMENT_REFERENCE_URI_NOT_LIBRARY, 2915 COMMENT_REFERENCE_URI_NOT_LIBRARY,
2880 CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, 2916 CONCRETE_CLASS_WITH_ABSTRACT_MEMBER,
2917 CONFLICTING_DART_IMPORT,
2881 CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER, 2918 CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER,
2882 CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER, 2919 CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER,
2883 CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER, 2920 CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER,
2884 CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER, 2921 CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER,
2885 CONST_WITH_ABSTRACT_CLASS, 2922 CONST_WITH_ABSTRACT_CLASS,
2886 EQUAL_KEYS_IN_MAP, 2923 EQUAL_KEYS_IN_MAP,
2887 EXPORT_DUPLICATED_LIBRARY_NAME, 2924 EXPORT_DUPLICATED_LIBRARY_NAME,
2888 EXTRA_POSITIONAL_ARGUMENTS, 2925 EXTRA_POSITIONAL_ARGUMENTS,
2889 FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION, 2926 FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION,
2890 FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR, 2927 FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR,
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
3067 * The enumeration `StaticTypeWarningCode` defines the error codes used for stat ic type 3104 * The enumeration `StaticTypeWarningCode` defines the error codes used for stat ic type
3068 * warnings. The convention for this class is for the name of the error code to indicate the problem 3105 * warnings. The convention for this class is for the name of the error code to indicate the problem
3069 * that caused the error to be generated and for the error message to explain wh at is wrong and, 3106 * that caused the error to be generated and for the error message to explain wh at is wrong and,
3070 * when appropriate, how the problem can be corrected. 3107 * when appropriate, how the problem can be corrected.
3071 * 3108 *
3072 * @coverage dart.engine.error 3109 * @coverage dart.engine.error
3073 */ 3110 */
3074 class StaticTypeWarningCode extends Enum<StaticTypeWarningCode> implements Error Code { 3111 class StaticTypeWarningCode extends Enum<StaticTypeWarningCode> implements Error Code {
3075 3112
3076 /** 3113 /**
3114 * 12.7 Lists: A fresh instance (7.6.1) <i>a</i>, of size <i>n</i>, whose clas s implements the
3115 * built-in class <i>List&lt;E></i> is allocated.
3116 *
3117 * @param numTypeArgument the number of provided type arguments
3118 */
3119 static final StaticTypeWarningCode EXPECTED_ONE_LIST_TYPE_ARGUMENTS = new Stat icTypeWarningCode.con1('EXPECTED_ONE_LIST_TYPE_ARGUMENTS', 0, "List literal requ ires exactly one type arguments or none, but %d found");
3120
3121 /**
3122 * 12.8 Maps: A fresh instance (7.6.1) <i>m</i>, of size <i>n</i>, whose class implements the
3123 * built-in class <i>Map&lt;K, V></i> is allocated.
3124 *
3125 * @param numTypeArgument the number of provided type arguments
3126 */
3127 static final StaticTypeWarningCode EXPECTED_TWO_MAP_TYPE_ARGUMENTS = new Stati cTypeWarningCode.con1('EXPECTED_TWO_MAP_TYPE_ARGUMENTS', 1, "Map literal require s exactly two type arguments or none, but %d found");
3128
3129 /**
3077 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. It is a static type 3130 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. It is a static type
3078 * warning if <i>T</i> does not have an accessible instance setter named <i>v= </i>. 3131 * warning if <i>T</i> does not have an accessible instance setter named <i>v= </i>.
3079 * 3132 *
3080 * @see #UNDEFINED_SETTER 3133 * @see #UNDEFINED_SETTER
3081 */ 3134 */
3082 static final StaticTypeWarningCode INACCESSIBLE_SETTER = new StaticTypeWarning Code.con1('INACCESSIBLE_SETTER', 0, ""); 3135 static final StaticTypeWarningCode INACCESSIBLE_SETTER = new StaticTypeWarning Code.con1('INACCESSIBLE_SETTER', 2, "");
3083 3136
3084 /** 3137 /**
3085 * 8.1.1 Inheritance and Overriding: However, if there are multiple members <i >m<sub>1</sub>, 3138 * 8.1.1 Inheritance and Overriding: However, if there are multiple members <i >m<sub>1</sub>,
3086 * &hellip; m<sub>k</sub></i> with the same name <i>n</i> that would be inheri ted (because 3139 * &hellip; m<sub>k</sub></i> with the same name <i>n</i> that would be inheri ted (because
3087 * identically named members existed in several superinterfaces) then at most one member is 3140 * identically named members existed in several superinterfaces) then at most one member is
3088 * inherited. 3141 * inherited.
3089 * 3142 *
3090 * If the static types <i>T<sub>1</sub>, &hellip;, T<sub>k</sub></i> of the me mbers 3143 * If the static types <i>T<sub>1</sub>, &hellip;, T<sub>k</sub></i> of the me mbers
3091 * <i>m<sub>1</sub>, &hellip;, m<sub>k</sub></i> are not identical, then there must be a member 3144 * <i>m<sub>1</sub>, &hellip;, m<sub>k</sub></i> are not identical, then there must be a member
3092 * <i>m<sub>x</sub></i> such that <i>T<sub>x</sub> &lt; T<sub>i</sub>, 1 &lt;= x &lt;= k</i> for 3145 * <i>m<sub>x</sub></i> such that <i>T<sub>x</sub> &lt; T<sub>i</sub>, 1 &lt;= x &lt;= k</i> for
3093 * all <i>i, 1 &lt;= i &lt; k</i>, or a static type warning occurs. The member that is inherited 3146 * all <i>i, 1 &lt;= i &lt; k</i>, or a static type warning occurs. The member that is inherited
3094 * is <i>m<sub>x</sub></i>, if it exists; otherwise: 3147 * is <i>m<sub>x</sub></i>, if it exists; otherwise:
3095 * <ol> 3148 * <ol>
3096 * * If all of <i>m<sub>1</sub>, &hellip; m<sub>k</sub></i> have the same numb er <i>r</i> of 3149 * * If all of <i>m<sub>1</sub>, &hellip; m<sub>k</sub></i> have the same numb er <i>r</i> of
3097 * required parameters and the same set of named parameters <i>s</i>, then let <i>h = max( 3150 * required parameters and the same set of named parameters <i>s</i>, then let <i>h = max(
3098 * numberOfOptionalPositionals( m<sub>i</sub> ) ), 1 &lt;= i &lt;= k</i>. <i>I </i> has a method 3151 * numberOfOptionalPositionals( m<sub>i</sub> ) ), 1 &lt;= i &lt;= k</i>. <i>I </i> has a method
3099 * named <i>n</i>, with <i>r</i> required parameters of type dynamic, <i>h</i> optional positional 3152 * named <i>n</i>, with <i>r</i> required parameters of type dynamic, <i>h</i> optional positional
3100 * parameters of type dynamic, named parameters <i>s</i> of type dynamic and r eturn type dynamic. 3153 * parameters of type dynamic, named parameters <i>s</i> of type dynamic and r eturn type dynamic.
3101 * * Otherwise none of the members <i>m<sub>1</sub>, &hellip;, m<sub>k</sub></ i> is inherited. 3154 * * Otherwise none of the members <i>m<sub>1</sub>, &hellip;, m<sub>k</sub></ i> is inherited.
3102 * </ol> 3155 * </ol>
3103 */ 3156 */
3104 static final StaticTypeWarningCode INCONSISTENT_METHOD_INHERITANCE = new Stati cTypeWarningCode.con1('INCONSISTENT_METHOD_INHERITANCE', 1, "'%s' is inherited b y at least two interfaces inconsistently"); 3157 static final StaticTypeWarningCode INCONSISTENT_METHOD_INHERITANCE = new Stati cTypeWarningCode.con1('INCONSISTENT_METHOD_INHERITANCE', 3, "'%s' is inherited b y at least two interfaces inconsistently");
3105 3158
3106 /** 3159 /**
3107 * 12.15.1 Ordinary Invocation: It is a static type warning if <i>T</i> does n ot have an 3160 * 12.15.1 Ordinary Invocation: It is a static type warning if <i>T</i> does n ot have an
3108 * accessible (3.2) instance member named <i>m</i>. 3161 * accessible (3.2) instance member named <i>m</i>.
3109 * 3162 *
3110 * @param memberName the name of the static member 3163 * @param memberName the name of the static member
3111 * @see UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER 3164 * @see UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER
3112 */ 3165 */
3113 static final StaticTypeWarningCode INSTANCE_ACCESS_TO_STATIC_MEMBER = new Stat icTypeWarningCode.con1('INSTANCE_ACCESS_TO_STATIC_MEMBER', 2, "Static member '%s ' cannot be accessed using instance access"); 3166 static final StaticTypeWarningCode INSTANCE_ACCESS_TO_STATIC_MEMBER = new Stat icTypeWarningCode.con1('INSTANCE_ACCESS_TO_STATIC_MEMBER', 4, "Static member '%s ' cannot be accessed using instance access");
3114 3167
3115 /** 3168 /**
3116 * 12.18 Assignment: It is a static type warning if the static type of <i>e</i > may not be 3169 * 12.18 Assignment: It is a static type warning if the static type of <i>e</i > may not be
3117 * assigned to the static type of <i>v</i>. The static type of the expression <i>v = e</i> is the 3170 * assigned to the static type of <i>v</i>. The static type of the expression <i>v = e</i> is the
3118 * static type of <i>e</i>. 3171 * static type of <i>e</i>.
3119 * 3172 *
3120 * 12.18 Assignment: It is a static type warning if the static type of <i>e</i > may not be 3173 * 12.18 Assignment: It is a static type warning if the static type of <i>e</i > may not be
3121 * assigned to the static type of <i>C.v</i>. The static type of the expressio n <i>C.v = e</i> is 3174 * assigned to the static type of <i>C.v</i>. The static type of the expressio n <i>C.v = e</i> is
3122 * the static type of <i>e</i>. 3175 * the static type of <i>e</i>.
3123 * 3176 *
3124 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. It is a static type 3177 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. It is a static type
3125 * warning if the static type of <i>e<sub>2</sub></i> may not be assigned to < i>T</i>. 3178 * warning if the static type of <i>e<sub>2</sub></i> may not be assigned to < i>T</i>.
3126 * 3179 *
3127 * @param rhsTypeName the name of the right hand side type 3180 * @param rhsTypeName the name of the right hand side type
3128 * @param lhsTypeName the name of the left hand side type 3181 * @param lhsTypeName the name of the left hand side type
3129 */ 3182 */
3130 static final StaticTypeWarningCode INVALID_ASSIGNMENT = new StaticTypeWarningC ode.con1('INVALID_ASSIGNMENT', 3, "A value of type '%s' cannot be assigned to a variable of type '%s'"); 3183 static final StaticTypeWarningCode INVALID_ASSIGNMENT = new StaticTypeWarningC ode.con1('INVALID_ASSIGNMENT', 5, "A value of type '%s' cannot be assigned to a variable of type '%s'");
3131 3184
3132 /** 3185 /**
3133 * 12.15.1 Ordinary Invocation: An ordinary method invocation <i>i</i> has the form 3186 * 12.15.1 Ordinary Invocation: An ordinary method invocation <i>i</i> has the form
3134 * <i>o.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</ sub>, &hellip; 3187 * <i>o.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</ sub>, &hellip;
3135 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. 3188 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>.
3136 * 3189 *
3137 * Let <i>T</i> be the static type of <i>o</i>. It is a static type warning if <i>T</i> does not 3190 * Let <i>T</i> be the static type of <i>o</i>. It is a static type warning if <i>T</i> does not
3138 * have an accessible instance member named <i>m</i>. If <i>T.m</i> exists, it is a static warning 3191 * have an accessible instance member named <i>m</i>. If <i>T.m</i> exists, it is a static warning
3139 * if the type <i>F</i> of <i>T.m</i> may not be assigned to a function type. If <i>T.m</i> does 3192 * if the type <i>F</i> of <i>T.m</i> may not be assigned to a function type. If <i>T.m</i> does
3140 * not exist, or if <i>F</i> is not a function type, the static type of <i>i</ i> is dynamic. 3193 * not exist, or if <i>F</i> is not a function type, the static type of <i>i</ i> is dynamic.
3141 * 3194 *
3142 * 12.15.3 Static Invocation: It is a static type warning if the type <i>F</i> of <i>C.m</i> may 3195 * 12.15.3 Static Invocation: It is a static type warning if the type <i>F</i> of <i>C.m</i> may
3143 * not be assigned to a function type. 3196 * not be assigned to a function type.
3144 * 3197 *
3145 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form 3198 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form
3146 * <i>super.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n +1</sub>, &hellip; 3199 * <i>super.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n +1</sub>, &hellip;
3147 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. If <i>S.m</i> exists, it is a static warning if the type 3200 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. If <i>S.m</i> exists, it is a static warning if the type
3148 * <i>F</i> of <i>S.m</i> may not be assigned to a function type. 3201 * <i>F</i> of <i>S.m</i> may not be assigned to a function type.
3149 * 3202 *
3150 * @param nonFunctionIdentifier the name of the identifier that is not a funct ion type 3203 * @param nonFunctionIdentifier the name of the identifier that is not a funct ion type
3151 */ 3204 */
3152 static final StaticTypeWarningCode INVOCATION_OF_NON_FUNCTION = new StaticType WarningCode.con1('INVOCATION_OF_NON_FUNCTION', 4, "'%s' is not a method"); 3205 static final StaticTypeWarningCode INVOCATION_OF_NON_FUNCTION = new StaticType WarningCode.con1('INVOCATION_OF_NON_FUNCTION', 6, "'%s' is not a method");
3153 3206
3154 /** 3207 /**
3155 * 12.14.4 Function Expression Invocation: A function expression invocation <i >i</i> has the form 3208 * 12.14.4 Function Expression Invocation: A function expression invocation <i >i</i> has the form
3156 * <i>e<sub>f</sub>(a<sub>1</sub>, &hellip; a<sub>n</sub>, x<sub>n+1</sub>: a< sub>n+1</sub>, 3209 * <i>e<sub>f</sub>(a<sub>1</sub>, &hellip; a<sub>n</sub>, x<sub>n+1</sub>: a< sub>n+1</sub>,
3157 * &hellip;, x<sub>n+k</sub>: a<sub>n+k</sub>)</i>, where <i>e<sub>f</sub></i> is an expression. 3210 * &hellip;, x<sub>n+k</sub>: a<sub>n+k</sub>)</i>, where <i>e<sub>f</sub></i> is an expression.
3158 * 3211 *
3159 * It is a static type warning if the static type <i>F</i> of <i>e<sub>f</sub> </i> may not be 3212 * It is a static type warning if the static type <i>F</i> of <i>e<sub>f</sub> </i> may not be
3160 * assigned to a function type. 3213 * assigned to a function type.
3161 */ 3214 */
3162 static final StaticTypeWarningCode INVOCATION_OF_NON_FUNCTION_EXPRESSION = new StaticTypeWarningCode.con1('INVOCATION_OF_NON_FUNCTION_EXPRESSION', 5, "Cannot invoke a non-function"); 3215 static final StaticTypeWarningCode INVOCATION_OF_NON_FUNCTION_EXPRESSION = new StaticTypeWarningCode.con1('INVOCATION_OF_NON_FUNCTION_EXPRESSION', 7, "Cannot invoke a non-function");
3163 3216
3164 /** 3217 /**
3165 * 12.19 Conditional: It is a static type warning if the type of <i>e<sub>1</s ub></i> may not be 3218 * 12.19 Conditional: It is a static type warning if the type of <i>e<sub>1</s ub></i> may not be
3166 * assigned to bool. 3219 * assigned to bool.
3167 * 3220 *
3168 * 13.5 If: It is a static type warning if the type of the expression <i>b</i> may not be assigned 3221 * 13.5 If: It is a static type warning if the type of the expression <i>b</i> may not be assigned
3169 * to bool. 3222 * to bool.
3170 * 3223 *
3171 * 13.7 While: It is a static type warning if the type of <i>e</i> may not be assigned to bool. 3224 * 13.7 While: It is a static type warning if the type of <i>e</i> may not be assigned to bool.
3172 * 3225 *
3173 * 13.8 Do: It is a static type warning if the type of <i>e</i> cannot be assi gned to bool. 3226 * 13.8 Do: It is a static type warning if the type of <i>e</i> cannot be assi gned to bool.
3174 */ 3227 */
3175 static final StaticTypeWarningCode NON_BOOL_CONDITION = new StaticTypeWarningC ode.con1('NON_BOOL_CONDITION', 6, "Conditions must have a static type of 'bool'" ); 3228 static final StaticTypeWarningCode NON_BOOL_CONDITION = new StaticTypeWarningC ode.con1('NON_BOOL_CONDITION', 8, "Conditions must have a static type of 'bool'" );
3176 3229
3177 /** 3230 /**
3178 * 13.15 Assert: It is a static type warning if the type of <i>e</i> may not b e assigned to either 3231 * 13.15 Assert: It is a static type warning if the type of <i>e</i> may not b e assigned to either
3179 * bool or () &rarr; bool 3232 * bool or () &rarr; bool
3180 */ 3233 */
3181 static final StaticTypeWarningCode NON_BOOL_EXPRESSION = new StaticTypeWarning Code.con1('NON_BOOL_EXPRESSION', 7, "Assertions must be on either a 'bool' or '( ) -> bool'"); 3234 static final StaticTypeWarningCode NON_BOOL_EXPRESSION = new StaticTypeWarning Code.con1('NON_BOOL_EXPRESSION', 9, "Assertions must be on either a 'bool' or '( ) -> bool'");
3182 3235
3183 /** 3236 /**
3184 * 15.8 Parameterized Types: It is a static type warning if <i>A<sub>i</sub>, 1 &lt;= i &lt;= 3237 * 15.8 Parameterized Types: It is a static type warning if <i>A<sub>i</sub>, 1 &lt;= i &lt;=
3185 * n</i> does not denote a type in the enclosing lexical scope. 3238 * n</i> does not denote a type in the enclosing lexical scope.
3186 */ 3239 */
3187 static final StaticTypeWarningCode NON_TYPE_AS_TYPE_ARGUMENT = new StaticTypeW arningCode.con1('NON_TYPE_AS_TYPE_ARGUMENT', 8, "The name '%s' is not a type and cannot be used as a parameterized type"); 3240 static final StaticTypeWarningCode NON_TYPE_AS_TYPE_ARGUMENT = new StaticTypeW arningCode.con1('NON_TYPE_AS_TYPE_ARGUMENT', 10, "The name '%s' is not a type an d cannot be used as a parameterized type");
3188 3241
3189 /** 3242 /**
3190 * 13.11 Return: It is a static type warning if the type of <i>e</i> may not b e assigned to the 3243 * 13.11 Return: It is a static type warning if the type of <i>e</i> may not b e assigned to the
3191 * declared return type of the immediately enclosing function. 3244 * declared return type of the immediately enclosing function.
3192 * 3245 *
3193 * @param actualReturnType the return type as declared in the return statement 3246 * @param actualReturnType the return type as declared in the return statement
3194 * @param expectedReturnType the expected return type as defined by the method 3247 * @param expectedReturnType the expected return type as defined by the method
3195 * @param methodName the name of the method 3248 * @param methodName the name of the method
3196 */ 3249 */
3197 static final StaticTypeWarningCode RETURN_OF_INVALID_TYPE = new StaticTypeWarn ingCode.con1('RETURN_OF_INVALID_TYPE', 9, "The return type '%s' is not a '%s', a s defined by the method '%s'"); 3250 static final StaticTypeWarningCode RETURN_OF_INVALID_TYPE = new StaticTypeWarn ingCode.con1('RETURN_OF_INVALID_TYPE', 11, "The return type '%s' is not a '%s', as defined by the method '%s'");
3198 3251
3199 /** 3252 /**
3200 * 12.11 Instance Creation: It is a static type warning if any of the type arg uments to a 3253 * 12.11 Instance Creation: It is a static type warning if any of the type arg uments to a
3201 * constructor of a generic type <i>G</i> invoked by a new expression or a con stant object 3254 * constructor of a generic type <i>G</i> invoked by a new expression or a con stant object
3202 * expression are not subtypes of the bounds of the corresponding formal type parameters of 3255 * expression are not subtypes of the bounds of the corresponding formal type parameters of
3203 * <i>G</i>. 3256 * <i>G</i>.
3204 * 3257 *
3205 * 10 Generics: It is a static type warning if a type parameter is a supertype of its upper bound.
3206 *
3207 * 15.8 Parameterized Types: If <i>S</i> is the static type of a member <i>m</ i> of <i>G</i>, then 3258 * 15.8 Parameterized Types: If <i>S</i> is the static type of a member <i>m</ i> of <i>G</i>, then
3208 * the static type of the member <i>m</i> of <i>G&lt;A<sub>1</sub>, &hellip; A <sub>n</sub>&gt;</i> 3259 * the static type of the member <i>m</i> of <i>G&lt;A<sub>1</sub>, &hellip; A <sub>n</sub>&gt;</i>
3209 * is <i>[A<sub>1</sub>, &hellip;, A<sub>n</sub>/T<sub>1</sub>, &hellip;, T<su b>n</sub>]S</i> 3260 * is <i>[A<sub>1</sub>, &hellip;, A<sub>n</sub>/T<sub>1</sub>, &hellip;, T<su b>n</sub>]S</i>
3210 * where <i>T<sub>1</sub>, &hellip; T<sub>n</sub></i> are the formal type para meters of <i>G</i>. 3261 * where <i>T<sub>1</sub>, &hellip; T<sub>n</sub></i> are the formal type para meters of <i>G</i>.
3211 * Let <i>B<sub>i</sub></i> be the bounds of <i>T<sub>i</sub>, 1 &lt;= i &lt;= n</i>. It is a 3262 * Let <i>B<sub>i</sub></i> be the bounds of <i>T<sub>i</sub>, 1 &lt;= i &lt;= n</i>. It is a
3212 * static type warning if <i>A<sub>i</sub></i> is not a subtype of <i>[A<sub>1 </sub>, &hellip;, 3263 * static type warning if <i>A<sub>i</sub></i> is not a subtype of <i>[A<sub>1 </sub>, &hellip;,
3213 * A<sub>n</sub>/T<sub>1</sub>, &hellip;, T<sub>n</sub>]B<sub>i</sub>, 1 &lt;= i &lt;= n</i>. 3264 * A<sub>n</sub>/T<sub>1</sub>, &hellip;, T<sub>n</sub>]B<sub>i</sub>, 1 &lt;= i &lt;= n</i>.
3214 * 3265 *
3215 * 7.6.2 Factories: It is a static type warning if any of the type arguments t o <i>k'</i> are not 3266 * 7.6.2 Factories: It is a static type warning if any of the type arguments t o <i>k'</i> are not
3216 * subtypes of the bounds of the corresponding formal type parameters of type. 3267 * subtypes of the bounds of the corresponding formal type parameters of type.
3217 * 3268 *
3218 * @param boundedTypeName the name of the type used in the instance creation t hat should be 3269 * @param boundedTypeName the name of the type used in the instance creation t hat should be
3219 * limited by the bound as specified in the class declaration 3270 * limited by the bound as specified in the class declaration
3220 * @param boundingTypeName the name of the bounding type 3271 * @param boundingTypeName the name of the bounding type
3272 * @see #TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND
3221 */ 3273 */
3222 static final StaticTypeWarningCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = new Sta ticTypeWarningCode.con1('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 10, "'%s' does not extend '%s'"); 3274 static final StaticTypeWarningCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = new Sta ticTypeWarningCode.con1('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 12, "'%s' does not extend '%s'");
3275
3276 /**
3277 * 10 Generics: It is a static type warning if a type parameter is a supertype of its upper bound.
3278 *
3279 * @param typeParameterName the name of the type parameter
3280 * @see #TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
3281 */
3282 static final StaticTypeWarningCode TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND = new StaticTypeWarningCode.con1('TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND', 13, "'%s' c annot be a supertype of its upper bound");
3223 3283
3224 /** 3284 /**
3225 * 12.17 Getter Invocation: Let <i>T</i> be the static type of <i>e</i>. It is a static type 3285 * 12.17 Getter Invocation: Let <i>T</i> be the static type of <i>e</i>. It is a static type
3226 * warning if <i>T</i> does not have a getter named <i>m</i>. 3286 * warning if <i>T</i> does not have a getter named <i>m</i>.
3227 * 3287 *
3228 * @param getterName the name of the getter 3288 * @param getterName the name of the getter
3229 * @param enclosingType the name of the enclosing type where the getter is bei ng looked for 3289 * @param enclosingType the name of the enclosing type where the getter is bei ng looked for
3230 */ 3290 */
3231 static final StaticTypeWarningCode UNDEFINED_GETTER = new StaticTypeWarningCod e.con1('UNDEFINED_GETTER', 11, "There is no such getter '%s' in '%s'"); 3291 static final StaticTypeWarningCode UNDEFINED_GETTER = new StaticTypeWarningCod e.con1('UNDEFINED_GETTER', 14, "There is no such getter '%s' in '%s'");
3232 3292
3233 /** 3293 /**
3234 * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>. I t is a static type 3294 * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>. I t is a static type
3235 * warning if <i>T</i> does not have an accessible instance member named <i>m< /i>. 3295 * warning if <i>T</i> does not have an accessible instance member named <i>m< /i>.
3236 * 3296 *
3237 * @param methodName the name of the method that is undefined 3297 * @param methodName the name of the method that is undefined
3238 * @param typeName the resolved type name that the method lookup is happening on 3298 * @param typeName the resolved type name that the method lookup is happening on
3239 */ 3299 */
3240 static final StaticTypeWarningCode UNDEFINED_METHOD = new StaticTypeWarningCod e.con1('UNDEFINED_METHOD', 12, "The method '%s' is not defined for the class '%s '"); 3300 static final StaticTypeWarningCode UNDEFINED_METHOD = new StaticTypeWarningCod e.con1('UNDEFINED_METHOD', 15, "The method '%s' is not defined for the class '%s '");
3241 3301
3242 /** 3302 /**
3243 * 12.18 Assignment: Evaluation of an assignment of the form 3303 * 12.18 Assignment: Evaluation of an assignment of the form
3244 * <i>e<sub>1</sub></i>[<i>e<sub>2</sub></i>] = <i>e<sub>3</sub></i> is equiva lent to the 3304 * <i>e<sub>1</sub></i>[<i>e<sub>2</sub></i>] = <i>e<sub>3</sub></i> is equiva lent to the
3245 * evaluation of the expression (a, i, e){a.[]=(i, e); return e;} (<i>e<sub>1< /sub></i>, 3305 * evaluation of the expression (a, i, e){a.[]=(i, e); return e;} (<i>e<sub>1< /sub></i>,
3246 * <i>e<sub>2</sub></i>, <i>e<sub>2</sub></i>). 3306 * <i>e<sub>2</sub></i>, <i>e<sub>2</sub></i>).
3247 * 3307 *
3248 * 12.29 Assignable Expressions: An assignable expression of the form 3308 * 12.29 Assignable Expressions: An assignable expression of the form
3249 * <i>e<sub>1</sub></i>[<i>e<sub>2</sub></i>] is evaluated as a method invocat ion of the operator 3309 * <i>e<sub>1</sub></i>[<i>e<sub>2</sub></i>] is evaluated as a method invocat ion of the operator
3250 * method [] on <i>e<sub>1</sub></i> with argument <i>e<sub>2</sub></i>. 3310 * method [] on <i>e<sub>1</sub></i> with argument <i>e<sub>2</sub></i>.
3251 * 3311 *
3252 * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>. I t is a static type 3312 * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>. I t is a static type
3253 * warning if <i>T</i> does not have an accessible instance member named <i>m< /i>. 3313 * warning if <i>T</i> does not have an accessible instance member named <i>m< /i>.
3254 * 3314 *
3255 * @param operator the name of the operator 3315 * @param operator the name of the operator
3256 * @param enclosingType the name of the enclosing type where the operator is b eing looked for 3316 * @param enclosingType the name of the enclosing type where the operator is b eing looked for
3257 */ 3317 */
3258 static final StaticTypeWarningCode UNDEFINED_OPERATOR = new StaticTypeWarningC ode.con1('UNDEFINED_OPERATOR', 13, "There is no such operator '%s' in '%s'"); 3318 static final StaticTypeWarningCode UNDEFINED_OPERATOR = new StaticTypeWarningC ode.con1('UNDEFINED_OPERATOR', 16, "There is no such operator '%s' in '%s'");
3259 3319
3260 /** 3320 /**
3261 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. It is a static type 3321 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. It is a static type
3262 * warning if <i>T</i> does not have an accessible instance setter named <i>v= </i>. 3322 * warning if <i>T</i> does not have an accessible instance setter named <i>v= </i>.
3263 * 3323 *
3264 * @param setterName the name of the setter 3324 * @param setterName the name of the setter
3265 * @param enclosingType the name of the enclosing type where the setter is bei ng looked for 3325 * @param enclosingType the name of the enclosing type where the setter is bei ng looked for
3266 * @see #INACCESSIBLE_SETTER 3326 * @see #INACCESSIBLE_SETTER
3267 */ 3327 */
3268 static final StaticTypeWarningCode UNDEFINED_SETTER = new StaticTypeWarningCod e.con1('UNDEFINED_SETTER', 14, "There is no such setter '%s' in '%s'"); 3328 static final StaticTypeWarningCode UNDEFINED_SETTER = new StaticTypeWarningCod e.con1('UNDEFINED_SETTER', 17, "There is no such setter '%s' in '%s'");
3269 3329
3270 /** 3330 /**
3271 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form 3331 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form
3272 * <i>super.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n +1</sub>, &hellip; 3332 * <i>super.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n +1</sub>, &hellip;
3273 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a static type warning if <i>S< /i> does not have an 3333 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a static type warning if <i>S< /i> does not have an
3274 * accessible instance member named <i>m</i>. 3334 * accessible instance member named <i>m</i>.
3275 * 3335 *
3276 * @param methodName the name of the method that is undefined 3336 * @param methodName the name of the method that is undefined
3277 * @param typeName the resolved type name that the method lookup is happening on 3337 * @param typeName the resolved type name that the method lookup is happening on
3278 */ 3338 */
3279 static final StaticTypeWarningCode UNDEFINED_SUPER_METHOD = new StaticTypeWarn ingCode.con1('UNDEFINED_SUPER_METHOD', 15, "There is no such method '%s' in '%s' "); 3339 static final StaticTypeWarningCode UNDEFINED_SUPER_METHOD = new StaticTypeWarn ingCode.con1('UNDEFINED_SUPER_METHOD', 18, "There is no such method '%s' in '%s' ");
3280 3340
3281 /** 3341 /**
3282 * 12.15.1 Ordinary Invocation: It is a static type warning if <i>T</i> does n ot have an 3342 * 12.15.1 Ordinary Invocation: It is a static type warning if <i>T</i> does n ot have an
3283 * accessible (3.2) instance member named <i>m</i>. 3343 * accessible (3.2) instance member named <i>m</i>.
3284 * 3344 *
3285 * This is a specialization of [INSTANCE_ACCESS_TO_STATIC_MEMBER] that is used when we are 3345 * This is a specialization of [INSTANCE_ACCESS_TO_STATIC_MEMBER] that is used when we are
3286 * able to find the name defined in a supertype. It exists to provide a more i nformative error 3346 * able to find the name defined in a supertype. It exists to provide a more i nformative error
3287 * message. 3347 * message.
3288 */ 3348 */
3289 static final StaticTypeWarningCode UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_M EMBER = new StaticTypeWarningCode.con1('UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATI C_MEMBER', 16, "Static members from supertypes must be qualified by the name of the defining type"); 3349 static final StaticTypeWarningCode UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_M EMBER = new StaticTypeWarningCode.con1('UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATI C_MEMBER', 19, "Static members from supertypes must be qualified by the name of the defining type");
3290 3350
3291 /** 3351 /**
3292 * 15.8 Parameterized Types: It is a static type warning if <i>G</i> is not a generic type with 3352 * 15.8 Parameterized Types: It is a static type warning if <i>G</i> is not a generic type with
3293 * exactly <i>n</i> type parameters. 3353 * exactly <i>n</i> type parameters.
3294 * 3354 *
3295 * @param typeName the name of the type being referenced (<i>G</i>) 3355 * @param typeName the name of the type being referenced (<i>G</i>)
3296 * @param parameterCount the number of type parameters that were declared 3356 * @param parameterCount the number of type parameters that were declared
3297 * @param argumentCount the number of type arguments provided 3357 * @param argumentCount the number of type arguments provided
3298 * @see CompileTimeErrorCode#CONST_WITH_INVALID_TYPE_PARAMETERS 3358 * @see CompileTimeErrorCode#CONST_WITH_INVALID_TYPE_PARAMETERS
3299 * @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS 3359 * @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS
3300 */ 3360 */
3301 static final StaticTypeWarningCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = new Static TypeWarningCode.con1('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 17, "The type '%s' is dec lared with %d type parameters, but %d type arguments were given"); 3361 static final StaticTypeWarningCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = new Static TypeWarningCode.con1('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 20, "The type '%s' is dec lared with %d type parameters, but %d type arguments were given");
3302 static final List<StaticTypeWarningCode> values = [ 3362 static final List<StaticTypeWarningCode> values = [
3363 EXPECTED_ONE_LIST_TYPE_ARGUMENTS,
3364 EXPECTED_TWO_MAP_TYPE_ARGUMENTS,
3303 INACCESSIBLE_SETTER, 3365 INACCESSIBLE_SETTER,
3304 INCONSISTENT_METHOD_INHERITANCE, 3366 INCONSISTENT_METHOD_INHERITANCE,
3305 INSTANCE_ACCESS_TO_STATIC_MEMBER, 3367 INSTANCE_ACCESS_TO_STATIC_MEMBER,
3306 INVALID_ASSIGNMENT, 3368 INVALID_ASSIGNMENT,
3307 INVOCATION_OF_NON_FUNCTION, 3369 INVOCATION_OF_NON_FUNCTION,
3308 INVOCATION_OF_NON_FUNCTION_EXPRESSION, 3370 INVOCATION_OF_NON_FUNCTION_EXPRESSION,
3309 NON_BOOL_CONDITION, 3371 NON_BOOL_CONDITION,
3310 NON_BOOL_EXPRESSION, 3372 NON_BOOL_EXPRESSION,
3311 NON_TYPE_AS_TYPE_ARGUMENT, 3373 NON_TYPE_AS_TYPE_ARGUMENT,
3312 RETURN_OF_INVALID_TYPE, 3374 RETURN_OF_INVALID_TYPE,
3313 TYPE_ARGUMENT_NOT_MATCHING_BOUNDS, 3375 TYPE_ARGUMENT_NOT_MATCHING_BOUNDS,
3376 TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND,
3314 UNDEFINED_GETTER, 3377 UNDEFINED_GETTER,
3315 UNDEFINED_METHOD, 3378 UNDEFINED_METHOD,
3316 UNDEFINED_OPERATOR, 3379 UNDEFINED_OPERATOR,
3317 UNDEFINED_SETTER, 3380 UNDEFINED_SETTER,
3318 UNDEFINED_SUPER_METHOD, 3381 UNDEFINED_SUPER_METHOD,
3319 UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER, 3382 UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER,
3320 WRONG_NUMBER_OF_TYPE_ARGUMENTS]; 3383 WRONG_NUMBER_OF_TYPE_ARGUMENTS];
3321 3384
3322 /** 3385 /**
3323 * The template used to create the message to be displayed for this error. 3386 * The template used to create the message to be displayed for this error.
(...skipping 23 matching lines...) Expand all
3347 */ 3410 */
3348 StaticTypeWarningCode.con2(String name, int ordinal, String message, String co rrection) : super(name, ordinal) { 3411 StaticTypeWarningCode.con2(String name, int ordinal, String message, String co rrection) : super(name, ordinal) {
3349 this._message = message; 3412 this._message = message;
3350 this.correction6 = correction; 3413 this.correction6 = correction;
3351 } 3414 }
3352 String get correction => correction6; 3415 String get correction => correction6;
3353 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; 3416 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity;
3354 String get message => _message; 3417 String get message => _message;
3355 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; 3418 ErrorType get type => ErrorType.STATIC_TYPE_WARNING;
3356 } 3419 }
OLDNEW
« no previous file with comments | « pkg/analyzer_experimental/lib/src/generated/engine.dart ('k') | pkg/analyzer_experimental/lib/src/generated/java_core.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698