Index: pkg/analyzer/lib/src/generated/error.dart |
diff --git a/pkg/analyzer/lib/src/generated/error.dart b/pkg/analyzer/lib/src/generated/error.dart |
index 7443ab4007fe1ace4d7291d0cb0f5cce47e8e44f..a3f5efe025f99f6d9b34f6797fc0b164284a78d2 100644 |
--- a/pkg/analyzer/lib/src/generated/error.dart |
+++ b/pkg/analyzer/lib/src/generated/error.dart |
@@ -5,11 +5,12 @@ |
library engine.error; |
import 'dart:collection'; |
-import 'java_core.dart'; |
-import 'source.dart'; |
-import 'scanner.dart' show Token; |
+ |
import 'ast.dart' show AstNode; |
import 'element.dart'; |
+import 'java_core.dart'; |
+import 'scanner.dart' show Token; |
+import 'source.dart'; |
/** |
* Instances of the class `AnalysisError` represent an error discovered during the analysis of |
@@ -27,13 +28,16 @@ class AnalysisError { |
* A [Comparator] that sorts by the name of the file that the [AnalysisError] was |
* found. |
*/ |
- static Comparator<AnalysisError> FILE_COMPARATOR = (AnalysisError o1, AnalysisError o2) => o1.source.shortName.compareTo(o2.source.shortName); |
+ static Comparator<AnalysisError> FILE_COMPARATOR = |
+ (AnalysisError o1, AnalysisError o2) => |
+ o1.source.shortName.compareTo(o2.source.shortName); |
/** |
* A [Comparator] that sorts error codes first by their severity (errors first, warnings |
* second), and then by the the error code type. |
*/ |
- static Comparator<AnalysisError> ERROR_CODE_COMPARATOR = (AnalysisError o1, AnalysisError o2) { |
+ static Comparator<AnalysisError> ERROR_CODE_COMPARATOR = |
+ (AnalysisError o1, AnalysisError o2) { |
ErrorCode errorCode1 = o1.errorCode; |
ErrorCode errorCode2 = o2.errorCode; |
ErrorSeverity errorSeverity1 = errorCode1.errorSeverity; |
@@ -106,7 +110,8 @@ class AnalysisError { |
* @param errorCode the error code to be associated with this error |
* @param arguments the arguments used to build the error message |
*/ |
- AnalysisError.con2(this.source, int offset, int length, this.errorCode, [List<Object> arguments]) { |
+ AnalysisError.con2(this.source, int offset, int length, this.errorCode, |
+ [List<Object> arguments]) { |
this._offset = offset; |
this._length = length; |
this._message = formatList(errorCode.message, arguments); |
@@ -116,37 +121,6 @@ class AnalysisError { |
} |
} |
- @override |
- bool operator ==(Object obj) { |
- if (identical(obj, this)) { |
- return true; |
- } |
- // prepare other AnalysisError |
- if (obj is! AnalysisError) { |
- return false; |
- } |
- AnalysisError other = obj as AnalysisError; |
- // Quick checks. |
- if (!identical(errorCode, other.errorCode)) { |
- return false; |
- } |
- if (_offset != other._offset || _length != other._length) { |
- return false; |
- } |
- if (isStaticOnly != other.isStaticOnly) { |
- return false; |
- } |
- // Deep checks. |
- if (_message != other._message) { |
- return false; |
- } |
- if (source != other.source) { |
- return false; |
- } |
- // OK |
- return true; |
- } |
- |
/** |
* Return the correction to be displayed for this error, or `null` if there is no correction |
* information for this error. The correction should indicate how the user can fix the error. |
@@ -155,6 +129,14 @@ class AnalysisError { |
*/ |
String get correction => _correction; |
+ @override |
+ int get hashCode { |
+ int hashCode = _offset; |
+ hashCode ^= (_message != null) ? _message.hashCode : 0; |
+ hashCode ^= (source != null) ? source.hashCode : 0; |
+ return hashCode; |
+ } |
+ |
/** |
* Return the number of characters from the offset to the end of the source which encompasses the |
* compilation error. |
@@ -179,6 +161,37 @@ class AnalysisError { |
*/ |
int get offset => _offset; |
+ @override |
+ bool operator ==(Object obj) { |
+ if (identical(obj, this)) { |
+ return true; |
+ } |
+ // prepare other AnalysisError |
+ if (obj is! AnalysisError) { |
+ return false; |
+ } |
+ AnalysisError other = obj as AnalysisError; |
+ // Quick checks. |
+ if (!identical(errorCode, other.errorCode)) { |
+ return false; |
+ } |
+ if (_offset != other._offset || _length != other._length) { |
+ return false; |
+ } |
+ if (isStaticOnly != other.isStaticOnly) { |
+ return false; |
+ } |
+ // Deep checks. |
+ if (_message != other._message) { |
+ return false; |
+ } |
+ if (source != other.source) { |
+ return false; |
+ } |
+ // OK |
+ return true; |
+ } |
+ |
/** |
* Return the value of the given property, or `null` if the given property is not defined |
* for this error. |
@@ -189,14 +202,6 @@ class AnalysisError { |
Object getProperty(ErrorProperty property) => null; |
@override |
- int get hashCode { |
- int hashCode = _offset; |
- hashCode ^= (_message != null) ? _message.hashCode : 0; |
- hashCode ^= (source != null) ? source.hashCode : 0; |
- return hashCode; |
- } |
- |
- @override |
String toString() { |
StringBuffer buffer = new StringBuffer(); |
buffer.write((source != null) ? source.fullName : "<unknown source>"); |
@@ -219,7 +224,8 @@ abstract class AnalysisErrorListener { |
/** |
* An error listener that ignores errors that are reported to it. |
*/ |
- static final AnalysisErrorListener NULL_LISTENER = new AnalysisErrorListener_NULL_LISTENER(); |
+ static final AnalysisErrorListener NULL_LISTENER = |
+ new AnalysisErrorListener_NULL_LISTENER(); |
/** |
* This method is invoked when an error has been found by the analysis engine. |
@@ -243,7 +249,8 @@ class AnalysisErrorWithProperties extends AnalysisError { |
/** |
* The properties associated with this error. |
*/ |
- HashMap<ErrorProperty, Object> _propertyMap = new HashMap<ErrorProperty, Object>(); |
+ HashMap<ErrorProperty, Object> _propertyMap = |
+ new HashMap<ErrorProperty, Object>(); |
/** |
* Initialize a newly created analysis error for the specified source. The error has no location |
@@ -253,7 +260,9 @@ class AnalysisErrorWithProperties extends AnalysisError { |
* @param errorCode the error code to be associated with this error |
* @param arguments the arguments used to build the error message |
*/ |
- AnalysisErrorWithProperties.con1(Source source, ErrorCode errorCode, List<Object> arguments) : super.con1(source, errorCode, arguments); |
+ AnalysisErrorWithProperties.con1(Source source, ErrorCode errorCode, |
+ List<Object> arguments) |
+ : super.con1(source, errorCode, arguments); |
/** |
* Initialize a newly created analysis error for the specified source at the given location. |
@@ -264,7 +273,9 @@ class AnalysisErrorWithProperties extends AnalysisError { |
* @param errorCode the error code to be associated with this error |
* @param arguments the arguments used to build the error message |
*/ |
- AnalysisErrorWithProperties.con2(Source source, int offset, int length, ErrorCode errorCode, List<Object> arguments) : super.con2(source, offset, length, errorCode, arguments); |
+ AnalysisErrorWithProperties.con2(Source source, int offset, int length, |
+ ErrorCode errorCode, List<Object> arguments) |
+ : super.con2(source, offset, length, errorCode, arguments); |
@override |
Object getProperty(ErrorProperty property) => _propertyMap[property]; |
@@ -285,80 +296,60 @@ class AnalysisErrorWithProperties extends AnalysisError { |
* The enumeration `AngularCode` defines Angular specific problems. |
*/ |
class AngularCode extends ErrorCode { |
- static const AngularCode CANNOT_PARSE_SELECTOR |
- = const AngularCode( |
- 'CANNOT_PARSE_SELECTOR', |
- "The selector '{0}' cannot be parsed"); |
- |
- static const AngularCode INVALID_FORMATTER_NAME |
- = const AngularCode( |
- 'INVALID_FORMATTER_NAME', |
- "Formatter name must be a simple identifier"); |
- |
- static const AngularCode INVALID_PROPERTY_KIND |
- = const AngularCode( |
- 'INVALID_PROPERTY_KIND', |
- "Unknown property binding kind '{0}', use one of the '@', '=>', '=>!' or '<=>'"); |
- |
- static const AngularCode INVALID_PROPERTY_FIELD |
- = const AngularCode( |
- 'INVALID_PROPERTY_FIELD', |
- "Unknown property field '{0}'"); |
- |
- static const AngularCode INVALID_PROPERTY_MAP |
- = const AngularCode( |
- 'INVALID_PROPERTY_MAP', |
- "Argument 'map' must be a constant map literal"); |
- |
- static const AngularCode INVALID_PROPERTY_NAME |
- = const AngularCode( |
- 'INVALID_PROPERTY_NAME', |
- "Property name must be a string literal"); |
- |
- static const AngularCode INVALID_PROPERTY_SPEC |
- = const AngularCode( |
- 'INVALID_PROPERTY_SPEC', |
- "Property binding specification must be a string literal"); |
- |
- static const AngularCode INVALID_REPEAT_SYNTAX |
- = const AngularCode( |
- 'INVALID_REPEAT_SYNTAX', |
- "Expected statement in form '_item_ in _collection_ [tracked by _id_]'"); |
- |
- static const AngularCode INVALID_REPEAT_ITEM_SYNTAX |
- = const AngularCode( |
- 'INVALID_REPEAT_ITEM_SYNTAX', |
- "Item must by identifier or in '(_key_, _value_)' pair."); |
- |
- static const AngularCode INVALID_URI |
- = const AngularCode( |
- 'INVALID_URI', |
- "Invalid URI syntax: '{0}'"); |
- |
- static const AngularCode MISSING_FORMATTER_COLON |
- = const AngularCode( |
- 'MISSING_FORMATTER_COLON', |
- "Missing ':' before formatter argument"); |
- |
- static const AngularCode MISSING_NAME |
- = const AngularCode( |
- 'MISSING_NAME', |
- "Argument 'name' must be provided"); |
- |
- static const AngularCode MISSING_PUBLISH_AS |
- = const AngularCode( |
- 'MISSING_PUBLISH_AS', |
- "Argument 'publishAs' must be provided"); |
- |
- static const AngularCode MISSING_SELECTOR |
- = const AngularCode( |
- 'MISSING_SELECTOR', |
- "Argument 'selector' must be provided"); |
- |
- static const AngularCode URI_DOES_NOT_EXIST |
- = const AngularCode( |
- 'URI_DOES_NOT_EXIST', |
- "Target of URI does not exist: '{0}'"); |
+ static const AngularCode CANNOT_PARSE_SELECTOR = const AngularCode( |
+ 'CANNOT_PARSE_SELECTOR', |
+ "The selector '{0}' cannot be parsed"); |
+ |
+ static const AngularCode INVALID_FORMATTER_NAME = const AngularCode( |
+ 'INVALID_FORMATTER_NAME', |
+ "Formatter name must be a simple identifier"); |
+ |
+ static const AngularCode INVALID_PROPERTY_KIND = const AngularCode( |
+ 'INVALID_PROPERTY_KIND', |
+ "Unknown property binding kind '{0}', use one of the '@', '=>', '=>!' or '<=>'"); |
+ |
+ static const AngularCode INVALID_PROPERTY_FIELD = |
+ const AngularCode('INVALID_PROPERTY_FIELD', "Unknown property field '{0}'"); |
+ |
+ static const AngularCode INVALID_PROPERTY_MAP = const AngularCode( |
+ 'INVALID_PROPERTY_MAP', |
+ "Argument 'map' must be a constant map literal"); |
+ |
+ static const AngularCode INVALID_PROPERTY_NAME = const AngularCode( |
+ 'INVALID_PROPERTY_NAME', |
+ "Property name must be a string literal"); |
+ |
+ static const AngularCode INVALID_PROPERTY_SPEC = const AngularCode( |
+ 'INVALID_PROPERTY_SPEC', |
+ "Property binding specification must be a string literal"); |
+ |
+ static const AngularCode INVALID_REPEAT_SYNTAX = const AngularCode( |
+ 'INVALID_REPEAT_SYNTAX', |
+ "Expected statement in form '_item_ in _collection_ [tracked by _id_]'"); |
+ |
+ static const AngularCode INVALID_REPEAT_ITEM_SYNTAX = const AngularCode( |
+ 'INVALID_REPEAT_ITEM_SYNTAX', |
+ "Item must by identifier or in '(_key_, _value_)' pair."); |
+ |
+ static const AngularCode INVALID_URI = |
+ const AngularCode('INVALID_URI', "Invalid URI syntax: '{0}'"); |
+ |
+ static const AngularCode MISSING_FORMATTER_COLON = const AngularCode( |
+ 'MISSING_FORMATTER_COLON', |
+ "Missing ':' before formatter argument"); |
+ |
+ static const AngularCode MISSING_NAME = |
+ const AngularCode('MISSING_NAME', "Argument 'name' must be provided"); |
+ |
+ static const AngularCode MISSING_PUBLISH_AS = const AngularCode( |
+ 'MISSING_PUBLISH_AS', |
+ "Argument 'publishAs' must be provided"); |
+ |
+ static const AngularCode MISSING_SELECTOR = |
+ const AngularCode('MISSING_SELECTOR', "Argument 'selector' must be provided"); |
+ |
+ static const AngularCode URI_DOES_NOT_EXIST = |
+ const AngularCode('URI_DOES_NOT_EXIST', "Target of URI does not exist: '{0}'"); |
/** |
* Initialize a newly created error code to have the given [name]. The message |
@@ -419,8 +410,9 @@ class CheckedModeCompileTimeErrorCode extends ErrorCode { |
* 12.11.2 Const: It is a compile-time error if evaluation of a constant |
* object results in an uncaught exception being thrown. |
*/ |
- static const CheckedModeCompileTimeErrorCode CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH |
- = const CheckedModeCompileTimeErrorCode( |
+ static const CheckedModeCompileTimeErrorCode |
+ CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH = |
+ const CheckedModeCompileTimeErrorCode( |
'CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH', |
"The object type '{0}' cannot be assigned to the field '{1}', which has type '{2}'"); |
@@ -428,8 +420,9 @@ class CheckedModeCompileTimeErrorCode extends ErrorCode { |
* 12.11.2 Const: It is a compile-time error if evaluation of a constant |
* object results in an uncaught exception being thrown. |
*/ |
- static const CheckedModeCompileTimeErrorCode CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH |
- = const CheckedModeCompileTimeErrorCode( |
+ static const CheckedModeCompileTimeErrorCode |
+ CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH = |
+ const CheckedModeCompileTimeErrorCode( |
'CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH', |
"The object type '{0}' cannot be assigned to a parameter of type '{1}'"); |
@@ -444,8 +437,9 @@ class CheckedModeCompileTimeErrorCode extends ErrorCode { |
* @param initializerType the name of the type of the initializer expression |
* @param fieldType the name of the type of the field |
*/ |
- static const CheckedModeCompileTimeErrorCode CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE |
- = const CheckedModeCompileTimeErrorCode( |
+ static const CheckedModeCompileTimeErrorCode |
+ CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE = |
+ const CheckedModeCompileTimeErrorCode( |
'CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE', |
"The initializer type '{0}' cannot be assigned to the field type '{1}'"); |
@@ -463,7 +457,8 @@ class CheckedModeCompileTimeErrorCode extends ErrorCode { |
* 1 <= j <= m</i>. |
*/ |
static const CheckedModeCompileTimeErrorCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE |
- = const CheckedModeCompileTimeErrorCode( |
+ = |
+ const CheckedModeCompileTimeErrorCode( |
'LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', |
"The element type '{0}' cannot be assigned to the list type '{1}'"); |
@@ -482,8 +477,8 @@ class CheckedModeCompileTimeErrorCode extends ErrorCode { |
* warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<sub>j</sub>, 1 |
* <= j <= m</i>. |
*/ |
- static const CheckedModeCompileTimeErrorCode MAP_KEY_TYPE_NOT_ASSIGNABLE |
- = const CheckedModeCompileTimeErrorCode( |
+ static const CheckedModeCompileTimeErrorCode MAP_KEY_TYPE_NOT_ASSIGNABLE = |
+ const CheckedModeCompileTimeErrorCode( |
'MAP_KEY_TYPE_NOT_ASSIGNABLE', |
"The element type '{0}' cannot be assigned to the map key type '{1}'"); |
@@ -502,8 +497,8 @@ class CheckedModeCompileTimeErrorCode extends ErrorCode { |
* warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<sub>j</sub>, 1 |
* <= j <= m</i>. |
*/ |
- static const CheckedModeCompileTimeErrorCode MAP_VALUE_TYPE_NOT_ASSIGNABLE |
- = const CheckedModeCompileTimeErrorCode( |
+ static const CheckedModeCompileTimeErrorCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = |
+ const CheckedModeCompileTimeErrorCode( |
'MAP_VALUE_TYPE_NOT_ASSIGNABLE', |
"The element type '{0}' cannot be assigned to the map value type '{1}'"); |
@@ -511,8 +506,8 @@ class CheckedModeCompileTimeErrorCode extends ErrorCode { |
* 12.11.2 Const: It is a compile-time error if evaluation of a constant |
* object results in an uncaught exception being thrown. |
*/ |
- static const CheckedModeCompileTimeErrorCode VARIABLE_TYPE_MISMATCH |
- = const CheckedModeCompileTimeErrorCode( |
+ static const CheckedModeCompileTimeErrorCode VARIABLE_TYPE_MISMATCH = |
+ const CheckedModeCompileTimeErrorCode( |
'VARIABLE_TYPE_MISMATCH', |
"The object type '{0}' cannot be assigned to a variable of type '{1}'"); |
@@ -522,11 +517,13 @@ class CheckedModeCompileTimeErrorCode extends ErrorCode { |
* template. The correction associated with the error will be created from the |
* given [correction] template. |
*/ |
- const CheckedModeCompileTimeErrorCode(String name, String message, [String correction]) |
+ const CheckedModeCompileTimeErrorCode(String name, String message, |
+ [String correction]) |
: super(name, message, correction); |
@override |
- ErrorSeverity get errorSeverity => ErrorType.CHECKED_MODE_COMPILE_TIME_ERROR.severity; |
+ ErrorSeverity get errorSeverity => |
+ ErrorType.CHECKED_MODE_COMPILE_TIME_ERROR.severity; |
@override |
ErrorType get type => ErrorType.CHECKED_MODE_COMPILE_TIME_ERROR; |
@@ -544,7 +541,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* Enum proposal: It is also a compile-time error to explicitly instantiate an |
* enum via 'new' or 'const' or to access its private fields. |
*/ |
- static const CompileTimeErrorCode ACCESS_PRIVATE_ENUM_FIELD = const CompileTimeErrorCode('ACCESS_PRIVATE_ENUM_FIELD', "The private fields of an enum cannot be accessed, even within the same library"); |
+ static const CompileTimeErrorCode ACCESS_PRIVATE_ENUM_FIELD = |
+ const CompileTimeErrorCode( |
+ 'ACCESS_PRIVATE_ENUM_FIELD', |
+ "The private fields of an enum cannot be accessed, even within the same library"); |
/** |
* 14.2 Exports: It is a compile-time error if a name <i>N</i> is re-exported |
@@ -558,7 +558,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* @param secondLibraryName the name of the second library that the type is |
* found |
*/ |
- static const CompileTimeErrorCode AMBIGUOUS_EXPORT = const CompileTimeErrorCode('AMBIGUOUS_EXPORT', "The name '{0}' is defined in the libraries '{1}' and '{2}'"); |
+ static const CompileTimeErrorCode AMBIGUOUS_EXPORT = |
+ const CompileTimeErrorCode( |
+ 'AMBIGUOUS_EXPORT', |
+ "The name '{0}' is defined in the libraries '{1}' and '{2}'"); |
/** |
* 12.33 Argument Definition Test: It is a compile time error if <i>v</i> does |
@@ -567,59 +570,84 @@ class CompileTimeErrorCode extends ErrorCode { |
* @param the name of the identifier in the argument definition test that is |
* not a parameter |
*/ |
- static const CompileTimeErrorCode ARGUMENT_DEFINITION_TEST_NON_PARAMETER = const CompileTimeErrorCode('ARGUMENT_DEFINITION_TEST_NON_PARAMETER', "'{0}' is not a parameter"); |
+ static const CompileTimeErrorCode ARGUMENT_DEFINITION_TEST_NON_PARAMETER = |
+ const CompileTimeErrorCode( |
+ 'ARGUMENT_DEFINITION_TEST_NON_PARAMETER', |
+ "'{0}' is not a parameter"); |
/** |
* ?? Asynchronous For-in: It is a compile-time error if an asynchronous |
* for-in statement appears inside a synchronous function. |
*/ |
- static const CompileTimeErrorCode ASYNC_FOR_IN_WRONG_CONTEXT = const CompileTimeErrorCode('ASYNC_FOR_IN_WRONG_CONTEXT', "The asynchronous for-in can only be used in a function marked with async or async*"); |
+ static const CompileTimeErrorCode ASYNC_FOR_IN_WRONG_CONTEXT = |
+ const CompileTimeErrorCode( |
+ 'ASYNC_FOR_IN_WRONG_CONTEXT', |
+ "The asynchronous for-in can only be used in a function marked with async or async*"); |
/** |
* ??: It is a compile-time error if the function immediately enclosing a is |
* not declared asynchronous. |
*/ |
- static const CompileTimeErrorCode AWAIT_IN_WRONG_CONTEXT = const CompileTimeErrorCode('AWAIT_IN_WRONG_CONTEXT', "The await expression can only be used in a function marked as async or async*"); |
+ static const CompileTimeErrorCode AWAIT_IN_WRONG_CONTEXT = |
+ const CompileTimeErrorCode( |
+ 'AWAIT_IN_WRONG_CONTEXT', |
+ "The await expression can only be used in a function marked as async or async*"); |
/** |
* 12.30 Identifier Reference: It is a compile-time error to use a built-in |
* identifier other than dynamic as a type annotation. |
*/ |
- static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE = const CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE', "The built-in identifier '{0}' cannot be as a type"); |
+ static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE = |
+ const CompileTimeErrorCode( |
+ 'BUILT_IN_IDENTIFIER_AS_TYPE', |
+ "The built-in identifier '{0}' cannot be as a type"); |
/** |
* 12.30 Identifier Reference: It is a compile-time error if a built-in |
* identifier is used as the declared name of a class, type parameter or type |
* alias. |
*/ |
- static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_NAME = const CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE_NAME', "The built-in identifier '{0}' cannot be used as a type name"); |
+ static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_NAME = |
+ const CompileTimeErrorCode( |
+ 'BUILT_IN_IDENTIFIER_AS_TYPE_NAME', |
+ "The built-in identifier '{0}' cannot be used as a type name"); |
/** |
* 12.30 Identifier Reference: It is a compile-time error if a built-in |
* identifier is used as the declared name of a class, type parameter or type |
* alias. |
*/ |
- static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME = const CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME', "The built-in identifier '{0}' cannot be used as a type alias name"); |
+ static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME = |
+ const CompileTimeErrorCode( |
+ 'BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME', |
+ "The built-in identifier '{0}' cannot be used as a type alias name"); |
/** |
* 12.30 Identifier Reference: It is a compile-time error if a built-in |
* identifier is used as the declared name of a class, type parameter or type |
* alias. |
*/ |
- static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME = const CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME', "The built-in identifier '{0}' cannot be used as a type parameter name"); |
+ static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME = |
+ const CompileTimeErrorCode( |
+ 'BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME', |
+ "The built-in identifier '{0}' cannot be used as a type parameter name"); |
/** |
* 13.9 Switch: It is a compile-time error if the class <i>C</i> implements |
* the operator <i>==</i>. |
*/ |
- static const CompileTimeErrorCode CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS = const CompileTimeErrorCode('CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS', "The switch case expression type '{0}' cannot override the == operator"); |
+ static const CompileTimeErrorCode CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS = |
+ const CompileTimeErrorCode( |
+ 'CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS', |
+ "The switch case expression type '{0}' cannot override the == operator"); |
/** |
* 12.1 Constants: It is a compile-time error if evaluation of a compile-time |
* constant would raise |
* an exception. |
*/ |
- static const CompileTimeErrorCode COMPILE_TIME_CONSTANT_RAISES_EXCEPTION = const CompileTimeErrorCode('COMPILE_TIME_CONSTANT_RAISES_EXCEPTION', ""); |
+ static const CompileTimeErrorCode COMPILE_TIME_CONSTANT_RAISES_EXCEPTION = |
+ const CompileTimeErrorCode('COMPILE_TIME_CONSTANT_RAISES_EXCEPTION', ""); |
/** |
* 7.2 Getters: It is a compile-time error if a class has both a getter and a |
@@ -627,7 +655,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* getter is defined explicitly or implicitly, or whether the getter or the |
* method are inherited or not. |
*/ |
- static const CompileTimeErrorCode CONFLICTING_GETTER_AND_METHOD = const CompileTimeErrorCode('CONFLICTING_GETTER_AND_METHOD', "Class '{0}' cannot have both getter '{1}.{2}' and method with the same name"); |
+ static const CompileTimeErrorCode CONFLICTING_GETTER_AND_METHOD = |
+ const CompileTimeErrorCode( |
+ 'CONFLICTING_GETTER_AND_METHOD', |
+ "Class '{0}' cannot have both getter '{1}.{2}' and method with the same name"); |
/** |
* 7.2 Getters: It is a compile-time error if a class has both a getter and a |
@@ -635,7 +666,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* getter is defined explicitly or implicitly, or whether the getter or the |
* method are inherited or not. |
*/ |
- static const CompileTimeErrorCode CONFLICTING_METHOD_AND_GETTER = const CompileTimeErrorCode('CONFLICTING_METHOD_AND_GETTER', "Class '{0}' cannot have both method '{1}.{2}' and getter with the same name"); |
+ static const CompileTimeErrorCode CONFLICTING_METHOD_AND_GETTER = |
+ const CompileTimeErrorCode( |
+ 'CONFLICTING_METHOD_AND_GETTER', |
+ "Class '{0}' cannot have both method '{1}.{2}' and getter with the same name"); |
/** |
* 7.6 Constructors: A constructor name always begins with the name of its |
@@ -643,7 +677,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* identifier <i>id</i>. It is a compile-time error if <i>id</i> is the name |
* of a member declared in the immediately enclosing class. |
*/ |
- static const CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD = const CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD', "'{0}' cannot be used to name a constructor and a field in this class"); |
+ static const CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD = |
+ const CompileTimeErrorCode( |
+ 'CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD', |
+ "'{0}' cannot be used to name a constructor and a field in this class"); |
/** |
* 7.6 Constructors: A constructor name always begins with the name of its |
@@ -651,34 +688,50 @@ class CompileTimeErrorCode extends ErrorCode { |
* identifier <i>id</i>. It is a compile-time error if <i>id</i> is the name |
* of a member declared in the immediately enclosing class. |
*/ |
- static const CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD = const CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD', "'{0}' cannot be used to name a constructor and a method in this class"); |
+ static const CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD = |
+ const CompileTimeErrorCode( |
+ 'CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD', |
+ "'{0}' cannot be used to name a constructor and a method in this class"); |
/** |
* 7. Classes: It is a compile time error if a generic class declares a type |
* variable with the same name as the class or any of its members or |
* constructors. |
*/ |
- static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_CLASS = const CompileTimeErrorCode('CONFLICTING_TYPE_VARIABLE_AND_CLASS', "'{0}' cannot be used to name a type varaible in a class with the same name"); |
+ static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_CLASS = |
+ const CompileTimeErrorCode( |
+ 'CONFLICTING_TYPE_VARIABLE_AND_CLASS', |
+ "'{0}' cannot be used to name a type varaible in a class with the same name"); |
/** |
* 7. Classes: It is a compile time error if a generic class declares a type |
* variable with the same name as the class or any of its members or |
* constructors. |
*/ |
- static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_MEMBER = const CompileTimeErrorCode('CONFLICTING_TYPE_VARIABLE_AND_MEMBER', "'{0}' cannot be used to name a type varaible and member in this class"); |
+ static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_MEMBER = |
+ const CompileTimeErrorCode( |
+ 'CONFLICTING_TYPE_VARIABLE_AND_MEMBER', |
+ "'{0}' cannot be used to name a type varaible and member in this class"); |
/** |
* 12.11.2 Const: It is a compile-time error if evaluation of a constant |
* object results in an uncaught exception being thrown. |
*/ |
- static const CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION = const CompileTimeErrorCode('CONST_CONSTRUCTOR_THROWS_EXCEPTION', "'const' constructors cannot throw exceptions"); |
+ static const CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION = |
+ const CompileTimeErrorCode( |
+ 'CONST_CONSTRUCTOR_THROWS_EXCEPTION', |
+ "'const' constructors cannot throw exceptions"); |
/** |
* 10.6.3 Constant Constructors: It is a compile-time error if a constant |
* constructor is declared by a class C if any instance variable declared in C |
* is initialized with an expression that is not a constant expression. |
*/ |
- static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST = const CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST', "Can't define the 'const' constructor because the field '{0}' is initialized with a non-constant value"); |
+ static const CompileTimeErrorCode |
+ CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST = |
+ const CompileTimeErrorCode( |
+ 'CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST', |
+ "Can't define the 'const' constructor because the field '{0}' is initialized with a non-constant value"); |
/** |
* 7.6.3 Constant Constructors: The superinitializer that appears, explicitly |
@@ -689,7 +742,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* 9 Mixins: For each generative constructor named ... an implicitly declared |
* constructor named ... is declared. |
*/ |
- static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_MIXIN = const CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_MIXIN', "Constant constructor cannot be declared for a class with a mixin"); |
+ static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_MIXIN = |
+ const CompileTimeErrorCode( |
+ 'CONST_CONSTRUCTOR_WITH_MIXIN', |
+ "Constant constructor cannot be declared for a class with a mixin"); |
/** |
* 7.6.3 Constant Constructors: The superinitializer that appears, explicitly |
@@ -697,7 +753,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* specify a constant constructor of the superclass of the immediately |
* enclosing class or a compile-time error occurs. |
*/ |
- static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER = const CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER', "Constant constructor cannot call non-constant super constructor of '{0}'"); |
+ static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER = |
+ const CompileTimeErrorCode( |
+ 'CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER', |
+ "Constant constructor cannot call non-constant super constructor of '{0}'"); |
/** |
* 7.6.3 Constant Constructors: It is a compile-time error if a constant |
@@ -705,24 +764,36 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* The above refers to both locally declared and inherited instance variables. |
*/ |
- static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD = const CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD', "Cannot define the 'const' constructor for a class with non-final fields"); |
+ static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD = |
+ const CompileTimeErrorCode( |
+ 'CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD', |
+ "Cannot define the 'const' constructor for a class with non-final fields"); |
/** |
* 12.12.2 Const: It is a compile-time error if <i>T</i> is a deferred type. |
*/ |
- static const CompileTimeErrorCode CONST_DEFERRED_CLASS = const CompileTimeErrorCode('CONST_DEFERRED_CLASS', "Deferred classes cannot be created with 'const'"); |
+ static const CompileTimeErrorCode CONST_DEFERRED_CLASS = |
+ const CompileTimeErrorCode( |
+ 'CONST_DEFERRED_CLASS', |
+ "Deferred classes cannot be created with 'const'"); |
/** |
* 6.2 Formal Parameters: It is a compile-time error if a formal parameter is |
* declared as a constant variable. |
*/ |
- static const CompileTimeErrorCode CONST_FORMAL_PARAMETER = const CompileTimeErrorCode('CONST_FORMAL_PARAMETER', "Parameters cannot be 'const'"); |
+ static const CompileTimeErrorCode CONST_FORMAL_PARAMETER = |
+ const CompileTimeErrorCode( |
+ 'CONST_FORMAL_PARAMETER', |
+ "Parameters cannot be 'const'"); |
/** |
* 5 Variables: A constant variable must be initialized to a compile-time |
* constant or a compile-time error occurs. |
*/ |
- static const CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE = const CompileTimeErrorCode('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', "'const' variables must be constant value"); |
+ static const CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE = |
+ const CompileTimeErrorCode( |
+ 'CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', |
+ "'const' variables must be constant value"); |
/** |
* 5 Variables: A constant variable must be initialized to a compile-time |
@@ -731,20 +802,31 @@ class CompileTimeErrorCode extends ErrorCode { |
* 12.1 Constants: A qualified reference to a static constant variable that is |
* not qualified by a deferred prefix. |
*/ |
- static const CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY = const CompileTimeErrorCode('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY', "Constant values from a deferred library cannot be used to initialized a 'const' variable"); |
+ static const CompileTimeErrorCode |
+ CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY = |
+ const CompileTimeErrorCode( |
+ 'CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY', |
+ "Constant values from a deferred library cannot be used to initialized a 'const' variable"); |
/** |
* 7.5 Instance Variables: It is a compile-time error if an instance variable |
* is declared to be constant. |
*/ |
- static const CompileTimeErrorCode CONST_INSTANCE_FIELD = const CompileTimeErrorCode('CONST_INSTANCE_FIELD', "Only static fields can be declared as 'const'"); |
+ static const CompileTimeErrorCode CONST_INSTANCE_FIELD = |
+ const CompileTimeErrorCode( |
+ 'CONST_INSTANCE_FIELD', |
+ "Only static fields can be declared as 'const'"); |
/** |
* 12.8 Maps: It is a compile-time error if the key of an entry in a constant |
* map literal is an instance of a class that implements the operator |
* <i>==</i> unless the key is a string or integer. |
*/ |
- static const CompileTimeErrorCode CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS = const CompileTimeErrorCode('CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS', "The constant map entry key expression type '{0}' cannot override the == operator"); |
+ static const CompileTimeErrorCode |
+ CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS = |
+ const CompileTimeErrorCode( |
+ 'CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS', |
+ "The constant map entry key expression type '{0}' cannot override the == operator"); |
/** |
* 5 Variables: A constant variable must be initialized to a compile-time |
@@ -752,28 +834,40 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* @param name the name of the uninitialized final variable |
*/ |
- static const CompileTimeErrorCode CONST_NOT_INITIALIZED = const CompileTimeErrorCode('CONST_NOT_INITIALIZED', "The const variable '{0}' must be initialized"); |
+ static const CompileTimeErrorCode CONST_NOT_INITIALIZED = |
+ const CompileTimeErrorCode( |
+ 'CONST_NOT_INITIALIZED', |
+ "The const variable '{0}' must be initialized"); |
/** |
* 12.11.2 Const: An expression of one of the forms !e, e1 && e2 or e1 || e2, |
* where e, e1 and e2 are constant expressions that evaluate to a boolean |
* value. |
*/ |
- static const CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = const CompileTimeErrorCode('CONST_EVAL_TYPE_BOOL', "An expression of type 'bool' was expected"); |
+ static const CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = |
+ const CompileTimeErrorCode( |
+ 'CONST_EVAL_TYPE_BOOL', |
+ "An expression of type 'bool' was expected"); |
/** |
* 12.11.2 Const: An expression of one of the forms e1 == e2 or e1 != e2 where |
* e1 and e2 are constant expressions that evaluate to a numeric, string or |
* boolean value or to null. |
*/ |
- static const CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_NUM_STRING = const CompileTimeErrorCode('CONST_EVAL_TYPE_BOOL_NUM_STRING', "An expression of type 'bool', 'num', 'String' or 'null' was expected"); |
+ static const CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_NUM_STRING = |
+ const CompileTimeErrorCode( |
+ 'CONST_EVAL_TYPE_BOOL_NUM_STRING', |
+ "An expression of type 'bool', 'num', 'String' or 'null' was expected"); |
/** |
* 12.11.2 Const: An expression of one of the forms ~e, e1 ^ e2, e1 & e2, |
* e1 | e2, e1 >> e2 or e1 << e2, where e, e1 and e2 are constant expressions |
* that evaluate to an integer value or to null. |
*/ |
- static const CompileTimeErrorCode CONST_EVAL_TYPE_INT = const CompileTimeErrorCode('CONST_EVAL_TYPE_INT', "An expression of type 'int' was expected"); |
+ static const CompileTimeErrorCode CONST_EVAL_TYPE_INT = |
+ const CompileTimeErrorCode( |
+ 'CONST_EVAL_TYPE_INT', |
+ "An expression of type 'int' was expected"); |
/** |
* 12.11.2 Const: An expression of one of the forms e, e1 + e2, e1 - e2, e1 * |
@@ -781,19 +875,28 @@ class CompileTimeErrorCode extends ErrorCode { |
* where e, e1 and e2 are constant expressions that evaluate to a numeric |
* value or to null. |
*/ |
- static const CompileTimeErrorCode CONST_EVAL_TYPE_NUM = const CompileTimeErrorCode('CONST_EVAL_TYPE_NUM', "An expression of type 'num' was expected"); |
+ static const CompileTimeErrorCode CONST_EVAL_TYPE_NUM = |
+ const CompileTimeErrorCode( |
+ 'CONST_EVAL_TYPE_NUM', |
+ "An expression of type 'num' was expected"); |
/** |
* 12.11.2 Const: It is a compile-time error if evaluation of a constant |
* object results in an uncaught exception being thrown. |
*/ |
- static const CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = const CompileTimeErrorCode('CONST_EVAL_THROWS_EXCEPTION', "Evaluation of this constant expression causes exception"); |
+ static const CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = |
+ const CompileTimeErrorCode( |
+ 'CONST_EVAL_THROWS_EXCEPTION', |
+ "Evaluation of this constant expression causes exception"); |
/** |
* 12.11.2 Const: It is a compile-time error if evaluation of a constant |
* object results in an uncaught exception being thrown. |
*/ |
- static const CompileTimeErrorCode CONST_EVAL_THROWS_IDBZE = const CompileTimeErrorCode('CONST_EVAL_THROWS_IDBZE', "Evaluation of this constant expression throws IntegerDivisionByZeroException"); |
+ static const CompileTimeErrorCode CONST_EVAL_THROWS_IDBZE = |
+ const CompileTimeErrorCode( |
+ 'CONST_EVAL_THROWS_IDBZE', |
+ "Evaluation of this constant expression throws IntegerDivisionByZeroException"); |
/** |
* 12.11.2 Const: If <i>T</i> is a parameterized type <i>S<U<sub>1</sub>, |
@@ -806,7 +909,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* See [CompileTimeErrorCode.NEW_WITH_INVALID_TYPE_PARAMETERS], and |
* [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]. |
*/ |
- static const CompileTimeErrorCode CONST_WITH_INVALID_TYPE_PARAMETERS = const CompileTimeErrorCode('CONST_WITH_INVALID_TYPE_PARAMETERS', "The type '{0}' is declared with {1} type parameters, but {2} type arguments were given"); |
+ static const CompileTimeErrorCode CONST_WITH_INVALID_TYPE_PARAMETERS = |
+ const CompileTimeErrorCode( |
+ 'CONST_WITH_INVALID_TYPE_PARAMETERS', |
+ "The type '{0}' is declared with {1} type parameters, but {2} type arguments were given"); |
/** |
* 12.11.2 Const: If <i>e</i> is of the form <i>const T(a<sub>1</sub>, |
@@ -815,14 +921,20 @@ class CompileTimeErrorCode extends ErrorCode { |
* type <i>T</i> does not declare a constant constructor with the same name as |
* the declaration of <i>T</i>. |
*/ |
- static const CompileTimeErrorCode CONST_WITH_NON_CONST = const CompileTimeErrorCode('CONST_WITH_NON_CONST', "The constructor being called is not a 'const' constructor"); |
+ static const CompileTimeErrorCode CONST_WITH_NON_CONST = |
+ const CompileTimeErrorCode( |
+ 'CONST_WITH_NON_CONST', |
+ "The constructor being called is not a 'const' constructor"); |
/** |
* 12.11.2 Const: In all of the above cases, it is a compile-time error if |
* <i>a<sub>i</sub>, 1 <= i <= n + k</i>, is not a compile-time constant |
* expression. |
*/ |
- static const CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = const CompileTimeErrorCode('CONST_WITH_NON_CONSTANT_ARGUMENT', "Arguments of a constant creation must be constant expressions"); |
+ static const CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = |
+ const CompileTimeErrorCode( |
+ 'CONST_WITH_NON_CONSTANT_ARGUMENT', |
+ "Arguments of a constant creation must be constant expressions"); |
/** |
* 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class |
@@ -836,13 +948,19 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* @param name the name of the non-type element |
*/ |
- static const CompileTimeErrorCode CONST_WITH_NON_TYPE = const CompileTimeErrorCode('CONST_WITH_NON_TYPE', "The name '{0}' is not a class"); |
+ static const CompileTimeErrorCode CONST_WITH_NON_TYPE = |
+ const CompileTimeErrorCode( |
+ 'CONST_WITH_NON_TYPE', |
+ "The name '{0}' is not a class"); |
/** |
* 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type |
* parameters. |
*/ |
- static const CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = const CompileTimeErrorCode('CONST_WITH_TYPE_PARAMETERS', "The constant creation cannot use a type parameter"); |
+ static const CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = |
+ const CompileTimeErrorCode( |
+ 'CONST_WITH_TYPE_PARAMETERS', |
+ "The constant creation cannot use a type parameter"); |
/** |
* 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of |
@@ -851,7 +969,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* @param typeName the name of the type |
* @param constructorName the name of the requested constant constructor |
*/ |
- static const CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR = const CompileTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR', "The class '{0}' does not have a constant constructor '{1}'"); |
+ static const CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR = |
+ const CompileTimeErrorCode( |
+ 'CONST_WITH_UNDEFINED_CONSTRUCTOR', |
+ "The class '{0}' does not have a constant constructor '{1}'"); |
/** |
* 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of |
@@ -859,13 +980,19 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* @param typeName the name of the type |
*/ |
- static const CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = const CompileTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', "The class '{0}' does not have a default constant constructor"); |
+ static const CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = |
+ const CompileTimeErrorCode( |
+ 'CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', |
+ "The class '{0}' does not have a default constant constructor"); |
/** |
* 15.3.1 Typedef: It is a compile-time error if any default values are |
* specified in the signature of a function type alias. |
*/ |
- static const CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS = const CompileTimeErrorCode('DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS', "Default values aren't allowed in typedefs"); |
+ static const CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS = |
+ const CompileTimeErrorCode( |
+ 'DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS', |
+ "Default values aren't allowed in typedefs"); |
/** |
* 6.2.1 Required Formals: By means of a function signature that names the |
@@ -873,19 +1000,29 @@ class CompileTimeErrorCode extends ErrorCode { |
* error if any default values are specified in the signature of such a |
* function type. |
*/ |
- static const CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER = const CompileTimeErrorCode('DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER', "Default values aren't allowed in function type parameters"); |
+ static const CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER = |
+ const CompileTimeErrorCode( |
+ 'DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER', |
+ "Default values aren't allowed in function type parameters"); |
/** |
* 7.6.2 Factories: It is a compile-time error if <i>k</i> explicitly |
* specifies a default value for an optional parameter. |
*/ |
- static const CompileTimeErrorCode DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR = const CompileTimeErrorCode('DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR', "Default values aren't allowed in factory constructors that redirect to another constructor"); |
+ static const CompileTimeErrorCode |
+ DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR = |
+ const CompileTimeErrorCode( |
+ 'DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR', |
+ "Default values aren't allowed in factory constructors that redirect to another constructor"); |
/** |
* 3.1 Scoping: It is a compile-time error if there is more than one entity |
* with the same name declared in the same scope. |
*/ |
- static const CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT = const CompileTimeErrorCode('DUPLICATE_CONSTRUCTOR_DEFAULT', "The default constructor is already defined"); |
+ static const CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT = |
+ const CompileTimeErrorCode( |
+ 'DUPLICATE_CONSTRUCTOR_DEFAULT', |
+ "The default constructor is already defined"); |
/** |
* 3.1 Scoping: It is a compile-time error if there is more than one entity |
@@ -893,7 +1030,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* @param duplicateName the name of the duplicate entity |
*/ |
- static const CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME = const CompileTimeErrorCode('DUPLICATE_CONSTRUCTOR_NAME', "The constructor with name '{0}' is already defined"); |
+ static const CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME = |
+ const CompileTimeErrorCode( |
+ 'DUPLICATE_CONSTRUCTOR_NAME', |
+ "The constructor with name '{0}' is already defined"); |
/** |
* 3.1 Scoping: It is a compile-time error if there is more than one entity |
@@ -907,7 +1047,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* @param duplicateName the name of the duplicate entity |
*/ |
- static const CompileTimeErrorCode DUPLICATE_DEFINITION = const CompileTimeErrorCode('DUPLICATE_DEFINITION', "The name '{0}' is already defined"); |
+ static const CompileTimeErrorCode DUPLICATE_DEFINITION = |
+ const CompileTimeErrorCode( |
+ 'DUPLICATE_DEFINITION', |
+ "The name '{0}' is already defined"); |
/** |
* 7. Classes: It is a compile-time error if a class has an instance member |
@@ -921,21 +1064,30 @@ class CompileTimeErrorCode extends ErrorCode { |
* @param name the name of the conflicting members |
* See [DUPLICATE_DEFINITION]. |
*/ |
- static const CompileTimeErrorCode DUPLICATE_DEFINITION_INHERITANCE = const CompileTimeErrorCode('DUPLICATE_DEFINITION_INHERITANCE', "The name '{0}' is already defined in '{1}'"); |
+ static const CompileTimeErrorCode DUPLICATE_DEFINITION_INHERITANCE = |
+ const CompileTimeErrorCode( |
+ 'DUPLICATE_DEFINITION_INHERITANCE', |
+ "The name '{0}' is already defined in '{1}'"); |
/** |
* 12.14.2 Binding Actuals to Formals: It is a compile-time error if |
* <i>q<sub>i</sub> = q<sub>j</sub></i> for any <i>i != j</i> [where |
* <i>q<sub>i</sub></i> is the label for a named argument]. |
*/ |
- static const CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = const CompileTimeErrorCode('DUPLICATE_NAMED_ARGUMENT', "The argument for the named parameter '{0}' was already specified"); |
+ static const CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = |
+ const CompileTimeErrorCode( |
+ 'DUPLICATE_NAMED_ARGUMENT', |
+ "The argument for the named parameter '{0}' was already specified"); |
/** |
* SDK implementation libraries can be exported only by other SDK libraries. |
* |
* @param uri the uri pointing to a library |
*/ |
- static const CompileTimeErrorCode EXPORT_INTERNAL_LIBRARY = const CompileTimeErrorCode('EXPORT_INTERNAL_LIBRARY', "The library '{0}' is internal and cannot be exported"); |
+ static const CompileTimeErrorCode EXPORT_INTERNAL_LIBRARY = |
+ const CompileTimeErrorCode( |
+ 'EXPORT_INTERNAL_LIBRARY', |
+ "The library '{0}' is internal and cannot be exported"); |
/** |
* 14.2 Exports: It is a compile-time error if the compilation unit found at |
@@ -943,13 +1095,17 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* @param uri the uri pointing to a non-library declaration |
*/ |
- static const CompileTimeErrorCode EXPORT_OF_NON_LIBRARY = const CompileTimeErrorCode('EXPORT_OF_NON_LIBRARY', "The exported library '{0}' must not have a part-of directive"); |
+ static const CompileTimeErrorCode EXPORT_OF_NON_LIBRARY = |
+ const CompileTimeErrorCode( |
+ 'EXPORT_OF_NON_LIBRARY', |
+ "The exported library '{0}' must not have a part-of directive"); |
/** |
* Enum proposal: It is a compile-time error to subclass, mix-in or implement |
* an enum. |
*/ |
- static const CompileTimeErrorCode EXTENDS_ENUM = const CompileTimeErrorCode('EXTENDS_ENUM', "Classes cannot extend an enum"); |
+ static const CompileTimeErrorCode EXTENDS_ENUM = |
+ const CompileTimeErrorCode('EXTENDS_ENUM', "Classes cannot extend an enum"); |
/** |
* 7.9 Superclasses: It is a compile-time error if the extends clause of a |
@@ -958,7 +1114,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* @param typeName the name of the superclass that was not found |
*/ |
- static const CompileTimeErrorCode EXTENDS_NON_CLASS = const CompileTimeErrorCode('EXTENDS_NON_CLASS', "Classes can only extend other classes"); |
+ static const CompileTimeErrorCode EXTENDS_NON_CLASS = |
+ const CompileTimeErrorCode( |
+ 'EXTENDS_NON_CLASS', |
+ "Classes can only extend other classes"); |
/** |
* 12.2 Null: It is a compile-time error for a class to attempt to extend or |
@@ -983,7 +1142,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* @param typeName the name of the type that cannot be extended |
* See [IMPLEMENTS_DISALLOWED_CLASS]. |
*/ |
- static const CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = const CompileTimeErrorCode('EXTENDS_DISALLOWED_CLASS', "Classes cannot extend '{0}'"); |
+ static const CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = |
+ const CompileTimeErrorCode( |
+ 'EXTENDS_DISALLOWED_CLASS', |
+ "Classes cannot extend '{0}'"); |
/** |
* 7.9 Superclasses: It is a compile-time error if the extends clause of a |
@@ -992,7 +1154,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* @param typeName the name of the type that cannot be extended |
* See [IMPLEMENTS_DEFERRED_CLASS], and [MIXIN_DEFERRED_CLASS]. |
*/ |
- static const CompileTimeErrorCode EXTENDS_DEFERRED_CLASS = const CompileTimeErrorCode('EXTENDS_DEFERRED_CLASS', "This class cannot extend the deferred class '{0}'"); |
+ static const CompileTimeErrorCode EXTENDS_DEFERRED_CLASS = |
+ const CompileTimeErrorCode( |
+ 'EXTENDS_DEFERRED_CLASS', |
+ "This class cannot extend the deferred class '{0}'"); |
/** |
* 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < |
@@ -1004,14 +1169,20 @@ class CompileTimeErrorCode extends ErrorCode { |
* @param requiredCount the maximum number of positional arguments |
* @param argumentCount the actual number of positional arguments given |
*/ |
- static const CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS = const CompileTimeErrorCode('EXTRA_POSITIONAL_ARGUMENTS', "{0} positional arguments expected, but {1} found"); |
+ static const CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS = |
+ const CompileTimeErrorCode( |
+ 'EXTRA_POSITIONAL_ARGUMENTS', |
+ "{0} positional arguments expected, but {1} found"); |
/** |
* 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It |
* is a compile time error if more than one initializer corresponding to a |
* given instance variable appears in <i>k</i>'s list. |
*/ |
- static const CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS = const CompileTimeErrorCode('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', "The field '{0}' cannot be initialized twice in the same constructor"); |
+ static const CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS = |
+ const CompileTimeErrorCode( |
+ 'FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', |
+ "The field '{0}' cannot be initialized twice in the same constructor"); |
/** |
* 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It |
@@ -1019,7 +1190,11 @@ class CompileTimeErrorCode extends ErrorCode { |
* initializer for a variable that is initialized by means of an initializing |
* formal of <i>k</i>. |
*/ |
- static const CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER = const CompileTimeErrorCode('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER', "Fields cannot be initialized in both the parameter list and the initializers"); |
+ static const CompileTimeErrorCode |
+ FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER = |
+ const CompileTimeErrorCode( |
+ 'FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER', |
+ "Fields cannot be initialized in both the parameter list and the initializers"); |
/** |
* 5 Variables: It is a compile-time error if a final instance variable that |
@@ -1028,21 +1203,30 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* @param name the name of the field in question |
*/ |
- static const CompileTimeErrorCode FINAL_INITIALIZED_MULTIPLE_TIMES = const CompileTimeErrorCode('FINAL_INITIALIZED_MULTIPLE_TIMES', "'{0}' is a final field and so can only be set once"); |
+ static const CompileTimeErrorCode FINAL_INITIALIZED_MULTIPLE_TIMES = |
+ const CompileTimeErrorCode( |
+ 'FINAL_INITIALIZED_MULTIPLE_TIMES', |
+ "'{0}' is a final field and so can only be set once"); |
/** |
* 7.6.1 Generative Constructors: It is a compile-time error if an |
* initializing formal is used by a function other than a non-redirecting |
* generative constructor. |
*/ |
- static const CompileTimeErrorCode FIELD_INITIALIZER_FACTORY_CONSTRUCTOR = const CompileTimeErrorCode('FIELD_INITIALIZER_FACTORY_CONSTRUCTOR', "Initializing formal fields cannot be used in factory constructors"); |
+ static const CompileTimeErrorCode FIELD_INITIALIZER_FACTORY_CONSTRUCTOR = |
+ const CompileTimeErrorCode( |
+ 'FIELD_INITIALIZER_FACTORY_CONSTRUCTOR', |
+ "Initializing formal fields cannot be used in factory constructors"); |
/** |
* 7.6.1 Generative Constructors: It is a compile-time error if an |
* initializing formal is used by a function other than a non-redirecting |
* generative constructor. |
*/ |
- static const CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = const CompileTimeErrorCode('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', "Initializing formal fields can only be used in constructors"); |
+ static const CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = |
+ const CompileTimeErrorCode( |
+ 'FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', |
+ "Initializing formal fields can only be used in constructors"); |
/** |
* 7.6.1 Generative Constructors: A generative constructor may be redirecting, |
@@ -1052,7 +1236,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* initializing formal is used by a function other than a non-redirecting |
* generative constructor. |
*/ |
- static const CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR = const CompileTimeErrorCode('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', "The redirecting constructor cannot have a field initializer"); |
+ static const CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR = |
+ const CompileTimeErrorCode( |
+ 'FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', |
+ "The redirecting constructor cannot have a field initializer"); |
/** |
* 7.2 Getters: It is a compile-time error if a class has both a getter and a |
@@ -1060,7 +1247,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* @param name the conflicting name of the getter and method |
*/ |
- static const CompileTimeErrorCode GETTER_AND_METHOD_WITH_SAME_NAME = const CompileTimeErrorCode('GETTER_AND_METHOD_WITH_SAME_NAME', "'{0}' cannot be used to name a getter, there is already a method with the same name"); |
+ static const CompileTimeErrorCode GETTER_AND_METHOD_WITH_SAME_NAME = |
+ const CompileTimeErrorCode( |
+ 'GETTER_AND_METHOD_WITH_SAME_NAME', |
+ "'{0}' cannot be used to name a getter, there is already a method with the same name"); |
/** |
* 7.10 Superinterfaces: It is a compile-time error if the implements clause |
@@ -1070,7 +1260,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* @param typeName the name of the type that cannot be extended |
* See [EXTENDS_DEFERRED_CLASS], and [MIXIN_DEFERRED_CLASS]. |
*/ |
- static const CompileTimeErrorCode IMPLEMENTS_DEFERRED_CLASS = const CompileTimeErrorCode('IMPLEMENTS_DEFERRED_CLASS', "This class cannot implement the deferred class '{0}'"); |
+ static const CompileTimeErrorCode IMPLEMENTS_DEFERRED_CLASS = |
+ const CompileTimeErrorCode( |
+ 'IMPLEMENTS_DEFERRED_CLASS', |
+ "This class cannot implement the deferred class '{0}'"); |
/** |
* 12.2 Null: It is a compile-time error for a class to attempt to extend or |
@@ -1095,19 +1288,28 @@ class CompileTimeErrorCode extends ErrorCode { |
* @param typeName the name of the type that cannot be implemented |
* See [EXTENDS_DISALLOWED_CLASS]. |
*/ |
- static const CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = const CompileTimeErrorCode('IMPLEMENTS_DISALLOWED_CLASS', "Classes cannot implement '{0}'"); |
+ static const CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = |
+ const CompileTimeErrorCode( |
+ 'IMPLEMENTS_DISALLOWED_CLASS', |
+ "Classes cannot implement '{0}'"); |
/** |
* 7.10 Superinterfaces: It is a compile-time error if the implements clause |
* of a class includes type dynamic. |
*/ |
- static const CompileTimeErrorCode IMPLEMENTS_DYNAMIC = const CompileTimeErrorCode('IMPLEMENTS_DYNAMIC', "Classes cannot implement 'dynamic'"); |
+ static const CompileTimeErrorCode IMPLEMENTS_DYNAMIC = |
+ const CompileTimeErrorCode( |
+ 'IMPLEMENTS_DYNAMIC', |
+ "Classes cannot implement 'dynamic'"); |
/** |
* Enum proposal: It is a compile-time error to subclass, mix-in or implement |
* an enum. |
*/ |
- static const CompileTimeErrorCode IMPLEMENTS_ENUM = const CompileTimeErrorCode('IMPLEMENTS_ENUM', "Classes cannot implement an enum"); |
+ static const CompileTimeErrorCode IMPLEMENTS_ENUM = |
+ const CompileTimeErrorCode( |
+ 'IMPLEMENTS_ENUM', |
+ "Classes cannot implement an enum"); |
/** |
* 7.10 Superinterfaces: It is a compile-time error if the implements clause |
@@ -1116,7 +1318,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* @param typeName the name of the interface that was not found |
*/ |
- static const CompileTimeErrorCode IMPLEMENTS_NON_CLASS = const CompileTimeErrorCode('IMPLEMENTS_NON_CLASS', "Classes can only implement other classes"); |
+ static const CompileTimeErrorCode IMPLEMENTS_NON_CLASS = |
+ const CompileTimeErrorCode( |
+ 'IMPLEMENTS_NON_CLASS', |
+ "Classes can only implement other classes"); |
/** |
* 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears |
@@ -1124,7 +1329,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* @param className the name of the class that is implemented more than once |
*/ |
- static const CompileTimeErrorCode IMPLEMENTS_REPEATED = const CompileTimeErrorCode('IMPLEMENTS_REPEATED', "'{0}' can only be implemented once"); |
+ static const CompileTimeErrorCode IMPLEMENTS_REPEATED = |
+ const CompileTimeErrorCode( |
+ 'IMPLEMENTS_REPEATED', |
+ "'{0}' can only be implemented once"); |
/** |
* 7.10 Superinterfaces: It is a compile-time error if the superclass of a |
@@ -1133,7 +1341,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* @param className the name of the class that appears in both "extends" and |
* "implements" clauses |
*/ |
- static const CompileTimeErrorCode IMPLEMENTS_SUPER_CLASS = const CompileTimeErrorCode('IMPLEMENTS_SUPER_CLASS', "'{0}' cannot be used in both 'extends' and 'implements' clauses"); |
+ static const CompileTimeErrorCode IMPLEMENTS_SUPER_CLASS = |
+ const CompileTimeErrorCode( |
+ 'IMPLEMENTS_SUPER_CLASS', |
+ "'{0}' cannot be used in both 'extends' and 'implements' clauses"); |
/** |
* 7.6.1 Generative Constructors: Note that <b>this</b> is not in scope on the |
@@ -1146,14 +1357,20 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* @param name the name of the type in question |
*/ |
- static const CompileTimeErrorCode IMPLICIT_THIS_REFERENCE_IN_INITIALIZER = const CompileTimeErrorCode('IMPLICIT_THIS_REFERENCE_IN_INITIALIZER', "Only static members can be accessed in initializers"); |
+ static const CompileTimeErrorCode IMPLICIT_THIS_REFERENCE_IN_INITIALIZER = |
+ const CompileTimeErrorCode( |
+ 'IMPLICIT_THIS_REFERENCE_IN_INITIALIZER', |
+ "Only static members can be accessed in initializers"); |
/** |
* SDK implementation libraries can be imported only by other SDK libraries. |
* |
* @param uri the uri pointing to a library |
*/ |
- static const CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY = const CompileTimeErrorCode('IMPORT_INTERNAL_LIBRARY', "The library '{0}' is internal and cannot be imported"); |
+ static const CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY = |
+ const CompileTimeErrorCode( |
+ 'IMPORT_INTERNAL_LIBRARY', |
+ "The library '{0}' is internal and cannot be imported"); |
/** |
* 14.1 Imports: It is a compile-time error if the specified URI of an |
@@ -1162,7 +1379,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* @param uri the uri pointing to a non-library declaration |
* See [StaticWarningCode.IMPORT_OF_NON_LIBRARY]. |
*/ |
- static const CompileTimeErrorCode IMPORT_OF_NON_LIBRARY = const CompileTimeErrorCode('IMPORT_OF_NON_LIBRARY', "The imported library '{0}' must not have a part-of directive"); |
+ static const CompileTimeErrorCode IMPORT_OF_NON_LIBRARY = |
+ const CompileTimeErrorCode( |
+ 'IMPORT_OF_NON_LIBRARY', |
+ "The imported library '{0}' must not have a part-of directive"); |
/** |
* 13.9 Switch: It is a compile-time error if values of the expressions |
@@ -1173,7 +1393,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* type |
* @param expectedType the name of the expected type |
*/ |
- static const CompileTimeErrorCode INCONSISTENT_CASE_EXPRESSION_TYPES = const CompileTimeErrorCode('INCONSISTENT_CASE_EXPRESSION_TYPES', "Case expressions must have the same types, '{0}' is not a '{1}'"); |
+ static const CompileTimeErrorCode INCONSISTENT_CASE_EXPRESSION_TYPES = |
+ const CompileTimeErrorCode( |
+ 'INCONSISTENT_CASE_EXPRESSION_TYPES', |
+ "Case expressions must have the same types, '{0}' is not a '{1}'"); |
/** |
* 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It |
@@ -1185,7 +1408,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* variable in the immediately enclosing class |
* See [INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]. |
*/ |
- static const CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTENT_FIELD = const CompileTimeErrorCode('INITIALIZER_FOR_NON_EXISTENT_FIELD', "'{0}' is not a variable in the enclosing class"); |
+ static const CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTENT_FIELD = |
+ const CompileTimeErrorCode( |
+ 'INITIALIZER_FOR_NON_EXISTENT_FIELD', |
+ "'{0}' is not a variable in the enclosing class"); |
/** |
* 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It |
@@ -1197,7 +1423,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* the immediately enclosing class |
* See [INITIALIZING_FORMAL_FOR_STATIC_FIELD]. |
*/ |
- static const CompileTimeErrorCode INITIALIZER_FOR_STATIC_FIELD = const CompileTimeErrorCode('INITIALIZER_FOR_STATIC_FIELD', "'{0}' is a static variable in the enclosing class, variables initialized in a constructor cannot be static"); |
+ static const CompileTimeErrorCode INITIALIZER_FOR_STATIC_FIELD = |
+ const CompileTimeErrorCode( |
+ 'INITIALIZER_FOR_STATIC_FIELD', |
+ "'{0}' is a static variable in the enclosing class, variables initialized in a constructor cannot be static"); |
/** |
* 7.6.1 Generative Constructors: An initializing formal has the form |
@@ -1209,7 +1438,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* See [INITIALIZING_FORMAL_FOR_STATIC_FIELD], and |
* [INITIALIZER_FOR_NON_EXISTENT_FIELD]. |
*/ |
- static const CompileTimeErrorCode INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD = const CompileTimeErrorCode('INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD', "'{0}' is not a variable in the enclosing class"); |
+ static const CompileTimeErrorCode INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD = |
+ const CompileTimeErrorCode( |
+ 'INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD', |
+ "'{0}' is not a variable in the enclosing class"); |
/** |
* 7.6.1 Generative Constructors: An initializing formal has the form |
@@ -1220,25 +1452,35 @@ class CompileTimeErrorCode extends ErrorCode { |
* the immediately enclosing class |
* See [INITIALIZER_FOR_STATIC_FIELD]. |
*/ |
- static const CompileTimeErrorCode INITIALIZING_FORMAL_FOR_STATIC_FIELD = const CompileTimeErrorCode('INITIALIZING_FORMAL_FOR_STATIC_FIELD', "'{0}' is a static field in the enclosing class, fields initialized in a constructor cannot be static"); |
+ static const CompileTimeErrorCode INITIALIZING_FORMAL_FOR_STATIC_FIELD = |
+ const CompileTimeErrorCode( |
+ 'INITIALIZING_FORMAL_FOR_STATIC_FIELD', |
+ "'{0}' is a static field in the enclosing class, fields initialized in a constructor cannot be static"); |
/** |
* 12.30 Identifier Reference: Otherwise, e is equivalent to the property |
* extraction <b>this</b>.<i>id</i>. |
*/ |
- static const CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_FACTORY = const CompileTimeErrorCode('INSTANCE_MEMBER_ACCESS_FROM_FACTORY', "Instance members cannot be accessed from a factory constructor"); |
+ static const CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_FACTORY = |
+ const CompileTimeErrorCode( |
+ 'INSTANCE_MEMBER_ACCESS_FROM_FACTORY', |
+ "Instance members cannot be accessed from a factory constructor"); |
/** |
* 12.30 Identifier Reference: Otherwise, e is equivalent to the property |
* extraction <b>this</b>.<i>id</i>. |
*/ |
- static const CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_STATIC = const CompileTimeErrorCode('INSTANCE_MEMBER_ACCESS_FROM_STATIC', "Instance members cannot be accessed from a static method"); |
+ static const CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_STATIC = |
+ const CompileTimeErrorCode( |
+ 'INSTANCE_MEMBER_ACCESS_FROM_STATIC', |
+ "Instance members cannot be accessed from a static method"); |
/** |
* Enum proposal: It is also a compile-time error to explicitly instantiate an |
* enum via 'new' or 'const' or to access its private fields. |
*/ |
- static const CompileTimeErrorCode INSTANTIATE_ENUM = const CompileTimeErrorCode('INSTANTIATE_ENUM', "Enums cannot be instantiated"); |
+ static const CompileTimeErrorCode INSTANTIATE_ENUM = |
+ const CompileTimeErrorCode('INSTANTIATE_ENUM', "Enums cannot be instantiated"); |
/** |
* 11 Metadata: Metadata consists of a series of annotations, each of which |
@@ -1246,7 +1488,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* either a reference to a compile-time constant variable, or a call to a |
* constant constructor. |
*/ |
- static const CompileTimeErrorCode INVALID_ANNOTATION = const CompileTimeErrorCode('INVALID_ANNOTATION', "Annotation can be only constant variable or constant constructor invocation"); |
+ static const CompileTimeErrorCode INVALID_ANNOTATION = |
+ const CompileTimeErrorCode( |
+ 'INVALID_ANNOTATION', |
+ "Annotation can be only constant variable or constant constructor invocation"); |
/** |
* 11 Metadata: Metadata consists of a series of annotations, each of which |
@@ -1257,26 +1502,38 @@ class CompileTimeErrorCode extends ErrorCode { |
* 12.1 Constants: A qualified reference to a static constant variable that is |
* not qualified by a deferred prefix. |
*/ |
- static const CompileTimeErrorCode INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY = const CompileTimeErrorCode('INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY', "Constant values from a deferred library cannot be used as annotations"); |
+ static const CompileTimeErrorCode INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY = |
+ const CompileTimeErrorCode( |
+ 'INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY', |
+ "Constant values from a deferred library cannot be used as annotations"); |
/** |
* 15.31 Identifier Reference: It is a compile-time error if any of the |
* identifiers async, await or yield is used as an identifier in a function |
* body marked with either async, async* or sync*. |
*/ |
- static const CompileTimeErrorCode INVALID_IDENTIFIER_IN_ASYNC = const CompileTimeErrorCode('INVALID_IDENTIFIER_IN_ASYNC', "The identifier '{0}' cannot be used in a function marked with async, async* or sync*"); |
+ static const CompileTimeErrorCode INVALID_IDENTIFIER_IN_ASYNC = |
+ const CompileTimeErrorCode( |
+ 'INVALID_IDENTIFIER_IN_ASYNC', |
+ "The identifier '{0}' cannot be used in a function marked with async, async* or sync*"); |
/** |
* 9. Functions: It is a compile-time error if an async, async* or sync* |
* modifier is attached to the body of a setter or constructor. |
*/ |
- static const CompileTimeErrorCode INVALID_MODIFIER_ON_CONSTRUCTOR = const CompileTimeErrorCode('INVALID_MODIFIER_ON_CONSTRUCTOR', "The modifier '{0}' cannot be applied to the body of a constructor"); |
+ static const CompileTimeErrorCode INVALID_MODIFIER_ON_CONSTRUCTOR = |
+ const CompileTimeErrorCode( |
+ 'INVALID_MODIFIER_ON_CONSTRUCTOR', |
+ "The modifier '{0}' cannot be applied to the body of a constructor"); |
/** |
* 9. Functions: It is a compile-time error if an async, async* or sync* |
* modifier is attached to the body of a setter or constructor. |
*/ |
- static const CompileTimeErrorCode INVALID_MODIFIER_ON_SETTER = const CompileTimeErrorCode('INVALID_MODIFIER_ON_SETTER', "The modifier '{0}' cannot be applied to the body of a setter"); |
+ static const CompileTimeErrorCode INVALID_MODIFIER_ON_SETTER = |
+ const CompileTimeErrorCode( |
+ 'INVALID_MODIFIER_ON_SETTER', |
+ "The modifier '{0}' cannot be applied to the body of a setter"); |
/** |
* TODO(brianwilkerson) Remove this when we have decided on how to report |
@@ -1285,19 +1542,26 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* See TODOs in ConstantVisitor |
*/ |
- static const CompileTimeErrorCode INVALID_CONSTANT = const CompileTimeErrorCode('INVALID_CONSTANT', "Invalid constant value"); |
+ static const CompileTimeErrorCode INVALID_CONSTANT = |
+ const CompileTimeErrorCode('INVALID_CONSTANT', "Invalid constant value"); |
/** |
* 7.6 Constructors: It is a compile-time error if the name of a constructor |
* is not a constructor name. |
*/ |
- static const CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = const CompileTimeErrorCode('INVALID_CONSTRUCTOR_NAME', "Invalid constructor name"); |
+ static const CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = |
+ const CompileTimeErrorCode( |
+ 'INVALID_CONSTRUCTOR_NAME', |
+ "Invalid constructor name"); |
/** |
* 7.6.2 Factories: It is a compile-time error if <i>M</i> is not the name of |
* the immediately enclosing class. |
*/ |
- static const CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS = const CompileTimeErrorCode('INVALID_FACTORY_NAME_NOT_A_CLASS', "The name of the immediately enclosing class expected"); |
+ static const CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS = |
+ const CompileTimeErrorCode( |
+ 'INVALID_FACTORY_NAME_NOT_A_CLASS', |
+ "The name of the immediately enclosing class expected"); |
/** |
* 12.10 This: It is a compile-time error if this appears in a top-level |
@@ -1305,7 +1569,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* method or variable initializer, or in the initializer of an instance |
* variable. |
*/ |
- static const CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = const CompileTimeErrorCode('INVALID_REFERENCE_TO_THIS', "Invalid reference to 'this' expression"); |
+ static const CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = |
+ const CompileTimeErrorCode( |
+ 'INVALID_REFERENCE_TO_THIS', |
+ "Invalid reference to 'this' expression"); |
/** |
* 12.6 Lists: It is a compile time error if the type argument of a constant |
@@ -1313,7 +1580,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* @name the name of the type parameter |
*/ |
- static const CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST = const CompileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_LIST', "Constant list literals cannot include a type parameter as a type argument, such as '{0}'"); |
+ static const CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST = |
+ const CompileTimeErrorCode( |
+ 'INVALID_TYPE_ARGUMENT_IN_CONST_LIST', |
+ "Constant list literals cannot include a type parameter as a type argument, such as '{0}'"); |
/** |
* 12.7 Maps: It is a compile time error if the type arguments of a constant |
@@ -1321,7 +1591,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* @name the name of the type parameter |
*/ |
- static const CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = const CompileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', "Constant map literals cannot include a type parameter as a type argument, such as '{0}'"); |
+ static const CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = |
+ const CompileTimeErrorCode( |
+ 'INVALID_TYPE_ARGUMENT_IN_CONST_MAP', |
+ "Constant map literals cannot include a type parameter as a type argument, such as '{0}'"); |
/** |
* 14.2 Exports: It is a compile-time error if the compilation unit found at |
@@ -1336,7 +1609,8 @@ class CompileTimeErrorCode extends ErrorCode { |
* @param uri the URI that is invalid |
* See [URI_DOES_NOT_EXIST]. |
*/ |
- static const CompileTimeErrorCode INVALID_URI = const CompileTimeErrorCode('INVALID_URI', "Invalid URI syntax: '{0}'"); |
+ static const CompileTimeErrorCode INVALID_URI = |
+ const CompileTimeErrorCode('INVALID_URI', "Invalid URI syntax: '{0}'"); |
/** |
* 13.13 Break: It is a compile-time error if no such statement |
@@ -1349,7 +1623,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* @param labelName the name of the unresolvable label |
*/ |
- static const CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = const CompileTimeErrorCode('LABEL_IN_OUTER_SCOPE', "Cannot reference label '{0}' declared in an outer method"); |
+ static const CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = |
+ const CompileTimeErrorCode( |
+ 'LABEL_IN_OUTER_SCOPE', |
+ "Cannot reference label '{0}' declared in an outer method"); |
/** |
* 13.13 Break: It is a compile-time error if no such statement |
@@ -1362,13 +1639,19 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* @param labelName the name of the unresolvable label |
*/ |
- static const CompileTimeErrorCode LABEL_UNDEFINED = const CompileTimeErrorCode('LABEL_UNDEFINED', "Cannot reference undefined label '{0}'"); |
+ static const CompileTimeErrorCode LABEL_UNDEFINED = |
+ const CompileTimeErrorCode( |
+ 'LABEL_UNDEFINED', |
+ "Cannot reference undefined label '{0}'"); |
/** |
* 7 Classes: It is a compile time error if a class <i>C</i> declares a member |
* with the same name as <i>C</i>. |
*/ |
- static const CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = const CompileTimeErrorCode('MEMBER_WITH_CLASS_NAME', "Class members cannot have the same name as the enclosing class"); |
+ static const CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = |
+ const CompileTimeErrorCode( |
+ 'MEMBER_WITH_CLASS_NAME', |
+ "Class members cannot have the same name as the enclosing class"); |
/** |
* 7.2 Getters: It is a compile-time error if a class has both a getter and a |
@@ -1376,17 +1659,26 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* @param name the conflicting name of the getter and method |
*/ |
- static const CompileTimeErrorCode METHOD_AND_GETTER_WITH_SAME_NAME = const CompileTimeErrorCode('METHOD_AND_GETTER_WITH_SAME_NAME', "'{0}' cannot be used to name a method, there is already a getter with the same name"); |
+ static const CompileTimeErrorCode METHOD_AND_GETTER_WITH_SAME_NAME = |
+ const CompileTimeErrorCode( |
+ 'METHOD_AND_GETTER_WITH_SAME_NAME', |
+ "'{0}' cannot be used to name a method, there is already a getter with the same name"); |
/** |
* 12.1 Constants: A constant expression is ... a constant list literal. |
*/ |
- static const CompileTimeErrorCode MISSING_CONST_IN_LIST_LITERAL = const CompileTimeErrorCode('MISSING_CONST_IN_LIST_LITERAL', "List literals must be prefixed with 'const' when used as a constant expression"); |
+ static const CompileTimeErrorCode MISSING_CONST_IN_LIST_LITERAL = |
+ const CompileTimeErrorCode( |
+ 'MISSING_CONST_IN_LIST_LITERAL', |
+ "List literals must be prefixed with 'const' when used as a constant expression"); |
/** |
* 12.1 Constants: A constant expression is ... a constant map literal. |
*/ |
- static const CompileTimeErrorCode MISSING_CONST_IN_MAP_LITERAL = const CompileTimeErrorCode('MISSING_CONST_IN_MAP_LITERAL', "Map literals must be prefixed with 'const' when used as a constant expression"); |
+ static const CompileTimeErrorCode MISSING_CONST_IN_MAP_LITERAL = |
+ const CompileTimeErrorCode( |
+ 'MISSING_CONST_IN_MAP_LITERAL', |
+ "Map literals must be prefixed with 'const' when used as a constant expression"); |
/** |
* Enum proposal: It is a static warning if all of the following conditions |
@@ -1399,7 +1691,11 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* @param constantName the name of the constant that is missing |
*/ |
- static const CompileTimeErrorCode MISSING_ENUM_CONSTANT_IN_SWITCH = const CompileTimeErrorCode('MISSING_ENUM_CONSTANT_IN_SWITCH', "Missing case clause for '{0}'", "Add a case clause for the missing constant or add a default clause."); |
+ static const CompileTimeErrorCode MISSING_ENUM_CONSTANT_IN_SWITCH = |
+ const CompileTimeErrorCode( |
+ 'MISSING_ENUM_CONSTANT_IN_SWITCH', |
+ "Missing case clause for '{0}'", |
+ "Add a case clause for the missing constant or add a default clause."); |
/** |
* 9 Mixins: It is a compile-time error if a declared or derived mixin |
@@ -1407,7 +1703,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* @param typeName the name of the mixin that is invalid |
*/ |
- static const CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = const CompileTimeErrorCode('MIXIN_DECLARES_CONSTRUCTOR', "The class '{0}' cannot be used as a mixin because it declares a constructor"); |
+ static const CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = |
+ const CompileTimeErrorCode( |
+ 'MIXIN_DECLARES_CONSTRUCTOR', |
+ "The class '{0}' cannot be used as a mixin because it declares a constructor"); |
/** |
* 9.1 Mixin Application: It is a compile-time error if the with clause of a |
@@ -1416,7 +1715,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* @param typeName the name of the type that cannot be extended |
* See [EXTENDS_DEFERRED_CLASS], and [IMPLEMENTS_DEFERRED_CLASS]. |
*/ |
- static const CompileTimeErrorCode MIXIN_DEFERRED_CLASS = const CompileTimeErrorCode('MIXIN_DEFERRED_CLASS', "This class cannot mixin the deferred class '{0}'"); |
+ static const CompileTimeErrorCode MIXIN_DEFERRED_CLASS = |
+ const CompileTimeErrorCode( |
+ 'MIXIN_DEFERRED_CLASS', |
+ "This class cannot mixin the deferred class '{0}'"); |
/** |
* Not yet in the spec, but consistent with VM behavior. It is a |
@@ -1426,9 +1728,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* https://code.google.com/p/dart/issues/detail?id=15101#c4 |
*/ |
static const CompileTimeErrorCode MIXIN_HAS_NO_CONSTRUCTORS = |
- const CompileTimeErrorCode('MIXIN_HAS_NO_CONSTRUCTORS', |
+ const CompileTimeErrorCode( |
+ 'MIXIN_HAS_NO_CONSTRUCTORS', |
"This mixin application is invalid because all of the constructors " |
- "in the base class '{0}' have optional parameters."); |
+ "in the base class '{0}' have optional parameters."); |
/** |
* 9 Mixins: It is a compile-time error if a mixin is derived from a class |
@@ -1436,7 +1739,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* @param typeName the name of the mixin that is invalid |
*/ |
- static const CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = const CompileTimeErrorCode('MIXIN_INHERITS_FROM_NOT_OBJECT', "The class '{0}' cannot be used as a mixin because it extends a class other than Object"); |
+ static const CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = |
+ const CompileTimeErrorCode( |
+ 'MIXIN_INHERITS_FROM_NOT_OBJECT', |
+ "The class '{0}' cannot be used as a mixin because it extends a class other than Object"); |
/** |
* 12.2 Null: It is a compile-time error for a class to attempt to extend or |
@@ -1460,44 +1766,64 @@ class CompileTimeErrorCode extends ErrorCode { |
* @param typeName the name of the type that cannot be extended |
* See [IMPLEMENTS_DISALLOWED_CLASS]. |
*/ |
- static const CompileTimeErrorCode MIXIN_OF_DISALLOWED_CLASS = const CompileTimeErrorCode('MIXIN_OF_DISALLOWED_CLASS', "Classes cannot mixin '{0}'"); |
+ static const CompileTimeErrorCode MIXIN_OF_DISALLOWED_CLASS = |
+ const CompileTimeErrorCode( |
+ 'MIXIN_OF_DISALLOWED_CLASS', |
+ "Classes cannot mixin '{0}'"); |
/** |
* Enum proposal: It is a compile-time error to subclass, mix-in or implement |
* an enum. |
*/ |
- static const CompileTimeErrorCode MIXIN_OF_ENUM = const CompileTimeErrorCode('MIXIN_OF_ENUM', "Classes cannot mixin an enum"); |
+ static const CompileTimeErrorCode MIXIN_OF_ENUM = |
+ const CompileTimeErrorCode('MIXIN_OF_ENUM', "Classes cannot mixin an enum"); |
/** |
* 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not |
* denote a class or mixin available in the immediately enclosing scope. |
*/ |
- static const CompileTimeErrorCode MIXIN_OF_NON_CLASS = const CompileTimeErrorCode('MIXIN_OF_NON_CLASS', "Classes can only mixin other classes"); |
+ static const CompileTimeErrorCode MIXIN_OF_NON_CLASS = |
+ const CompileTimeErrorCode( |
+ 'MIXIN_OF_NON_CLASS', |
+ "Classes can only mixin other classes"); |
/** |
* 9 Mixins: It is a compile-time error if a declared or derived mixin refers |
* to super. |
*/ |
- static const CompileTimeErrorCode MIXIN_REFERENCES_SUPER = const CompileTimeErrorCode('MIXIN_REFERENCES_SUPER', "The class '{0}' cannot be used as a mixin because it references 'super'"); |
+ static const CompileTimeErrorCode MIXIN_REFERENCES_SUPER = |
+ const CompileTimeErrorCode( |
+ 'MIXIN_REFERENCES_SUPER', |
+ "The class '{0}' cannot be used as a mixin because it references 'super'"); |
/** |
* 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not |
* denote a class available in the immediately enclosing scope. |
*/ |
- static const CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = const CompileTimeErrorCode('MIXIN_WITH_NON_CLASS_SUPERCLASS', "Mixin can only be applied to class"); |
+ static const CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = |
+ const CompileTimeErrorCode( |
+ 'MIXIN_WITH_NON_CLASS_SUPERCLASS', |
+ "Mixin can only be applied to class"); |
/** |
* 7.6.1 Generative Constructors: A generative constructor may be redirecting, |
* in which case its only action is to invoke another generative constructor. |
*/ |
- static const CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS = const CompileTimeErrorCode('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS', "Constructor may have at most one 'this' redirection"); |
+ static const CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS |
+ = |
+ const CompileTimeErrorCode( |
+ 'MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS', |
+ "Constructor may have at most one 'this' redirection"); |
/** |
* 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. |
* Then <i>k</i> may include at most one superinitializer in its initializer |
* list or a compile time error occurs. |
*/ |
- static const CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = const CompileTimeErrorCode('MULTIPLE_SUPER_INITIALIZERS', "Constructor may have at most one 'super' initializer"); |
+ static const CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = |
+ const CompileTimeErrorCode( |
+ 'MULTIPLE_SUPER_INITIALIZERS', |
+ "Constructor may have at most one 'super' initializer"); |
/** |
* 11 Metadata: Metadata consists of a series of annotations, each of which |
@@ -1505,7 +1831,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* either a reference to a compile-time constant variable, or a call to a |
* constant constructor. |
*/ |
- static const CompileTimeErrorCode NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS = const CompileTimeErrorCode('NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS', "Annotation creation must have arguments"); |
+ static const CompileTimeErrorCode NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS = |
+ const CompileTimeErrorCode( |
+ 'NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS', |
+ "Annotation creation must have arguments"); |
/** |
* 7.6.1 Generative Constructors: If no superinitializer is provided, an |
@@ -1517,7 +1846,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* does not declare a generative constructor named <i>S</i> (respectively |
* <i>S.id</i>) |
*/ |
- static const CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT = const CompileTimeErrorCode('NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT', "The class '{0}' does not have a default constructor"); |
+ static const CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT = |
+ const CompileTimeErrorCode( |
+ 'NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT', |
+ "The class '{0}' does not have a default constructor"); |
/** |
* 7.6 Constructors: Iff no constructor is specified for a class <i>C</i>, it |
@@ -1528,14 +1860,20 @@ class CompileTimeErrorCode extends ErrorCode { |
* does not declare a generative constructor named <i>S</i> (respectively |
* <i>S.id</i>) |
*/ |
- static const CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT = const CompileTimeErrorCode('NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT', "The class '{0}' does not have a default constructor"); |
+ static const CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT = |
+ const CompileTimeErrorCode( |
+ 'NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT', |
+ "The class '{0}' does not have a default constructor"); |
/** |
* 13.2 Expression Statements: It is a compile-time error if a non-constant |
* map literal that has no explicit type arguments appears in a place where a |
* statement is expected. |
*/ |
- static const CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = const CompileTimeErrorCode('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', "A non-constant map literal without type arguments cannot be used as an expression statement"); |
+ static const CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = |
+ const CompileTimeErrorCode( |
+ 'NON_CONST_MAP_AS_EXPRESSION_STATEMENT', |
+ "A non-constant map literal without type arguments cannot be used as an expression statement"); |
/** |
* 13.9 Switch: Given a switch statement of the form <i>switch (e) { |
@@ -1548,7 +1886,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* compile-time error if the expressions <i>e<sub>k</sub></i> are not |
* compile-time constants, for all <i>1 <= k <= n</i>. |
*/ |
- static const CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = const CompileTimeErrorCode('NON_CONSTANT_CASE_EXPRESSION', "Case expressions must be constant"); |
+ static const CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = |
+ const CompileTimeErrorCode( |
+ 'NON_CONSTANT_CASE_EXPRESSION', |
+ "Case expressions must be constant"); |
/** |
* 13.9 Switch: Given a switch statement of the form <i>switch (e) { |
@@ -1564,13 +1905,20 @@ class CompileTimeErrorCode extends ErrorCode { |
* 12.1 Constants: A qualified reference to a static constant variable that is |
* not qualified by a deferred prefix. |
*/ |
- static const CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY = const CompileTimeErrorCode('NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY', "Constant values from a deferred library cannot be used as a case expression"); |
+ static const CompileTimeErrorCode |
+ NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY = |
+ const CompileTimeErrorCode( |
+ 'NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY', |
+ "Constant values from a deferred library cannot be used as a case expression"); |
/** |
* 6.2.2 Optional Formals: It is a compile-time error if the default value of |
* an optional parameter is not a compile-time constant. |
*/ |
- static const CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = const CompileTimeErrorCode('NON_CONSTANT_DEFAULT_VALUE', "Default values of an optional parameter must be constant"); |
+ static const CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = |
+ const CompileTimeErrorCode( |
+ 'NON_CONSTANT_DEFAULT_VALUE', |
+ "Default values of an optional parameter must be constant"); |
/** |
* 6.2.2 Optional Formals: It is a compile-time error if the default value of |
@@ -1579,13 +1927,20 @@ class CompileTimeErrorCode extends ErrorCode { |
* 12.1 Constants: A qualified reference to a static constant variable that is |
* not qualified by a deferred prefix. |
*/ |
- static const CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY = const CompileTimeErrorCode('NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY', "Constant values from a deferred library cannot be used as a default parameter value"); |
+ static const CompileTimeErrorCode |
+ NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY = |
+ const CompileTimeErrorCode( |
+ 'NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY', |
+ "Constant values from a deferred library cannot be used as a default parameter value"); |
/** |
* 12.6 Lists: It is a compile time error if an element of a constant list |
* literal is not a compile-time constant. |
*/ |
- static const CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = const CompileTimeErrorCode('NON_CONSTANT_LIST_ELEMENT', "'const' lists must have all constant values"); |
+ static const CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = |
+ const CompileTimeErrorCode( |
+ 'NON_CONSTANT_LIST_ELEMENT', |
+ "'const' lists must have all constant values"); |
/** |
* 12.6 Lists: It is a compile time error if an element of a constant list |
@@ -1594,13 +1949,20 @@ class CompileTimeErrorCode extends ErrorCode { |
* 12.1 Constants: A qualified reference to a static constant variable that is |
* not qualified by a deferred prefix. |
*/ |
- static const CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY = const CompileTimeErrorCode('NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY', "Constant values from a deferred library cannot be used as values in a 'const' list"); |
+ static const CompileTimeErrorCode |
+ NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY = |
+ const CompileTimeErrorCode( |
+ 'NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY', |
+ "Constant values from a deferred library cannot be used as values in a 'const' list"); |
/** |
* 12.7 Maps: It is a compile time error if either a key or a value of an |
* entry in a constant map literal is not a compile-time constant. |
*/ |
- static const CompileTimeErrorCode NON_CONSTANT_MAP_KEY = const CompileTimeErrorCode('NON_CONSTANT_MAP_KEY', "The keys in a map must be constant"); |
+ static const CompileTimeErrorCode NON_CONSTANT_MAP_KEY = |
+ const CompileTimeErrorCode( |
+ 'NON_CONSTANT_MAP_KEY', |
+ "The keys in a map must be constant"); |
/** |
* 12.7 Maps: It is a compile time error if either a key or a value of an |
@@ -1609,13 +1971,19 @@ class CompileTimeErrorCode extends ErrorCode { |
* 12.1 Constants: A qualified reference to a static constant variable that is |
* not qualified by a deferred prefix. |
*/ |
- static const CompileTimeErrorCode NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY = const CompileTimeErrorCode('NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY', "Constant values from a deferred library cannot be used as keys in a map"); |
+ static const CompileTimeErrorCode NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY = |
+ const CompileTimeErrorCode( |
+ 'NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY', |
+ "Constant values from a deferred library cannot be used as keys in a map"); |
/** |
* 12.7 Maps: It is a compile time error if either a key or a value of an |
* entry in a constant map literal is not a compile-time constant. |
*/ |
- static const CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = const CompileTimeErrorCode('NON_CONSTANT_MAP_VALUE', "The values in a 'const' map must be constant"); |
+ static const CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = |
+ const CompileTimeErrorCode( |
+ 'NON_CONSTANT_MAP_VALUE', |
+ "The values in a 'const' map must be constant"); |
/** |
* 12.7 Maps: It is a compile time error if either a key or a value of an |
@@ -1624,7 +1992,11 @@ class CompileTimeErrorCode extends ErrorCode { |
* 12.1 Constants: A qualified reference to a static constant variable that is |
* not qualified by a deferred prefix. |
*/ |
- static const CompileTimeErrorCode NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY = const CompileTimeErrorCode('NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY', "Constant values from a deferred library cannot be used as values in a 'const' map"); |
+ static const CompileTimeErrorCode NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY |
+ = |
+ const CompileTimeErrorCode( |
+ 'NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY', |
+ "Constant values from a deferred library cannot be used as values in a 'const' map"); |
/** |
* 11 Metadata: Metadata consists of a series of annotations, each of which |
@@ -1635,14 +2007,20 @@ class CompileTimeErrorCode extends ErrorCode { |
* "From deferred library" case is covered by |
* [CompileTimeErrorCode.INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY]. |
*/ |
- static const CompileTimeErrorCode NON_CONSTANT_ANNOTATION_CONSTRUCTOR = const CompileTimeErrorCode('NON_CONSTANT_ANNOTATION_CONSTRUCTOR', "Annotation creation can use only 'const' constructor"); |
+ static const CompileTimeErrorCode NON_CONSTANT_ANNOTATION_CONSTRUCTOR = |
+ const CompileTimeErrorCode( |
+ 'NON_CONSTANT_ANNOTATION_CONSTRUCTOR', |
+ "Annotation creation can use only 'const' constructor"); |
/** |
* 7.6.3 Constant Constructors: Any expression that appears within the |
* initializer list of a constant constructor must be a potentially constant |
* expression, or a compile-time error occurs. |
*/ |
- static const CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = const CompileTimeErrorCode('NON_CONSTANT_VALUE_IN_INITIALIZER', "Initializer expressions in constant constructors must be constants"); |
+ static const CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = |
+ const CompileTimeErrorCode( |
+ 'NON_CONSTANT_VALUE_IN_INITIALIZER', |
+ "Initializer expressions in constant constructors must be constants"); |
/** |
* 7.6.3 Constant Constructors: Any expression that appears within the |
@@ -1652,7 +2030,11 @@ class CompileTimeErrorCode extends ErrorCode { |
* 12.1 Constants: A qualified reference to a static constant variable that is |
* not qualified by a deferred prefix. |
*/ |
- static const CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY = const CompileTimeErrorCode('NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY', "Constant values from a deferred library cannot be used as constant initializers"); |
+ static const CompileTimeErrorCode |
+ NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY = |
+ const CompileTimeErrorCode( |
+ 'NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY', |
+ "Constant values from a deferred library cannot be used as constant initializers"); |
/** |
* 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i> |
@@ -1664,7 +2046,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* @param requiredCount the expected number of required arguments |
* @param argumentCount the actual number of positional arguments given |
*/ |
- static const CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = const CompileTimeErrorCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', "{0} required argument(s) expected, but {1} found"); |
+ static const CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = |
+ const CompileTimeErrorCode( |
+ 'NOT_ENOUGH_REQUIRED_ARGUMENTS', |
+ "{0} required argument(s) expected, but {1} found"); |
/** |
* 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the |
@@ -1673,19 +2058,26 @@ class CompileTimeErrorCode extends ErrorCode { |
* class <i>S</i> does not declare a generative constructor named <i>S</i> |
* (respectively <i>S.id</i>) |
*/ |
- static const CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR = const CompileTimeErrorCode('NON_GENERATIVE_CONSTRUCTOR', "The generative constructor '{0}' expected, but factory found"); |
+ static const CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR = |
+ const CompileTimeErrorCode( |
+ 'NON_GENERATIVE_CONSTRUCTOR', |
+ "The generative constructor '{0}' expected, but factory found"); |
/** |
* 7.9 Superclasses: It is a compile-time error to specify an extends clause |
* for class Object. |
*/ |
- static const CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = const CompileTimeErrorCode('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', ""); |
+ static const CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = |
+ const CompileTimeErrorCode('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', ""); |
/** |
* 7.1.1 Operators: It is a compile-time error to declare an optional |
* parameter in an operator. |
*/ |
- static const CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = const CompileTimeErrorCode('OPTIONAL_PARAMETER_IN_OPERATOR', "Optional parameters are not allowed when defining an operator"); |
+ static const CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = |
+ const CompileTimeErrorCode( |
+ 'OPTIONAL_PARAMETER_IN_OPERATOR', |
+ "Optional parameters are not allowed when defining an operator"); |
/** |
* 14.3 Parts: It is a compile time error if the contents of the URI are not a |
@@ -1693,25 +2085,35 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* @param uri the uri pointing to a non-library declaration |
*/ |
- static const CompileTimeErrorCode PART_OF_NON_PART = const CompileTimeErrorCode('PART_OF_NON_PART', "The included part '{0}' must have a part-of directive"); |
+ static const CompileTimeErrorCode PART_OF_NON_PART = |
+ const CompileTimeErrorCode( |
+ 'PART_OF_NON_PART', |
+ "The included part '{0}' must have a part-of directive"); |
/** |
* 14.1 Imports: It is a compile-time error if the current library declares a |
* top-level member named <i>p</i>. |
*/ |
- static const CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = const CompileTimeErrorCode('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', "The name '{0}' is already used as an import prefix and cannot be used to name a top-level element"); |
+ static const CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = |
+ const CompileTimeErrorCode( |
+ 'PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', |
+ "The name '{0}' is already used as an import prefix and cannot be used to name a top-level element"); |
/** |
* 6.2.2 Optional Formals: It is a compile-time error if the name of a named |
* optional parameter begins with an '_' character. |
*/ |
- static const CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = const CompileTimeErrorCode('PRIVATE_OPTIONAL_PARAMETER', "Named optional parameters cannot start with an underscore"); |
+ static const CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = |
+ const CompileTimeErrorCode( |
+ 'PRIVATE_OPTIONAL_PARAMETER', |
+ "Named optional parameters cannot start with an underscore"); |
/** |
* 12.1 Constants: It is a compile-time error if the value of a compile-time |
* constant expression depends on itself. |
*/ |
- static const CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = const CompileTimeErrorCode('RECURSIVE_COMPILE_TIME_CONSTANT', ""); |
+ static const CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = |
+ const CompileTimeErrorCode('RECURSIVE_COMPILE_TIME_CONSTANT', ""); |
/** |
* 7.6.1 Generative Constructors: A generative constructor may be redirecting, |
@@ -1723,14 +2125,20 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* https://code.google.com/p/dart/issues/detail?id=954 |
*/ |
- static const CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = const CompileTimeErrorCode('RECURSIVE_CONSTRUCTOR_REDIRECT', "Cycle in redirecting generative constructors"); |
+ static const CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = |
+ const CompileTimeErrorCode( |
+ 'RECURSIVE_CONSTRUCTOR_REDIRECT', |
+ "Cycle in redirecting generative constructors"); |
/** |
* 7.6.2 Factories: It is a compile-time error if a redirecting factory |
* constructor redirects to itself, either directly or indirectly via a |
* sequence of redirections. |
*/ |
- static const CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = const CompileTimeErrorCode('RECURSIVE_FACTORY_REDIRECT', "Cycle in redirecting factory constructors"); |
+ static const CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = |
+ const CompileTimeErrorCode( |
+ 'RECURSIVE_FACTORY_REDIRECT', |
+ "Cycle in redirecting factory constructors"); |
/** |
* 7.10 Superinterfaces: It is a compile-time error if the interface of a |
@@ -1745,7 +2153,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* @param className the name of the class that implements itself recursively |
* @param strImplementsPath a string representation of the implements loop |
*/ |
- static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = const CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE', "'{0}' cannot be a superinterface of itself: {1}"); |
+ static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = |
+ const CompileTimeErrorCode( |
+ 'RECURSIVE_INTERFACE_INHERITANCE', |
+ "'{0}' cannot be a superinterface of itself: {1}"); |
/** |
* 7.10 Superinterfaces: It is a compile-time error if the interface of a |
@@ -1759,7 +2170,11 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* @param className the name of the class that implements itself recursively |
*/ |
- static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS = const CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS', "'{0}' cannot extend itself"); |
+ static const CompileTimeErrorCode |
+ RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS = |
+ const CompileTimeErrorCode( |
+ 'RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS', |
+ "'{0}' cannot extend itself"); |
/** |
* 7.10 Superinterfaces: It is a compile-time error if the interface of a |
@@ -1773,7 +2188,11 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* @param className the name of the class that implements itself recursively |
*/ |
- static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS = const CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS', "'{0}' cannot implement itself"); |
+ static const CompileTimeErrorCode |
+ RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS = |
+ const CompileTimeErrorCode( |
+ 'RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS', |
+ "'{0}' cannot implement itself"); |
/** |
* 7.10 Superinterfaces: It is a compile-time error if the interface of a |
@@ -1787,70 +2206,105 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* @param className the name of the class that implements itself recursively |
*/ |
- static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_WITH = const CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_WITH', "'{0}' cannot use itself as a mixin"); |
+ static const CompileTimeErrorCode |
+ RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_WITH = |
+ const CompileTimeErrorCode( |
+ 'RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_WITH', |
+ "'{0}' cannot use itself as a mixin"); |
/** |
* 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with |
* the const modifier but <i>k'</i> is not a constant constructor. |
*/ |
- static const CompileTimeErrorCode REDIRECT_TO_MISSING_CONSTRUCTOR = const CompileTimeErrorCode('REDIRECT_TO_MISSING_CONSTRUCTOR', "The constructor '{0}' could not be found in '{1}'"); |
+ static const CompileTimeErrorCode REDIRECT_TO_MISSING_CONSTRUCTOR = |
+ const CompileTimeErrorCode( |
+ 'REDIRECT_TO_MISSING_CONSTRUCTOR', |
+ "The constructor '{0}' could not be found in '{1}'"); |
/** |
* 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with |
* the const modifier but <i>k'</i> is not a constant constructor. |
*/ |
- static const CompileTimeErrorCode REDIRECT_TO_NON_CLASS = const CompileTimeErrorCode('REDIRECT_TO_NON_CLASS', "The name '{0}' is not a type and cannot be used in a redirected constructor"); |
+ static const CompileTimeErrorCode REDIRECT_TO_NON_CLASS = |
+ const CompileTimeErrorCode( |
+ 'REDIRECT_TO_NON_CLASS', |
+ "The name '{0}' is not a type and cannot be used in a redirected constructor"); |
/** |
* 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with |
* the const modifier but <i>k'</i> is not a constant constructor. |
*/ |
- static const CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = const CompileTimeErrorCode('REDIRECT_TO_NON_CONST_CONSTRUCTOR', "Constant factory constructor cannot delegate to a non-constant constructor"); |
+ static const CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = |
+ const CompileTimeErrorCode( |
+ 'REDIRECT_TO_NON_CONST_CONSTRUCTOR', |
+ "Constant factory constructor cannot delegate to a non-constant constructor"); |
/** |
* 7.6.1 Generative constructors: A generative constructor may be |
* <i>redirecting</i>, in which case its only action is to invoke another |
* generative constructor. |
*/ |
- static const CompileTimeErrorCode REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR = const CompileTimeErrorCode('REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR', "The constructor '{0}' could not be found in '{1}'"); |
+ static const CompileTimeErrorCode REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR = |
+ const CompileTimeErrorCode( |
+ 'REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR', |
+ "The constructor '{0}' could not be found in '{1}'"); |
/** |
* 7.6.1 Generative constructors: A generative constructor may be |
* <i>redirecting</i>, in which case its only action is to invoke another |
* generative constructor. |
*/ |
- static const CompileTimeErrorCode REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTRUCTOR = const CompileTimeErrorCode('REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTRUCTOR', "Generative constructor cannot redirect to a factory constructor"); |
+ static const CompileTimeErrorCode |
+ REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTRUCTOR = |
+ const CompileTimeErrorCode( |
+ 'REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTRUCTOR', |
+ "Generative constructor cannot redirect to a factory constructor"); |
/** |
* 5 Variables: A local variable may only be referenced at a source code |
* location that is after its initializer, if any, is complete, or a |
* compile-time error occurs. |
*/ |
- static const CompileTimeErrorCode REFERENCED_BEFORE_DECLARATION = const CompileTimeErrorCode('REFERENCED_BEFORE_DECLARATION', "Local variables cannot be referenced before they are declared"); |
+ static const CompileTimeErrorCode REFERENCED_BEFORE_DECLARATION = |
+ const CompileTimeErrorCode( |
+ 'REFERENCED_BEFORE_DECLARATION', |
+ "Local variables cannot be referenced before they are declared"); |
/** |
* 12.8.1 Rethrow: It is a compile-time error if an expression of the form |
* <i>rethrow;</i> is not enclosed within a on-catch clause. |
*/ |
- static const CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = const CompileTimeErrorCode('RETHROW_OUTSIDE_CATCH', "rethrow must be inside of a catch clause"); |
+ static const CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = |
+ const CompileTimeErrorCode( |
+ 'RETHROW_OUTSIDE_CATCH', |
+ "rethrow must be inside of a catch clause"); |
/** |
* 13.12 Return: It is a compile-time error if a return statement of the form |
* <i>return e;</i> appears in a generative constructor. |
*/ |
- static const CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = const CompileTimeErrorCode('RETURN_IN_GENERATIVE_CONSTRUCTOR', "Constructors cannot return a value"); |
+ static const CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = |
+ const CompileTimeErrorCode( |
+ 'RETURN_IN_GENERATIVE_CONSTRUCTOR', |
+ "Constructors cannot return a value"); |
/** |
* 13.12 Return: It is a compile-time error if a return statement of the form |
* <i>return e;</i> appears in a generator function. |
*/ |
- static const CompileTimeErrorCode RETURN_IN_GENERATOR = const CompileTimeErrorCode('RETURN_IN_GENERATOR', "Cannot return a value from a generator function (one marked with either 'async*' or 'sync*')"); |
+ static const CompileTimeErrorCode RETURN_IN_GENERATOR = |
+ const CompileTimeErrorCode( |
+ 'RETURN_IN_GENERATOR', |
+ "Cannot return a value from a generator function (one marked with either 'async*' or 'sync*')"); |
/** |
* 14.1 Imports: It is a compile-time error if a prefix used in a deferred |
* import is used in another import clause. |
*/ |
- static const CompileTimeErrorCode SHARED_DEFERRED_PREFIX = const CompileTimeErrorCode('SHARED_DEFERRED_PREFIX', "The prefix of a deferred import cannot be used in other import directives"); |
+ static const CompileTimeErrorCode SHARED_DEFERRED_PREFIX = |
+ const CompileTimeErrorCode( |
+ 'SHARED_DEFERRED_PREFIX', |
+ "The prefix of a deferred import cannot be used in other import directives"); |
/** |
* 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form |
@@ -1861,20 +2315,27 @@ class CompileTimeErrorCode extends ErrorCode { |
* initializer list, in class Object, in a factory constructor, or in a static |
* method or variable initializer. |
*/ |
- static const CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = const CompileTimeErrorCode('SUPER_IN_INVALID_CONTEXT', "Invalid context for 'super' invocation"); |
+ static const CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = |
+ const CompileTimeErrorCode( |
+ 'SUPER_IN_INVALID_CONTEXT', |
+ "Invalid context for 'super' invocation"); |
/** |
* 7.6.1 Generative Constructors: A generative constructor may be redirecting, |
* in which case its only action is to invoke another generative constructor. |
*/ |
- static const CompileTimeErrorCode SUPER_IN_REDIRECTING_CONSTRUCTOR = const CompileTimeErrorCode('SUPER_IN_REDIRECTING_CONSTRUCTOR', "The redirecting constructor cannot have a 'super' initializer"); |
+ static const CompileTimeErrorCode SUPER_IN_REDIRECTING_CONSTRUCTOR = |
+ const CompileTimeErrorCode( |
+ 'SUPER_IN_REDIRECTING_CONSTRUCTOR', |
+ "The redirecting constructor cannot have a 'super' initializer"); |
/** |
* 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It |
* is a compile-time error if a generative constructor of class Object |
* includes a superinitializer. |
*/ |
- static const CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = const CompileTimeErrorCode('SUPER_INITIALIZER_IN_OBJECT', ""); |
+ static const CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = |
+ const CompileTimeErrorCode('SUPER_INITIALIZER_IN_OBJECT', ""); |
/** |
* 12.11 Instance Creation: It is a static type warning if any of the type |
@@ -1894,19 +2355,26 @@ class CompileTimeErrorCode extends ErrorCode { |
* @param boundingTypeName the name of the bounding type |
* See [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]. |
*/ |
- static const CompileTimeErrorCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = const CompileTimeErrorCode('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', "'{0}' does not extend '{1}'"); |
+ static const CompileTimeErrorCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = |
+ const CompileTimeErrorCode( |
+ 'TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', |
+ "'{0}' does not extend '{1}'"); |
/** |
* 15.3.1 Typedef: Any self reference, either directly, or recursively via |
* another typedef, is a compile time error. |
*/ |
- static const CompileTimeErrorCode TYPE_ALIAS_CANNOT_REFERENCE_ITSELF = const CompileTimeErrorCode('TYPE_ALIAS_CANNOT_REFERENCE_ITSELF', "Type alias cannot reference itself directly or recursively via another typedef"); |
+ static const CompileTimeErrorCode TYPE_ALIAS_CANNOT_REFERENCE_ITSELF = |
+ const CompileTimeErrorCode( |
+ 'TYPE_ALIAS_CANNOT_REFERENCE_ITSELF', |
+ "Type alias cannot reference itself directly or recursively via another typedef"); |
/** |
* 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class |
* accessible in the current scope, optionally followed by type arguments. |
*/ |
- static const CompileTimeErrorCode UNDEFINED_CLASS = const CompileTimeErrorCode('UNDEFINED_CLASS', "Undefined class '{0}'"); |
+ static const CompileTimeErrorCode UNDEFINED_CLASS = |
+ const CompileTimeErrorCode('UNDEFINED_CLASS', "Undefined class '{0}'"); |
/** |
* 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the |
@@ -1915,7 +2383,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* class <i>S</i> does not declare a generative constructor named <i>S</i> |
* (respectively <i>S.id</i>) |
*/ |
- static const CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = const CompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', "The class '{0}' does not have a generative constructor '{1}'"); |
+ static const CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = |
+ const CompileTimeErrorCode( |
+ 'UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', |
+ "The class '{0}' does not have a generative constructor '{1}'"); |
/** |
* 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the |
@@ -1924,7 +2395,11 @@ class CompileTimeErrorCode extends ErrorCode { |
* class <i>S</i> does not declare a generative constructor named <i>S</i> |
* (respectively <i>S.id</i>) |
*/ |
- static const CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT = const CompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT', "The class '{0}' does not have a default generative constructor"); |
+ static const CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT |
+ = |
+ const CompileTimeErrorCode( |
+ 'UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT', |
+ "The class '{0}' does not have a default generative constructor"); |
/** |
* 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>, |
@@ -1937,7 +2412,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* |
* @param name the name of the requested named parameter |
*/ |
- static const CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER = const CompileTimeErrorCode('UNDEFINED_NAMED_PARAMETER', "The named parameter '{0}' is not defined"); |
+ static const CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER = |
+ const CompileTimeErrorCode( |
+ 'UNDEFINED_NAMED_PARAMETER', |
+ "The named parameter '{0}' is not defined"); |
/** |
* 14.2 Exports: It is a compile-time error if the compilation unit found at |
@@ -1952,7 +2430,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* @param uri the URI pointing to a non-existent file |
* See [INVALID_URI]. |
*/ |
- static const CompileTimeErrorCode URI_DOES_NOT_EXIST = const CompileTimeErrorCode('URI_DOES_NOT_EXIST', "Target of URI does not exist: '{0}'"); |
+ static const CompileTimeErrorCode URI_DOES_NOT_EXIST = |
+ const CompileTimeErrorCode( |
+ 'URI_DOES_NOT_EXIST', |
+ "Target of URI does not exist: '{0}'"); |
/** |
* 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time |
@@ -1965,7 +2446,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* describes a URI is not a compile-time constant, or if <i>x</i> involves |
* string interpolation. |
*/ |
- static const CompileTimeErrorCode URI_WITH_INTERPOLATION = const CompileTimeErrorCode('URI_WITH_INTERPOLATION', "URIs cannot use string interpolation"); |
+ static const CompileTimeErrorCode URI_WITH_INTERPOLATION = |
+ const CompileTimeErrorCode( |
+ 'URI_WITH_INTERPOLATION', |
+ "URIs cannot use string interpolation"); |
/** |
* 7.1.1 Operators: It is a compile-time error if the arity of the |
@@ -1981,7 +2465,10 @@ class CompileTimeErrorCode extends ErrorCode { |
* @param actualNumberOfParameters the number of parameters found in the |
* operator declaration |
*/ |
- static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = const CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', "Operator '{0}' should declare exactly {1} parameter(s), but {2} found"); |
+ static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = |
+ const CompileTimeErrorCode( |
+ 'WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', |
+ "Operator '{0}' should declare exactly {1} parameter(s), but {2} found"); |
/** |
* 7.1.1 Operators: It is a compile time error if the arity of the |
@@ -1990,25 +2477,38 @@ class CompileTimeErrorCode extends ErrorCode { |
* @param actualNumberOfParameters the number of parameters found in the |
* operator declaration |
*/ |
- static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS = const CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS', "Operator '-' should declare 0 or 1 parameter, but {0} found"); |
+ static const CompileTimeErrorCode |
+ WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS = |
+ const CompileTimeErrorCode( |
+ 'WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS', |
+ "Operator '-' should declare 0 or 1 parameter, but {0} found"); |
/** |
* 7.3 Setters: It is a compile-time error if a setter's formal parameter list |
* does not include exactly one required formal parameter <i>p</i>. |
*/ |
- static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = const CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', "Setters should declare exactly one required parameter"); |
+ static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = |
+ const CompileTimeErrorCode( |
+ 'WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', |
+ "Setters should declare exactly one required parameter"); |
/** |
* ?? Yield: It is a compile-time error if a yield statement appears in a |
* function that is not a generator function. |
*/ |
- static const CompileTimeErrorCode YIELD_EACH_IN_NON_GENERATOR = const CompileTimeErrorCode('YIELD_EACH_IN_NON_GENERATOR', "Yield-each statements must be in a generator function (one marked with either 'async*' or 'sync*')"); |
+ static const CompileTimeErrorCode YIELD_EACH_IN_NON_GENERATOR = |
+ const CompileTimeErrorCode( |
+ 'YIELD_EACH_IN_NON_GENERATOR', |
+ "Yield-each statements must be in a generator function (one marked with either 'async*' or 'sync*')"); |
/** |
* ?? Yield: It is a compile-time error if a yield statement appears in a |
* function that is not a generator function. |
*/ |
- static const CompileTimeErrorCode YIELD_IN_NON_GENERATOR = const CompileTimeErrorCode('YIELD_IN_NON_GENERATOR', "Yield statements must be in a generator function (one marked with either 'async*' or 'sync*')"); |
+ static const CompileTimeErrorCode YIELD_IN_NON_GENERATOR = |
+ const CompileTimeErrorCode( |
+ 'YIELD_IN_NON_GENERATOR', |
+ "Yield statements must be in a generator function (one marked with either 'async*' or 'sync*')"); |
/** |
* Initialize a newly created error code to have the given [name]. The message |
@@ -2016,7 +2516,8 @@ class CompileTimeErrorCode extends ErrorCode { |
* template. The correction associated with the error will be created from the |
* given [correction] template. |
*/ |
- const CompileTimeErrorCode(String name, String message, [String correction]) : super(name, message, correction); |
+ const CompileTimeErrorCode(String name, String message, [String correction]) |
+ : super(name, message, correction); |
@override |
ErrorSeverity get errorSeverity => ErrorType.COMPILE_TIME_ERROR.severity; |
@@ -2038,6 +2539,11 @@ class CompileTimeErrorCode extends ErrorCode { |
*/ |
abstract class ErrorCode { |
/** |
+ * An empty list of error codes. |
+ */ |
+ static const List<ErrorCode> EMPTY_LIST = const <ErrorCode>[]; |
+ |
+ /** |
* The name of the error code. |
*/ |
final String name; |
@@ -2056,11 +2562,6 @@ abstract class ErrorCode { |
final String correction; |
/** |
- * An empty list of error codes. |
- */ |
- static const List<ErrorCode> EMPTY_LIST = const <ErrorCode>[]; |
- |
- /** |
* Initialize a newly created error code to have the given [name]. The message |
* associated with the error will be created from the given [message] |
* template. The correction associated with the error will be created from the |
@@ -2093,7 +2594,8 @@ class ErrorProperty extends Enum<ErrorProperty> { |
* A property whose value is an array of [ExecutableElement] that should |
* be but are not implemented by a concrete class. |
*/ |
- static const ErrorProperty UNIMPLEMENTED_METHODS = const ErrorProperty('UNIMPLEMENTED_METHODS', 0); |
+ static const ErrorProperty UNIMPLEMENTED_METHODS = |
+ const ErrorProperty('UNIMPLEMENTED_METHODS', 0); |
static const List<ErrorProperty> values = const [UNIMPLEMENTED_METHODS]; |
@@ -2138,13 +2640,30 @@ class ErrorReporter { |
Source get source => _source; |
/** |
+ * Set the source to be used when reporting errors. Setting the source to `null` will cause |
+ * the default source to be used. |
+ * |
+ * @param source the source to be used when reporting errors |
+ */ |
+ void set source(Source source) { |
+ this._source = source == null ? _defaultSource : source; |
+ } |
+ |
+ /** |
* Creates an error with properties with the given error code and arguments. |
* |
* @param errorCode the error code of the error to be reported |
* @param node the node specifying the location of the error |
* @param arguments the arguments to the error, used to compose the error message |
*/ |
- AnalysisErrorWithProperties newErrorWithProperties(ErrorCode errorCode, AstNode node, List<Object> arguments) => new AnalysisErrorWithProperties.con2(_source, node.offset, node.length, errorCode, arguments); |
+ AnalysisErrorWithProperties newErrorWithProperties(ErrorCode errorCode, |
+ AstNode node, List<Object> arguments) => |
+ new AnalysisErrorWithProperties.con2( |
+ _source, |
+ node.offset, |
+ node.length, |
+ errorCode, |
+ arguments); |
/** |
* Report a passed error. |
@@ -2162,8 +2681,13 @@ class ErrorReporter { |
* @param element the element which name should be used as the location of the error |
* @param arguments the arguments to the error, used to compose the error message |
*/ |
- void reportErrorForElement(ErrorCode errorCode, Element element, List<Object> arguments) { |
- reportErrorForOffset(errorCode, element.nameOffset, element.displayName.length, arguments); |
+ void reportErrorForElement(ErrorCode errorCode, Element element, |
+ List<Object> arguments) { |
+ reportErrorForOffset( |
+ errorCode, |
+ element.nameOffset, |
+ element.displayName.length, |
+ arguments); |
} |
/** |
@@ -2177,7 +2701,8 @@ class ErrorReporter { |
* @param node the node specifying the location of the error |
* @param arguments the arguments to the error, used to compose the error message |
*/ |
- void reportErrorForNode(ErrorCode errorCode, AstNode node, [List<Object> arguments]) { |
+ void reportErrorForNode(ErrorCode errorCode, AstNode node, |
+ [List<Object> arguments]) { |
reportErrorForOffset(errorCode, node.offset, node.length, arguments); |
} |
@@ -2189,8 +2714,10 @@ class ErrorReporter { |
* @param length the length of the location of the error |
* @param arguments the arguments to the error, used to compose the error message |
*/ |
- void reportErrorForOffset(ErrorCode errorCode, int offset, int length, [List<Object> arguments]) { |
- _errorListener.onError(new AnalysisError.con2(_source, offset, length, errorCode, arguments)); |
+ void reportErrorForOffset(ErrorCode errorCode, int offset, int length, |
+ [List<Object> arguments]) { |
+ _errorListener.onError( |
+ new AnalysisError.con2(_source, offset, length, errorCode, arguments)); |
} |
/** |
@@ -2200,7 +2727,8 @@ class ErrorReporter { |
* @param token the token specifying the location of the error |
* @param arguments the arguments to the error, used to compose the error message |
*/ |
- void reportErrorForToken(ErrorCode errorCode, Token token, [List<Object> arguments]) { |
+ void reportErrorForToken(ErrorCode errorCode, Token token, |
+ [List<Object> arguments]) { |
reportErrorForOffset(errorCode, token.offset, token.length, arguments); |
} |
@@ -2217,22 +2745,13 @@ class ErrorReporter { |
* @param node the node specifying the location of the error |
* @param arguments the arguments to the error, used to compose the error message |
*/ |
- void reportTypeErrorForNode(ErrorCode errorCode, AstNode node, List<Object> arguments) { |
+ void reportTypeErrorForNode(ErrorCode errorCode, AstNode node, |
+ List<Object> arguments) { |
_convertTypeNames(arguments); |
reportErrorForOffset(errorCode, node.offset, node.length, arguments); |
} |
/** |
- * Set the source to be used when reporting errors. Setting the source to `null` will cause |
- * the default source to be used. |
- * |
- * @param source the source to be used when reporting errors |
- */ |
- void set source(Source source) { |
- this._source = source == null ? _defaultSource : source; |
- } |
- |
- /** |
* Given an array of arguments that is expected to contain two or more types, convert the types |
* into strings by using the display names of the types, unless there are two or more types with |
* the same names, in which case the extended display names of the types will be used in order to |
@@ -2278,7 +2797,8 @@ class ErrorReporter { |
int count = arguments.length; |
HashSet<String> typeNames = new HashSet<String>(); |
for (int i = 0; i < count; i++) { |
- if (arguments[i] is DartType && !typeNames.add((arguments[i] as DartType).displayName)) { |
+ if (arguments[i] is DartType && |
+ !typeNames.add((arguments[i] as DartType).displayName)) { |
return true; |
} |
} |
@@ -2306,12 +2826,14 @@ class ErrorSeverity extends Enum<ErrorSeverity> { |
* The severity representing a warning. Warnings can become errors if the `-Werror` command |
* line flag is specified. |
*/ |
- static const ErrorSeverity WARNING = const ErrorSeverity('WARNING', 2, "W", "warning"); |
+ static const ErrorSeverity WARNING = |
+ const ErrorSeverity('WARNING', 2, "W", "warning"); |
/** |
* The severity representing an error. |
*/ |
- static const ErrorSeverity ERROR = const ErrorSeverity('ERROR', 3, "E", "error"); |
+ static const ErrorSeverity ERROR = |
+ const ErrorSeverity('ERROR', 3, "E", "error"); |
static const List<ErrorSeverity> values = const [NONE, INFO, WARNING, ERROR]; |
@@ -2331,7 +2853,9 @@ class ErrorSeverity extends Enum<ErrorSeverity> { |
* @param machineCode the name of the severity used when producing machine output |
* @param displayName the name of the severity used when producing readable output |
*/ |
- const ErrorSeverity(String name, int ordinal, this.machineCode, this.displayName) : super(name, ordinal); |
+ const ErrorSeverity(String name, int ordinal, this.machineCode, |
+ this.displayName) |
+ : super(name, ordinal); |
/** |
* Return the severity constant that represents the greatest severity. |
@@ -2339,7 +2863,8 @@ class ErrorSeverity extends Enum<ErrorSeverity> { |
* @param severity the severity being compared against |
* @return the most sever of this or the given severity |
*/ |
- ErrorSeverity max(ErrorSeverity severity) => this.ordinal >= severity.ordinal ? this : severity; |
+ ErrorSeverity max(ErrorSeverity severity) => |
+ this.ordinal >= severity.ordinal ? this : severity; |
} |
/** |
@@ -2361,39 +2886,46 @@ class ErrorType extends Enum<ErrorType> { |
* Compile-time errors are errors that preclude execution. A compile time error must be reported |
* by a Dart compiler before the erroneous code is executed. |
*/ |
- static const ErrorType COMPILE_TIME_ERROR = const ErrorType('COMPILE_TIME_ERROR', 2, ErrorSeverity.ERROR); |
+ static const ErrorType COMPILE_TIME_ERROR = |
+ const ErrorType('COMPILE_TIME_ERROR', 2, ErrorSeverity.ERROR); |
/** |
* Checked mode compile-time errors are errors that preclude execution in checked mode. |
*/ |
- static const ErrorType CHECKED_MODE_COMPILE_TIME_ERROR = const ErrorType('CHECKED_MODE_COMPILE_TIME_ERROR', 3, ErrorSeverity.ERROR); |
+ static const ErrorType CHECKED_MODE_COMPILE_TIME_ERROR = |
+ const ErrorType('CHECKED_MODE_COMPILE_TIME_ERROR', 3, ErrorSeverity.ERROR); |
/** |
* Static warnings are those warnings reported by the static checker. They have no effect on |
* execution. Static warnings must be provided by Dart compilers used during development. |
*/ |
- static const ErrorType STATIC_WARNING = const ErrorType('STATIC_WARNING', 4, ErrorSeverity.WARNING); |
+ static const ErrorType STATIC_WARNING = |
+ const ErrorType('STATIC_WARNING', 4, ErrorSeverity.WARNING); |
/** |
* Many, but not all, static warnings relate to types, in which case they are known as static type |
* warnings. |
*/ |
- static const ErrorType STATIC_TYPE_WARNING = const ErrorType('STATIC_TYPE_WARNING', 5, ErrorSeverity.WARNING); |
+ static const ErrorType STATIC_TYPE_WARNING = |
+ const ErrorType('STATIC_TYPE_WARNING', 5, ErrorSeverity.WARNING); |
/** |
* Syntactic errors are errors produced as a result of input that does not conform to the grammar. |
*/ |
- static const ErrorType SYNTACTIC_ERROR = const ErrorType('SYNTACTIC_ERROR', 6, ErrorSeverity.ERROR); |
+ static const ErrorType SYNTACTIC_ERROR = |
+ const ErrorType('SYNTACTIC_ERROR', 6, ErrorSeverity.ERROR); |
/** |
* Angular specific semantic problems. |
*/ |
- static const ErrorType ANGULAR = const ErrorType('ANGULAR', 7, ErrorSeverity.INFO); |
+ static const ErrorType ANGULAR = |
+ const ErrorType('ANGULAR', 7, ErrorSeverity.INFO); |
/** |
* Polymer specific semantic problems. |
*/ |
- static const ErrorType POLYMER = const ErrorType('POLYMER', 8, ErrorSeverity.INFO); |
+ static const ErrorType POLYMER = |
+ const ErrorType('POLYMER', 8, ErrorSeverity.INFO); |
static const List<ErrorType> values = const [ |
TODO, |
@@ -2416,7 +2948,8 @@ class ErrorType extends Enum<ErrorType> { |
* |
* @param severity the severity of this type of error |
*/ |
- const ErrorType(String name, int ordinal, this.severity) : super(name, ordinal); |
+ const ErrorType(String name, int ordinal, this.severity) |
+ : super(name, ordinal); |
String get displayName => name.toLowerCase().replaceAll('_', ' '); |
} |
@@ -2434,7 +2967,9 @@ class HintCode extends ErrorCode { |
* @param actualType the name of the actual argument type |
* @param expectedType the name of the expected type |
*/ |
- static const HintCode ARGUMENT_TYPE_NOT_ASSIGNABLE = const HintCode('ARGUMENT_TYPE_NOT_ASSIGNABLE', "The argument type '{0}' cannot be assigned to the parameter type '{1}'"); |
+ static const HintCode ARGUMENT_TYPE_NOT_ASSIGNABLE = const HintCode( |
+ 'ARGUMENT_TYPE_NOT_ASSIGNABLE', |
+ "The argument type '{0}' cannot be assigned to the parameter type '{1}'"); |
/** |
* Dead code is code that is never reached, this can happen for instance if a |
@@ -2446,7 +2981,9 @@ class HintCode extends ErrorCode { |
* Dead code is code that is never reached. This case covers cases where the |
* user has catch clauses after `catch (e)` or `on Object catch (e)`. |
*/ |
- static const HintCode DEAD_CODE_CATCH_FOLLOWING_CATCH = const HintCode('DEAD_CODE_CATCH_FOLLOWING_CATCH', "Dead code, catch clauses after a 'catch (e)' or an 'on Object catch (e)' are never reached"); |
+ static const HintCode DEAD_CODE_CATCH_FOLLOWING_CATCH = const HintCode( |
+ 'DEAD_CODE_CATCH_FOLLOWING_CATCH', |
+ "Dead code, catch clauses after a 'catch (e)' or an 'on Object catch (e)' are never reached"); |
/** |
* Dead code is code that is never reached. This case covers cases where the |
@@ -2456,49 +2993,66 @@ class HintCode extends ErrorCode { |
* @param subtypeName name of the subtype |
* @param supertypeName name of the supertype |
*/ |
- static const HintCode DEAD_CODE_ON_CATCH_SUBTYPE = const HintCode('DEAD_CODE_ON_CATCH_SUBTYPE', "Dead code, this on-catch block will never be executed since '{0}' is a subtype of '{1}'"); |
+ static const HintCode DEAD_CODE_ON_CATCH_SUBTYPE = const HintCode( |
+ 'DEAD_CODE_ON_CATCH_SUBTYPE', |
+ "Dead code, this on-catch block will never be executed since '{0}' is a subtype of '{1}'"); |
/** |
* Deprecated members should not be invoked or used. |
* |
* @param memberName the name of the member |
*/ |
- static const HintCode DEPRECATED_MEMBER_USE = const HintCode('DEPRECATED_MEMBER_USE', "'{0}' is deprecated"); |
+ static const HintCode DEPRECATED_MEMBER_USE = |
+ const HintCode('DEPRECATED_MEMBER_USE', "'{0}' is deprecated"); |
/** |
* Duplicate imports. |
*/ |
- static const HintCode DUPLICATE_IMPORT = const HintCode('DUPLICATE_IMPORT', "Duplicate import"); |
+ static const HintCode DUPLICATE_IMPORT = |
+ const HintCode('DUPLICATE_IMPORT', "Duplicate import"); |
/** |
* Hint to use the ~/ operator. |
*/ |
- static const HintCode DIVISION_OPTIMIZATION = const HintCode('DIVISION_OPTIMIZATION', "The operator x ~/ y is more efficient than (x / y).toInt()"); |
+ static const HintCode DIVISION_OPTIMIZATION = const HintCode( |
+ 'DIVISION_OPTIMIZATION', |
+ "The operator x ~/ y is more efficient than (x / y).toInt()"); |
/** |
* Hint for the `x is double` type checks. |
*/ |
- static const HintCode IS_DOUBLE = const HintCode('IS_DOUBLE', "When compiled to JS, this test might return true when the left hand side is an int"); |
+ static const HintCode IS_DOUBLE = const HintCode( |
+ 'IS_DOUBLE', |
+ "When compiled to JS, this test might return true when the left hand side is an int"); |
/** |
* Hint for the `x is int` type checks. |
*/ |
- static const HintCode IS_INT = const HintCode('IS_INT', "When compiled to JS, this test might return true when the left hand side is a double"); |
+ static const HintCode IS_INT = const HintCode( |
+ 'IS_INT', |
+ "When compiled to JS, this test might return true when the left hand side is a double"); |
/** |
* Hint for the `x is! double` type checks. |
*/ |
- static const HintCode IS_NOT_DOUBLE = const HintCode('IS_NOT_DOUBLE', "When compiled to JS, this test might return false when the left hand side is an int"); |
+ static const HintCode IS_NOT_DOUBLE = const HintCode( |
+ 'IS_NOT_DOUBLE', |
+ "When compiled to JS, this test might return false when the left hand side is an int"); |
/** |
* Hint for the `x is! int` type checks. |
*/ |
- static const HintCode IS_NOT_INT = const HintCode('IS_NOT_INT', "When compiled to JS, this test might return false when the left hand side is a double"); |
+ static const HintCode IS_NOT_INT = const HintCode( |
+ 'IS_NOT_INT', |
+ "When compiled to JS, this test might return false when the left hand side is a double"); |
/** |
* Deferred libraries shouldn't define a top level function 'loadLibrary'. |
*/ |
- static const HintCode IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION = const HintCode('IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION', "The library '{0}' defines a top-level function named 'loadLibrary' which is hidden by deferring this library"); |
+ static const HintCode IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION = |
+ const HintCode( |
+ 'IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION', |
+ "The library '{0}' defines a top-level function named 'loadLibrary' which is hidden by deferring this library"); |
/** |
* This hint is generated anywhere where the |
@@ -2509,7 +3063,9 @@ class HintCode extends ErrorCode { |
* @param lhsTypeName the name of the left hand side type |
* See [StaticTypeWarningCode.INVALID_ASSIGNMENT]. |
*/ |
- static const HintCode INVALID_ASSIGNMENT = const HintCode('INVALID_ASSIGNMENT', "A value of type '{0}' cannot be assigned to a variable of type '{1}'"); |
+ static const HintCode INVALID_ASSIGNMENT = const HintCode( |
+ 'INVALID_ASSIGNMENT', |
+ "A value of type '{0}' cannot be assigned to a variable of type '{1}'"); |
/** |
* Generate a hint for methods or functions that have a return type, but do |
@@ -2519,39 +3075,54 @@ class HintCode extends ErrorCode { |
* |
* @param returnType the name of the declared return type |
*/ |
- static const HintCode MISSING_RETURN = const HintCode('MISSING_RETURN', "This function declares a return type of '{0}', but does not end with a return statement", "Either add a return statement or change the return type to 'void'"); |
+ static const HintCode MISSING_RETURN = const HintCode( |
+ 'MISSING_RETURN', |
+ "This function declares a return type of '{0}', but does not end with a return statement", |
+ "Either add a return statement or change the return type to 'void'"); |
/** |
* A getter with the override annotation does not override an existing getter. |
*/ |
- static const HintCode OVERRIDE_ON_NON_OVERRIDING_GETTER = const HintCode('OVERRIDE_ON_NON_OVERRIDING_GETTER', "Getter does not override an inherited getter"); |
+ static const HintCode OVERRIDE_ON_NON_OVERRIDING_GETTER = const HintCode( |
+ 'OVERRIDE_ON_NON_OVERRIDING_GETTER', |
+ "Getter does not override an inherited getter"); |
/** |
* A method with the override annotation does not override an existing method. |
*/ |
- static const HintCode OVERRIDE_ON_NON_OVERRIDING_METHOD = const HintCode('OVERRIDE_ON_NON_OVERRIDING_METHOD', "Method does not override an inherited method"); |
+ static const HintCode OVERRIDE_ON_NON_OVERRIDING_METHOD = const HintCode( |
+ 'OVERRIDE_ON_NON_OVERRIDING_METHOD', |
+ "Method does not override an inherited method"); |
/** |
* A setter with the override annotation does not override an existing setter. |
*/ |
- static const HintCode OVERRIDE_ON_NON_OVERRIDING_SETTER = const HintCode('OVERRIDE_ON_NON_OVERRIDING_SETTER', "Setter does not override an inherited setter"); |
+ static const HintCode OVERRIDE_ON_NON_OVERRIDING_SETTER = const HintCode( |
+ 'OVERRIDE_ON_NON_OVERRIDING_SETTER', |
+ "Setter does not override an inherited setter"); |
/** |
* Hint for classes that override equals, but not hashCode. |
* |
* @param className the name of the current class |
*/ |
- static const HintCode OVERRIDE_EQUALS_BUT_NOT_HASH_CODE = const HintCode('OVERRIDE_EQUALS_BUT_NOT_HASH_CODE', "The class '{0}' overrides 'operator==', but not 'get hashCode'"); |
+ static const HintCode OVERRIDE_EQUALS_BUT_NOT_HASH_CODE = const HintCode( |
+ 'OVERRIDE_EQUALS_BUT_NOT_HASH_CODE', |
+ "The class '{0}' overrides 'operator==', but not 'get hashCode'"); |
/** |
* Type checks of the type `x is! Null` should be done with `x != null`. |
*/ |
- static const HintCode TYPE_CHECK_IS_NOT_NULL = const HintCode('TYPE_CHECK_IS_NOT_NULL', "Tests for non-null should be done with '!= null'"); |
+ static const HintCode TYPE_CHECK_IS_NOT_NULL = const HintCode( |
+ 'TYPE_CHECK_IS_NOT_NULL', |
+ "Tests for non-null should be done with '!= null'"); |
/** |
* Type checks of the type `x is Null` should be done with `x == null`. |
*/ |
- static const HintCode TYPE_CHECK_IS_NULL = const HintCode('TYPE_CHECK_IS_NULL', "Tests for null should be done with '== null'"); |
+ static const HintCode TYPE_CHECK_IS_NULL = const HintCode( |
+ 'TYPE_CHECK_IS_NULL', |
+ "Tests for null should be done with '== null'"); |
/** |
* This hint is generated anywhere where the |
@@ -2565,7 +3136,8 @@ class HintCode extends ErrorCode { |
* See [StaticTypeWarningCode.UNDEFINED_GETTER], and |
* [StaticWarningCode.UNDEFINED_GETTER]. |
*/ |
- static const HintCode UNDEFINED_GETTER = const HintCode('UNDEFINED_GETTER', "There is no such getter '{0}' in '{1}'"); |
+ static const HintCode UNDEFINED_GETTER = |
+ const HintCode('UNDEFINED_GETTER', "There is no such getter '{0}' in '{1}'"); |
/** |
* This hint is generated anywhere where the |
@@ -2577,7 +3149,9 @@ class HintCode extends ErrorCode { |
* on |
* See [StaticTypeWarningCode.UNDEFINED_METHOD]. |
*/ |
- static const HintCode UNDEFINED_METHOD = const HintCode('UNDEFINED_METHOD', "The method '{0}' is not defined for the class '{1}'"); |
+ static const HintCode UNDEFINED_METHOD = const HintCode( |
+ 'UNDEFINED_METHOD', |
+ "The method '{0}' is not defined for the class '{1}'"); |
/** |
* This hint is generated anywhere where the |
@@ -2589,7 +3163,9 @@ class HintCode extends ErrorCode { |
* being looked for |
* See [StaticTypeWarningCode.UNDEFINED_OPERATOR]. |
*/ |
- static const HintCode UNDEFINED_OPERATOR = const HintCode('UNDEFINED_OPERATOR', "There is no such operator '{0}' in '{1}'"); |
+ static const HintCode UNDEFINED_OPERATOR = const HintCode( |
+ 'UNDEFINED_OPERATOR', |
+ "There is no such operator '{0}' in '{1}'"); |
/** |
* This hint is generated anywhere where the |
@@ -2603,42 +3179,53 @@ class HintCode extends ErrorCode { |
* See [StaticTypeWarningCode.UNDEFINED_SETTER], and |
* [StaticWarningCode.UNDEFINED_SETTER]. |
*/ |
- static const HintCode UNDEFINED_SETTER = const HintCode('UNDEFINED_SETTER', "There is no such setter '{0}' in '{1}'"); |
+ static const HintCode UNDEFINED_SETTER = |
+ const HintCode('UNDEFINED_SETTER', "There is no such setter '{0}' in '{1}'"); |
/** |
* Unnecessary cast. |
*/ |
- static const HintCode UNNECESSARY_CAST = const HintCode('UNNECESSARY_CAST', "Unnecessary cast"); |
+ static const HintCode UNNECESSARY_CAST = |
+ const HintCode('UNNECESSARY_CAST', "Unnecessary cast"); |
/** |
* Unnecessary type checks, the result is always true. |
*/ |
- static const HintCode UNNECESSARY_TYPE_CHECK_FALSE = const HintCode('UNNECESSARY_TYPE_CHECK_FALSE', "Unnecessary type check, the result is always false"); |
+ static const HintCode UNNECESSARY_TYPE_CHECK_FALSE = const HintCode( |
+ 'UNNECESSARY_TYPE_CHECK_FALSE', |
+ "Unnecessary type check, the result is always false"); |
/** |
* Unnecessary type checks, the result is always false. |
*/ |
- static const HintCode UNNECESSARY_TYPE_CHECK_TRUE = const HintCode('UNNECESSARY_TYPE_CHECK_TRUE', "Unnecessary type check, the result is always true"); |
+ static const HintCode UNNECESSARY_TYPE_CHECK_TRUE = const HintCode( |
+ 'UNNECESSARY_TYPE_CHECK_TRUE', |
+ "Unnecessary type check, the result is always true"); |
/** |
* See [Modifier.IS_USED_IN_LIBRARY]. |
*/ |
- static const HintCode UNUSED_ELEMENT = const HintCode('UNUSED_ELEMENT', "The {0} '{1}' is not used"); |
+ static const HintCode UNUSED_ELEMENT = |
+ const HintCode('UNUSED_ELEMENT', "The {0} '{1}' is not used"); |
/** |
* Unused fields are fields which are never read. |
*/ |
- static const HintCode UNUSED_FIELD = const HintCode('UNUSED_FIELD', "The value of the field '{0}' is not used"); |
+ static const HintCode UNUSED_FIELD = |
+ const HintCode('UNUSED_FIELD', "The value of the field '{0}' is not used"); |
/** |
* Unused imports are imports which are never used. |
*/ |
- static const HintCode UNUSED_IMPORT = const HintCode('UNUSED_IMPORT', "Unused import"); |
+ static const HintCode UNUSED_IMPORT = |
+ const HintCode('UNUSED_IMPORT', "Unused import"); |
/** |
* Unused local variables are local varaibles which are never read. |
*/ |
- static const HintCode UNUSED_LOCAL_VARIABLE = const HintCode('UNUSED_LOCAL_VARIABLE', "The value of the local variable '{0}' is not used"); |
+ static const HintCode UNUSED_LOCAL_VARIABLE = const HintCode( |
+ 'UNUSED_LOCAL_VARIABLE', |
+ "The value of the local variable '{0}' is not used"); |
/** |
* Hint for cases where the source expects a method or function to return a |
@@ -2646,7 +3233,9 @@ class HintCode extends ErrorCode { |
* |
* @param name the name of the method or function that returns void |
*/ |
- static const HintCode USE_OF_VOID_RESULT = const HintCode('USE_OF_VOID_RESULT', "The result of '{0}' is being used, even though it is declared to be 'void'"); |
+ static const HintCode USE_OF_VOID_RESULT = const HintCode( |
+ 'USE_OF_VOID_RESULT', |
+ "The result of '{0}' is being used, even though it is declared to be 'void'"); |
/** |
* It is a bad practice for a source file in a package "lib" directory |
@@ -2655,7 +3244,10 @@ class HintCode extends ErrorCode { |
* `import '../web/some.dart'` which references a file outside the lib |
* directory. |
*/ |
- static const HintCode FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE = const HintCode('FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE', "A file in the 'lib' directory hierarchy should not reference a file outside that hierarchy"); |
+ static const HintCode FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE = |
+ const HintCode( |
+ 'FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE', |
+ "A file in the 'lib' directory hierarchy should not reference a file outside that hierarchy"); |
/** |
* It is a bad practice for a source file ouside a package "lib" directory |
@@ -2664,7 +3256,10 @@ class HintCode extends ErrorCode { |
* `import '../lib/some.dart'` which references a file inside the lib |
* directory. |
*/ |
- static const HintCode FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE = const HintCode('FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE', "A file outside the 'lib' directory hierarchy should not reference a file inside that hierarchy. Use a package: reference instead."); |
+ static const HintCode FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE = |
+ const HintCode( |
+ 'FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE', |
+ "A file outside the 'lib' directory hierarchy should not reference a file inside that hierarchy. Use a package: reference instead."); |
/** |
* It is a bad practice for a package import to reference anything outside the |
@@ -2672,7 +3267,9 @@ class HintCode extends ErrorCode { |
* to contain a "..". For example, a source file should not contain a |
* directive such as `import 'package:foo/../some.dart'`. |
*/ |
- static const HintCode PACKAGE_IMPORT_CONTAINS_DOT_DOT = const HintCode('PACKAGE_IMPORT_CONTAINS_DOT_DOT', "A package import should not contain '..'"); |
+ static const HintCode PACKAGE_IMPORT_CONTAINS_DOT_DOT = const HintCode( |
+ 'PACKAGE_IMPORT_CONTAINS_DOT_DOT', |
+ "A package import should not contain '..'"); |
/** |
* Initialize a newly created error code to have the given [name]. The message |
@@ -2680,7 +3277,8 @@ class HintCode extends ErrorCode { |
* template. The correction associated with the error will be created from the |
* given [correction] template. |
*/ |
- const HintCode(String name, String message, [String correction]) : super(name, message, correction); |
+ const HintCode(String name, String message, [String correction]) |
+ : super(name, message, correction); |
@override |
ErrorSeverity get errorSeverity => ErrorType.HINT.severity; |
@@ -2703,7 +3301,8 @@ class HtmlWarningCode extends ErrorCode { |
* |
* @param uri the URI that is invalid |
*/ |
- static const HtmlWarningCode INVALID_URI = const HtmlWarningCode('INVALID_URI', "Invalid URI syntax: '{0}'"); |
+ static const HtmlWarningCode INVALID_URI = |
+ const HtmlWarningCode('INVALID_URI', "Invalid URI syntax: '{0}'"); |
/** |
* An error code indicating that the value of the 'src' attribute of a Dart |
@@ -2711,7 +3310,9 @@ class HtmlWarningCode extends ErrorCode { |
* |
* @param uri the URI pointing to a non-existent file |
*/ |
- static const HtmlWarningCode URI_DOES_NOT_EXIST = const HtmlWarningCode('URI_DOES_NOT_EXIST', "Target of URI does not exist: '{0}'"); |
+ static const HtmlWarningCode URI_DOES_NOT_EXIST = const HtmlWarningCode( |
+ 'URI_DOES_NOT_EXIST', |
+ "Target of URI does not exist: '{0}'"); |
/** |
* Initialize a newly created error code to have the given [name]. The message |
@@ -2719,7 +3320,8 @@ class HtmlWarningCode extends ErrorCode { |
* template. The correction associated with the error will be created from the |
* given [correction] template. |
*/ |
- const HtmlWarningCode(String name, String message, [String correction]) : super(name, message, correction); |
+ const HtmlWarningCode(String name, String message, [String correction]) |
+ : super(name, message, correction); |
@override |
ErrorSeverity get errorSeverity => ErrorSeverity.WARNING; |
@@ -2732,19 +3334,33 @@ class HtmlWarningCode extends ErrorCode { |
* The enumeration `PolymerCode` defines Polymer specific problems. |
*/ |
class PolymerCode extends ErrorCode { |
- static const PolymerCode ATTRIBUTE_FIELD_NOT_PUBLISHED = const PolymerCode('ATTRIBUTE_FIELD_NOT_PUBLISHED', "Field '{0}' in '{1}' must be @published"); |
+ static const PolymerCode ATTRIBUTE_FIELD_NOT_PUBLISHED = const PolymerCode( |
+ 'ATTRIBUTE_FIELD_NOT_PUBLISHED', |
+ "Field '{0}' in '{1}' must be @published"); |
- static const PolymerCode DUPLICATE_ATTRIBUTE_DEFINITION = const PolymerCode('DUPLICATE_ATTRIBUTE_DEFINITION', "The attribute '{0}' is already defined"); |
+ static const PolymerCode DUPLICATE_ATTRIBUTE_DEFINITION = const PolymerCode( |
+ 'DUPLICATE_ATTRIBUTE_DEFINITION', |
+ "The attribute '{0}' is already defined"); |
- static const PolymerCode EMPTY_ATTRIBUTES = const PolymerCode('EMPTY_ATTRIBUTES', "Empty 'attributes' attribute is useless"); |
+ static const PolymerCode EMPTY_ATTRIBUTES = const PolymerCode( |
+ 'EMPTY_ATTRIBUTES', |
+ "Empty 'attributes' attribute is useless"); |
- static const PolymerCode INVALID_ATTRIBUTE_NAME = const PolymerCode('INVALID_ATTRIBUTE_NAME', "'{0}' is not a valid name for a custom element attribute"); |
+ static const PolymerCode INVALID_ATTRIBUTE_NAME = const PolymerCode( |
+ 'INVALID_ATTRIBUTE_NAME', |
+ "'{0}' is not a valid name for a custom element attribute"); |
- static const PolymerCode INVALID_TAG_NAME = const PolymerCode('INVALID_TAG_NAME', "'{0}' is not a valid name for a custom element"); |
+ static const PolymerCode INVALID_TAG_NAME = const PolymerCode( |
+ 'INVALID_TAG_NAME', |
+ "'{0}' is not a valid name for a custom element"); |
- static const PolymerCode MISSING_TAG_NAME = const PolymerCode('MISSING_TAG_NAME', "Missing tag name of the custom element. Please include an attribute like name='your-tag-name'"); |
+ static const PolymerCode MISSING_TAG_NAME = const PolymerCode( |
+ 'MISSING_TAG_NAME', |
+ "Missing tag name of the custom element. Please include an attribute like name='your-tag-name'"); |
- static const PolymerCode UNDEFINED_ATTRIBUTE_FIELD = const PolymerCode('UNDEFINED_ATTRIBUTE_FIELD', "There is no such field '{0}' in '{1}'"); |
+ static const PolymerCode UNDEFINED_ATTRIBUTE_FIELD = const PolymerCode( |
+ 'UNDEFINED_ATTRIBUTE_FIELD', |
+ "There is no such field '{0}' in '{1}'"); |
/** |
* Initialize a newly created error code to have the given [name]. The message |
@@ -2752,7 +3368,8 @@ class PolymerCode extends ErrorCode { |
* template. The correction associated with the error will be created from the |
* given [correction] template. |
*/ |
- const PolymerCode(String name, String message, [String correction]) : super(name, message, correction); |
+ const PolymerCode(String name, String message, [String correction]) |
+ : super(name, message, correction); |
@override |
ErrorSeverity get errorSeverity => ErrorSeverity.INFO; |
@@ -2775,7 +3392,10 @@ class StaticTypeWarningCode extends ErrorCode { |
* |
* @param numTypeArgument the number of provided type arguments |
*/ |
- static const StaticTypeWarningCode EXPECTED_ONE_LIST_TYPE_ARGUMENTS = const StaticTypeWarningCode('EXPECTED_ONE_LIST_TYPE_ARGUMENTS', "List literal requires exactly one type arguments or none, but {0} found"); |
+ static const StaticTypeWarningCode EXPECTED_ONE_LIST_TYPE_ARGUMENTS = |
+ const StaticTypeWarningCode( |
+ 'EXPECTED_ONE_LIST_TYPE_ARGUMENTS', |
+ "List literal requires exactly one type arguments or none, but {0} found"); |
/** |
* 12.8 Maps: A fresh instance (7.6.1) <i>m</i>, of size <i>n</i>, whose class |
@@ -2783,7 +3403,10 @@ class StaticTypeWarningCode extends ErrorCode { |
* |
* @param numTypeArgument the number of provided type arguments |
*/ |
- static const StaticTypeWarningCode EXPECTED_TWO_MAP_TYPE_ARGUMENTS = const StaticTypeWarningCode('EXPECTED_TWO_MAP_TYPE_ARGUMENTS', "Map literal requires exactly two type arguments or none, but {0} found"); |
+ static const StaticTypeWarningCode EXPECTED_TWO_MAP_TYPE_ARGUMENTS = |
+ const StaticTypeWarningCode( |
+ 'EXPECTED_TWO_MAP_TYPE_ARGUMENTS', |
+ "Map literal requires exactly two type arguments or none, but {0} found"); |
/** |
* 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. |
@@ -2792,7 +3415,8 @@ class StaticTypeWarningCode extends ErrorCode { |
* |
* See [UNDEFINED_SETTER]. |
*/ |
- static const StaticTypeWarningCode INACCESSIBLE_SETTER = const StaticTypeWarningCode('INACCESSIBLE_SETTER', ""); |
+ static const StaticTypeWarningCode INACCESSIBLE_SETTER = |
+ const StaticTypeWarningCode('INACCESSIBLE_SETTER', ""); |
/** |
* 8.1.1 Inheritance and Overriding: However, if the above rules would cause |
@@ -2822,7 +3446,10 @@ class StaticTypeWarningCode extends ErrorCode { |
* * Otherwise none of the members <i>m<sub>1</sub>, …, |
* m<sub>k</sub></i> is inherited. |
*/ |
- static const StaticTypeWarningCode INCONSISTENT_METHOD_INHERITANCE = const StaticTypeWarningCode('INCONSISTENT_METHOD_INHERITANCE', "'{0}' is inherited by at least two interfaces inconsistently, from {1}"); |
+ static const StaticTypeWarningCode INCONSISTENT_METHOD_INHERITANCE = |
+ const StaticTypeWarningCode( |
+ 'INCONSISTENT_METHOD_INHERITANCE', |
+ "'{0}' is inherited by at least two interfaces inconsistently, from {1}"); |
/** |
* 12.15.1 Ordinary Invocation: It is a static type warning if <i>T</i> does |
@@ -2831,7 +3458,10 @@ class StaticTypeWarningCode extends ErrorCode { |
* @param memberName the name of the static member |
* See [UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER]. |
*/ |
- static const StaticTypeWarningCode INSTANCE_ACCESS_TO_STATIC_MEMBER = const StaticTypeWarningCode('INSTANCE_ACCESS_TO_STATIC_MEMBER', "Static member '{0}' cannot be accessed using instance access"); |
+ static const StaticTypeWarningCode INSTANCE_ACCESS_TO_STATIC_MEMBER = |
+ const StaticTypeWarningCode( |
+ 'INSTANCE_ACCESS_TO_STATIC_MEMBER', |
+ "Static member '{0}' cannot be accessed using instance access"); |
/** |
* 12.18 Assignment: It is a static type warning if the static type of |
@@ -2849,7 +3479,10 @@ class StaticTypeWarningCode extends ErrorCode { |
* @param rhsTypeName the name of the right hand side type |
* @param lhsTypeName the name of the left hand side type |
*/ |
- static const StaticTypeWarningCode INVALID_ASSIGNMENT = const StaticTypeWarningCode('INVALID_ASSIGNMENT', "A value of type '{0}' cannot be assigned to a variable of type '{1}'"); |
+ static const StaticTypeWarningCode INVALID_ASSIGNMENT = |
+ const StaticTypeWarningCode( |
+ 'INVALID_ASSIGNMENT', |
+ "A value of type '{0}' cannot be assigned to a variable of type '{1}'"); |
/** |
* 12.15.1 Ordinary Invocation: An ordinary method invocation <i>i</i> has the |
@@ -2875,7 +3508,10 @@ class StaticTypeWarningCode extends ErrorCode { |
* @param nonFunctionIdentifier the name of the identifier that is not a |
* function type |
*/ |
- static const StaticTypeWarningCode INVOCATION_OF_NON_FUNCTION = const StaticTypeWarningCode('INVOCATION_OF_NON_FUNCTION', "'{0}' is not a method"); |
+ static const StaticTypeWarningCode INVOCATION_OF_NON_FUNCTION = |
+ const StaticTypeWarningCode( |
+ 'INVOCATION_OF_NON_FUNCTION', |
+ "'{0}' is not a method"); |
/** |
* 12.14.4 Function Expression Invocation: A function expression invocation |
@@ -2886,7 +3522,10 @@ class StaticTypeWarningCode extends ErrorCode { |
* It is a static type warning if the static type <i>F</i> of |
* <i>e<sub>f</sub></i> may not be assigned to a function type. |
*/ |
- static const StaticTypeWarningCode INVOCATION_OF_NON_FUNCTION_EXPRESSION = const StaticTypeWarningCode('INVOCATION_OF_NON_FUNCTION_EXPRESSION', "Cannot invoke a non-function"); |
+ static const StaticTypeWarningCode INVOCATION_OF_NON_FUNCTION_EXPRESSION = |
+ const StaticTypeWarningCode( |
+ 'INVOCATION_OF_NON_FUNCTION_EXPRESSION', |
+ "Cannot invoke a non-function"); |
/** |
* 12.20 Conditional: It is a static type warning if the type of |
@@ -2901,13 +3540,19 @@ class StaticTypeWarningCode extends ErrorCode { |
* 13.8 Do: It is a static type warning if the type of <i>e</i> cannot be |
* assigned to bool. |
*/ |
- static const StaticTypeWarningCode NON_BOOL_CONDITION = const StaticTypeWarningCode('NON_BOOL_CONDITION', "Conditions must have a static type of 'bool'"); |
+ static const StaticTypeWarningCode NON_BOOL_CONDITION = |
+ const StaticTypeWarningCode( |
+ 'NON_BOOL_CONDITION', |
+ "Conditions must have a static type of 'bool'"); |
/** |
* 13.15 Assert: It is a static type warning if the type of <i>e</i> may not |
* be assigned to either bool or () → bool |
*/ |
- static const StaticTypeWarningCode NON_BOOL_EXPRESSION = const StaticTypeWarningCode('NON_BOOL_EXPRESSION', "Assertions must be on either a 'bool' or '() -> bool'"); |
+ static const StaticTypeWarningCode NON_BOOL_EXPRESSION = |
+ const StaticTypeWarningCode( |
+ 'NON_BOOL_EXPRESSION', |
+ "Assertions must be on either a 'bool' or '() -> bool'"); |
/** |
* 12.28 Unary Expressions: The expression !<i>e</i> is equivalent to the |
@@ -2916,7 +3561,10 @@ class StaticTypeWarningCode extends ErrorCode { |
* 12.20 Conditional: It is a static type warning if the type of |
* <i>e<sub>1</sub></i> may not be assigned to bool. |
*/ |
- static const StaticTypeWarningCode NON_BOOL_NEGATION_EXPRESSION = const StaticTypeWarningCode('NON_BOOL_NEGATION_EXPRESSION', "Negation argument must have a static type of 'bool'"); |
+ static const StaticTypeWarningCode NON_BOOL_NEGATION_EXPRESSION = |
+ const StaticTypeWarningCode( |
+ 'NON_BOOL_NEGATION_EXPRESSION', |
+ "Negation argument must have a static type of 'bool'"); |
/** |
* 12.21 Logical Boolean Expressions: It is a static type warning if the |
@@ -2925,13 +3573,19 @@ class StaticTypeWarningCode extends ErrorCode { |
* |
* @param operator the lexeme of the logical operator |
*/ |
- static const StaticTypeWarningCode NON_BOOL_OPERAND = const StaticTypeWarningCode('NON_BOOL_OPERAND', "The operands of the '{0}' operator must be assignable to 'bool'"); |
+ static const StaticTypeWarningCode NON_BOOL_OPERAND = |
+ const StaticTypeWarningCode( |
+ 'NON_BOOL_OPERAND', |
+ "The operands of the '{0}' operator must be assignable to 'bool'"); |
/** |
* 15.8 Parameterized Types: It is a static type warning if <i>A<sub>i</sub>, |
* 1 <= i <= n</i> does not denote a type in the enclosing lexical scope. |
*/ |
- static const StaticTypeWarningCode NON_TYPE_AS_TYPE_ARGUMENT = const StaticTypeWarningCode('NON_TYPE_AS_TYPE_ARGUMENT', "The name '{0}' is not a type and cannot be used as a parameterized type"); |
+ static const StaticTypeWarningCode NON_TYPE_AS_TYPE_ARGUMENT = |
+ const StaticTypeWarningCode( |
+ 'NON_TYPE_AS_TYPE_ARGUMENT', |
+ "The name '{0}' is not a type and cannot be used as a parameterized type"); |
/** |
* 13.11 Return: It is a static type warning if the type of <i>e</i> may not |
@@ -2942,7 +3596,10 @@ class StaticTypeWarningCode extends ErrorCode { |
* @param expectedReturnType the expected return type as defined by the method |
* @param methodName the name of the method |
*/ |
- static const StaticTypeWarningCode RETURN_OF_INVALID_TYPE = const StaticTypeWarningCode('RETURN_OF_INVALID_TYPE', "The return type '{0}' is not a '{1}', as defined by the method '{2}'"); |
+ static const StaticTypeWarningCode RETURN_OF_INVALID_TYPE = |
+ const StaticTypeWarningCode( |
+ 'RETURN_OF_INVALID_TYPE', |
+ "The return type '{0}' is not a '{1}', as defined by the method '{2}'"); |
/** |
* 12.11 Instance Creation: It is a static type warning if any of the type |
@@ -2971,7 +3628,10 @@ class StaticTypeWarningCode extends ErrorCode { |
* @param boundingTypeName the name of the bounding type |
* See [TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND]. |
*/ |
- static const StaticTypeWarningCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = const StaticTypeWarningCode('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', "'{0}' does not extend '{1}'"); |
+ static const StaticTypeWarningCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = |
+ const StaticTypeWarningCode( |
+ 'TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', |
+ "'{0}' does not extend '{1}'"); |
/** |
* 10 Generics: It is a static type warning if a type parameter is a supertype |
@@ -2980,7 +3640,10 @@ class StaticTypeWarningCode extends ErrorCode { |
* @param typeParameterName the name of the type parameter |
* See [TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]. |
*/ |
- static const StaticTypeWarningCode TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND = const StaticTypeWarningCode('TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND', "'{0}' cannot be a supertype of its upper bound"); |
+ static const StaticTypeWarningCode TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND = |
+ const StaticTypeWarningCode( |
+ 'TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND', |
+ "'{0}' cannot be a supertype of its upper bound"); |
/** |
* 12.17 Getter Invocation: It is a static warning if there is no class |
@@ -2991,7 +3654,10 @@ class StaticTypeWarningCode extends ErrorCode { |
* defined |
* @param enumName the name of the enumeration used to access the constant |
*/ |
- static const StaticTypeWarningCode UNDEFINED_ENUM_CONSTANT = const StaticTypeWarningCode('UNDEFINED_ENUM_CONSTANT', "There is no constant named '{0}' in '{1}'"); |
+ static const StaticTypeWarningCode UNDEFINED_ENUM_CONSTANT = |
+ const StaticTypeWarningCode( |
+ 'UNDEFINED_ENUM_CONSTANT', |
+ "There is no constant named '{0}' in '{1}'"); |
/** |
* 12.15.3 Unqualified Invocation: If there exists a lexically visible |
@@ -3004,7 +3670,10 @@ class StaticTypeWarningCode extends ErrorCode { |
* |
* @param methodName the name of the method that is undefined |
*/ |
- static const StaticTypeWarningCode UNDEFINED_FUNCTION = const StaticTypeWarningCode('UNDEFINED_FUNCTION', "The function '{0}' is not defined"); |
+ static const StaticTypeWarningCode UNDEFINED_FUNCTION = |
+ const StaticTypeWarningCode( |
+ 'UNDEFINED_FUNCTION', |
+ "The function '{0}' is not defined"); |
/** |
* 12.17 Getter Invocation: Let <i>T</i> be the static type of <i>e</i>. It is |
@@ -3014,7 +3683,10 @@ class StaticTypeWarningCode extends ErrorCode { |
* @param enclosingType the name of the enclosing type where the getter is |
* being looked for |
*/ |
- static const StaticTypeWarningCode UNDEFINED_GETTER = const StaticTypeWarningCode('UNDEFINED_GETTER', "There is no such getter '{0}' in '{1}'"); |
+ static const StaticTypeWarningCode UNDEFINED_GETTER = |
+ const StaticTypeWarningCode( |
+ 'UNDEFINED_GETTER', |
+ "There is no such getter '{0}' in '{1}'"); |
/** |
* 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>. |
@@ -3025,7 +3697,10 @@ class StaticTypeWarningCode extends ErrorCode { |
* @param typeName the resolved type name that the method lookup is happening |
* on |
*/ |
- static const StaticTypeWarningCode UNDEFINED_METHOD = const StaticTypeWarningCode('UNDEFINED_METHOD', "The method '{0}' is not defined for the class '{1}'"); |
+ static const StaticTypeWarningCode UNDEFINED_METHOD = |
+ const StaticTypeWarningCode( |
+ 'UNDEFINED_METHOD', |
+ "The method '{0}' is not defined for the class '{1}'"); |
/** |
* 12.18 Assignment: Evaluation of an assignment of the form |
@@ -3047,7 +3722,10 @@ class StaticTypeWarningCode extends ErrorCode { |
* @param enclosingType the name of the enclosing type where the operator is |
* being looked for |
*/ |
- static const StaticTypeWarningCode UNDEFINED_OPERATOR = const StaticTypeWarningCode('UNDEFINED_OPERATOR', "There is no such operator '{0}' in '{1}'"); |
+ static const StaticTypeWarningCode UNDEFINED_OPERATOR = |
+ const StaticTypeWarningCode( |
+ 'UNDEFINED_OPERATOR', |
+ "There is no such operator '{0}' in '{1}'"); |
/** |
* 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. |
@@ -3059,7 +3737,10 @@ class StaticTypeWarningCode extends ErrorCode { |
* being looked for |
* See [INACCESSIBLE_SETTER]. |
*/ |
- static const StaticTypeWarningCode UNDEFINED_SETTER = const StaticTypeWarningCode('UNDEFINED_SETTER', "There is no such setter '{0}' in '{1}'"); |
+ static const StaticTypeWarningCode UNDEFINED_SETTER = |
+ const StaticTypeWarningCode( |
+ 'UNDEFINED_SETTER', |
+ "There is no such setter '{0}' in '{1}'"); |
/** |
* 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form |
@@ -3072,7 +3753,10 @@ class StaticTypeWarningCode extends ErrorCode { |
* @param typeName the resolved type name that the method lookup is happening |
* on |
*/ |
- static const StaticTypeWarningCode UNDEFINED_SUPER_METHOD = const StaticTypeWarningCode('UNDEFINED_SUPER_METHOD', "There is no such method '{0}' in '{1}'"); |
+ static const StaticTypeWarningCode UNDEFINED_SUPER_METHOD = |
+ const StaticTypeWarningCode( |
+ 'UNDEFINED_SUPER_METHOD', |
+ "There is no such method '{0}' in '{1}'"); |
/** |
* 12.15.1 Ordinary Invocation: It is a static type warning if <i>T</i> does |
@@ -3082,7 +3766,11 @@ class StaticTypeWarningCode extends ErrorCode { |
* when we are able to find the name defined in a supertype. It exists to |
* provide a more informative error message. |
*/ |
- static const StaticTypeWarningCode UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER = const StaticTypeWarningCode('UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER', "Static members from supertypes must be qualified by the name of the defining type"); |
+ static const StaticTypeWarningCode |
+ UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER = |
+ const StaticTypeWarningCode( |
+ 'UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER', |
+ "Static members from supertypes must be qualified by the name of the defining type"); |
/** |
* 15.8 Parameterized Types: It is a static type warning if <i>G</i> is not a |
@@ -3094,7 +3782,10 @@ class StaticTypeWarningCode extends ErrorCode { |
* See [CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS], and |
* [CompileTimeErrorCode.NEW_WITH_INVALID_TYPE_PARAMETERS]. |
*/ |
- static const StaticTypeWarningCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = const StaticTypeWarningCode('WRONG_NUMBER_OF_TYPE_ARGUMENTS', "The type '{0}' is declared with {1} type parameters, but {2} type arguments were given"); |
+ static const StaticTypeWarningCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = |
+ const StaticTypeWarningCode( |
+ 'WRONG_NUMBER_OF_TYPE_ARGUMENTS', |
+ "The type '{0}' is declared with {1} type parameters, but {2} type arguments were given"); |
/** |
* Initialize a newly created error code to have the given [name]. The message |
@@ -3102,7 +3793,8 @@ class StaticTypeWarningCode extends ErrorCode { |
* template. The correction associated with the error will be created from the |
* given [correction] template. |
*/ |
- const StaticTypeWarningCode(String name, String message, [String correction]) : super(name, message, correction); |
+ const StaticTypeWarningCode(String name, String message, [String correction]) |
+ : super(name, message, correction); |
@override |
ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; |
@@ -3134,7 +3826,9 @@ class StaticWarningCode extends ErrorCode { |
* @param secondLibraryName the name of the second library that the type is |
* found |
*/ |
- static const StaticWarningCode AMBIGUOUS_IMPORT = const StaticWarningCode('AMBIGUOUS_IMPORT', "The name '{0}' is defined in the libraries {1}"); |
+ static const StaticWarningCode AMBIGUOUS_IMPORT = const StaticWarningCode( |
+ 'AMBIGUOUS_IMPORT', |
+ "The name '{0}' is defined in the libraries {1}"); |
/** |
* 12.11.1 New: It is a static warning if the static type of <i>a<sub>i</sub>, |
@@ -3164,7 +3858,10 @@ class StaticWarningCode extends ErrorCode { |
* @param actualType the name of the actual argument type |
* @param expectedType the name of the expected type |
*/ |
- static const StaticWarningCode ARGUMENT_TYPE_NOT_ASSIGNABLE = const StaticWarningCode('ARGUMENT_TYPE_NOT_ASSIGNABLE', "The argument type '{0}' cannot be assigned to the parameter type '{1}'"); |
+ static const StaticWarningCode ARGUMENT_TYPE_NOT_ASSIGNABLE = |
+ const StaticWarningCode( |
+ 'ARGUMENT_TYPE_NOT_ASSIGNABLE', |
+ "The argument type '{0}' cannot be assigned to the parameter type '{1}'"); |
/** |
* 5 Variables: Attempting to assign to a final variable elsewhere will cause |
@@ -3173,21 +3870,28 @@ class StaticWarningCode extends ErrorCode { |
* |
* A constant variable is always implicitly final. |
*/ |
- static const StaticWarningCode ASSIGNMENT_TO_CONST = const StaticWarningCode('ASSIGNMENT_TO_CONST', "Constant variables cannot be assigned a value"); |
+ static const StaticWarningCode ASSIGNMENT_TO_CONST = const StaticWarningCode( |
+ 'ASSIGNMENT_TO_CONST', |
+ "Constant variables cannot be assigned a value"); |
/** |
* 5 Variables: Attempting to assign to a final variable elsewhere will cause |
* a NoSuchMethodError to be thrown, because no setter is defined for it. The |
* assignment will also give rise to a static warning for the same reason. |
*/ |
- static const StaticWarningCode ASSIGNMENT_TO_FINAL = const StaticWarningCode('ASSIGNMENT_TO_FINAL', "'{0}' cannot be used as a setter, it is final"); |
+ static const StaticWarningCode ASSIGNMENT_TO_FINAL = const StaticWarningCode( |
+ 'ASSIGNMENT_TO_FINAL', |
+ "'{0}' cannot be used as a setter, it is final"); |
/** |
* 5 Variables: Attempting to assign to a final variable elsewhere will cause |
* a NoSuchMethodError to be thrown, because no setter is defined for it. The |
* assignment will also give rise to a static warning for the same reason. |
*/ |
- static const StaticWarningCode ASSIGNMENT_TO_FINAL_NO_SETTER = const StaticWarningCode('ASSIGNMENT_TO_FINAL_NO_SETTER', "No setter named '{0}' in class '{1}'"); |
+ static const StaticWarningCode ASSIGNMENT_TO_FINAL_NO_SETTER = |
+ const StaticWarningCode( |
+ 'ASSIGNMENT_TO_FINAL_NO_SETTER', |
+ "No setter named '{0}' in class '{1}'"); |
/** |
* 12.18 Assignment: It is as static warning if an assignment of the form |
@@ -3196,33 +3900,46 @@ class StaticWarningCode extends ErrorCode { |
* local variable declaration with name <i>v</i> nor setter declaration with |
* name <i>v=</i> in the lexical scope enclosing the assignment. |
*/ |
- static const StaticWarningCode ASSIGNMENT_TO_FUNCTION = const StaticWarningCode('ASSIGNMENT_TO_FUNCTION', "Functions cannot be assigned a value"); |
+ static const StaticWarningCode ASSIGNMENT_TO_FUNCTION = |
+ const StaticWarningCode( |
+ 'ASSIGNMENT_TO_FUNCTION', |
+ "Functions cannot be assigned a value"); |
/** |
* 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i> |
* It is a static type warning if <i>T</i> does not have an accessible |
* instance setter named <i>v=</i>. |
*/ |
- static const StaticWarningCode ASSIGNMENT_TO_METHOD = const StaticWarningCode('ASSIGNMENT_TO_METHOD', "Methods cannot be assigned a value"); |
+ static const StaticWarningCode ASSIGNMENT_TO_METHOD = const StaticWarningCode( |
+ 'ASSIGNMENT_TO_METHOD', |
+ "Methods cannot be assigned a value"); |
/** |
* 13.9 Switch: It is a static warning if the last statement of the statement |
* sequence <i>s<sub>k</sub></i> is not a break, continue, return or throw |
* statement. |
*/ |
- static const StaticWarningCode CASE_BLOCK_NOT_TERMINATED = const StaticWarningCode('CASE_BLOCK_NOT_TERMINATED', "The last statement of the 'case' should be 'break', 'continue', 'return' or 'throw'"); |
+ static const StaticWarningCode CASE_BLOCK_NOT_TERMINATED = |
+ const StaticWarningCode( |
+ 'CASE_BLOCK_NOT_TERMINATED', |
+ "The last statement of the 'case' should be 'break', 'continue', 'return' or 'throw'"); |
/** |
* 12.32 Type Cast: It is a static warning if <i>T</i> does not denote a type |
* available in the current lexical scope. |
*/ |
- static const StaticWarningCode CAST_TO_NON_TYPE = const StaticWarningCode('CAST_TO_NON_TYPE', "The name '{0}' is not a type and cannot be used in an 'as' expression"); |
+ static const StaticWarningCode CAST_TO_NON_TYPE = const StaticWarningCode( |
+ 'CAST_TO_NON_TYPE', |
+ "The name '{0}' is not a type and cannot be used in an 'as' expression"); |
/** |
* 7.4 Abstract Instance Members: It is a static warning if an abstract member |
* is declared or inherited in a concrete class. |
*/ |
- static const StaticWarningCode CONCRETE_CLASS_WITH_ABSTRACT_MEMBER = const StaticWarningCode('CONCRETE_CLASS_WITH_ABSTRACT_MEMBER', "'{0}' must have a method body because '{1}' is not abstract"); |
+ static const StaticWarningCode CONCRETE_CLASS_WITH_ABSTRACT_MEMBER = |
+ const StaticWarningCode( |
+ 'CONCRETE_CLASS_WITH_ABSTRACT_MEMBER', |
+ "'{0}' must have a method body because '{1}' is not abstract"); |
/** |
* 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and |
@@ -3238,7 +3955,10 @@ class StaticWarningCode extends ErrorCode { |
* @param otherLibraryName the name of the non-dart: library that the element |
* is found |
*/ |
- static const StaticWarningCode CONFLICTING_DART_IMPORT = const StaticWarningCode('CONFLICTING_DART_IMPORT', "Element '{0}' from SDK library '{1}' is implicitly hidden by '{2}'"); |
+ static const StaticWarningCode CONFLICTING_DART_IMPORT = |
+ const StaticWarningCode( |
+ 'CONFLICTING_DART_IMPORT', |
+ "Element '{0}' from SDK library '{1}' is implicitly hidden by '{2}'"); |
/** |
* 7.2 Getters: It is a static warning if a class <i>C</i> declares an |
@@ -3247,19 +3967,29 @@ class StaticWarningCode extends ErrorCode { |
* |
* @param superName the name of the super class declaring a static member |
*/ |
- static const StaticWarningCode CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER = const StaticWarningCode('CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER', "Superclass '{0}' declares static member with the same name"); |
+ static const StaticWarningCode |
+ CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER = |
+ const StaticWarningCode( |
+ 'CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER', |
+ "Superclass '{0}' declares static member with the same name"); |
/** |
* 7.1 Instance Methods: It is a static warning if a class <i>C</i> declares |
* an instance method named <i>n</i> and has a setter named <i>n=</i>. |
*/ |
- static const StaticWarningCode CONFLICTING_INSTANCE_METHOD_SETTER = const StaticWarningCode('CONFLICTING_INSTANCE_METHOD_SETTER', "Class '{0}' declares instance method '{1}', but also has a setter with the same name from '{2}'"); |
+ static const StaticWarningCode CONFLICTING_INSTANCE_METHOD_SETTER = |
+ const StaticWarningCode( |
+ 'CONFLICTING_INSTANCE_METHOD_SETTER', |
+ "Class '{0}' declares instance method '{1}', but also has a setter with the same name from '{2}'"); |
/** |
* 7.1 Instance Methods: It is a static warning if a class <i>C</i> declares |
* an instance method named <i>n</i> and has a setter named <i>n=</i>. |
*/ |
- static const StaticWarningCode CONFLICTING_INSTANCE_METHOD_SETTER2 = const StaticWarningCode('CONFLICTING_INSTANCE_METHOD_SETTER2', "Class '{0}' declares the setter '{1}', but also has an instance method in the same class"); |
+ static const StaticWarningCode CONFLICTING_INSTANCE_METHOD_SETTER2 = |
+ const StaticWarningCode( |
+ 'CONFLICTING_INSTANCE_METHOD_SETTER2', |
+ "Class '{0}' declares the setter '{1}', but also has an instance method in the same class"); |
/** |
* 7.3 Setters: It is a static warning if a class <i>C</i> declares an |
@@ -3268,19 +3998,29 @@ class StaticWarningCode extends ErrorCode { |
* |
* @param superName the name of the super class declaring a static member |
*/ |
- static const StaticWarningCode CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER = const StaticWarningCode('CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER', "Superclass '{0}' declares static member with the same name"); |
+ static const StaticWarningCode |
+ CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER = |
+ const StaticWarningCode( |
+ 'CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER', |
+ "Superclass '{0}' declares static member with the same name"); |
/** |
* 7.2 Getters: It is a static warning if a class declares a static getter |
* named <i>v</i> and also has a non-static setter named <i>v=</i>. |
*/ |
- static const StaticWarningCode CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER = const StaticWarningCode('CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER', "Class '{0}' declares non-static setter with the same name"); |
+ static const StaticWarningCode CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER = |
+ const StaticWarningCode( |
+ 'CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER', |
+ "Class '{0}' declares non-static setter with the same name"); |
/** |
* 7.3 Setters: It is a static warning if a class declares a static setter |
* named <i>v=</i> and also has a non-static member named <i>v</i>. |
*/ |
- static const StaticWarningCode CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER = const StaticWarningCode('CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER', "Class '{0}' declares non-static member with the same name"); |
+ static const StaticWarningCode CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER = |
+ const StaticWarningCode( |
+ 'CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER', |
+ "Class '{0}' declares non-static member with the same name"); |
/** |
* 12.11.2 Const: Given an instance creation expression of the form <i>const |
@@ -3288,13 +4028,17 @@ class StaticWarningCode extends ErrorCode { |
* <i>q</i> is the constructor of an abstract class but <i>q</i> is not a |
* factory constructor. |
*/ |
- static const StaticWarningCode CONST_WITH_ABSTRACT_CLASS = const StaticWarningCode('CONST_WITH_ABSTRACT_CLASS', "Abstract classes cannot be created with a 'const' expression"); |
+ static const StaticWarningCode CONST_WITH_ABSTRACT_CLASS = |
+ const StaticWarningCode( |
+ 'CONST_WITH_ABSTRACT_CLASS', |
+ "Abstract classes cannot be created with a 'const' expression"); |
/** |
* 12.7 Maps: It is a static warning if the values of any two keys in a map |
* literal are equal. |
*/ |
- static const StaticWarningCode EQUAL_KEYS_IN_MAP = const StaticWarningCode('EQUAL_KEYS_IN_MAP', "Keys in a map cannot be equal"); |
+ static const StaticWarningCode EQUAL_KEYS_IN_MAP = |
+ const StaticWarningCode('EQUAL_KEYS_IN_MAP', "Keys in a map cannot be equal"); |
/** |
* 14.2 Exports: It is a static warning to export two different libraries with |
@@ -3304,8 +4048,8 @@ class StaticWarningCode extends ErrorCode { |
* @param uri2 the uri pointing to a second library |
* @param name the shared name of the exported libraries |
*/ |
- static const StaticWarningCode EXPORT_DUPLICATED_LIBRARY_NAMED |
- = const StaticWarningCode( |
+ static const StaticWarningCode EXPORT_DUPLICATED_LIBRARY_NAMED = |
+ const StaticWarningCode( |
'EXPORT_DUPLICATED_LIBRARY_NAMED', |
"The exported libraries '{0}' and '{1}' cannot have the same name '{2}'"); |
@@ -3316,8 +4060,8 @@ class StaticWarningCode extends ErrorCode { |
* @param uri1 the uri pointing to a first library |
* @param uri2 the uri pointing to a second library |
*/ |
- static const StaticWarningCode EXPORT_DUPLICATED_LIBRARY_UNNAMED |
- = const StaticWarningCode( |
+ static const StaticWarningCode EXPORT_DUPLICATED_LIBRARY_UNNAMED = |
+ const StaticWarningCode( |
'EXPORT_DUPLICATED_LIBRARY_UNNAMED', |
"The exported libraries '{0}' and '{1}' cannot both be unnamed"); |
@@ -3329,14 +4073,21 @@ class StaticWarningCode extends ErrorCode { |
* @param argumentCount the actual number of positional arguments given |
* See [NOT_ENOUGH_REQUIRED_ARGUMENTS]. |
*/ |
- static const StaticWarningCode EXTRA_POSITIONAL_ARGUMENTS = const StaticWarningCode('EXTRA_POSITIONAL_ARGUMENTS', "{0} positional arguments expected, but {1} found"); |
+ static const StaticWarningCode EXTRA_POSITIONAL_ARGUMENTS = |
+ const StaticWarningCode( |
+ 'EXTRA_POSITIONAL_ARGUMENTS', |
+ "{0} positional arguments expected, but {1} found"); |
/** |
* 5. Variables: It is a static warning if a final instance variable that has |
* been initialized at its point of declaration is also initialized in a |
* constructor. |
*/ |
- static const StaticWarningCode FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION = const StaticWarningCode('FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION', "Values cannot be set in the constructor if they are final, and have already been set"); |
+ static const StaticWarningCode |
+ FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION = |
+ const StaticWarningCode( |
+ 'FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION', |
+ "Values cannot be set in the constructor if they are final, and have already been set"); |
/** |
* 5. Variables: It is a static warning if a final instance variable that has |
@@ -3345,7 +4096,11 @@ class StaticWarningCode extends ErrorCode { |
* |
* @param name the name of the field in question |
*/ |
- static const StaticWarningCode FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR = const StaticWarningCode('FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR', "'{0}' is final and was given a value when it was declared, so it cannot be set to a new value"); |
+ static const StaticWarningCode |
+ FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR = |
+ const StaticWarningCode( |
+ 'FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR', |
+ "'{0}' is final and was given a value when it was declared, so it cannot be set to a new value"); |
/** |
* 7.6.1 Generative Constructors: Execution of an initializer of the form |
@@ -3363,7 +4118,10 @@ class StaticWarningCode extends ErrorCode { |
* @param initializerType the name of the type of the initializer expression |
* @param fieldType the name of the type of the field |
*/ |
- static const StaticWarningCode FIELD_INITIALIZER_NOT_ASSIGNABLE = const StaticWarningCode('FIELD_INITIALIZER_NOT_ASSIGNABLE', "The initializer type '{0}' cannot be assigned to the field type '{1}'"); |
+ static const StaticWarningCode FIELD_INITIALIZER_NOT_ASSIGNABLE = |
+ const StaticWarningCode( |
+ 'FIELD_INITIALIZER_NOT_ASSIGNABLE', |
+ "The initializer type '{0}' cannot be assigned to the field type '{1}'"); |
/** |
* 7.6.1 Generative Constructors: An initializing formal has the form |
@@ -3373,7 +4131,10 @@ class StaticWarningCode extends ErrorCode { |
* @param parameterType the name of the type of the field formal parameter |
* @param fieldType the name of the type of the field |
*/ |
- static const StaticWarningCode FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE = const StaticWarningCode('FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE', "The parameter type '{0}' is incompatable with the field type '{1}'"); |
+ static const StaticWarningCode FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE = |
+ const StaticWarningCode( |
+ 'FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE', |
+ "The parameter type '{0}' is incompatable with the field type '{1}'"); |
/** |
* 5 Variables: It is a static warning if a library, static or local variable |
@@ -3390,13 +4151,19 @@ class StaticWarningCode extends ErrorCode { |
* |
* @param name the name of the uninitialized final variable |
*/ |
- static const StaticWarningCode FINAL_NOT_INITIALIZED = const StaticWarningCode('FINAL_NOT_INITIALIZED', "The final variable '{0}' must be initialized"); |
+ static const StaticWarningCode FINAL_NOT_INITIALIZED = |
+ const StaticWarningCode( |
+ 'FINAL_NOT_INITIALIZED', |
+ "The final variable '{0}' must be initialized"); |
/** |
* 15.5 Function Types: It is a static warning if a concrete class implements |
* Function and does not have a concrete method named call(). |
*/ |
- static const StaticWarningCode FUNCTION_WITHOUT_CALL = const StaticWarningCode('FUNCTION_WITHOUT_CALL', "Concrete classes that implement Function must implement the method call()"); |
+ static const StaticWarningCode FUNCTION_WITHOUT_CALL = |
+ const StaticWarningCode( |
+ 'FUNCTION_WITHOUT_CALL', |
+ "Concrete classes that implement Function must implement the method call()"); |
/** |
* 14.1 Imports: It is a static warning to import two different libraries with |
@@ -3406,8 +4173,8 @@ class StaticWarningCode extends ErrorCode { |
* @param uri2 the uri pointing to a second library |
* @param name the shared name of the imported libraries |
*/ |
- static const StaticWarningCode IMPORT_DUPLICATED_LIBRARY_NAMED |
- = const StaticWarningCode( |
+ static const StaticWarningCode IMPORT_DUPLICATED_LIBRARY_NAMED = |
+ const StaticWarningCode( |
'IMPORT_DUPLICATED_LIBRARY_NAMED', |
"The imported libraries '{0}' and '{1}' cannot have the same name '{2}'"); |
@@ -3418,8 +4185,8 @@ class StaticWarningCode extends ErrorCode { |
* @param uri1 the uri pointing to a first library |
* @param uri2 the uri pointing to a second library |
*/ |
- static const StaticWarningCode IMPORT_DUPLICATED_LIBRARY_UNNAMED |
- = const StaticWarningCode( |
+ static const StaticWarningCode IMPORT_DUPLICATED_LIBRARY_UNNAMED = |
+ const StaticWarningCode( |
'IMPORT_DUPLICATED_LIBRARY_UNNAMED', |
"The imported libraries '{0}' and '{1}' cannot both be unnamed"); |
@@ -3430,7 +4197,10 @@ class StaticWarningCode extends ErrorCode { |
* @param uri the uri pointing to a non-library declaration |
* See [CompileTimeErrorCode.IMPORT_OF_NON_LIBRARY]. |
*/ |
- static const StaticWarningCode IMPORT_OF_NON_LIBRARY = const StaticWarningCode('IMPORT_OF_NON_LIBRARY', "The imported library '{0}' must not have a part-of directive"); |
+ static const StaticWarningCode IMPORT_OF_NON_LIBRARY = |
+ const StaticWarningCode( |
+ 'IMPORT_OF_NON_LIBRARY', |
+ "The imported library '{0}' must not have a part-of directive"); |
/** |
* 8.1.1 Inheritance and Overriding: However, if the above rules would cause |
@@ -3443,7 +4213,11 @@ class StaticWarningCode extends ErrorCode { |
* getters none of the <i>m<sub>i</sub></i> are inherited, and a static |
* warning is issued. |
*/ |
- static const StaticWarningCode INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD = const StaticWarningCode('INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD', "'{0}' is inherited as a getter and also a method"); |
+ static const StaticWarningCode |
+ INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD = |
+ const StaticWarningCode( |
+ 'INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD', |
+ "'{0}' is inherited as a getter and also a method"); |
/** |
* 7.1 Instance Methods: It is a static warning if a class <i>C</i> declares |
@@ -3454,7 +4228,11 @@ class StaticWarningCode extends ErrorCode { |
* @param superclassName the name of the enclosing class that has the static |
* member |
*/ |
- static const StaticWarningCode INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC = const StaticWarningCode('INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC', "'{0}' collides with a static member in the superclass '{1}'"); |
+ static const StaticWarningCode |
+ INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC = |
+ const StaticWarningCode( |
+ 'INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC', |
+ "'{0}' collides with a static member in the superclass '{1}'"); |
/** |
* 7.2 Getters: It is a static warning if a getter <i>m1</i> overrides a |
@@ -3468,7 +4246,10 @@ class StaticWarningCode extends ErrorCode { |
* declared |
* See [INVALID_METHOD_OVERRIDE_RETURN_TYPE]. |
*/ |
- static const StaticWarningCode INVALID_GETTER_OVERRIDE_RETURN_TYPE = const StaticWarningCode('INVALID_GETTER_OVERRIDE_RETURN_TYPE', "The return type '{0}' is not assignable to '{1}' as required by the getter it is overriding from '{2}'"); |
+ static const StaticWarningCode INVALID_GETTER_OVERRIDE_RETURN_TYPE = |
+ const StaticWarningCode( |
+ 'INVALID_GETTER_OVERRIDE_RETURN_TYPE', |
+ "The return type '{0}' is not assignable to '{1}' as required by the getter it is overriding from '{2}'"); |
/** |
* 7.1 Instance Methods: It is a static warning if an instance method |
@@ -3481,7 +4262,10 @@ class StaticWarningCode extends ErrorCode { |
* @param className the name of the class where the overridden method is |
* declared |
*/ |
- static const StaticWarningCode INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE = const StaticWarningCode('INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE', "The parameter type '{0}' is not assignable to '{1}' as required by the method it is overriding from '{2}'"); |
+ static const StaticWarningCode INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE = |
+ const StaticWarningCode( |
+ 'INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE', |
+ "The parameter type '{0}' is not assignable to '{1}' as required by the method it is overriding from '{2}'"); |
/** |
* 7.1 Instance Methods: It is a static warning if an instance method |
@@ -3495,7 +4279,10 @@ class StaticWarningCode extends ErrorCode { |
* declared |
* See [INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE]. |
*/ |
- static const StaticWarningCode INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE = const StaticWarningCode('INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE', "The parameter type '{0}' is not assignable to '{1}' as required by the method it is overriding from '{2}'"); |
+ static const StaticWarningCode INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE = |
+ const StaticWarningCode( |
+ 'INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE', |
+ "The parameter type '{0}' is not assignable to '{1}' as required by the method it is overriding from '{2}'"); |
/** |
* 7.1 Instance Methods: It is a static warning if an instance method |
@@ -3508,7 +4295,10 @@ class StaticWarningCode extends ErrorCode { |
* @param className the name of the class where the overridden method is |
* declared |
*/ |
- static const StaticWarningCode INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE = const StaticWarningCode('INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE', "The parameter type '{0}' is not assignable to '{1}' as required by the method it is overriding from '{2}'"); |
+ static const StaticWarningCode INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE = |
+ const StaticWarningCode( |
+ 'INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE', |
+ "The parameter type '{0}' is not assignable to '{1}' as required by the method it is overriding from '{2}'"); |
/** |
* 7.1 Instance Methods: It is a static warning if an instance method |
@@ -3522,7 +4312,10 @@ class StaticWarningCode extends ErrorCode { |
* declared |
* See [INVALID_GETTER_OVERRIDE_RETURN_TYPE]. |
*/ |
- static const StaticWarningCode INVALID_METHOD_OVERRIDE_RETURN_TYPE = const StaticWarningCode('INVALID_METHOD_OVERRIDE_RETURN_TYPE', "The return type '{0}' is not assignable to '{1}' as required by the method it is overriding from '{2}'"); |
+ static const StaticWarningCode INVALID_METHOD_OVERRIDE_RETURN_TYPE = |
+ const StaticWarningCode( |
+ 'INVALID_METHOD_OVERRIDE_RETURN_TYPE', |
+ "The return type '{0}' is not assignable to '{1}' as required by the method it is overriding from '{2}'"); |
/** |
* 7.1 Instance Methods: It is a static warning if an instance method |
@@ -3531,7 +4324,11 @@ class StaticWarningCode extends ErrorCode { |
* <i>p</i> and the signature of <i>m1</i> specifies a different default value |
* for <i>p</i>. |
*/ |
- static const StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED = const StaticWarningCode('INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED', "Parameters cannot override default values, this method overrides '{0}.{1}' where '{2}' has a different value"); |
+ static const StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED |
+ = |
+ const StaticWarningCode( |
+ 'INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED', |
+ "Parameters cannot override default values, this method overrides '{0}.{1}' where '{2}' has a different value"); |
/** |
* 7.1 Instance Methods: It is a static warning if an instance method |
@@ -3540,7 +4337,11 @@ class StaticWarningCode extends ErrorCode { |
* <i>p</i> and the signature of <i>m1</i> specifies a different default value |
* for <i>p</i>. |
*/ |
- static const StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL = const StaticWarningCode('INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL', "Parameters cannot override default values, this method overrides '{0}.{1}' where this positional parameter has a different value"); |
+ static const StaticWarningCode |
+ INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL = |
+ const StaticWarningCode( |
+ 'INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL', |
+ "Parameters cannot override default values, this method overrides '{0}.{1}' where this positional parameter has a different value"); |
/** |
* 7.1 Instance Methods: It is a static warning if an instance method |
@@ -3550,7 +4351,10 @@ class StaticWarningCode extends ErrorCode { |
* @param paramCount the number of named parameters in the overridden member |
* @param className the name of the class from the overridden method |
*/ |
- static const StaticWarningCode INVALID_OVERRIDE_NAMED = const StaticWarningCode('INVALID_OVERRIDE_NAMED', "Missing the named parameter '{0}' to match the overridden method from '{1}'"); |
+ static const StaticWarningCode INVALID_OVERRIDE_NAMED = |
+ const StaticWarningCode( |
+ 'INVALID_OVERRIDE_NAMED', |
+ "Missing the named parameter '{0}' to match the overridden method from '{1}'"); |
/** |
* 7.1 Instance Methods: It is a static warning if an instance method |
@@ -3561,7 +4365,10 @@ class StaticWarningCode extends ErrorCode { |
* member |
* @param className the name of the class from the overridden method |
*/ |
- static const StaticWarningCode INVALID_OVERRIDE_POSITIONAL = const StaticWarningCode('INVALID_OVERRIDE_POSITIONAL', "Must have at least {0} parameters to match the overridden method from '{1}'"); |
+ static const StaticWarningCode INVALID_OVERRIDE_POSITIONAL = |
+ const StaticWarningCode( |
+ 'INVALID_OVERRIDE_POSITIONAL', |
+ "Must have at least {0} parameters to match the overridden method from '{1}'"); |
/** |
* 7.1 Instance Methods: It is a static warning if an instance method |
@@ -3572,7 +4379,10 @@ class StaticWarningCode extends ErrorCode { |
* member |
* @param className the name of the class from the overridden method |
*/ |
- static const StaticWarningCode INVALID_OVERRIDE_REQUIRED = const StaticWarningCode('INVALID_OVERRIDE_REQUIRED', "Must have {0} required parameters or less to match the overridden method from '{1}'"); |
+ static const StaticWarningCode INVALID_OVERRIDE_REQUIRED = |
+ const StaticWarningCode( |
+ 'INVALID_OVERRIDE_REQUIRED', |
+ "Must have {0} required parameters or less to match the overridden method from '{1}'"); |
/** |
* 7.3 Setters: It is a static warning if a setter <i>m1</i> overrides a |
@@ -3586,7 +4396,10 @@ class StaticWarningCode extends ErrorCode { |
* declared |
* See [INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE]. |
*/ |
- static const StaticWarningCode INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE = const StaticWarningCode('INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE', "The parameter type '{0}' is not assignable to '{1}' as required by the setter it is overriding from '{2}'"); |
+ static const StaticWarningCode INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE = |
+ const StaticWarningCode( |
+ 'INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE', |
+ "The parameter type '{0}' is not assignable to '{1}' as required by the setter it is overriding from '{2}'"); |
/** |
* 12.6 Lists: A run-time list literal <<i>E</i>> [<i>e<sub>1</sub></i> |
@@ -3601,7 +4414,10 @@ class StaticWarningCode extends ErrorCode { |
* warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<sub>j</sub>, 1 |
* <= j <= m</i>. |
*/ |
- static const StaticWarningCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = const StaticWarningCode('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', "The element type '{0}' cannot be assigned to the list type '{1}'"); |
+ static const StaticWarningCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = |
+ const StaticWarningCode( |
+ 'LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', |
+ "The element type '{0}' cannot be assigned to the list type '{1}'"); |
/** |
* 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> |
@@ -3618,7 +4434,10 @@ class StaticWarningCode extends ErrorCode { |
* warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<sub>j</sub>, 1 |
* <= j <= m</i>. |
*/ |
- static const StaticWarningCode MAP_KEY_TYPE_NOT_ASSIGNABLE = const StaticWarningCode('MAP_KEY_TYPE_NOT_ASSIGNABLE', "The element type '{0}' cannot be assigned to the map key type '{1}'"); |
+ static const StaticWarningCode MAP_KEY_TYPE_NOT_ASSIGNABLE = |
+ const StaticWarningCode( |
+ 'MAP_KEY_TYPE_NOT_ASSIGNABLE', |
+ "The element type '{0}' cannot be assigned to the map key type '{1}'"); |
/** |
* 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> |
@@ -3635,34 +4454,49 @@ class StaticWarningCode extends ErrorCode { |
* warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<sub>j</sub>, 1 |
* <= j <= m</i>. |
*/ |
- static const StaticWarningCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = const StaticWarningCode('MAP_VALUE_TYPE_NOT_ASSIGNABLE', "The element type '{0}' cannot be assigned to the map value type '{1}'"); |
+ static const StaticWarningCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = |
+ const StaticWarningCode( |
+ 'MAP_VALUE_TYPE_NOT_ASSIGNABLE', |
+ "The element type '{0}' cannot be assigned to the map value type '{1}'"); |
/** |
* 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i> |
* with argument type <i>T</i> and a getter named <i>v</i> with return type |
* <i>S</i>, and <i>T</i> may not be assigned to <i>S</i>. |
*/ |
- static const StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES = const StaticWarningCode('MISMATCHED_GETTER_AND_SETTER_TYPES', "The parameter type for setter '{0}' is '{1}' which is not assignable to its getter (of type '{2}')"); |
+ static const StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES = |
+ const StaticWarningCode( |
+ 'MISMATCHED_GETTER_AND_SETTER_TYPES', |
+ "The parameter type for setter '{0}' is '{1}' which is not assignable to its getter (of type '{2}')"); |
/** |
* 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i> |
* with argument type <i>T</i> and a getter named <i>v</i> with return type |
* <i>S</i>, and <i>T</i> may not be assigned to <i>S</i>. |
*/ |
- static const StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE = const StaticWarningCode('MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE', "The parameter type for setter '{0}' is '{1}' which is not assignable to its getter (of type '{2}'), from superclass '{3}'"); |
+ static const StaticWarningCode |
+ MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE = |
+ const StaticWarningCode( |
+ 'MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE', |
+ "The parameter type for setter '{0}' is '{1}' which is not assignable to its getter (of type '{2}'), from superclass '{3}'"); |
/** |
* 13.12 Return: It is a static warning if a function contains both one or |
* more return statements of the form <i>return;</i> and one or more return |
* statements of the form <i>return e;</i>. |
*/ |
- static const StaticWarningCode MIXED_RETURN_TYPES = const StaticWarningCode('MIXED_RETURN_TYPES', "Methods and functions cannot use return both with and without values"); |
+ static const StaticWarningCode MIXED_RETURN_TYPES = const StaticWarningCode( |
+ 'MIXED_RETURN_TYPES', |
+ "Methods and functions cannot use return both with and without values"); |
/** |
* 12.11.1 New: It is a static warning if <i>q</i> is a constructor of an |
* abstract class and <i>q</i> is not a factory constructor. |
*/ |
- static const StaticWarningCode NEW_WITH_ABSTRACT_CLASS = const StaticWarningCode('NEW_WITH_ABSTRACT_CLASS', "Abstract classes cannot be created with a 'new' expression"); |
+ static const StaticWarningCode NEW_WITH_ABSTRACT_CLASS = |
+ const StaticWarningCode( |
+ 'NEW_WITH_ABSTRACT_CLASS', |
+ "Abstract classes cannot be created with a 'new' expression"); |
/** |
* 15.8 Parameterized Types: Any use of a malbounded type gives rise to a |
@@ -3674,7 +4508,10 @@ class StaticWarningCode extends ErrorCode { |
* See [CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS], and |
* [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]. |
*/ |
- static const StaticWarningCode NEW_WITH_INVALID_TYPE_PARAMETERS = const StaticWarningCode('NEW_WITH_INVALID_TYPE_PARAMETERS', "The type '{0}' is declared with {1} type parameters, but {2} type arguments were given"); |
+ static const StaticWarningCode NEW_WITH_INVALID_TYPE_PARAMETERS = |
+ const StaticWarningCode( |
+ 'NEW_WITH_INVALID_TYPE_PARAMETERS', |
+ "The type '{0}' is declared with {1} type parameters, but {2} type arguments were given"); |
/** |
* 12.11.1 New: It is a static warning if <i>T</i> is not a class accessible |
@@ -3682,7 +4519,8 @@ class StaticWarningCode extends ErrorCode { |
* |
* @param name the name of the non-type element |
*/ |
- static const StaticWarningCode NEW_WITH_NON_TYPE = const StaticWarningCode('NEW_WITH_NON_TYPE', "The name '{0}' is not a class"); |
+ static const StaticWarningCode NEW_WITH_NON_TYPE = |
+ const StaticWarningCode('NEW_WITH_NON_TYPE', "The name '{0}' is not a class"); |
/** |
* 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the |
@@ -3697,7 +4535,10 @@ class StaticWarningCode extends ErrorCode { |
* a<sub>n+kM/sub>)</i> it is a static warning if the type <i>T</i> does not |
* declare a constructor with the same name as the declaration of <i>T</i>. |
*/ |
- static const StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR = const StaticWarningCode('NEW_WITH_UNDEFINED_CONSTRUCTOR', "The class '{0}' does not have a constructor '{1}'"); |
+ static const StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR = |
+ const StaticWarningCode( |
+ 'NEW_WITH_UNDEFINED_CONSTRUCTOR', |
+ "The class '{0}' does not have a constructor '{1}'"); |
/** |
* 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the |
@@ -3711,7 +4552,10 @@ class StaticWarningCode extends ErrorCode { |
* static warning if the type <i>T</i> does not declare a constructor with the |
* same name as the declaration of <i>T</i>. |
*/ |
- static const StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = const StaticWarningCode('NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', "The class '{0}' does not have a default constructor"); |
+ static const StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = |
+ const StaticWarningCode( |
+ 'NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', |
+ "The class '{0}' does not have a default constructor"); |
/** |
* 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract |
@@ -3734,7 +4578,11 @@ class StaticWarningCode extends ErrorCode { |
* @param additionalCount the number of additional missing members that aren't |
* listed |
*/ |
- static const StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS = const StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS', "Missing concrete implementation of {0}, {1}, {2}, {3} and {4} more"); |
+ static const StaticWarningCode |
+ NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS = |
+ const StaticWarningCode( |
+ 'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS', |
+ "Missing concrete implementation of {0}, {1}, {2}, {3} and {4} more"); |
/** |
* 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract |
@@ -3755,7 +4603,11 @@ class StaticWarningCode extends ErrorCode { |
* @param memberName the name of the third member |
* @param memberName the name of the fourth member |
*/ |
- static const StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR = const StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR', "Missing concrete implementation of {0}, {1}, {2} and {3}"); |
+ static const StaticWarningCode |
+ NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR = |
+ const StaticWarningCode( |
+ 'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR', |
+ "Missing concrete implementation of {0}, {1}, {2} and {3}"); |
/** |
* 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract |
@@ -3773,7 +4625,11 @@ class StaticWarningCode extends ErrorCode { |
* |
* @param memberName the name of the member |
*/ |
- static const StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE = const StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE', "Missing concrete implementation of {0}"); |
+ static const StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE |
+ = |
+ const StaticWarningCode( |
+ 'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE', |
+ "Missing concrete implementation of {0}"); |
/** |
* 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract |
@@ -3793,7 +4649,11 @@ class StaticWarningCode extends ErrorCode { |
* @param memberName the name of the second member |
* @param memberName the name of the third member |
*/ |
- static const StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE = const StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE', "Missing concrete implementation of {0}, {1} and {2}"); |
+ static const StaticWarningCode |
+ NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE = |
+ const StaticWarningCode( |
+ 'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE', |
+ "Missing concrete implementation of {0}, {1} and {2}"); |
/** |
* 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract |
@@ -3812,7 +4672,11 @@ class StaticWarningCode extends ErrorCode { |
* @param memberName the name of the first member |
* @param memberName the name of the second member |
*/ |
- static const StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO = const StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO', "Missing concrete implementation of {0} and {1}"); |
+ static const StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO |
+ = |
+ const StaticWarningCode( |
+ 'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO', |
+ "Missing concrete implementation of {0} and {1}"); |
/** |
* 13.11 Try: An on-catch clause of the form <i>on T catch (p<sub>1</sub>, |
@@ -3823,19 +4687,28 @@ class StaticWarningCode extends ErrorCode { |
* |
* @param name the name of the non-type element |
*/ |
- static const StaticWarningCode NON_TYPE_IN_CATCH_CLAUSE = const StaticWarningCode('NON_TYPE_IN_CATCH_CLAUSE', "The name '{0}' is not a type and cannot be used in an on-catch clause"); |
+ static const StaticWarningCode NON_TYPE_IN_CATCH_CLAUSE = |
+ const StaticWarningCode( |
+ 'NON_TYPE_IN_CATCH_CLAUSE', |
+ "The name '{0}' is not a type and cannot be used in an on-catch clause"); |
/** |
* 7.1.1 Operators: It is a static warning if the return type of the |
* user-declared operator []= is explicitly declared and not void. |
*/ |
- static const StaticWarningCode NON_VOID_RETURN_FOR_OPERATOR = const StaticWarningCode('NON_VOID_RETURN_FOR_OPERATOR', "The return type of the operator []= must be 'void'"); |
+ static const StaticWarningCode NON_VOID_RETURN_FOR_OPERATOR = |
+ const StaticWarningCode( |
+ 'NON_VOID_RETURN_FOR_OPERATOR', |
+ "The return type of the operator []= must be 'void'"); |
/** |
* 7.3 Setters: It is a static warning if a setter declares a return type |
* other than void. |
*/ |
- static const StaticWarningCode NON_VOID_RETURN_FOR_SETTER = const StaticWarningCode('NON_VOID_RETURN_FOR_SETTER', "The return type of the setter must be 'void'"); |
+ static const StaticWarningCode NON_VOID_RETURN_FOR_SETTER = |
+ const StaticWarningCode( |
+ 'NON_VOID_RETURN_FOR_SETTER', |
+ "The return type of the setter must be 'void'"); |
/** |
* 15.1 Static Types: A type <i>T</i> is malformed iff: |
@@ -3851,7 +4724,8 @@ class StaticWarningCode extends ErrorCode { |
* |
* @param nonTypeName the name that is not a type |
*/ |
- static const StaticWarningCode NOT_A_TYPE = const StaticWarningCode('NOT_A_TYPE', "{0} is not a type"); |
+ static const StaticWarningCode NOT_A_TYPE = |
+ const StaticWarningCode('NOT_A_TYPE', "{0} is not a type"); |
/** |
* 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < |
@@ -3861,7 +4735,10 @@ class StaticWarningCode extends ErrorCode { |
* @param argumentCount the actual number of positional arguments given |
* See [EXTRA_POSITIONAL_ARGUMENTS]. |
*/ |
- static const StaticWarningCode NOT_ENOUGH_REQUIRED_ARGUMENTS = const StaticWarningCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', "{0} required argument(s) expected, but {1} found"); |
+ static const StaticWarningCode NOT_ENOUGH_REQUIRED_ARGUMENTS = |
+ const StaticWarningCode( |
+ 'NOT_ENOUGH_REQUIRED_ARGUMENTS', |
+ "{0} required argument(s) expected, but {1} found"); |
/** |
* 14.3 Parts: It is a static warning if the referenced part declaration |
@@ -3872,7 +4749,10 @@ class StaticWarningCode extends ErrorCode { |
* @param actualLibraryName the non-matching actual library name from the |
* "part of" declaration |
*/ |
- static const StaticWarningCode PART_OF_DIFFERENT_LIBRARY = const StaticWarningCode('PART_OF_DIFFERENT_LIBRARY', "Expected this library to be part of '{0}', not '{1}'"); |
+ static const StaticWarningCode PART_OF_DIFFERENT_LIBRARY = |
+ const StaticWarningCode( |
+ 'PART_OF_DIFFERENT_LIBRARY', |
+ "Expected this library to be part of '{0}', not '{1}'"); |
/** |
* 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> |
@@ -3881,7 +4761,10 @@ class StaticWarningCode extends ErrorCode { |
* @param redirectedName the name of the redirected constructor |
* @param redirectingName the name of the redirecting constructor |
*/ |
- static const StaticWarningCode REDIRECT_TO_INVALID_FUNCTION_TYPE = const StaticWarningCode('REDIRECT_TO_INVALID_FUNCTION_TYPE', "The redirected constructor '{0}' has incompatible parameters with '{1}'"); |
+ static const StaticWarningCode REDIRECT_TO_INVALID_FUNCTION_TYPE = |
+ const StaticWarningCode( |
+ 'REDIRECT_TO_INVALID_FUNCTION_TYPE', |
+ "The redirected constructor '{0}' has incompatible parameters with '{1}'"); |
/** |
* 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> |
@@ -3890,7 +4773,10 @@ class StaticWarningCode extends ErrorCode { |
* @param redirectedName the name of the redirected constructor return type |
* @param redirectingName the name of the redirecting constructor return type |
*/ |
- static const StaticWarningCode REDIRECT_TO_INVALID_RETURN_TYPE = const StaticWarningCode('REDIRECT_TO_INVALID_RETURN_TYPE', "The return type '{0}' of the redirected constructor is not assignable to '{1}'"); |
+ static const StaticWarningCode REDIRECT_TO_INVALID_RETURN_TYPE = |
+ const StaticWarningCode( |
+ 'REDIRECT_TO_INVALID_RETURN_TYPE', |
+ "The return type '{0}' of the redirected constructor is not assignable to '{1}'"); |
/** |
* 7.6.2 Factories: It is a static warning if type does not denote a class |
@@ -3898,7 +4784,10 @@ class StaticWarningCode extends ErrorCode { |
* it is a static warning if the referenced constructor (be it <i>type</i> or |
* <i>type.id</i>) is not a constructor of <i>C</i>. |
*/ |
- static const StaticWarningCode REDIRECT_TO_MISSING_CONSTRUCTOR = const StaticWarningCode('REDIRECT_TO_MISSING_CONSTRUCTOR', "The constructor '{0}' could not be found in '{1}'"); |
+ static const StaticWarningCode REDIRECT_TO_MISSING_CONSTRUCTOR = |
+ const StaticWarningCode( |
+ 'REDIRECT_TO_MISSING_CONSTRUCTOR', |
+ "The constructor '{0}' could not be found in '{1}'"); |
/** |
* 7.6.2 Factories: It is a static warning if type does not denote a class |
@@ -3906,7 +4795,10 @@ class StaticWarningCode extends ErrorCode { |
* it is a static warning if the referenced constructor (be it <i>type</i> or |
* <i>type.id</i>) is not a constructor of <i>C</i>. |
*/ |
- static const StaticWarningCode REDIRECT_TO_NON_CLASS = const StaticWarningCode('REDIRECT_TO_NON_CLASS', "The name '{0}' is not a type and cannot be used in a redirected constructor"); |
+ static const StaticWarningCode REDIRECT_TO_NON_CLASS = |
+ const StaticWarningCode( |
+ 'REDIRECT_TO_NON_CLASS', |
+ "The name '{0}' is not a type and cannot be used in a redirected constructor"); |
/** |
* 13.12 Return: Let <i>f</i> be the function immediately enclosing a return |
@@ -3915,7 +4807,9 @@ class StaticWarningCode extends ErrorCode { |
* * <i>f</i> is not a generative constructor. |
* * The return type of <i>f</i> may not be assigned to void. |
*/ |
- static const StaticWarningCode RETURN_WITHOUT_VALUE = const StaticWarningCode('RETURN_WITHOUT_VALUE', "Missing return value after 'return'"); |
+ static const StaticWarningCode RETURN_WITHOUT_VALUE = const StaticWarningCode( |
+ 'RETURN_WITHOUT_VALUE', |
+ "Missing return value after 'return'"); |
/** |
* 12.16.3 Static Invocation: It is a static warning if <i>C</i> does not |
@@ -3923,13 +4817,19 @@ class StaticWarningCode extends ErrorCode { |
* |
* @param memberName the name of the instance member |
*/ |
- static const StaticWarningCode STATIC_ACCESS_TO_INSTANCE_MEMBER = const StaticWarningCode('STATIC_ACCESS_TO_INSTANCE_MEMBER', "Instance member '{0}' cannot be accessed using static access"); |
+ static const StaticWarningCode STATIC_ACCESS_TO_INSTANCE_MEMBER = |
+ const StaticWarningCode( |
+ 'STATIC_ACCESS_TO_INSTANCE_MEMBER', |
+ "Instance member '{0}' cannot be accessed using static access"); |
/** |
* 13.9 Switch: It is a static warning if the type of <i>e</i> may not be |
* assigned to the type of <i>e<sub>k</sub></i>. |
*/ |
- static const StaticWarningCode SWITCH_EXPRESSION_NOT_ASSIGNABLE = const StaticWarningCode('SWITCH_EXPRESSION_NOT_ASSIGNABLE', "Type '{0}' of the switch expression is not assignable to the type '{1}' of case expressions"); |
+ static const StaticWarningCode SWITCH_EXPRESSION_NOT_ASSIGNABLE = |
+ const StaticWarningCode( |
+ 'SWITCH_EXPRESSION_NOT_ASSIGNABLE', |
+ "Type '{0}' of the switch expression is not assignable to the type '{1}' of case expressions"); |
/** |
* 15.1 Static Types: It is a static warning to use a deferred type in a type |
@@ -3938,13 +4838,18 @@ class StaticWarningCode extends ErrorCode { |
* @param name the name of the type that is deferred and being used in a type |
* annotation |
*/ |
- static const StaticWarningCode TYPE_ANNOTATION_DEFERRED_CLASS = const StaticWarningCode('TYPE_ANNOTATION_DEFERRED_CLASS', "The deferred type '{0}' cannot be used in a declaration, cast or type test"); |
+ static const StaticWarningCode TYPE_ANNOTATION_DEFERRED_CLASS = |
+ const StaticWarningCode( |
+ 'TYPE_ANNOTATION_DEFERRED_CLASS', |
+ "The deferred type '{0}' cannot be used in a declaration, cast or type test"); |
/** |
* 12.31 Type Test: It is a static warning if <i>T</i> does not denote a type |
* available in the current lexical scope. |
*/ |
- static const StaticWarningCode TYPE_TEST_NON_TYPE = const StaticWarningCode('TYPE_TEST_NON_TYPE', "The name '{0}' is not a type and cannot be used in an 'is' expression"); |
+ static const StaticWarningCode TYPE_TEST_NON_TYPE = const StaticWarningCode( |
+ 'TYPE_TEST_NON_TYPE', |
+ "The name '{0}' is not a type and cannot be used in an 'is' expression"); |
/** |
* 10 Generics: However, a type parameter is considered to be a malformed type |
@@ -3954,7 +4859,10 @@ class StaticWarningCode extends ErrorCode { |
* warning. A malformed type is then interpreted as dynamic by the static type |
* checker and the runtime. |
*/ |
- static const StaticWarningCode TYPE_PARAMETER_REFERENCED_BY_STATIC = const StaticWarningCode('TYPE_PARAMETER_REFERENCED_BY_STATIC', "Static members cannot reference type parameters"); |
+ static const StaticWarningCode TYPE_PARAMETER_REFERENCED_BY_STATIC = |
+ const StaticWarningCode( |
+ 'TYPE_PARAMETER_REFERENCED_BY_STATIC', |
+ "Static members cannot reference type parameters"); |
/** |
* 12.16.3 Static Invocation: A static method invocation <i>i</i> has the form |
@@ -3964,12 +4872,16 @@ class StaticWarningCode extends ErrorCode { |
* |
* @param undefinedClassName the name of the undefined class |
*/ |
- static const StaticWarningCode UNDEFINED_CLASS = const StaticWarningCode('UNDEFINED_CLASS', "Undefined class '{0}'"); |
+ static const StaticWarningCode UNDEFINED_CLASS = |
+ const StaticWarningCode('UNDEFINED_CLASS', "Undefined class '{0}'"); |
/** |
* Same as [UNDEFINED_CLASS], but to catch using "boolean" instead of "bool". |
*/ |
- static const StaticWarningCode UNDEFINED_CLASS_BOOLEAN = const StaticWarningCode('UNDEFINED_CLASS_BOOLEAN', "Undefined class 'boolean'; did you mean 'bool'?"); |
+ static const StaticWarningCode UNDEFINED_CLASS_BOOLEAN = |
+ const StaticWarningCode( |
+ 'UNDEFINED_CLASS_BOOLEAN', |
+ "Undefined class 'boolean'; did you mean 'bool'?"); |
/** |
* 12.17 Getter Invocation: It is a static warning if there is no class |
@@ -3980,7 +4892,9 @@ class StaticWarningCode extends ErrorCode { |
* @param enclosingType the name of the enclosing type where the getter is |
* being looked for |
*/ |
- static const StaticWarningCode UNDEFINED_GETTER = const StaticWarningCode('UNDEFINED_GETTER', "There is no such getter '{0}' in '{1}'"); |
+ static const StaticWarningCode UNDEFINED_GETTER = const StaticWarningCode( |
+ 'UNDEFINED_GETTER', |
+ "There is no such getter '{0}' in '{1}'"); |
/** |
* 12.30 Identifier Reference: It is as static warning if an identifier |
@@ -3991,7 +4905,8 @@ class StaticWarningCode extends ErrorCode { |
* |
* @param name the name of the identifier |
*/ |
- static const StaticWarningCode UNDEFINED_IDENTIFIER = const StaticWarningCode('UNDEFINED_IDENTIFIER', "Undefined name '{0}'"); |
+ static const StaticWarningCode UNDEFINED_IDENTIFIER = |
+ const StaticWarningCode('UNDEFINED_IDENTIFIER', "Undefined name '{0}'"); |
/** |
* 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>, |
@@ -4001,7 +4916,10 @@ class StaticWarningCode extends ErrorCode { |
* |
* @param name the name of the requested named parameter |
*/ |
- static const StaticWarningCode UNDEFINED_NAMED_PARAMETER = const StaticWarningCode('UNDEFINED_NAMED_PARAMETER', "The named parameter '{0}' is not defined"); |
+ static const StaticWarningCode UNDEFINED_NAMED_PARAMETER = |
+ const StaticWarningCode( |
+ 'UNDEFINED_NAMED_PARAMETER', |
+ "The named parameter '{0}' is not defined"); |
/** |
* 12.18 Assignment: It is as static warning if an assignment of the form |
@@ -4018,7 +4936,9 @@ class StaticWarningCode extends ErrorCode { |
* @param enclosingType the name of the enclosing type where the setter is |
* being looked for |
*/ |
- static const StaticWarningCode UNDEFINED_SETTER = const StaticWarningCode('UNDEFINED_SETTER', "There is no such setter '{0}' in '{1}'"); |
+ static const StaticWarningCode UNDEFINED_SETTER = const StaticWarningCode( |
+ 'UNDEFINED_SETTER', |
+ "There is no such setter '{0}' in '{1}'"); |
/** |
* 12.16.3 Static Invocation: It is a static warning if <i>C</i> does not |
@@ -4028,12 +4948,18 @@ class StaticWarningCode extends ErrorCode { |
* @param enclosingType the name of the enclosing type where the method is |
* being looked for |
*/ |
- static const StaticWarningCode UNDEFINED_STATIC_METHOD_OR_GETTER = const StaticWarningCode('UNDEFINED_STATIC_METHOD_OR_GETTER', "There is no such static method, getter or setter '{0}' in '{1}'"); |
+ static const StaticWarningCode UNDEFINED_STATIC_METHOD_OR_GETTER = |
+ const StaticWarningCode( |
+ 'UNDEFINED_STATIC_METHOD_OR_GETTER', |
+ "There is no such static method, getter or setter '{0}' in '{1}'"); |
/** |
* 7.2 Getters: It is a static warning if the return type of a getter is void. |
*/ |
- static const StaticWarningCode VOID_RETURN_FOR_GETTER = const StaticWarningCode('VOID_RETURN_FOR_GETTER', "The return type of the getter must not be 'void'"); |
+ static const StaticWarningCode VOID_RETURN_FOR_GETTER = |
+ const StaticWarningCode( |
+ 'VOID_RETURN_FOR_GETTER', |
+ "The return type of the getter must not be 'void'"); |
/** |
* Initialize a newly created error code to have the given [name]. The message |
@@ -4041,7 +4967,8 @@ class StaticWarningCode extends ErrorCode { |
* template. The correction associated with the error will be created from the |
* given [correction] template. |
*/ |
- const StaticWarningCode(String name, String message, [String correction]) : super(name, message, correction); |
+ const StaticWarningCode(String name, String message, [String correction]) |
+ : super(name, message, correction); |
@override |
ErrorSeverity get errorSeverity => ErrorType.STATIC_WARNING.severity; |
@@ -4072,7 +4999,8 @@ class TodoCode extends ErrorCode { |
* * todo |
* * TODOS |
*/ |
- static RegExp TODO_REGEX = new RegExp("([\\s/\\*])((TODO[^\\w\\d][^\\r\\n]*)|(TODO:?\$))"); |
+ static RegExp TODO_REGEX = |
+ new RegExp("([\\s/\\*])((TODO[^\\w\\d][^\\r\\n]*)|(TODO:?\$))"); |
/** |
* Initialize a newly created error code to have the given [name]. |
@@ -4084,4 +5012,4 @@ class TodoCode extends ErrorCode { |
@override |
ErrorType get type => ErrorType.TODO; |
-} |
+} |