| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.error; | 8 library engine.error; |
| 9 | 9 |
| 10 import 'java_core.dart'; | 10 import 'java_core.dart'; |
| 11 import 'source.dart'; | 11 import 'source.dart'; |
| 12 import 'scanner.dart' show Token; | 12 import 'scanner.dart' show Token; |
| 13 import 'ast.dart' show ASTNode; | 13 import 'ast.dart' show AstNode; |
| 14 import 'element.dart' show Element; | 14 import 'element.dart' show Element; |
| 15 | 15 |
| 16 /** | 16 /** |
| 17 * Instances of the enumeration `ErrorSeverity` represent the severity of an [Er
rorCode] | 17 * Instances of the enumeration `ErrorSeverity` represent the severity of an [Er
rorCode] |
| 18 * . | 18 * . |
| 19 * | |
| 20 * @coverage dart.engine.error | |
| 21 */ | 19 */ |
| 22 class ErrorSeverity extends Enum<ErrorSeverity> { | 20 class ErrorSeverity extends Enum<ErrorSeverity> { |
| 23 /** | 21 /** |
| 24 * The severity representing a non-error. This is never used for any error cod
e, but is useful for | 22 * The severity representing a non-error. This is never used for any error cod
e, but is useful for |
| 25 * clients. | 23 * clients. |
| 26 */ | 24 */ |
| 27 static final ErrorSeverity NONE = new ErrorSeverity('NONE', 0, " ", "none"); | 25 static final ErrorSeverity NONE = new ErrorSeverity('NONE', 0, " ", "none"); |
| 28 | 26 |
| 29 /** | 27 /** |
| 30 * The severity representing an informational level analysis issue. | 28 * The severity representing an informational level analysis issue. |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 ErrorSeverity get errorSeverity => _severity; | 216 ErrorSeverity get errorSeverity => _severity; |
| 219 | 217 |
| 220 String get message => _message; | 218 String get message => _message; |
| 221 | 219 |
| 222 ErrorType get type => ErrorType.ANGULAR; | 220 ErrorType get type => ErrorType.ANGULAR; |
| 223 } | 221 } |
| 224 | 222 |
| 225 /** | 223 /** |
| 226 * Instances of the class `ErrorReporter` wrap an error listener with utility me
thods used to | 224 * Instances of the class `ErrorReporter` wrap an error listener with utility me
thods used to |
| 227 * create the errors being reported. | 225 * create the errors being reported. |
| 228 * | |
| 229 * @coverage dart.engine.error | |
| 230 */ | 226 */ |
| 231 class ErrorReporter { | 227 class ErrorReporter { |
| 232 /** | 228 /** |
| 233 * The error listener to which errors will be reported. | 229 * The error listener to which errors will be reported. |
| 234 */ | 230 */ |
| 235 AnalysisErrorListener _errorListener; | 231 AnalysisErrorListener _errorListener; |
| 236 | 232 |
| 237 /** | 233 /** |
| 238 * The default source to be used when reporting errors. | 234 * The default source to be used when reporting errors. |
| 239 */ | 235 */ |
| (...skipping 21 matching lines...) Expand all Loading... |
| 261 this._source = defaultSource; | 257 this._source = defaultSource; |
| 262 } | 258 } |
| 263 | 259 |
| 264 /** | 260 /** |
| 265 * Creates an error with properties with the given error code and arguments. | 261 * Creates an error with properties with the given error code and arguments. |
| 266 * | 262 * |
| 267 * @param errorCode the error code of the error to be reported | 263 * @param errorCode the error code of the error to be reported |
| 268 * @param node the node specifying the location of the error | 264 * @param node the node specifying the location of the error |
| 269 * @param arguments the arguments to the error, used to compose the error mess
age | 265 * @param arguments the arguments to the error, used to compose the error mess
age |
| 270 */ | 266 */ |
| 271 AnalysisErrorWithProperties newErrorWithProperties(ErrorCode errorCode, ASTNod
e node, List<Object> arguments) => new AnalysisErrorWithProperties.con2(_source,
node.offset, node.length, errorCode, arguments); | 267 AnalysisErrorWithProperties newErrorWithProperties(ErrorCode errorCode, AstNod
e node, List<Object> arguments) => new AnalysisErrorWithProperties.con2(_source,
node.offset, node.length, errorCode, arguments); |
| 272 | 268 |
| 273 /** | 269 /** |
| 274 * Report a passed error. | 270 * Report a passed error. |
| 275 * | 271 * |
| 276 * @param error the error to report | 272 * @param error the error to report |
| 277 */ | 273 */ |
| 278 void reportError(AnalysisError error) { | 274 void reportError(AnalysisError error) { |
| 279 _errorListener.onError(error); | 275 _errorListener.onError(error); |
| 280 } | 276 } |
| 281 | 277 |
| 282 /** | 278 /** |
| 283 * Report an error with the given error code and arguments. | 279 * Report an error with the given error code and arguments. |
| 284 * | 280 * |
| 285 * @param errorCode the error code of the error to be reported | 281 * @param errorCode the error code of the error to be reported |
| 286 * @param node the node specifying the location of the error | 282 * @param node the node specifying the location of the error |
| 287 * @param arguments the arguments to the error, used to compose the error mess
age | 283 * @param arguments the arguments to the error, used to compose the error mess
age |
| 288 */ | 284 */ |
| 289 void reportError3(ErrorCode errorCode, ASTNode node, List<Object> arguments) { | 285 void reportError3(ErrorCode errorCode, AstNode node, List<Object> arguments) { |
| 290 reportError5(errorCode, node.offset, node.length, arguments); | 286 reportError5(errorCode, node.offset, node.length, arguments); |
| 291 } | 287 } |
| 292 | 288 |
| 293 /** | 289 /** |
| 294 * Report an error with the given error code and arguments. | 290 * Report an error with the given error code and arguments. |
| 295 * | 291 * |
| 296 * @param errorCode the error code of the error to be reported | 292 * @param errorCode the error code of the error to be reported |
| 297 * @param element the element which name should be used as the location of the
error | 293 * @param element the element which name should be used as the location of the
error |
| 298 * @param arguments the arguments to the error, used to compose the error mess
age | 294 * @param arguments the arguments to the error, used to compose the error mess
age |
| 299 */ | 295 */ |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 void set source(Source source) { | 329 void set source(Source source) { |
| 334 this._source = source == null ? _defaultSource : source; | 330 this._source = source == null ? _defaultSource : source; |
| 335 } | 331 } |
| 336 } | 332 } |
| 337 | 333 |
| 338 /** | 334 /** |
| 339 * Instances of the class `AnalysisError` represent an error discovered during t
he analysis of | 335 * Instances of the class `AnalysisError` represent an error discovered during t
he analysis of |
| 340 * some Dart code. | 336 * some Dart code. |
| 341 * | 337 * |
| 342 * @see AnalysisErrorListener | 338 * @see AnalysisErrorListener |
| 343 * @coverage dart.engine.error | |
| 344 */ | 339 */ |
| 345 class AnalysisError { | 340 class AnalysisError { |
| 346 /** | 341 /** |
| 347 * An empty array of errors used when no errors are expected. | 342 * An empty array of errors used when no errors are expected. |
| 348 */ | 343 */ |
| 349 static List<AnalysisError> NO_ERRORS = new List<AnalysisError>(0); | 344 static List<AnalysisError> NO_ERRORS = new List<AnalysisError>(0); |
| 350 | 345 |
| 351 /** | 346 /** |
| 352 * A [Comparator] that sorts by the name of the file that the [AnalysisError]
was | 347 * A [Comparator] that sorts by the name of the file that the [AnalysisError]
was |
| 353 * found. | 348 * found. |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 837 ErrorType get type => ErrorType.HINT; | 832 ErrorType get type => ErrorType.HINT; |
| 838 } | 833 } |
| 839 | 834 |
| 840 /** | 835 /** |
| 841 * The interface `ErrorCode` defines the behavior common to objects representing
error codes | 836 * The interface `ErrorCode` defines the behavior common to objects representing
error codes |
| 842 * associated with [AnalysisError]. | 837 * associated with [AnalysisError]. |
| 843 * | 838 * |
| 844 * Generally, we want to provide messages that consist of three sentences: 1. wh
at is wrong, 2. why | 839 * Generally, we want to provide messages that consist of three sentences: 1. wh
at is wrong, 2. why |
| 845 * is it wrong, and 3. how do I fix it. However, we combine the first two in the
result of | 840 * is it wrong, and 3. how do I fix it. However, we combine the first two in the
result of |
| 846 * [getMessage] and the last in the result of [getCorrection]. | 841 * [getMessage] and the last in the result of [getCorrection]. |
| 847 * | |
| 848 * @coverage dart.engine.error | |
| 849 */ | 842 */ |
| 850 abstract class ErrorCode { | 843 abstract class ErrorCode { |
| 851 /** | 844 /** |
| 852 * Return the template used to create the correction to be displayed for this
error, or | 845 * Return the template used to create the correction to be displayed for this
error, or |
| 853 * `null` if there is no correction information for this error. The correction
should | 846 * `null` if there is no correction information for this error. The correction
should |
| 854 * indicate how the user can fix the error. | 847 * indicate how the user can fix the error. |
| 855 * | 848 * |
| 856 * @return the template used to create the correction to be displayed for this
error | 849 * @return the template used to create the correction to be displayed for this
error |
| 857 */ | 850 */ |
| 858 String get correction; | 851 String get correction; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 875 /** | 868 /** |
| 876 * Return the type of the error. | 869 * Return the type of the error. |
| 877 * | 870 * |
| 878 * @return the type of the error | 871 * @return the type of the error |
| 879 */ | 872 */ |
| 880 ErrorType get type; | 873 ErrorType get type; |
| 881 } | 874 } |
| 882 | 875 |
| 883 /** | 876 /** |
| 884 * Instances of the enumeration `ErrorType` represent the type of an [ErrorCode]
. | 877 * Instances of the enumeration `ErrorType` represent the type of an [ErrorCode]
. |
| 885 * | |
| 886 * @coverage dart.engine.error | |
| 887 */ | 878 */ |
| 888 class ErrorType extends Enum<ErrorType> { | 879 class ErrorType extends Enum<ErrorType> { |
| 889 /** | 880 /** |
| 890 * Task (todo) comments in user code. | 881 * Task (todo) comments in user code. |
| 891 */ | 882 */ |
| 892 static final ErrorType TODO = new ErrorType('TODO', 0, ErrorSeverity.INFO); | 883 static final ErrorType TODO = new ErrorType('TODO', 0, ErrorSeverity.INFO); |
| 893 | 884 |
| 894 /** | 885 /** |
| 895 * Extra analysis run over the code to follow best practices, which are not in
the Dart Language | 886 * Extra analysis run over the code to follow best practices, which are not in
the Dart Language |
| 896 * Specification. | 887 * Specification. |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 ErrorType(String name, int ordinal, this.severity) : super(name, ordinal); | 945 ErrorType(String name, int ordinal, this.severity) : super(name, ordinal); |
| 955 | 946 |
| 956 String get displayName => name.toLowerCase().replaceAll('_', ' '); | 947 String get displayName => name.toLowerCase().replaceAll('_', ' '); |
| 957 } | 948 } |
| 958 | 949 |
| 959 /** | 950 /** |
| 960 * The enumeration `CompileTimeErrorCode` defines the error codes used for compi
le time | 951 * The enumeration `CompileTimeErrorCode` defines the error codes used for compi
le time |
| 961 * errors. The convention for this class is for the name of the error code to in
dicate the problem | 952 * errors. The convention for this class is for the name of the error code to in
dicate the problem |
| 962 * that caused the error to be generated and for the error message to explain wh
at is wrong and, | 953 * that caused the error to be generated and for the error message to explain wh
at is wrong and, |
| 963 * when appropriate, how the problem can be corrected. | 954 * when appropriate, how the problem can be corrected. |
| 964 * | |
| 965 * @coverage dart.engine.error | |
| 966 */ | 955 */ |
| 967 class CompileTimeErrorCode extends Enum<CompileTimeErrorCode> implements ErrorCo
de { | 956 class CompileTimeErrorCode extends Enum<CompileTimeErrorCode> implements ErrorCo
de { |
| 968 /** | 957 /** |
| 969 * 14.2 Exports: It is a compile-time error if a name <i>N</i> is re-exported
by a library | 958 * 14.2 Exports: It is a compile-time error if a name <i>N</i> is re-exported
by a library |
| 970 * <i>L</i> and <i>N</i> is introduced into the export namespace of <i>L</i> b
y more than one | 959 * <i>L</i> and <i>N</i> is introduced into the export namespace of <i>L</i> b
y more than one |
| 971 * export, unless each all exports refer to same declaration for the name N. | 960 * export, unless each all exports refer to same declaration for the name N. |
| 972 * | 961 * |
| 973 * @param ambiguousElementName the name of the ambiguous element | 962 * @param ambiguousElementName the name of the ambiguous element |
| 974 * @param firstLibraryName the name of the first library that the type is foun
d | 963 * @param firstLibraryName the name of the first library that the type is foun
d |
| 975 * @param secondLibraryName the name of the second library that the type is fo
und | 964 * @param secondLibraryName the name of the second library that the type is fo
und |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1620 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use | 1609 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use |
| 1621 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. | 1610 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. |
| 1622 * | 1611 * |
| 1623 * @param labelName the name of the unresolvable label | 1612 * @param labelName the name of the unresolvable label |
| 1624 */ | 1613 */ |
| 1625 static final CompileTimeErrorCode LABEL_UNDEFINED = new CompileTimeErrorCode.c
on1('LABEL_UNDEFINED', 79, "Cannot reference undefined label '%s'"); | 1614 static final CompileTimeErrorCode LABEL_UNDEFINED = new CompileTimeErrorCode.c
on1('LABEL_UNDEFINED', 79, "Cannot reference undefined label '%s'"); |
| 1626 | 1615 |
| 1627 /** | 1616 /** |
| 1628 * 12.6 Lists: A run-time list literal <<i>E</i>> [<i>e<sub>1</sub></i>
... | 1617 * 12.6 Lists: A run-time list literal <<i>E</i>> [<i>e<sub>1</sub></i>
... |
| 1629 * <i>e<sub>n</sub></i>] is evaluated as follows: | 1618 * <i>e<sub>n</sub></i>] is evaluated as follows: |
| 1630 * | |
| 1631 * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and
second argument | 1619 * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and
second argument |
| 1632 * <i>o<sub>i+1</sub></i><i>, 1 <= i <= n</i> | 1620 * <i>o<sub>i+1</sub></i><i>, 1 <= i <= n</i> |
| 1633 * | 1621 * |
| 1634 * | |
| 1635 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 1622 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
| 1636 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s
ub>, 1 <= i <= | 1623 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s
ub>, 1 <= i <= |
| 1637 * 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>. | 1624 * 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>. |
| 1638 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 1625 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
| 1639 * j <= m</i>. | 1626 * j <= m</i>. |
| 1640 */ | 1627 */ |
| 1641 static final CompileTimeErrorCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = new Compi
leTimeErrorCode.con1('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 80, "The element type '
%s' cannot be assigned to the list type '%s'"); | 1628 static final CompileTimeErrorCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = new Compi
leTimeErrorCode.con1('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 80, "The element type '
%s' cannot be assigned to the list type '%s'"); |
| 1642 | 1629 |
| 1643 /** | 1630 /** |
| 1644 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : | 1631 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : |
| 1645 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: | 1632 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: |
| 1646 * | |
| 1647 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second | 1633 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second |
| 1648 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> | 1634 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> |
| 1649 * | 1635 * |
| 1650 * | |
| 1651 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 1636 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
| 1652 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s
ub>, 1 <= i <= | 1637 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s
ub>, 1 <= i <= |
| 1653 * 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>. | 1638 * 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>. |
| 1654 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 1639 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
| 1655 * j <= m</i>. | 1640 * j <= m</i>. |
| 1656 */ | 1641 */ |
| 1657 static final CompileTimeErrorCode MAP_KEY_TYPE_NOT_ASSIGNABLE = new CompileTim
eErrorCode.con1('MAP_KEY_TYPE_NOT_ASSIGNABLE', 81, "The element type '%s' cannot
be assigned to the map key type '%s'"); | 1642 static final CompileTimeErrorCode MAP_KEY_TYPE_NOT_ASSIGNABLE = new CompileTim
eErrorCode.con1('MAP_KEY_TYPE_NOT_ASSIGNABLE', 81, "The element type '%s' cannot
be assigned to the map key type '%s'"); |
| 1658 | 1643 |
| 1659 /** | 1644 /** |
| 1660 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : | 1645 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : |
| 1661 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: | 1646 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: |
| 1662 * | |
| 1663 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second | 1647 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second |
| 1664 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> | 1648 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> |
| 1665 * | 1649 * |
| 1666 * | |
| 1667 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 1650 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
| 1668 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s
ub>, 1 <= i <= | 1651 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s
ub>, 1 <= i <= |
| 1669 * 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>. | 1652 * 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>. |
| 1670 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 1653 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
| 1671 * j <= m</i>. | 1654 * j <= m</i>. |
| 1672 */ | 1655 */ |
| 1673 static final CompileTimeErrorCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = new CompileT
imeErrorCode.con1('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 82, "The element type '%s' ca
nnot be assigned to the map value type '%s'"); | 1656 static final CompileTimeErrorCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = new CompileT
imeErrorCode.con1('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 82, "The element type '%s' ca
nnot be assigned to the map value type '%s'"); |
| 1674 | 1657 |
| 1675 /** | 1658 /** |
| 1676 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member
with the same name | 1659 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member
with the same name |
| (...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2375 ErrorSeverity get errorSeverity => ErrorType.PUB_SUGGESTION.severity; | 2358 ErrorSeverity get errorSeverity => ErrorType.PUB_SUGGESTION.severity; |
| 2376 | 2359 |
| 2377 ErrorType get type => ErrorType.PUB_SUGGESTION; | 2360 ErrorType get type => ErrorType.PUB_SUGGESTION; |
| 2378 } | 2361 } |
| 2379 | 2362 |
| 2380 /** | 2363 /** |
| 2381 * The enumeration `StaticWarningCode` defines the error codes used for static w
arnings. The | 2364 * The enumeration `StaticWarningCode` defines the error codes used for static w
arnings. The |
| 2382 * convention for this class is for the name of the error code to indicate the p
roblem that caused | 2365 * convention for this class is for the name of the error code to indicate the p
roblem that caused |
| 2383 * the error to be generated and for the error message to explain what is wrong
and, when | 2366 * the error to be generated and for the error message to explain what is wrong
and, when |
| 2384 * appropriate, how the problem can be corrected. | 2367 * appropriate, how the problem can be corrected. |
| 2385 * | |
| 2386 * @coverage dart.engine.error | |
| 2387 */ | 2368 */ |
| 2388 class StaticWarningCode extends Enum<StaticWarningCode> implements ErrorCode { | 2369 class StaticWarningCode extends Enum<StaticWarningCode> implements ErrorCode { |
| 2389 /** | 2370 /** |
| 2390 * 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i
>N</i> is introduced | 2371 * 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i
>N</i> is introduced |
| 2391 * into the top level scope <i>L</i> by more than one import then: | 2372 * into the top level scope <i>L</i> by more than one import then: |
| 2392 * <ol> | 2373 * <ol> |
| 2393 * * A static warning occurs. | 2374 * * A static warning occurs. |
| 2394 * * If <i>N</i> is referenced as a function, getter or setter, a <i>NoSuchMet
hodError</i> is | 2375 * * If <i>N</i> is referenced as a function, getter or setter, a <i>NoSuchMet
hodError</i> is |
| 2395 * raised. | 2376 * raised. |
| 2396 * * If <i>N</i> is referenced as a type, it is treated as a malformed type. | 2377 * * If <i>N</i> is referenced as a type, it is treated as a malformed type. |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2462 /** | 2443 /** |
| 2463 * 7.4 Abstract Instance Members: It is a static warning if an abstract member
is declared or | 2444 * 7.4 Abstract Instance Members: It is a static warning if an abstract member
is declared or |
| 2464 * inherited in a concrete class. | 2445 * inherited in a concrete class. |
| 2465 */ | 2446 */ |
| 2466 static final StaticWarningCode CONCRETE_CLASS_WITH_ABSTRACT_MEMBER = new Stati
cWarningCode.con1('CONCRETE_CLASS_WITH_ABSTRACT_MEMBER', 7, "'%s' must have a me
thod body because '%s' is not abstract"); | 2447 static final StaticWarningCode CONCRETE_CLASS_WITH_ABSTRACT_MEMBER = new Stati
cWarningCode.con1('CONCRETE_CLASS_WITH_ABSTRACT_MEMBER', 7, "'%s' must have a me
thod body because '%s' is not abstract"); |
| 2467 | 2448 |
| 2468 /** | 2449 /** |
| 2469 * 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i
>N</i> would be | 2450 * 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i
>N</i> would be |
| 2470 * introduced into the top level scope of <i>L</i> by an import from a library
whose URI begins | 2451 * introduced into the top level scope of <i>L</i> by an import from a library
whose URI begins |
| 2471 * with <i>dart:</i> and an import from a library whose URI does not begin wit
h <i>dart:</i>: | 2452 * with <i>dart:</i> and an import from a library whose URI does not begin wit
h <i>dart:</i>: |
| 2472 * | |
| 2473 * * The import from <i>dart:</i> is implicitly extended by a hide N clause. | 2453 * * The import from <i>dart:</i> is implicitly extended by a hide N clause. |
| 2474 * * A static warning is issued. | 2454 * * A static warning is issued. |
| 2475 * | 2455 * |
| 2476 * | |
| 2477 * @param ambiguousName the ambiguous name | 2456 * @param ambiguousName the ambiguous name |
| 2478 * @param sdkLibraryName the name of the dart: library that the element is fou
nd | 2457 * @param sdkLibraryName the name of the dart: library that the element is fou
nd |
| 2479 * @param otherLibraryName the name of the non-dart: library that the element
is found | 2458 * @param otherLibraryName the name of the non-dart: library that the element
is found |
| 2480 */ | 2459 */ |
| 2481 static final StaticWarningCode CONFLICTING_DART_IMPORT = new StaticWarningCode
.con1('CONFLICTING_DART_IMPORT', 8, "Element '%s' from SDK library '%s' is impli
citly hidden by '%s'"); | 2460 static final StaticWarningCode CONFLICTING_DART_IMPORT = new StaticWarningCode
.con1('CONFLICTING_DART_IMPORT', 8, "Element '%s' from SDK library '%s' is impli
citly hidden by '%s'"); |
| 2482 | 2461 |
| 2483 /** | 2462 /** |
| 2484 * 7.2 Getters: It is a static warning if a class <i>C</i> declares an instanc
e getter named | 2463 * 7.2 Getters: It is a static warning if a class <i>C</i> declares an instanc
e getter named |
| 2485 * <i>v</i> and an accessible static member named <i>v</i> or <i>v=</i> is dec
lared in a | 2464 * <i>v</i> and an accessible static member named <i>v</i> or <i>v=</i> is dec
lared in a |
| 2486 * superclass of <i>C</i>. | 2465 * superclass of <i>C</i>. |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2587 */ | 2566 */ |
| 2588 static final StaticWarningCode FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE = new
StaticWarningCode.con1('FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE', 21, "The para
meter type '%s' is incompatable with the field type '%s'"); | 2567 static final StaticWarningCode FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE = new
StaticWarningCode.con1('FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE', 21, "The para
meter type '%s' is incompatable with the field type '%s'"); |
| 2589 | 2568 |
| 2590 /** | 2569 /** |
| 2591 * 5 Variables: It is a static warning if a library, static or local variable
<i>v</i> is final | 2570 * 5 Variables: It is a static warning if a library, static or local variable
<i>v</i> is final |
| 2592 * and <i>v</i> is not initialized at its point of declaration. | 2571 * and <i>v</i> is not initialized at its point of declaration. |
| 2593 * | 2572 * |
| 2594 * 7.6.1 Generative Constructors: Each final instance variable <i>f</i> declar
ed in the | 2573 * 7.6.1 Generative Constructors: Each final instance variable <i>f</i> declar
ed in the |
| 2595 * immediately enclosing class must have an initializer in <i>k</i>'s initiali
zer list unless it | 2574 * immediately enclosing class must have an initializer in <i>k</i>'s initiali
zer list unless it |
| 2596 * has already been initialized by one of the following means: | 2575 * has already been initialized by one of the following means: |
| 2597 * | |
| 2598 * * Initialization at the declaration of <i>f</i>. | 2576 * * Initialization at the declaration of <i>f</i>. |
| 2599 * * Initialization by means of an initializing formal of <i>k</i>. | 2577 * * Initialization by means of an initializing formal of <i>k</i>. |
| 2600 * | |
| 2601 * or a static warning occurs. | 2578 * or a static warning occurs. |
| 2602 * | 2579 * |
| 2603 * @param name the name of the uninitialized final variable | 2580 * @param name the name of the uninitialized final variable |
| 2604 */ | 2581 */ |
| 2605 static final StaticWarningCode FINAL_NOT_INITIALIZED = new StaticWarningCode.c
on1('FINAL_NOT_INITIALIZED', 22, "The final variable '%s' must be initialized"); | 2582 static final StaticWarningCode FINAL_NOT_INITIALIZED = new StaticWarningCode.c
on1('FINAL_NOT_INITIALIZED', 22, "The final variable '%s' must be initialized"); |
| 2606 | 2583 |
| 2607 /** | 2584 /** |
| 2608 * 15.5 Function Types: It is a static warning if a concrete class implements
Function and does | 2585 * 15.5 Function Types: It is a static warning if a concrete class implements
Function and does |
| 2609 * not have a concrete method named call(). | 2586 * not have a concrete method named call(). |
| 2610 */ | 2587 */ |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2752 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the | 2729 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the |
| 2753 * actualParamTypeName | 2730 * actualParamTypeName |
| 2754 * @param className the name of the class where the overridden setter is decla
red | 2731 * @param className the name of the class where the overridden setter is decla
red |
| 2755 * @see #INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE | 2732 * @see #INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE |
| 2756 */ | 2733 */ |
| 2757 static final StaticWarningCode INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE = new
StaticWarningCode.con1('INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE', 37, "The pa
rameter type '%s' is not assignable to '%s' as required by the setter it is over
riding from '%s'"); | 2734 static final StaticWarningCode INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE = new
StaticWarningCode.con1('INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE', 37, "The pa
rameter type '%s' is not assignable to '%s' as required by the setter it is over
riding from '%s'"); |
| 2758 | 2735 |
| 2759 /** | 2736 /** |
| 2760 * 12.6 Lists: A run-time list literal <<i>E</i>> [<i>e<sub>1</sub></i>
... | 2737 * 12.6 Lists: A run-time list literal <<i>E</i>> [<i>e<sub>1</sub></i>
... |
| 2761 * <i>e<sub>n</sub></i>] is evaluated as follows: | 2738 * <i>e<sub>n</sub></i>] is evaluated as follows: |
| 2762 * | |
| 2763 * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and
second argument | 2739 * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and
second argument |
| 2764 * <i>o<sub>i+1</sub></i><i>, 1 <= i <= n</i> | 2740 * <i>o<sub>i+1</sub></i><i>, 1 <= i <= n</i> |
| 2765 * | 2741 * |
| 2766 * | |
| 2767 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 2742 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
| 2768 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s
ub>, 1 <= i <= | 2743 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s
ub>, 1 <= i <= |
| 2769 * 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>. | 2744 * 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>. |
| 2770 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 2745 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
| 2771 * j <= m</i>. | 2746 * j <= m</i>. |
| 2772 */ | 2747 */ |
| 2773 static final StaticWarningCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = new StaticWa
rningCode.con1('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 38, "The element type '%s' ca
nnot be assigned to the list type '%s'"); | 2748 static final StaticWarningCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = new StaticWa
rningCode.con1('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 38, "The element type '%s' ca
nnot be assigned to the list type '%s'"); |
| 2774 | 2749 |
| 2775 /** | 2750 /** |
| 2776 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : | 2751 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : |
| 2777 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: | 2752 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: |
| 2778 * | |
| 2779 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second | 2753 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second |
| 2780 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> | 2754 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> |
| 2781 * | 2755 * |
| 2782 * | |
| 2783 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 2756 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
| 2784 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s
ub>, 1 <= i <= | 2757 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s
ub>, 1 <= i <= |
| 2785 * 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>. | 2758 * 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>. |
| 2786 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 2759 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
| 2787 * j <= m</i>. | 2760 * j <= m</i>. |
| 2788 */ | 2761 */ |
| 2789 static final StaticWarningCode MAP_KEY_TYPE_NOT_ASSIGNABLE = new StaticWarning
Code.con1('MAP_KEY_TYPE_NOT_ASSIGNABLE', 39, "The element type '%s' cannot be as
signed to the map key type '%s'"); | 2762 static final StaticWarningCode MAP_KEY_TYPE_NOT_ASSIGNABLE = new StaticWarning
Code.con1('MAP_KEY_TYPE_NOT_ASSIGNABLE', 39, "The element type '%s' cannot be as
signed to the map key type '%s'"); |
| 2790 | 2763 |
| 2791 /** | 2764 /** |
| 2792 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : | 2765 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : |
| 2793 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: | 2766 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: |
| 2794 * | |
| 2795 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second | 2767 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second |
| 2796 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> | 2768 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> |
| 2797 * | 2769 * |
| 2798 * | |
| 2799 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 2770 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
| 2800 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s
ub>, 1 <= i <= | 2771 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s
ub>, 1 <= i <= |
| 2801 * 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>. | 2772 * 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>. |
| 2802 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 2773 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
| 2803 * j <= m</i>. | 2774 * j <= m</i>. |
| 2804 */ | 2775 */ |
| 2805 static final StaticWarningCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = new StaticWarni
ngCode.con1('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 40, "The element type '%s' cannot b
e assigned to the map value type '%s'"); | 2776 static final StaticWarningCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = new StaticWarni
ngCode.con1('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 40, "The element type '%s' cannot b
e assigned to the map value type '%s'"); |
| 2806 | 2777 |
| 2807 /** | 2778 /** |
| 2808 * 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i>
with argument type | 2779 * 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i>
with argument type |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2981 * 7.3 Setters: It is a static warning if a setter declares a return type othe
r than void. | 2952 * 7.3 Setters: It is a static warning if a setter declares a return type othe
r than void. |
| 2982 */ | 2953 */ |
| 2983 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'"); | 2954 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'"); |
| 2984 | 2955 |
| 2985 /** | 2956 /** |
| 2986 * 15.1 Static Types: A type <i>T</i> is malformed iff: * <i>T</i> has the for
m <i>id</i> or the | 2957 * 15.1 Static Types: A type <i>T</i> is malformed iff: * <i>T</i> has the for
m <i>id</i> or the |
| 2987 * form <i>prefix.id</i>, and in the enclosing lexical scope, the name <i>id</
i> (respectively | 2958 * form <i>prefix.id</i>, and in the enclosing lexical scope, the name <i>id</
i> (respectively |
| 2988 * <i>prefix.id</i>) does not denote a type. * <i>T</i> denotes a type paramet
er in the | 2959 * <i>prefix.id</i>) does not denote a type. * <i>T</i> denotes a type paramet
er in the |
| 2989 * enclosing lexical scope, but occurs in the signature or body of a static me
mber. * | 2960 * enclosing lexical scope, but occurs in the signature or body of a static me
mber. * |
| 2990 * <i>T</i> is a parameterized type of the form <i>G<S<sub>1</sub>, .., S<s
ub>n</sub>></i>, | 2961 * <i>T</i> is a parameterized type of the form <i>G<S<sub>1</sub>, .., S<s
ub>n</sub>></i>, |
| 2991 * and <i>G</i> is malformed. | |
| 2992 * | 2962 * |
| 2993 * Any use of a malformed type gives rise to a static warning. | 2963 * Any use of a malformed type gives rise to a static warning. |
| 2994 * | 2964 * |
| 2995 * @param nonTypeName the name that is not a type | 2965 * @param nonTypeName the name that is not a type |
| 2996 */ | 2966 */ |
| 2997 static final StaticWarningCode NOT_A_TYPE = new StaticWarningCode.con1('NOT_A_
TYPE', 57, "%s is not a type"); | 2967 static final StaticWarningCode NOT_A_TYPE = new StaticWarningCode.con1('NOT_A_
TYPE', 57, "%s is not a type"); |
| 2998 | 2968 |
| 2999 /** | 2969 /** |
| 3000 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > | 2970 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > |
| 3001 * n</i>. | 2971 * n</i>. |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3263 String get correction => correction7; | 3233 String get correction => correction7; |
| 3264 | 3234 |
| 3265 ErrorSeverity get errorSeverity => ErrorType.STATIC_WARNING.severity; | 3235 ErrorSeverity get errorSeverity => ErrorType.STATIC_WARNING.severity; |
| 3266 | 3236 |
| 3267 ErrorType get type => ErrorType.STATIC_WARNING; | 3237 ErrorType get type => ErrorType.STATIC_WARNING; |
| 3268 } | 3238 } |
| 3269 | 3239 |
| 3270 /** | 3240 /** |
| 3271 * The interface `AnalysisErrorListener` defines the behavior of objects that li
sten for | 3241 * The interface `AnalysisErrorListener` defines the behavior of objects that li
sten for |
| 3272 * [AnalysisError] being produced by the analysis engine. | 3242 * [AnalysisError] being produced by the analysis engine. |
| 3273 * | |
| 3274 * @coverage dart.engine.error | |
| 3275 */ | 3243 */ |
| 3276 abstract class AnalysisErrorListener { | 3244 abstract class AnalysisErrorListener { |
| 3277 /** | 3245 /** |
| 3278 * An error listener that ignores errors that are reported to it. | 3246 * An error listener that ignores errors that are reported to it. |
| 3279 */ | 3247 */ |
| 3280 static final AnalysisErrorListener NULL_LISTENER = new AnalysisErrorListener_N
ULL_LISTENER(); | 3248 static final AnalysisErrorListener NULL_LISTENER = new AnalysisErrorListener_N
ULL_LISTENER(); |
| 3281 | 3249 |
| 3282 /** | 3250 /** |
| 3283 * This method is invoked when an error has been found by the analysis engine. | 3251 * This method is invoked when an error has been found by the analysis engine. |
| 3284 * | 3252 * |
| 3285 * @param error the error that was just found (not `null`) | 3253 * @param error the error that was just found (not `null`) |
| 3286 */ | 3254 */ |
| 3287 void onError(AnalysisError error); | 3255 void onError(AnalysisError error); |
| 3288 } | 3256 } |
| 3289 | 3257 |
| 3290 class AnalysisErrorListener_NULL_LISTENER implements AnalysisErrorListener { | 3258 class AnalysisErrorListener_NULL_LISTENER implements AnalysisErrorListener { |
| 3291 void onError(AnalysisError event) { | 3259 void onError(AnalysisError event) { |
| 3292 } | 3260 } |
| 3293 } | 3261 } |
| 3294 | 3262 |
| 3295 /** | 3263 /** |
| 3296 * The enumeration `HtmlWarningCode` defines the error codes used for warnings i
n HTML files. | 3264 * The enumeration `HtmlWarningCode` defines the error codes used for warnings i
n HTML files. |
| 3297 * The convention for this class is for the name of the error code to indicate t
he problem that | 3265 * The convention for this class is for the name of the error code to indicate t
he problem that |
| 3298 * caused the error to be generated and for the error message to explain what is
wrong and, when | 3266 * caused the error to be generated and for the error message to explain what is
wrong and, when |
| 3299 * appropriate, how the problem can be corrected. | 3267 * appropriate, how the problem can be corrected. |
| 3300 * | |
| 3301 * @coverage dart.engine.error | |
| 3302 */ | 3268 */ |
| 3303 class HtmlWarningCode extends Enum<HtmlWarningCode> implements ErrorCode { | 3269 class HtmlWarningCode extends Enum<HtmlWarningCode> implements ErrorCode { |
| 3304 /** | 3270 /** |
| 3305 * An error code indicating that the value of the 'src' attribute of a Dart sc
ript tag is not a | 3271 * An error code indicating that the value of the 'src' attribute of a Dart sc
ript tag is not a |
| 3306 * valid URI. | 3272 * valid URI. |
| 3307 * | 3273 * |
| 3308 * @param uri the URI that is invalid | 3274 * @param uri the URI that is invalid |
| 3309 */ | 3275 */ |
| 3310 static final HtmlWarningCode INVALID_URI = new HtmlWarningCode.con1('INVALID_U
RI', 0, "Invalid URI syntax: '%s'"); | 3276 static final HtmlWarningCode INVALID_URI = new HtmlWarningCode.con1('INVALID_U
RI', 0, "Invalid URI syntax: '%s'"); |
| 3311 | 3277 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3352 ErrorSeverity get errorSeverity => ErrorSeverity.WARNING; | 3318 ErrorSeverity get errorSeverity => ErrorSeverity.WARNING; |
| 3353 | 3319 |
| 3354 ErrorType get type => ErrorType.STATIC_WARNING; | 3320 ErrorType get type => ErrorType.STATIC_WARNING; |
| 3355 } | 3321 } |
| 3356 | 3322 |
| 3357 /** | 3323 /** |
| 3358 * The enumeration `StaticTypeWarningCode` defines the error codes used for stat
ic type | 3324 * The enumeration `StaticTypeWarningCode` defines the error codes used for stat
ic type |
| 3359 * warnings. The convention for this class is for the name of the error code to
indicate the problem | 3325 * warnings. The convention for this class is for the name of the error code to
indicate the problem |
| 3360 * that caused the error to be generated and for the error message to explain wh
at is wrong and, | 3326 * that caused the error to be generated and for the error message to explain wh
at is wrong and, |
| 3361 * when appropriate, how the problem can be corrected. | 3327 * when appropriate, how the problem can be corrected. |
| 3362 * | |
| 3363 * @coverage dart.engine.error | |
| 3364 */ | 3328 */ |
| 3365 class StaticTypeWarningCode extends Enum<StaticTypeWarningCode> implements Error
Code { | 3329 class StaticTypeWarningCode extends Enum<StaticTypeWarningCode> implements Error
Code { |
| 3366 /** | 3330 /** |
| 3367 * 12.7 Lists: A fresh instance (7.6.1) <i>a</i>, of size <i>n</i>, whose clas
s implements the | 3331 * 12.7 Lists: A fresh instance (7.6.1) <i>a</i>, of size <i>n</i>, whose clas
s implements the |
| 3368 * built-in class <i>List<E></i> is allocated. | 3332 * built-in class <i>List<E></i> is allocated. |
| 3369 * | 3333 * |
| 3370 * @param numTypeArgument the number of provided type arguments | 3334 * @param numTypeArgument the number of provided type arguments |
| 3371 */ | 3335 */ |
| 3372 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"); | 3336 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"); |
| 3373 | 3337 |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3673 StaticTypeWarningCode.con2(String name, int ordinal, this.message, String corr
ection) : super(name, ordinal) { | 3637 StaticTypeWarningCode.con2(String name, int ordinal, this.message, String corr
ection) : super(name, ordinal) { |
| 3674 this.correction6 = correction; | 3638 this.correction6 = correction; |
| 3675 } | 3639 } |
| 3676 | 3640 |
| 3677 String get correction => correction6; | 3641 String get correction => correction6; |
| 3678 | 3642 |
| 3679 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; | 3643 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; |
| 3680 | 3644 |
| 3681 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; | 3645 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; |
| 3682 } | 3646 } |
| OLD | NEW |