| OLD | NEW |
| 1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
| 2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
| 3 | 3 |
| 4 library engine.error; | 4 library engine.error; |
| 5 | 5 |
| 6 import 'java_core.dart'; | 6 import 'java_core.dart'; |
| 7 import 'source.dart'; | 7 import 'source.dart'; |
| 8 import 'ast.dart' show ASTNode; | 8 import 'ast.dart' show ASTNode; |
| 9 import 'scanner.dart' show Token; | 9 import 'scanner.dart' show Token; |
| 10 | 10 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 * @param arguments the arguments to the error, used to compose the error mess
age | 115 * @param arguments the arguments to the error, used to compose the error mess
age |
| 116 */ | 116 */ |
| 117 void reportError2(ErrorCode errorCode, Token token, List<Object> arguments) { | 117 void reportError2(ErrorCode errorCode, Token token, List<Object> arguments) { |
| 118 _errorListener.onError(new AnalysisError.con2(_source, token.offset, token.l
ength, errorCode, [arguments])); | 118 _errorListener.onError(new AnalysisError.con2(_source, token.offset, token.l
ength, errorCode, [arguments])); |
| 119 } | 119 } |
| 120 /** | 120 /** |
| 121 * Set the source to be used when reporting errors. Setting the source to {@co
de null} will cause | 121 * Set the source to be used when reporting errors. Setting the source to {@co
de null} will cause |
| 122 * the default source to be used. | 122 * the default source to be used. |
| 123 * @param source the source to be used when reporting errors | 123 * @param source the source to be used when reporting errors |
| 124 */ | 124 */ |
| 125 void set source(Source source9) { | 125 void set source(Source source7) { |
| 126 this._source = source9 == null ? _defaultSource : source9; | 126 this._source = source7 == null ? _defaultSource : source7; |
| 127 } | 127 } |
| 128 } | 128 } |
| 129 /** | 129 /** |
| 130 * Instances of the class {@code AnalysisError} represent an error discovered du
ring the analysis of | 130 * Instances of the class {@code AnalysisError} represent an error discovered du
ring the analysis of |
| 131 * some Dart code. | 131 * some Dart code. |
| 132 * @see AnalysisErrorListener | 132 * @see AnalysisErrorListener |
| 133 * @coverage dart.engine.error | 133 * @coverage dart.engine.error |
| 134 */ | 134 */ |
| 135 class AnalysisError { | 135 class AnalysisError { |
| 136 /** | 136 /** |
| (...skipping 21 matching lines...) Expand all Loading... |
| 158 * compilation error. | 158 * compilation error. |
| 159 */ | 159 */ |
| 160 int _length = 0; | 160 int _length = 0; |
| 161 /** | 161 /** |
| 162 * Initialize a newly created analysis error for the specified source. The err
or has no location | 162 * Initialize a newly created analysis error for the specified source. The err
or has no location |
| 163 * information. | 163 * information. |
| 164 * @param source the source for which the exception occurred | 164 * @param source the source for which the exception occurred |
| 165 * @param errorCode the error code to be associated with this error | 165 * @param errorCode the error code to be associated with this error |
| 166 * @param arguments the arguments used to build the error message | 166 * @param arguments the arguments used to build the error message |
| 167 */ | 167 */ |
| 168 AnalysisError.con1(Source source4, ErrorCode errorCode2, List<Object> argument
s) { | 168 AnalysisError.con1(Source source2, ErrorCode errorCode2, List<Object> argument
s) { |
| 169 _jtd_constructor_131_impl(source4, errorCode2, arguments); | 169 _jtd_constructor_130_impl(source2, errorCode2, arguments); |
| 170 } | 170 } |
| 171 _jtd_constructor_131_impl(Source source4, ErrorCode errorCode2, List<Object> a
rguments) { | 171 _jtd_constructor_130_impl(Source source2, ErrorCode errorCode2, List<Object> a
rguments) { |
| 172 this._source = source4; | 172 this._source = source2; |
| 173 this._errorCode = errorCode2; | 173 this._errorCode = errorCode2; |
| 174 this._message = JavaString.format(errorCode2.message, arguments); | 174 this._message = JavaString.format(errorCode2.message, arguments); |
| 175 } | 175 } |
| 176 /** | 176 /** |
| 177 * Initialize a newly created analysis error for the specified source at the g
iven location. | 177 * Initialize a newly created analysis error for the specified source at the g
iven location. |
| 178 * @param source the source for which the exception occurred | 178 * @param source the source for which the exception occurred |
| 179 * @param offset the offset of the location of the error | 179 * @param offset the offset of the location of the error |
| 180 * @param length the length of the location of the error | 180 * @param length the length of the location of the error |
| 181 * @param errorCode the error code to be associated with this error | 181 * @param errorCode the error code to be associated with this error |
| 182 * @param arguments the arguments used to build the error message | 182 * @param arguments the arguments used to build the error message |
| 183 */ | 183 */ |
| 184 AnalysisError.con2(Source source5, int offset2, int length11, ErrorCode errorC
ode3, List<Object> arguments) { | 184 AnalysisError.con2(Source source3, int offset2, int length11, ErrorCode errorC
ode3, List<Object> arguments) { |
| 185 _jtd_constructor_132_impl(source5, offset2, length11, errorCode3, arguments)
; | 185 _jtd_constructor_131_impl(source3, offset2, length11, errorCode3, arguments)
; |
| 186 } | 186 } |
| 187 _jtd_constructor_132_impl(Source source5, int offset2, int length11, ErrorCode
errorCode3, List<Object> arguments) { | 187 _jtd_constructor_131_impl(Source source3, int offset2, int length11, ErrorCode
errorCode3, List<Object> arguments) { |
| 188 this._source = source5; | 188 this._source = source3; |
| 189 this._offset = offset2; | 189 this._offset = offset2; |
| 190 this._length = length11; | 190 this._length = length11; |
| 191 this._errorCode = errorCode3; | 191 this._errorCode = errorCode3; |
| 192 this._message = JavaString.format(errorCode3.message, arguments); | 192 this._message = JavaString.format(errorCode3.message, arguments); |
| 193 } | 193 } |
| 194 /** | 194 /** |
| 195 * Return the error code associated with the error. | 195 * Return the error code associated with the error. |
| 196 * @return the error code associated with the error | 196 * @return the error code associated with the error |
| 197 */ | 197 */ |
| 198 ErrorCode get errorCode => _errorCode; | 198 ErrorCode get errorCode => _errorCode; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 221 int get hashCode { | 221 int get hashCode { |
| 222 int hashCode = _offset; | 222 int hashCode = _offset; |
| 223 hashCode ^= (_message != null) ? _message.hashCode : 0; | 223 hashCode ^= (_message != null) ? _message.hashCode : 0; |
| 224 hashCode ^= (_source != null) ? _source.hashCode : 0; | 224 hashCode ^= (_source != null) ? _source.hashCode : 0; |
| 225 return hashCode; | 225 return hashCode; |
| 226 } | 226 } |
| 227 /** | 227 /** |
| 228 * Set the source in which the error occurred to the given source. | 228 * Set the source in which the error occurred to the given source. |
| 229 * @param source the source in which the error occurred | 229 * @param source the source in which the error occurred |
| 230 */ | 230 */ |
| 231 void set source(Source source6) { | 231 void set source(Source source4) { |
| 232 this._source = source6; | 232 this._source = source4; |
| 233 } | 233 } |
| 234 String toString() { | 234 String toString() { |
| 235 JavaStringBuilder builder = new JavaStringBuilder(); | 235 JavaStringBuilder builder = new JavaStringBuilder(); |
| 236 builder.append((_source != null) ? _source.fullName : "<unknown source>"); | 236 builder.append((_source != null) ? _source.fullName : "<unknown source>"); |
| 237 builder.append("("); | 237 builder.append("("); |
| 238 builder.append(_offset); | 238 builder.append(_offset); |
| 239 builder.append(".."); | 239 builder.append(".."); |
| 240 builder.append(_offset + _length - 1); | 240 builder.append(_offset + _length - 1); |
| 241 builder.append("): "); | 241 builder.append("): "); |
| 242 builder.append(_message); | 242 builder.append(_message); |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time | 533 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time |
| 534 * error if more than one initializer corresponding to a given instance variab
le appears in | 534 * error if more than one initializer corresponding to a given instance variab
le appears in |
| 535 * <i>k</i>’s list. | 535 * <i>k</i>’s list. |
| 536 */ | 536 */ |
| 537 static final CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS =
new CompileTimeErrorCode('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 31, ""); | 537 static final CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS =
new CompileTimeErrorCode('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 31, ""); |
| 538 /** | 538 /** |
| 539 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time | 539 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time |
| 540 * error if <i>k</i>’s initializer list contains an initializer for a final
variable <i>f</i> | 540 * error if <i>k</i>’s initializer list contains an initializer for a final
variable <i>f</i> |
| 541 * whose declaration includes an initialization expression. | 541 * whose declaration includes an initialization expression. |
| 542 */ | 542 */ |
| 543 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARA
TION = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATIO
N', 32, ""); | 543 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARA
TION = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATIO
N', 32, "Values cannot be set in the constructor if they are final, and have alr
eady been set"); |
| 544 /** | 544 /** |
| 545 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time | 545 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time |
| 546 * error if <i>k</i>’s initializer list contains an initializer for a variab
le that is initialized | 546 * error if <i>k</i>’s initializer list contains an initializer for a variab
le that is initialized |
| 547 * by means of an initializing formal of <i>k</i>. | 547 * by means of an initializing formal of <i>k</i>. |
| 548 */ | 548 */ |
| 549 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ
ER = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER',
33, ""); | 549 static final CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ
ER = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER',
33, "Fields cannot be initialized in both the parameter list and the initializer
s"); |
| 550 /** | 550 /** |
| 551 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by | 551 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by |
| 552 * a function other than a non-redirecting generative constructor. | 552 * a function other than a non-redirecting generative constructor. |
| 553 */ | 553 */ |
| 554 static final CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new
CompileTimeErrorCode('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 34, ""); | 554 static final CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new
CompileTimeErrorCode('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 34, "Initializing
formal fields can only be used in constructors"); |
| 555 /** | 555 /** |
| 556 * 5 Variables: It is a compile-time error if a final instance variable that h
as been initialized | 556 * 5 Variables: It is a compile-time error if a final instance variable that h
as been initialized |
| 557 * at its point of declaration is also initialized in a constructor. | 557 * at its point of declaration is also initialized in a constructor. |
| 558 */ | 558 */ |
| 559 static final CompileTimeErrorCode FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRU
CTOR = new CompileTimeErrorCode('FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTO
R', 35, ""); | 559 static final CompileTimeErrorCode FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRU
CTOR = new CompileTimeErrorCode('FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTO
R', 35, ""); |
| 560 /** | 560 /** |
| 561 * 5 Variables: It is a compile-time error if a final instance variable that h
as is initialized by | 561 * 5 Variables: It is a compile-time error if a final instance variable that h
as is initialized by |
| 562 * means of an initializing formal of a constructor is also initialized elsewh
ere in the same | 562 * means of an initializing formal of a constructor is also initialized elsewh
ere in the same |
| 563 * constructor. | 563 * constructor. |
| 564 */ | 564 */ |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 static final CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = new CompileTime
ErrorCode('NON_CONSTANT_DEFAULT_VALUE', 72, "Default values of an optional param
eter must be constant"); | 768 static final CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = new CompileTime
ErrorCode('NON_CONSTANT_DEFAULT_VALUE', 72, "Default values of an optional param
eter must be constant"); |
| 769 /** | 769 /** |
| 770 * 12.6 Lists: It is a compile time error if an element of a constant list lit
eral is not a | 770 * 12.6 Lists: It is a compile time error if an element of a constant list lit
eral is not a |
| 771 * compile-time constant. | 771 * compile-time constant. |
| 772 */ | 772 */ |
| 773 static final CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = new CompileTimeE
rrorCode('NON_CONSTANT_LIST_ELEMENT', 73, "'const' lists must have all constant
values"); | 773 static final CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = new CompileTimeE
rrorCode('NON_CONSTANT_LIST_ELEMENT', 73, "'const' lists must have all constant
values"); |
| 774 /** | 774 /** |
| 775 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map | 775 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map |
| 776 * literal is not a compile-time constant. | 776 * literal is not a compile-time constant. |
| 777 */ | 777 */ |
| 778 static final CompileTimeErrorCode NON_CONSTANT_MAP_KEY = new CompileTimeErrorC
ode('NON_CONSTANT_MAP_KEY', 74, "The keys in a 'const' map must be constant"); | 778 static final CompileTimeErrorCode NON_CONSTANT_MAP_KEY = new CompileTimeErrorC
ode('NON_CONSTANT_MAP_KEY', 74, "The keys in a map must be constant"); |
| 779 /** | 779 /** |
| 780 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map | 780 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map |
| 781 * literal is not a compile-time constant. | 781 * literal is not a compile-time constant. |
| 782 */ | 782 */ |
| 783 static final CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = new CompileTimeErro
rCode('NON_CONSTANT_MAP_VALUE', 75, "The values in a 'const' map must be constan
t"); | 783 static final CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = new CompileTimeErro
rCode('NON_CONSTANT_MAP_VALUE', 75, "The values in a 'const' map must be constan
t"); |
| 784 /** | 784 /** |
| 785 * 7.6.3 Constant Constructors: Any expression that appears within the initial
izer list of a | 785 * 7.6.3 Constant Constructors: Any expression that appears within the initial
izer list of a |
| 786 * constant constructor must be a potentially constant expression, or a compil
e-time error occurs. | 786 * constant constructor must be a potentially constant expression, or a compil
e-time error occurs. |
| 787 */ | 787 */ |
| 788 static final CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = new Comp
ileTimeErrorCode('NON_CONSTANT_VALUE_IN_INITIALIZER', 76, ""); | 788 static final CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = new Comp
ileTimeErrorCode('NON_CONSTANT_VALUE_IN_INITIALIZER', 76, ""); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 849 * 13.3 Local Variable Declaration: It is a compile-time error if <i>e</i> ref
ers to the name | 849 * 13.3 Local Variable Declaration: It is a compile-time error if <i>e</i> ref
ers to the name |
| 850 * <i>v</i> or the name <i>v=</i>. | 850 * <i>v</i> or the name <i>v=</i>. |
| 851 */ | 851 */ |
| 852 static final CompileTimeErrorCode REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZE
R = new CompileTimeErrorCode('REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER', 89
, ""); | 852 static final CompileTimeErrorCode REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZE
R = new CompileTimeErrorCode('REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER', 89
, ""); |
| 853 /** | 853 /** |
| 854 * 16.1.1 Reserved Words: A reserved word may not be used as an identifier; it
is a compile-time | 854 * 16.1.1 Reserved Words: A reserved word may not be used as an identifier; it
is a compile-time |
| 855 * error if a reserved word is used where an identifier is expected. | 855 * error if a reserved word is used where an identifier is expected. |
| 856 */ | 856 */ |
| 857 static final CompileTimeErrorCode RESERVED_WORD_AS_IDENTIFIER = new CompileTim
eErrorCode('RESERVED_WORD_AS_IDENTIFIER', 90, ""); | 857 static final CompileTimeErrorCode RESERVED_WORD_AS_IDENTIFIER = new CompileTim
eErrorCode('RESERVED_WORD_AS_IDENTIFIER', 90, ""); |
| 858 /** | 858 /** |
| 859 * 12.8.1 Rethrow: It is a compile-time error if an expression of the form <i>
rethrow;</i> is not |
| 860 * enclosed within a on-catch clause. |
| 861 */ |
| 862 static final CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = new CompileTimeError
Code('RETHROW_OUTSIDE_CATCH', 91, "rethrow must be inside of a catch clause"); |
| 863 /** |
| 859 * 13.11 Return: It is a compile-time error if a return statement of the form
<i>return e;</i> | 864 * 13.11 Return: It is a compile-time error if a return statement of the form
<i>return e;</i> |
| 860 * appears in a generative constructor. | 865 * appears in a generative constructor. |
| 861 */ | 866 */ |
| 862 static final CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = new Compi
leTimeErrorCode('RETURN_IN_GENERATIVE_CONSTRUCTOR', 91, ""); | 867 static final CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = new Compi
leTimeErrorCode('RETURN_IN_GENERATIVE_CONSTRUCTOR', 92, ""); |
| 863 /** | 868 /** |
| 864 * 6.1 Function Declarations: It is a compile-time error to preface a function
declaration with | 869 * 6.1 Function Declarations: It is a compile-time error to preface a function
declaration with |
| 865 * the built-in identifier static. | 870 * the built-in identifier static. |
| 866 */ | 871 */ |
| 867 static final CompileTimeErrorCode STATIC_TOP_LEVEL_FUNCTION = new CompileTimeE
rrorCode('STATIC_TOP_LEVEL_FUNCTION', 92, ""); | 872 static final CompileTimeErrorCode STATIC_TOP_LEVEL_FUNCTION = new CompileTimeE
rrorCode('STATIC_TOP_LEVEL_FUNCTION', 93, ""); |
| 868 /** | 873 /** |
| 869 * 5 Variables: It is a compile-time error to preface a top level variable dec
laration with the | 874 * 5 Variables: It is a compile-time error to preface a top level variable dec
laration with the |
| 870 * built-in identifier static. | 875 * built-in identifier static. |
| 871 */ | 876 */ |
| 872 static final CompileTimeErrorCode STATIC_TOP_LEVEL_VARIABLE = new CompileTimeE
rrorCode('STATIC_TOP_LEVEL_VARIABLE', 93, ""); | 877 static final CompileTimeErrorCode STATIC_TOP_LEVEL_VARIABLE = new CompileTimeE
rrorCode('STATIC_TOP_LEVEL_VARIABLE', 94, ""); |
| 873 /** | 878 /** |
| 874 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form | 879 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form |
| 875 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … | 880 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … |
| 876 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe
r method invocation | 881 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe
r method invocation |
| 877 * occurs in a top-level function or variable initializer, in an instance vari
able initializer or | 882 * occurs in a top-level function or variable initializer, in an instance vari
able initializer or |
| 878 * initializer list, in class Object, in a factory constructor, or in a static
method or variable | 883 * initializer list, in class Object, in a factory constructor, or in a static
method or variable |
| 879 * initializer. | 884 * initializer. |
| 880 */ | 885 */ |
| 881 static final CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = new CompileTimeEr
rorCode('SUPER_IN_INVALID_CONTEXT', 94, ""); | 886 static final CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = new CompileTimeEr
rorCode('SUPER_IN_INVALID_CONTEXT', 95, ""); |
| 882 /** | 887 /** |
| 883 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time | 888 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time |
| 884 * error if a generative constructor of class Object includes a superinitializ
er. | 889 * error if a generative constructor of class Object includes a superinitializ
er. |
| 885 */ | 890 */ |
| 886 static final CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = new CompileTim
eErrorCode('SUPER_INITIALIZER_IN_OBJECT', 95, ""); | 891 static final CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = new CompileTim
eErrorCode('SUPER_INITIALIZER_IN_OBJECT', 96, ""); |
| 887 /** | |
| 888 * 12.8 Throw: It is a compile-time error if an expression of the form throw;
is not enclosed | |
| 889 * within a on-catch clause. | |
| 890 */ | |
| 891 static final CompileTimeErrorCode THROW_WITHOUT_VALUE_OUTSIDE_ON = new Compile
TimeErrorCode('THROW_WITHOUT_VALUE_OUTSIDE_ON', 96, ""); | |
| 892 /** | 892 /** |
| 893 * 12.11 Instance Creation: It is a compile-time error if a constructor of a n
on-generic type | 893 * 12.11 Instance Creation: It is a compile-time error if a constructor of a n
on-generic type |
| 894 * invoked by a new expression or a constant object expression is passed any t
ype arguments. | 894 * invoked by a new expression or a constant object expression is passed any t
ype arguments. |
| 895 * <p> | 895 * <p> |
| 896 * 12.32 Type Cast: It is a compile-time error if <i>T</i> is a parameterized
type of the form | 896 * 12.32 Type Cast: It is a compile-time error if <i>T</i> is a parameterized
type of the form |
| 897 * <i>G<T<sub>1</sub>, …, T<sub>n</sub>></i> and <i>G</i> is not
a generic type with | 897 * <i>G<T<sub>1</sub>, …, T<sub>n</sub>></i> and <i>G</i> is not
a generic type with |
| 898 * <i>n</i> type parameters. | 898 * <i>n</i> type parameters. |
| 899 */ | 899 */ |
| 900 static final CompileTimeErrorCode TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS = new C
ompileTimeErrorCode('TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS', 97, ""); | 900 static final CompileTimeErrorCode TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS = new C
ompileTimeErrorCode('TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS', 97, ""); |
| 901 /** | 901 /** |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 /** | 944 /** |
| 945 * 12.11 Instance Creation: It is a compile-time error if a constructor of a g
eneric type with | 945 * 12.11 Instance Creation: It is a compile-time error if a constructor of a g
eneric type with |
| 946 * <i>n</i> type parameters invoked by a new expression or a constant object e
xpression is passed | 946 * <i>n</i> type parameters invoked by a new expression or a constant object e
xpression is passed |
| 947 * <i>m</i> type arguments where <i>m != n</i>. | 947 * <i>m</i> type arguments where <i>m != n</i>. |
| 948 * <p> | 948 * <p> |
| 949 * 12.31 Type Test: It is a compile-time error if <i>T</i> is a parameterized
type of the form | 949 * 12.31 Type Test: It is a compile-time error if <i>T</i> is a parameterized
type of the form |
| 950 * <i>G<T<sub>1</sub>, …, T<sub>n</sub>></i> and <i>G</i> is not
a generic type with | 950 * <i>G<T<sub>1</sub>, …, T<sub>n</sub>></i> and <i>G</i> is not
a generic type with |
| 951 * <i>n</i> type parameters. | 951 * <i>n</i> type parameters. |
| 952 */ | 952 */ |
| 953 static final CompileTimeErrorCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = new Compile
TimeErrorCode('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 103, ""); | 953 static final CompileTimeErrorCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = new Compile
TimeErrorCode('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 103, ""); |
| 954 static final List<CompileTimeErrorCode> values = [AMBIGUOUS_EXPORT, AMBIGUOUS_
IMPORT, ARGUMENT_DEFINITION_TEST_NON_PARAMETER, BUILT_IN_IDENTIFIER_AS_TYPE, BUI
LT_IN_IDENTIFIER_AS_TYPE_NAME, BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, BUILT_IN_IDE
NTIFIER_AS_TYPE_VARIABLE_NAME, CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, COMPILE_T
IME_CONSTANT_RAISES_EXCEPTION, COMPILE_TIME_CONSTANT_RAISES_EXCEPTION_DIVIDE_BY_
ZERO, CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, CONFLICTING_CONSTRUCTOR_NAME_AND_M
ETHOD, CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, CONST_FORMAL_PARAMETER, CONST_INI
TIALIZED_WITH_NON_CONSTANT_VALUE, CONST_EVAL_THROWS_EXCEPTION, CONST_WITH_INVALI
D_TYPE_PARAMETERS, CONST_WITH_NON_CONST, CONST_WITH_NON_CONSTANT_ARGUMENT, CONST
_WITH_NON_TYPE, CONST_WITH_TYPE_PARAMETERS, CONST_WITH_UNDEFINED_CONSTRUCTOR, DE
FAULT_VALUE_IN_FUNCTION_TYPE_ALIAS, DUPLICATE_DEFINITION, DUPLICATE_MEMBER_NAME,
DUPLICATE_MEMBER_NAME_INSTANCE_STATIC, DUPLICATE_NAMED_ARGUMENT, EXPORT_OF_NON_
LIBRARY, EXTENDS_NON_CLASS, EXTENDS_DISALLOWED_CLASS, IMPLEMENTS_DISALLOWED_CLAS
S, FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS, FIELD_INITIALIZED_IN_INITIALIZER_
AND_DECLARATION, FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER, FIELD_INITIALIZ
ER_OUTSIDE_CONSTRUCTOR, FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR, FINAL_
INITIALIZED_MULTIPLE_TIMES, FINAL_NOT_INITIALIZED, GETTER_AND_METHOD_WITH_SAME_N
AME, IMPLEMENTS_DYNAMIC, IMPLEMENTS_NON_CLASS, IMPLEMENTS_REPEATED, IMPLEMENTS_S
ELF, IMPORT_DUPLICATED_LIBRARY_NAME, IMPORT_OF_NON_LIBRARY, INCONSITENT_CASE_EXP
RESSION_TYPES, INITIALIZER_FOR_NON_EXISTANT_FIELD, INVALID_CONSTANT, INVALID_CON
STRUCTOR_NAME, INVALID_FACTORY_NAME_NOT_A_CLASS, INVALID_OVERRIDE_DEFAULT_VALUE,
INVALID_OVERRIDE_NAMED, INVALID_OVERRIDE_POSITIONAL, INVALID_OVERRIDE_REQUIRED,
INVALID_REFERENCE_TO_THIS, INVALID_TYPE_ARGUMENT_FOR_KEY, INVALID_TYPE_ARGUMENT
_IN_CONST_LIST, INVALID_TYPE_ARGUMENT_IN_CONST_MAP, INVALID_VARIABLE_IN_INITIALI
ZER, LABEL_IN_OUTER_SCOPE, LABEL_UNDEFINED, MEMBER_WITH_CLASS_NAME, MIXIN_DECLAR
ES_CONSTRUCTOR, MIXIN_INHERITS_FROM_NOT_OBJECT, MIXIN_OF_NON_CLASS, MIXIN_OF_NON
_MIXIN, MIXIN_REFERENCES_SUPER, MIXIN_WITH_NON_CLASS_SUPERCLASS, MULTIPLE_SUPER_
INITIALIZERS, NEW_WITH_INVALID_TYPE_PARAMETERS, NON_CONST_MAP_AS_EXPRESSION_STAT
EMENT, NON_CONSTANT_CASE_EXPRESSION, NON_CONSTANT_DEFAULT_VALUE, NON_CONSTANT_LI
ST_ELEMENT, NON_CONSTANT_MAP_KEY, NON_CONSTANT_MAP_VALUE, NON_CONSTANT_VALUE_IN_
INITIALIZER, OBJECT_CANNOT_EXTEND_ANOTHER_CLASS, OPTIONAL_PARAMETER_IN_OPERATOR,
OVERRIDE_MISSING_NAMED_PARAMETERS, OVERRIDE_MISSING_REQUIRED_PARAMETERS, PART_O
F_NON_PART, PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER, PRIVATE_OPTIONAL_PARAMETER, R
ECURSIVE_COMPILE_TIME_CONSTANT, RECURSIVE_FACTORY_REDIRECT, RECURSIVE_FUNCTION_T
YPE_ALIAS, RECURSIVE_INTERFACE_INHERITANCE, REDIRECT_TO_NON_CONST_CONSTRUCTOR, R
EFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER, RESERVED_WORD_AS_IDENTIFIER, RETUR
N_IN_GENERATIVE_CONSTRUCTOR, STATIC_TOP_LEVEL_FUNCTION, STATIC_TOP_LEVEL_VARIABL
E, SUPER_IN_INVALID_CONTEXT, SUPER_INITIALIZER_IN_OBJECT, THROW_WITHOUT_VALUE_OU
TSIDE_ON, TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS, UNDEFINED_CONSTRUCTOR_IN_INITIAL
IZER, UNINITIALIZED_FINAL_FIELD, URI_WITH_INTERPOLATION, WRONG_NUMBER_OF_PARAMET
ERS_FOR_OPERATOR, WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER, WRONG_NUMBER_OF_TYPE_AR
GUMENTS]; | 954 static final List<CompileTimeErrorCode> values = [AMBIGUOUS_EXPORT, AMBIGUOUS_
IMPORT, ARGUMENT_DEFINITION_TEST_NON_PARAMETER, BUILT_IN_IDENTIFIER_AS_TYPE, BUI
LT_IN_IDENTIFIER_AS_TYPE_NAME, BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, BUILT_IN_IDE
NTIFIER_AS_TYPE_VARIABLE_NAME, CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, COMPILE_T
IME_CONSTANT_RAISES_EXCEPTION, COMPILE_TIME_CONSTANT_RAISES_EXCEPTION_DIVIDE_BY_
ZERO, CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, CONFLICTING_CONSTRUCTOR_NAME_AND_M
ETHOD, CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, CONST_FORMAL_PARAMETER, CONST_INI
TIALIZED_WITH_NON_CONSTANT_VALUE, CONST_EVAL_THROWS_EXCEPTION, CONST_WITH_INVALI
D_TYPE_PARAMETERS, CONST_WITH_NON_CONST, CONST_WITH_NON_CONSTANT_ARGUMENT, CONST
_WITH_NON_TYPE, CONST_WITH_TYPE_PARAMETERS, CONST_WITH_UNDEFINED_CONSTRUCTOR, DE
FAULT_VALUE_IN_FUNCTION_TYPE_ALIAS, DUPLICATE_DEFINITION, DUPLICATE_MEMBER_NAME,
DUPLICATE_MEMBER_NAME_INSTANCE_STATIC, DUPLICATE_NAMED_ARGUMENT, EXPORT_OF_NON_
LIBRARY, EXTENDS_NON_CLASS, EXTENDS_DISALLOWED_CLASS, IMPLEMENTS_DISALLOWED_CLAS
S, FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS, FIELD_INITIALIZED_IN_INITIALIZER_
AND_DECLARATION, FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER, FIELD_INITIALIZ
ER_OUTSIDE_CONSTRUCTOR, FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR, FINAL_
INITIALIZED_MULTIPLE_TIMES, FINAL_NOT_INITIALIZED, GETTER_AND_METHOD_WITH_SAME_N
AME, IMPLEMENTS_DYNAMIC, IMPLEMENTS_NON_CLASS, IMPLEMENTS_REPEATED, IMPLEMENTS_S
ELF, IMPORT_DUPLICATED_LIBRARY_NAME, IMPORT_OF_NON_LIBRARY, INCONSITENT_CASE_EXP
RESSION_TYPES, INITIALIZER_FOR_NON_EXISTANT_FIELD, INVALID_CONSTANT, INVALID_CON
STRUCTOR_NAME, INVALID_FACTORY_NAME_NOT_A_CLASS, INVALID_OVERRIDE_DEFAULT_VALUE,
INVALID_OVERRIDE_NAMED, INVALID_OVERRIDE_POSITIONAL, INVALID_OVERRIDE_REQUIRED,
INVALID_REFERENCE_TO_THIS, INVALID_TYPE_ARGUMENT_FOR_KEY, INVALID_TYPE_ARGUMENT
_IN_CONST_LIST, INVALID_TYPE_ARGUMENT_IN_CONST_MAP, INVALID_VARIABLE_IN_INITIALI
ZER, LABEL_IN_OUTER_SCOPE, LABEL_UNDEFINED, MEMBER_WITH_CLASS_NAME, MIXIN_DECLAR
ES_CONSTRUCTOR, MIXIN_INHERITS_FROM_NOT_OBJECT, MIXIN_OF_NON_CLASS, MIXIN_OF_NON
_MIXIN, MIXIN_REFERENCES_SUPER, MIXIN_WITH_NON_CLASS_SUPERCLASS, MULTIPLE_SUPER_
INITIALIZERS, NEW_WITH_INVALID_TYPE_PARAMETERS, NON_CONST_MAP_AS_EXPRESSION_STAT
EMENT, NON_CONSTANT_CASE_EXPRESSION, NON_CONSTANT_DEFAULT_VALUE, NON_CONSTANT_LI
ST_ELEMENT, NON_CONSTANT_MAP_KEY, NON_CONSTANT_MAP_VALUE, NON_CONSTANT_VALUE_IN_
INITIALIZER, OBJECT_CANNOT_EXTEND_ANOTHER_CLASS, OPTIONAL_PARAMETER_IN_OPERATOR,
OVERRIDE_MISSING_NAMED_PARAMETERS, OVERRIDE_MISSING_REQUIRED_PARAMETERS, PART_O
F_NON_PART, PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER, PRIVATE_OPTIONAL_PARAMETER, R
ECURSIVE_COMPILE_TIME_CONSTANT, RECURSIVE_FACTORY_REDIRECT, RECURSIVE_FUNCTION_T
YPE_ALIAS, RECURSIVE_INTERFACE_INHERITANCE, REDIRECT_TO_NON_CONST_CONSTRUCTOR, R
EFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER, RESERVED_WORD_AS_IDENTIFIER, RETHR
OW_OUTSIDE_CATCH, RETURN_IN_GENERATIVE_CONSTRUCTOR, STATIC_TOP_LEVEL_FUNCTION, S
TATIC_TOP_LEVEL_VARIABLE, SUPER_IN_INVALID_CONTEXT, SUPER_INITIALIZER_IN_OBJECT,
TYPE_ARGUMENTS_FOR_NON_GENERIC_CLASS, UNDEFINED_CONSTRUCTOR_IN_INITIALIZER, UNI
NITIALIZED_FINAL_FIELD, URI_WITH_INTERPOLATION, WRONG_NUMBER_OF_PARAMETERS_FOR_O
PERATOR, WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER, WRONG_NUMBER_OF_TYPE_ARGUMENTS]; |
| 955 final String __name; | 955 final String __name; |
| 956 final int __ordinal; | 956 final int __ordinal; |
| 957 int get ordinal => __ordinal; | 957 int get ordinal => __ordinal; |
| 958 /** | 958 /** |
| 959 * The message template used to create the message to be displayed for this er
ror. | 959 * The message template used to create the message to be displayed for this er
ror. |
| 960 */ | 960 */ |
| 961 String _message; | 961 String _message; |
| 962 /** | 962 /** |
| 963 * Initialize a newly created error code to have the given message. | 963 * Initialize a newly created error code to have the given message. |
| 964 * @param message the message template used to create the message to be displa
yed for the error | 964 * @param message the message template used to create the message to be displa
yed for the error |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1471 */ | 1471 */ |
| 1472 StaticTypeWarningCode(this.__name, this.__ordinal, String message) { | 1472 StaticTypeWarningCode(this.__name, this.__ordinal, String message) { |
| 1473 this._message = message; | 1473 this._message = message; |
| 1474 } | 1474 } |
| 1475 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; | 1475 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; |
| 1476 String get message => _message; | 1476 String get message => _message; |
| 1477 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; | 1477 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; |
| 1478 bool needsRecompilation() => true; | 1478 bool needsRecompilation() => true; |
| 1479 String toString() => __name; | 1479 String toString() => __name; |
| 1480 } | 1480 } |
| OLD | NEW |