Index: pkg/analyzer_experimental/lib/src/generated/error.dart |
diff --git a/pkg/analyzer_experimental/lib/src/generated/error.dart b/pkg/analyzer_experimental/lib/src/generated/error.dart |
index a84bb3289a0b762cf13bd2023a10f844159aa54e..5dfba2f786ed054d67cb4fc5e417b6dbf08cb874 100644 |
--- a/pkg/analyzer_experimental/lib/src/generated/error.dart |
+++ b/pkg/analyzer_experimental/lib/src/generated/error.dart |
@@ -11,7 +11,7 @@ import 'scanner.dart' show Token; |
* |
* @coverage dart.engine.error |
*/ |
-class ErrorSeverity implements Enum<ErrorSeverity> { |
+class ErrorSeverity extends Enum<ErrorSeverity> { |
/** |
* The severity representing a non-error. This is never used for any error code, but is useful for |
@@ -37,12 +37,6 @@ class ErrorSeverity implements Enum<ErrorSeverity> { |
static final ErrorSeverity ERROR = new ErrorSeverity('ERROR', 3, "E", "error"); |
static final List<ErrorSeverity> values = [NONE, SUGGESTION, WARNING, ERROR]; |
- /// The name of this enum constant, as declared in the enum declaration. |
- final String name; |
- |
- /// The position in the enum declaration. |
- final int ordinal; |
- |
/** |
* The name of the severity used when producing machine output. |
*/ |
@@ -59,7 +53,7 @@ class ErrorSeverity implements 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 |
*/ |
- ErrorSeverity(this.name, this.ordinal, String machineCode, String displayName) { |
+ ErrorSeverity(String name, int ordinal, String machineCode, String displayName) : super(name, ordinal) { |
this._machineCode = machineCode; |
this._displayName = displayName; |
} |
@@ -85,9 +79,6 @@ class ErrorSeverity implements Enum<ErrorSeverity> { |
* @return the most sever of this or the given severity |
*/ |
ErrorSeverity max(ErrorSeverity severity) => this.ordinal >= severity.ordinal ? this : severity; |
- int compareTo(ErrorSeverity other) => ordinal - other.ordinal; |
- int get hashCode => ordinal; |
- String toString() => name; |
} |
/** |
* Instances of the class `AnalysisErrorWithProperties` |
@@ -283,6 +274,12 @@ class AnalysisError { |
String _message; |
/** |
+ * The correction to be displayed for this error, or `null` if there is no correction |
+ * information for this error. |
+ */ |
+ String _correction; |
+ |
+ /** |
* The source in which the error occurred, or `null` if unknown. |
*/ |
Source _source; |
@@ -299,6 +296,12 @@ class AnalysisError { |
int _length = 0; |
/** |
+ * A flag indicating whether this error can be shown to be a non-issue because of the result of |
+ * type propagation. |
+ */ |
+ bool _isStaticOnly2 = false; |
+ |
+ /** |
* Initialize a newly created analysis error for the specified source. The error has no location |
* information. |
* |
@@ -327,9 +330,21 @@ class AnalysisError { |
this._length = length; |
this._errorCode = errorCode; |
this._message = JavaString.format(errorCode.message, arguments); |
+ String correctionTemplate = errorCode.correction; |
+ if (correctionTemplate != null) { |
+ this._correction = JavaString.format(correctionTemplate, arguments); |
+ } |
} |
/** |
+ * 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. |
+ * |
+ * @return the template used to create the correction to be displayed for this error |
+ */ |
+ String get correction => _correction; |
+ |
+ /** |
* Return the error code associated with the error. |
* |
* @return the error code associated with the error |
@@ -345,9 +360,10 @@ class AnalysisError { |
int get length => _length; |
/** |
- * Return the localized error message. |
+ * Return the message to be displayed for this error. The message should indicate what is wrong |
+ * and why it is wrong. |
* |
- * @return the localized error message |
+ * @return the message to be displayed for this error |
*/ |
String get message => _message; |
@@ -382,6 +398,24 @@ class AnalysisError { |
} |
/** |
+ * Return `true` if this error can be shown to be a non-issue because of the result of type |
+ * propagation. |
+ * |
+ * @return `true` if this error can be shown to be a non-issue |
+ */ |
+ bool get isStaticOnly => _isStaticOnly2; |
+ |
+ /** |
+ * Set whether this error can be shown to be a non-issue because of the result of type propagation |
+ * to the given value. |
+ * |
+ * @param isStaticOnly `true` if this error can be shown to be a non-issue |
+ */ |
+ void set isStaticOnly(bool isStaticOnly2) { |
+ this._isStaticOnly2 = isStaticOnly2; |
+ } |
+ |
+ /** |
* Set the source in which the error occurred to the given source. |
* |
* @param source the source in which the error occurred |
@@ -405,7 +439,7 @@ class AnalysisError { |
* The enumeration `ErrorProperty` defines the properties that can be associated with an |
* [AnalysisError]. |
*/ |
-class ErrorProperty implements Enum<ErrorProperty> { |
+class ErrorProperty extends Enum<ErrorProperty> { |
/** |
* A property whose value is an array of [ExecutableElement] that should |
@@ -413,34 +447,25 @@ class ErrorProperty implements Enum<ErrorProperty> { |
*/ |
static final ErrorProperty UNIMPLEMENTED_METHODS = new ErrorProperty('UNIMPLEMENTED_METHODS', 0); |
static final List<ErrorProperty> values = [UNIMPLEMENTED_METHODS]; |
- |
- /// The name of this enum constant, as declared in the enum declaration. |
- final String name; |
- |
- /// The position in the enum declaration. |
- final int ordinal; |
- ErrorProperty(this.name, this.ordinal); |
- int compareTo(ErrorProperty other) => ordinal - other.ordinal; |
- int get hashCode => ordinal; |
- String toString() => name; |
+ ErrorProperty(String name, int ordinal) : super(name, ordinal); |
} |
/** |
* The enumeration `HintCode` defines the hints and coding recommendations for best practices |
* which are not mentioned in the Dart Language Specification. |
*/ |
-class HintCode implements Enum<HintCode>, ErrorCode { |
+class HintCode extends Enum<HintCode> implements ErrorCode { |
/** |
* Dead code is code that is never reached, this can happen for instance if a statement follows a |
* return statement. |
*/ |
- static final HintCode DEAD_CODE = new HintCode('DEAD_CODE', 0, "Dead code"); |
+ static final HintCode DEAD_CODE = new HintCode.con1('DEAD_CODE', 0, "Dead code"); |
/** |
* 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 final HintCode DEAD_CODE_CATCH_FOLLOWING_CATCH = new HintCode('DEAD_CODE_CATCH_FOLLOWING_CATCH', 1, "Dead code, catch clauses after a 'catch (e)' or an 'on Object catch (e)' are never reached"); |
+ static final HintCode DEAD_CODE_CATCH_FOLLOWING_CATCH = new HintCode.con1('DEAD_CODE_CATCH_FOLLOWING_CATCH', 1, "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 user has an on-catch |
@@ -449,53 +474,75 @@ class HintCode implements Enum<HintCode>, ErrorCode { |
* @param subtypeName name of the subtype |
* @param supertypeName name of the supertype |
*/ |
- static final HintCode DEAD_CODE_ON_CATCH_SUBTYPE = new HintCode('DEAD_CODE_ON_CATCH_SUBTYPE', 2, "Dead code, this on-catch block will never be executed since '%s' is a subtype of '%s'"); |
+ static final HintCode DEAD_CODE_ON_CATCH_SUBTYPE = new HintCode.con1('DEAD_CODE_ON_CATCH_SUBTYPE', 2, "Dead code, this on-catch block will never be executed since '%s' is a subtype of '%s'"); |
/** |
* Unused imports are imports which are never not used. |
*/ |
- static final HintCode UNUSED_IMPORT = new HintCode('UNUSED_IMPORT', 3, "Unused import"); |
+ static final HintCode UNUSED_IMPORT = new HintCode.con1('UNUSED_IMPORT', 3, "Unused import"); |
static final List<HintCode> values = [ |
DEAD_CODE, |
DEAD_CODE_CATCH_FOLLOWING_CATCH, |
DEAD_CODE_ON_CATCH_SUBTYPE, |
UNUSED_IMPORT]; |
- /// The name of this enum constant, as declared in the enum declaration. |
- final String name; |
- |
- /// The position in the enum declaration. |
- final int ordinal; |
- |
/** |
- * The message template used to create the message to be displayed for this error. |
+ * The template used to create the message to be displayed for this error. |
*/ |
String _message; |
/** |
+ * The template used to create the correction to be displayed for this error, or `null` if |
+ * there is no correction information for this error. |
+ */ |
+ String correction3; |
+ |
+ /** |
* Initialize a newly created error code to have the given message. |
* |
* @param message the message template used to create the message to be displayed for the error |
*/ |
- HintCode(this.name, this.ordinal, String message) { |
+ HintCode.con1(String name, int ordinal, String message) : super(name, ordinal) { |
this._message = message; |
} |
+ |
+ /** |
+ * Initialize a newly created error code to have the given message and correction. |
+ * |
+ * @param message the template used to create the message to be displayed for the error |
+ * @param correction the template used to create the correction to be displayed for the error |
+ */ |
+ HintCode.con2(String name, int ordinal, String message, String correction) : super(name, ordinal) { |
+ this._message = message; |
+ this.correction3 = correction; |
+ } |
+ String get correction => correction3; |
ErrorSeverity get errorSeverity => ErrorType.HINT.severity; |
String get message => _message; |
ErrorType get type => ErrorType.HINT; |
- int compareTo(HintCode other) => ordinal - other.ordinal; |
- int get hashCode => ordinal; |
- String toString() => name; |
} |
/** |
* The interface `ErrorCode` defines the behavior common to objects representing error codes |
* associated with [AnalysisError]. |
* |
+ * Generally, we want to provide messages that consist of three sentences: 1. what is wrong, 2. why |
+ * is it wrong, and 3. how do I fix it. However, we combine the first two in the result of |
+ * [getMessage] and the last in the result of [getCorrection]. |
+ * |
* @coverage dart.engine.error |
*/ |
abstract class ErrorCode { |
/** |
+ * Return the template used to create 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. |
+ * |
+ * @return the template used to create the correction to be displayed for this error |
+ */ |
+ String get correction; |
+ |
+ /** |
* Return the severity of this error. |
* |
* @return the severity of this error |
@@ -503,9 +550,10 @@ abstract class ErrorCode { |
ErrorSeverity get errorSeverity; |
/** |
- * Return the message template used to create the message to be displayed for this error. |
+ * Return the template used to create the message to be displayed for this error. The message |
+ * should indicate what is wrong and why it is wrong. |
* |
- * @return the message template used to create the message to be displayed for this error |
+ * @return the template used to create the message to be displayed for this error |
*/ |
String get message; |
@@ -521,7 +569,7 @@ abstract class ErrorCode { |
* |
* @coverage dart.engine.error |
*/ |
-class ErrorType implements Enum<ErrorType> { |
+class ErrorType extends Enum<ErrorType> { |
/** |
* Extra analysis run over the code to follow best practices, which are not in the Dart Language |
@@ -565,12 +613,6 @@ class ErrorType implements Enum<ErrorType> { |
STATIC_TYPE_WARNING, |
SYNTACTIC_ERROR]; |
- /// The name of this enum constant, as declared in the enum declaration. |
- final String name; |
- |
- /// The position in the enum declaration. |
- final int ordinal; |
- |
/** |
* The severity of this type of error. |
*/ |
@@ -581,7 +623,7 @@ class ErrorType implements Enum<ErrorType> { |
* |
* @param severity the severity of this type of error |
*/ |
- ErrorType(this.name, this.ordinal, ErrorSeverity severity) { |
+ ErrorType(String name, int ordinal, ErrorSeverity severity) : super(name, ordinal) { |
this._severity = severity; |
} |
@@ -591,9 +633,6 @@ class ErrorType implements Enum<ErrorType> { |
* @return the severity of this type of error |
*/ |
ErrorSeverity get severity => _severity; |
- int compareTo(ErrorType other) => ordinal - other.ordinal; |
- int get hashCode => ordinal; |
- String toString() => name; |
} |
/** |
* The enumeration `CompileTimeErrorCode` defines the error codes used for compile time |
@@ -603,7 +642,7 @@ class ErrorType implements Enum<ErrorType> { |
* |
* @coverage dart.engine.error |
*/ |
-class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
+class CompileTimeErrorCode extends Enum<CompileTimeErrorCode> implements ErrorCode { |
/** |
* 14.2 Exports: It is a compile-time error if a name <i>N</i> is re-exported by a library |
@@ -614,7 +653,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* @param firstLibraryName the name of the first library that the type is found |
* @param secondLibraryName the name of the second library that the type is found |
*/ |
- static final CompileTimeErrorCode AMBIGUOUS_EXPORT = new CompileTimeErrorCode('AMBIGUOUS_EXPORT', 0, "The element '%s' is defined in the libraries '%s' and '%s'"); |
+ static final CompileTimeErrorCode AMBIGUOUS_EXPORT = new CompileTimeErrorCode.con1('AMBIGUOUS_EXPORT', 0, "The element '%s' is defined in the libraries '%s' and '%s'"); |
/** |
* 12.33 Argument Definition Test: It is a compile time error if <i>v</i> does not denote a formal |
@@ -622,7 +661,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* @param the name of the identifier in the argument definition test that is not a parameter |
*/ |
- static final CompileTimeErrorCode ARGUMENT_DEFINITION_TEST_NON_PARAMETER = new CompileTimeErrorCode('ARGUMENT_DEFINITION_TEST_NON_PARAMETER', 1, "'%s' is not a parameter"); |
+ static final CompileTimeErrorCode ARGUMENT_DEFINITION_TEST_NON_PARAMETER = new CompileTimeErrorCode.con1('ARGUMENT_DEFINITION_TEST_NON_PARAMETER', 1, "'%s' is not a parameter"); |
/** |
* 12.14.2 Binding Actuals to Formals: In checked mode, it is a dynamic type error if |
@@ -635,57 +674,57 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* @param requiredCount the maximum number of positional arguments |
* @param argumentCount the actual number of positional arguments given |
*/ |
- static final CompileTimeErrorCode ARGUMENT_TYPE_NOT_ASSIGNABLE = new CompileTimeErrorCode('ARGUMENT_TYPE_NOT_ASSIGNABLE', 2, "The argument type '%s' cannot be assigned to the parameter type '%s'"); |
+ static final CompileTimeErrorCode ARGUMENT_TYPE_NOT_ASSIGNABLE = new CompileTimeErrorCode.con1('ARGUMENT_TYPE_NOT_ASSIGNABLE', 2, "The argument type '%s' cannot be assigned to the parameter type '%s'"); |
/** |
* 12.30 Identifier Reference: It is a compile-time error to use a built-in identifier other than |
* dynamic as a type annotation. |
*/ |
- static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE = new CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE', 3, "The built-in identifier '%s' cannot be as a type"); |
+ static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE = new CompileTimeErrorCode.con1('BUILT_IN_IDENTIFIER_AS_TYPE', 3, "The built-in identifier '%s' 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 final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_NAME = new CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE_NAME', 4, "The built-in identifier '%s' cannot be used as a type name"); |
+ static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_NAME = new CompileTimeErrorCode.con1('BUILT_IN_IDENTIFIER_AS_TYPE_NAME', 4, "The built-in identifier '%s' 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 final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME = new CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME', 5, "The built-in identifier '%s' cannot be used as a type alias name"); |
+ static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME = new CompileTimeErrorCode.con1('BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME', 5, "The built-in identifier '%s' 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 final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME = new CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME', 6, "The built-in identifier '%s' cannot be used as a type variable name"); |
+ static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME = new CompileTimeErrorCode.con1('BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME', 6, "The built-in identifier '%s' cannot be used as a type variable name"); |
/** |
* 13.9 Switch: It is a compile-time error if the class <i>C</i> implements the operator |
* <i>==</i>. |
*/ |
- static final CompileTimeErrorCode CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS = new CompileTimeErrorCode('CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS', 7, "The switch case expression type '%s' cannot override the == operator"); |
+ static final CompileTimeErrorCode CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS = new CompileTimeErrorCode.con1('CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS', 7, "The switch case expression type '%s' 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 final CompileTimeErrorCode COMPILE_TIME_CONSTANT_RAISES_EXCEPTION = new CompileTimeErrorCode('COMPILE_TIME_CONSTANT_RAISES_EXCEPTION', 8, ""); |
+ static final CompileTimeErrorCode COMPILE_TIME_CONSTANT_RAISES_EXCEPTION = new CompileTimeErrorCode.con1('COMPILE_TIME_CONSTANT_RAISES_EXCEPTION', 8, ""); |
/** |
* 7.2 Getters: It is a compile-time error if a class has both a getter and a method with the same |
* name. This restriction holds regardless of whether the getter is defined explicitly or |
* implicitly, or whether the getter or the method are inherited or not. |
*/ |
- static final CompileTimeErrorCode CONFLICTING_GETTER_AND_METHOD = new CompileTimeErrorCode('CONFLICTING_GETTER_AND_METHOD', 9, "Class '%s' cannot have both getter '%s.%s' and method with the same name"); |
+ static final CompileTimeErrorCode CONFLICTING_GETTER_AND_METHOD = new CompileTimeErrorCode.con1('CONFLICTING_GETTER_AND_METHOD', 9, "Class '%s' cannot have both getter '%s.%s' and method with the same name"); |
/** |
* 7.2 Getters: It is a compile-time error if a class has both a getter and a method with the same |
* name. This restriction holds regardless of whether the getter is defined explicitly or |
* implicitly, or whether the getter or the method are inherited or not. |
*/ |
- static final CompileTimeErrorCode CONFLICTING_METHOD_AND_GETTER = new CompileTimeErrorCode('CONFLICTING_METHOD_AND_GETTER', 10, "Class '%s' cannot have both method '%s.%s' and getter with the same name"); |
+ static final CompileTimeErrorCode CONFLICTING_METHOD_AND_GETTER = new CompileTimeErrorCode.con1('CONFLICTING_METHOD_AND_GETTER', 10, "Class '%s' cannot have both method '%s.%s' and getter with the same name"); |
/** |
* 7.6 Constructors: A constructor name always begins with the name of its immediately enclosing |
@@ -693,7 +732,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* compile-time error if <i>id</i> is the name of a member declared in the immediately enclosing |
* class. |
*/ |
- static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD = new CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD', 11, "'%s' cannot be used to name a constructor and a field in this class"); |
+ static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD = new CompileTimeErrorCode.con1('CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD', 11, "'%s' 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 immediately enclosing |
@@ -701,20 +740,20 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* compile-time error if <i>id</i> is the name of a member declared in the immediately enclosing |
* class. |
*/ |
- static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD = new CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD', 12, "'%s' cannot be used to name a constructor and a method in this class"); |
+ static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD = new CompileTimeErrorCode.con1('CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD', 12, "'%s' cannot be used to name a constructor and a method 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 final CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION = new CompileTimeErrorCode('CONST_CONSTRUCTOR_THROWS_EXCEPTION', 13, "'const' constructors cannot throw exceptions"); |
+ static final CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION = new CompileTimeErrorCode.con1('CONST_CONSTRUCTOR_THROWS_EXCEPTION', 13, "'const' constructors cannot throw exceptions"); |
/** |
* 7.6.3 Constant Constructors: The superinitializer that appears, explicitly or implicitly, in |
* the initializer list of a constant constructor must specify a constant constructor of the |
* superclass of the immediately enclosing class or a compile-time error occurs. |
*/ |
- static final CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER = new CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER', 14, "Constant constructor cannot call non-constant super constructor"); |
+ static final CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER = new CompileTimeErrorCode.con1('CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER', 14, "Constant constructor cannot call non-constant super constructor"); |
/** |
* 7.6.3 Constant Constructors: It is a compile-time error if a constant constructor is declared |
@@ -722,7 +761,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* The above refers to both locally declared and inherited instance variables. |
*/ |
- static final CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD = new CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD', 15, "Cannot define the 'const' constructor for a class with non-final fields"); |
+ static final CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD = new CompileTimeErrorCode.con1('CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD', 15, "Cannot define the 'const' constructor for a class with non-final fields"); |
/** |
* 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error if o is not |
@@ -735,63 +774,63 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* @param initializerType the name of the type of the initializer expression |
* @param fieldType the name of the type of the field |
*/ |
- static final CompileTimeErrorCode CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE = new CompileTimeErrorCode('CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE', 16, "The initializer type '%s' cannot be assigned to the field type '%s'"); |
+ static final CompileTimeErrorCode CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE = new CompileTimeErrorCode.con1('CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE', 16, "The initializer type '%s' cannot be assigned to the field type '%s'"); |
/** |
* 6.2 Formal Parameters: It is a compile-time error if a formal parameter is declared as a |
* constant variable. |
*/ |
- static final CompileTimeErrorCode CONST_FORMAL_PARAMETER = new CompileTimeErrorCode('CONST_FORMAL_PARAMETER', 17, "Parameters cannot be 'const'"); |
+ static final CompileTimeErrorCode CONST_FORMAL_PARAMETER = new CompileTimeErrorCode.con1('CONST_FORMAL_PARAMETER', 17, "Parameters cannot be 'const'"); |
/** |
* 5 Variables: A constant variable must be initialized to a compile-time constant or a |
* compile-time error occurs. |
*/ |
- static final CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE = new CompileTimeErrorCode('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', 18, "'const' variables must be constant value"); |
+ static final CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE = new CompileTimeErrorCode.con1('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', 18, "'const' variables must be constant value"); |
/** |
* 7.5 Instance Variables: It is a compile-time error if an instance variable is declared to be |
* constant. |
*/ |
- static final CompileTimeErrorCode CONST_INSTANCE_FIELD = new CompileTimeErrorCode('CONST_INSTANCE_FIELD', 19, "Only static fields can be declared as 'const'"); |
+ static final CompileTimeErrorCode CONST_INSTANCE_FIELD = new CompileTimeErrorCode.con1('CONST_INSTANCE_FIELD', 19, "Only static fields can be declared as 'const'"); |
/** |
* 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 final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = new CompileTimeErrorCode('CONST_EVAL_TYPE_BOOL', 20, "An expression of type 'bool' was expected"); |
+ static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = new CompileTimeErrorCode.con1('CONST_EVAL_TYPE_BOOL', 20, "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 final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_NUM_STRING = new CompileTimeErrorCode('CONST_EVAL_TYPE_BOOL_NUM_STRING', 21, "An expression of type 'bool', 'num', 'String' or 'null' was expected"); |
+ static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_NUM_STRING = new CompileTimeErrorCode.con1('CONST_EVAL_TYPE_BOOL_NUM_STRING', 21, "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 final CompileTimeErrorCode CONST_EVAL_TYPE_INT = new CompileTimeErrorCode('CONST_EVAL_TYPE_INT', 22, "An expression of type 'int' was expected"); |
+ static final CompileTimeErrorCode CONST_EVAL_TYPE_INT = new CompileTimeErrorCode.con1('CONST_EVAL_TYPE_INT', 22, "An expression of type 'int' was expected"); |
/** |
* 12.11.2 Const: An expression of one of the forms e, e1 + e2, e1 - e2, e1 * e2, e1 / e2, e1 ~/ |
* e2, e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are constant |
* expressions that evaluate to a numeric value or to null.. |
*/ |
- static final CompileTimeErrorCode CONST_EVAL_TYPE_NUM = new CompileTimeErrorCode('CONST_EVAL_TYPE_NUM', 23, "An expression of type 'num' was expected"); |
+ static final CompileTimeErrorCode CONST_EVAL_TYPE_NUM = new CompileTimeErrorCode.con1('CONST_EVAL_TYPE_NUM', 23, "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 final CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = new CompileTimeErrorCode('CONST_EVAL_THROWS_EXCEPTION', 24, "Evaluation of this constant expression causes exception"); |
+ static final CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = new CompileTimeErrorCode.con1('CONST_EVAL_THROWS_EXCEPTION', 24, "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 final CompileTimeErrorCode CONST_EVAL_THROWS_IDBZE = new CompileTimeErrorCode('CONST_EVAL_THROWS_IDBZE', 25, "Evaluation of this constant expression throws IntegerDivisionByZeroException"); |
+ static final CompileTimeErrorCode CONST_EVAL_THROWS_IDBZE = new CompileTimeErrorCode.con1('CONST_EVAL_THROWS_IDBZE', 25, "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>, …, |
@@ -804,7 +843,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS |
* @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS |
*/ |
- static final CompileTimeErrorCode CONST_WITH_INVALID_TYPE_PARAMETERS = new CompileTimeErrorCode('CONST_WITH_INVALID_TYPE_PARAMETERS', 26, "The type '%s' is declared with %d type parameters, but %d type arguments were given"); |
+ static final CompileTimeErrorCode CONST_WITH_INVALID_TYPE_PARAMETERS = new CompileTimeErrorCode.con1('CONST_WITH_INVALID_TYPE_PARAMETERS', 26, "The type '%s' is declared with %d type parameters, but %d type arguments were given"); |
/** |
* 12.11.2 Const: If <i>e</i> is of the form <i>const T(a<sub>1</sub>, …, a<sub>n</sub>, |
@@ -812,13 +851,13 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* compile-time error if the type <i>T</i> does not declare a constant constructor with the same |
* name as the declaration of <i>T</i>. |
*/ |
- static final CompileTimeErrorCode CONST_WITH_NON_CONST = new CompileTimeErrorCode('CONST_WITH_NON_CONST', 27, "The constructor being called is not a 'const' constructor"); |
+ static final CompileTimeErrorCode CONST_WITH_NON_CONST = new CompileTimeErrorCode.con1('CONST_WITH_NON_CONST', 27, "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 final CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = new CompileTimeErrorCode('CONST_WITH_NON_CONSTANT_ARGUMENT', 28, "Arguments of a constant creation must be constant expressions"); |
+ static final CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = new CompileTimeErrorCode.con1('CONST_WITH_NON_CONSTANT_ARGUMENT', 28, "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 accessible in the current |
@@ -831,12 +870,12 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* @param name the name of the non-type element |
*/ |
- static final CompileTimeErrorCode CONST_WITH_NON_TYPE = new CompileTimeErrorCode('CONST_WITH_NON_TYPE', 29, "The name '%s' is not a class"); |
+ static final CompileTimeErrorCode CONST_WITH_NON_TYPE = new CompileTimeErrorCode.con1('CONST_WITH_NON_TYPE', 29, "The name '%s' is not a class"); |
/** |
* 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type parameters. |
*/ |
- static final CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = new CompileTimeErrorCode('CONST_WITH_TYPE_PARAMETERS', 30, "The constant creation cannot use a type parameter"); |
+ static final CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = new CompileTimeErrorCode.con1('CONST_WITH_TYPE_PARAMETERS', 30, "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 a constant |
@@ -845,7 +884,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* @param typeName the name of the type |
* @param constructorName the name of the requested constant constructor |
*/ |
- static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR = new CompileTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR', 31, "The class '%s' does not have a constant constructor '%s'"); |
+ static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR = new CompileTimeErrorCode.con1('CONST_WITH_UNDEFINED_CONSTRUCTOR', 31, "The class '%s' does not have a constant constructor '%s'"); |
/** |
* 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of a constant |
@@ -853,26 +892,26 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* @param typeName the name of the type |
*/ |
- static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = new CompileTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 32, "The class '%s' does not have a default constant constructor"); |
+ static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = new CompileTimeErrorCode.con1('CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 32, "The class '%s' 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 final CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS = new CompileTimeErrorCode('DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS', 33, "Default values aren't allowed in typedefs"); |
+ static final CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS = new CompileTimeErrorCode.con1('DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS', 33, "Default values aren't allowed in typedefs"); |
/** |
* 6.2.1 Required Formals: By means of a function signature that names the parameter and describes |
* its type as a function type. It is a compile-time error if any default values are specified in |
* the signature of such a function type. |
*/ |
- static final CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER = new CompileTimeErrorCode('DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER', 34, "Default values aren't allowed in function type parameters"); |
+ static final CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER = new CompileTimeErrorCode.con1('DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER', 34, "Default values aren't allowed in function type parameters"); |
/** |
* 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 final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT = new CompileTimeErrorCode('DUPLICATE_CONSTRUCTOR_DEFAULT', 35, "The default constructor is already defined"); |
+ static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT = new CompileTimeErrorCode.con1('DUPLICATE_CONSTRUCTOR_DEFAULT', 35, "The default constructor is already defined"); |
/** |
* 3.1 Scoping: It is a compile-time error if there is more than one entity with the same name |
@@ -880,7 +919,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* @param duplicateName the name of the duplicate entity |
*/ |
- static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME = new CompileTimeErrorCode('DUPLICATE_CONSTRUCTOR_NAME', 36, "The constructor with name '%s' is already defined"); |
+ static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME = new CompileTimeErrorCode.con1('DUPLICATE_CONSTRUCTOR_NAME', 36, "The constructor with name '%s' is already defined"); |
/** |
* 3.1 Scoping: It is a compile-time error if there is more than one entity with the same name |
@@ -893,7 +932,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* @param duplicateName the name of the duplicate entity |
*/ |
- static final CompileTimeErrorCode DUPLICATE_DEFINITION = new CompileTimeErrorCode('DUPLICATE_DEFINITION', 37, "The name '%s' is already defined"); |
+ static final CompileTimeErrorCode DUPLICATE_DEFINITION = new CompileTimeErrorCode.con1('DUPLICATE_DEFINITION', 37, "The name '%s' is already defined"); |
/** |
* 7. Classes: It is a compile-time error if a class has an instance member and a static member |
@@ -905,21 +944,21 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* @param name the name of the conflicting members |
* @see #DUPLICATE_DEFINITION |
*/ |
- static final CompileTimeErrorCode DUPLICATE_DEFINITION_INHERITANCE = new CompileTimeErrorCode('DUPLICATE_DEFINITION_INHERITANCE', 38, "The name '%s' is already defined in '%s'"); |
+ static final CompileTimeErrorCode DUPLICATE_DEFINITION_INHERITANCE = new CompileTimeErrorCode.con1('DUPLICATE_DEFINITION_INHERITANCE', 38, "The name '%s' is already defined in '%s'"); |
/** |
* 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 final CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = new CompileTimeErrorCode('DUPLICATE_NAMED_ARGUMENT', 39, "The argument for the named parameter '%s' was already specified"); |
+ static final CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = new CompileTimeErrorCode.con1('DUPLICATE_NAMED_ARGUMENT', 39, "The argument for the named parameter '%s' was already specified"); |
/** |
* SDK implementation libraries can be exported only by other SDK libraries. |
* |
* @param uri the uri pointing to a library |
*/ |
- static final CompileTimeErrorCode EXPORT_INTERNAL_LIBRARY = new CompileTimeErrorCode('EXPORT_INTERNAL_LIBRARY', 40, "The library '%s' is internal and cannot be exported"); |
+ static final CompileTimeErrorCode EXPORT_INTERNAL_LIBRARY = new CompileTimeErrorCode.con1('EXPORT_INTERNAL_LIBRARY', 40, "The library '%s' is internal and cannot be exported"); |
/** |
* 14.2 Exports: It is a compile-time error if the compilation unit found at the specified URI is |
@@ -927,7 +966,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* @param uri the uri pointing to a non-library declaration |
*/ |
- static final CompileTimeErrorCode EXPORT_OF_NON_LIBRARY = new CompileTimeErrorCode('EXPORT_OF_NON_LIBRARY', 41, "The exported library '%s' must not have a part-of directive"); |
+ static final CompileTimeErrorCode EXPORT_OF_NON_LIBRARY = new CompileTimeErrorCode.con1('EXPORT_OF_NON_LIBRARY', 41, "The exported library '%s' must not have a part-of directive"); |
/** |
* 7.9 Superclasses: It is a compile-time error if the extends clause of a class <i>C</i> includes |
@@ -935,7 +974,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* @param typeName the name of the superclass that was not found |
*/ |
- static final CompileTimeErrorCode EXTENDS_NON_CLASS = new CompileTimeErrorCode('EXTENDS_NON_CLASS', 42, "Classes can only extend other classes"); |
+ static final CompileTimeErrorCode EXTENDS_NON_CLASS = new CompileTimeErrorCode.con1('EXTENDS_NON_CLASS', 42, "Classes can only extend other classes"); |
/** |
* 12.2 Null: It is a compile-time error for a class to attempt to extend or implement Null. |
@@ -954,7 +993,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* @param typeName the name of the type that cannot be extended |
* @see #IMPLEMENTS_DISALLOWED_CLASS |
*/ |
- static final CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = new CompileTimeErrorCode('EXTENDS_DISALLOWED_CLASS', 43, "Classes cannot extend '%s'"); |
+ static final CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = new CompileTimeErrorCode.con1('EXTENDS_DISALLOWED_CLASS', 43, "Classes cannot extend '%s'"); |
/** |
* 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i> or if <i>m > |
@@ -966,21 +1005,21 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* @param requiredCount the maximum number of positional arguments |
* @param argumentCount the actual number of positional arguments given |
*/ |
- static final CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS = new CompileTimeErrorCode('EXTRA_POSITIONAL_ARGUMENTS', 44, "%d positional arguments expected, but %d found"); |
+ static final CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS = new CompileTimeErrorCode.con1('EXTRA_POSITIONAL_ARGUMENTS', 44, "%d positional arguments expected, but %d 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 final CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS = new CompileTimeErrorCode('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 45, "The field '%s' cannot be initialized twice in the same constructor"); |
+ static final CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS = new CompileTimeErrorCode.con1('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 45, "The field '%s' cannot be initialized twice in the same constructor"); |
/** |
* 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile time |
* error if <i>k</i>'s initializer list contains an initializer for a variable that is initialized |
* by means of an initializing formal of <i>k</i>. |
*/ |
- static final CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER', 46, "Fields cannot be initialized in both the parameter list and the initializers"); |
+ static final CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER = new CompileTimeErrorCode.con1('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER', 46, "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 has is initialized by |
@@ -989,19 +1028,19 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* @param name the name of the field in question |
*/ |
- static final CompileTimeErrorCode FINAL_INITIALIZED_MULTIPLE_TIMES = new CompileTimeErrorCode('FINAL_INITIALIZED_MULTIPLE_TIMES', 47, "'%s' is a final field and so can only be set once"); |
+ static final CompileTimeErrorCode FINAL_INITIALIZED_MULTIPLE_TIMES = new CompileTimeErrorCode.con1('FINAL_INITIALIZED_MULTIPLE_TIMES', 47, "'%s' 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 final CompileTimeErrorCode FIELD_INITIALIZER_FACTORY_CONSTRUCTOR = new CompileTimeErrorCode('FIELD_INITIALIZER_FACTORY_CONSTRUCTOR', 48, "Initializing formal fields cannot be used in factory constructors"); |
+ static final CompileTimeErrorCode FIELD_INITIALIZER_FACTORY_CONSTRUCTOR = new CompileTimeErrorCode.con1('FIELD_INITIALIZER_FACTORY_CONSTRUCTOR', 48, "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 final CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new CompileTimeErrorCode('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 49, "Initializing formal fields can only be used in constructors"); |
+ static final CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new CompileTimeErrorCode.con1('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 49, "Initializing formal fields can only be used in constructors"); |
/** |
* 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its |
@@ -1010,7 +1049,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* 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 final CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR = new CompileTimeErrorCode('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', 50, "The redirecting constructor cannot have a field initializer"); |
+ static final CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR = new CompileTimeErrorCode.con1('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', 50, "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 method with the same |
@@ -1018,7 +1057,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* @param name the conflicting name of the getter and method |
*/ |
- static final CompileTimeErrorCode GETTER_AND_METHOD_WITH_SAME_NAME = new CompileTimeErrorCode('GETTER_AND_METHOD_WITH_SAME_NAME', 51, "'%s' cannot be used to name a getter, there is already a method with the same name"); |
+ static final CompileTimeErrorCode GETTER_AND_METHOD_WITH_SAME_NAME = new CompileTimeErrorCode.con1('GETTER_AND_METHOD_WITH_SAME_NAME', 51, "'%s' cannot be used to name a getter, there is already a method with the same name"); |
/** |
* 12.2 Null: It is a compile-time error for a class to attempt to extend or implement Null. |
@@ -1037,13 +1076,13 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* @param typeName the name of the type that cannot be implemented |
* @see #EXTENDS_DISALLOWED_CLASS |
*/ |
- static final CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = new CompileTimeErrorCode('IMPLEMENTS_DISALLOWED_CLASS', 52, "Classes cannot implement '%s'"); |
+ static final CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = new CompileTimeErrorCode.con1('IMPLEMENTS_DISALLOWED_CLASS', 52, "Classes cannot implement '%s'"); |
/** |
* 7.10 Superinterfaces: It is a compile-time error if the implements clause of a class includes |
* type dynamic. |
*/ |
- static final CompileTimeErrorCode IMPLEMENTS_DYNAMIC = new CompileTimeErrorCode('IMPLEMENTS_DYNAMIC', 53, "Classes cannot implement 'dynamic'"); |
+ static final CompileTimeErrorCode IMPLEMENTS_DYNAMIC = new CompileTimeErrorCode.con1('IMPLEMENTS_DYNAMIC', 53, "Classes cannot implement 'dynamic'"); |
/** |
* 7.10 Superinterfaces: It is a compile-time error if the implements clause of a class <i>C</i> |
@@ -1052,7 +1091,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* @param typeName the name of the interface that was not found |
*/ |
- static final CompileTimeErrorCode IMPLEMENTS_NON_CLASS = new CompileTimeErrorCode('IMPLEMENTS_NON_CLASS', 54, "Classes can only implement other classes"); |
+ static final CompileTimeErrorCode IMPLEMENTS_NON_CLASS = new CompileTimeErrorCode.con1('IMPLEMENTS_NON_CLASS', 54, "Classes can only implement other classes"); |
/** |
* 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears more than once in |
@@ -1060,7 +1099,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* @param className the name of the class that is implemented more than once |
*/ |
- static final CompileTimeErrorCode IMPLEMENTS_REPEATED = new CompileTimeErrorCode('IMPLEMENTS_REPEATED', 55, "'%s' can only be implemented once"); |
+ static final CompileTimeErrorCode IMPLEMENTS_REPEATED = new CompileTimeErrorCode.con1('IMPLEMENTS_REPEATED', 55, "'%s' can only be implemented once"); |
/** |
* 7.10 Superinterfaces: It is a compile-time error if the superclass of a class <i>C</i> appears |
@@ -1068,7 +1107,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* @param className the name of the class that appears in both "extends" and "implements" clauses |
*/ |
- static final CompileTimeErrorCode IMPLEMENTS_SUPER_CLASS = new CompileTimeErrorCode('IMPLEMENTS_SUPER_CLASS', 56, "'%s' cannot be used in both 'extends' and 'implements' clauses"); |
+ static final CompileTimeErrorCode IMPLEMENTS_SUPER_CLASS = new CompileTimeErrorCode.con1('IMPLEMENTS_SUPER_CLASS', 56, "'%s' 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 right hand side of |
@@ -1080,14 +1119,14 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* @param name the name of the type in question |
*/ |
- static final CompileTimeErrorCode IMPLICIT_THIS_REFERENCE_IN_INITIALIZER = new CompileTimeErrorCode('IMPLICIT_THIS_REFERENCE_IN_INITIALIZER', 57, "The 'this' expression cannot be implicitly used in initializers"); |
+ static final CompileTimeErrorCode IMPLICIT_THIS_REFERENCE_IN_INITIALIZER = new CompileTimeErrorCode.con1('IMPLICIT_THIS_REFERENCE_IN_INITIALIZER', 57, "The 'this' expression cannot be implicitly used in initializers"); |
/** |
* SDK implementation libraries can be imported only by other SDK libraries. |
* |
* @param uri the uri pointing to a library |
*/ |
- static final CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY = new CompileTimeErrorCode('IMPORT_INTERNAL_LIBRARY', 58, "The library '%s' is internal and cannot be imported"); |
+ static final CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY = new CompileTimeErrorCode.con1('IMPORT_INTERNAL_LIBRARY', 58, "The library '%s' is internal and cannot be imported"); |
/** |
* 14.1 Imports: It is a compile-time error if the compilation unit found at the specified URI is |
@@ -1095,7 +1134,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* @param uri the uri pointing to a non-library declaration |
*/ |
- static final CompileTimeErrorCode IMPORT_OF_NON_LIBRARY = new CompileTimeErrorCode('IMPORT_OF_NON_LIBRARY', 59, "The imported library '%s' must not have a part-of directive"); |
+ static final CompileTimeErrorCode IMPORT_OF_NON_LIBRARY = new CompileTimeErrorCode.con1('IMPORT_OF_NON_LIBRARY', 59, "The imported library '%s' must not have a part-of directive"); |
/** |
* 13.9 Switch: It is a compile-time error if values of the expressions <i>e<sub>k</sub></i> are |
@@ -1104,7 +1143,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* @param expressionSource the expression source code that is the unexpected type |
* @param expectedType the name of the expected type |
*/ |
- static final CompileTimeErrorCode INCONSISTENT_CASE_EXPRESSION_TYPES = new CompileTimeErrorCode('INCONSISTENT_CASE_EXPRESSION_TYPES', 60, "Case expressions must have the same types, '%s' is not a %s'"); |
+ static final CompileTimeErrorCode INCONSISTENT_CASE_EXPRESSION_TYPES = new CompileTimeErrorCode.con1('INCONSISTENT_CASE_EXPRESSION_TYPES', 60, "Case expressions must have the same types, '%s' is not a %s'"); |
/** |
* 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile-time |
@@ -1115,7 +1154,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* immediately enclosing class |
* @see #INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD |
*/ |
- static final CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTANT_FIELD = new CompileTimeErrorCode('INITIALIZER_FOR_NON_EXISTANT_FIELD', 61, "'%s' is not a variable in the enclosing class"); |
+ static final CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTANT_FIELD = new CompileTimeErrorCode.con1('INITIALIZER_FOR_NON_EXISTANT_FIELD', 61, "'%s' is not a variable in the enclosing class"); |
/** |
* 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile-time |
@@ -1126,7 +1165,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* enclosing class |
* @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD |
*/ |
- static final CompileTimeErrorCode INITIALIZER_FOR_STATIC_FIELD = new CompileTimeErrorCode('INITIALIZER_FOR_STATIC_FIELD', 62, "'%s' is a static variable in the enclosing class, variables initialized in a constructor cannot be static"); |
+ static final CompileTimeErrorCode INITIALIZER_FOR_STATIC_FIELD = new CompileTimeErrorCode.con1('INITIALIZER_FOR_STATIC_FIELD', 62, "'%s' 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 <i>this.id</i>. It is a |
@@ -1138,7 +1177,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD |
* @see #INITIALIZER_FOR_NON_EXISTANT_FIELD |
*/ |
- static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD = new CompileTimeErrorCode('INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD', 63, "'%s' is not a variable in the enclosing class"); |
+ static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD = new CompileTimeErrorCode.con1('INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD', 63, "'%s' is not a variable in the enclosing class"); |
/** |
* 7.6.1 Generative Constructors: An initializing formal has the form <i>this.id</i>. It is a |
@@ -1149,20 +1188,20 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* enclosing class |
* @see #INITIALIZER_FOR_STATIC_FIELD |
*/ |
- static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_STATIC_FIELD = new CompileTimeErrorCode('INITIALIZING_FORMAL_FOR_STATIC_FIELD', 64, "'%s' is a static variable in the enclosing class, variables initialized in a constructor cannot be static"); |
+ static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_STATIC_FIELD = new CompileTimeErrorCode.con1('INITIALIZING_FORMAL_FOR_STATIC_FIELD', 64, "'%s' is a static variable in the enclosing class, variables 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 final CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_STATIC = new CompileTimeErrorCode('INSTANCE_MEMBER_ACCESS_FROM_STATIC', 65, "Instance member cannot be accessed from static method"); |
+ static final CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_STATIC = new CompileTimeErrorCode.con1('INSTANCE_MEMBER_ACCESS_FROM_STATIC', 65, "Instance member cannot be accessed from static method"); |
/** |
* 11 Metadata: Metadata consists of a series of annotations, each of which begin with the |
* character @, followed by a constant expression that must be either a reference to a |
* compile-time constant variable, or a call to a constant constructor. |
*/ |
- static final CompileTimeErrorCode INVALID_ANNOTATION = new CompileTimeErrorCode('INVALID_ANNOTATION', 66, "Annotation can be only constant variable or constant constructor invocation"); |
+ static final CompileTimeErrorCode INVALID_ANNOTATION = new CompileTimeErrorCode.con1('INVALID_ANNOTATION', 66, "Annotation can be only constant variable or constant constructor invocation"); |
/** |
* TODO(brianwilkerson) Remove this when we have decided on how to report errors in compile-time |
@@ -1170,26 +1209,26 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* See TODOs in ConstantVisitor |
*/ |
- static final CompileTimeErrorCode INVALID_CONSTANT = new CompileTimeErrorCode('INVALID_CONSTANT', 67, "Invalid constant value"); |
+ static final CompileTimeErrorCode INVALID_CONSTANT = new CompileTimeErrorCode.con1('INVALID_CONSTANT', 67, "Invalid constant value"); |
/** |
* 7.6 Constructors: It is a compile-time error if the name of a constructor is not a constructor |
* name. |
*/ |
- static final CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = new CompileTimeErrorCode('INVALID_CONSTRUCTOR_NAME', 68, "Invalid constructor name"); |
+ static final CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = new CompileTimeErrorCode.con1('INVALID_CONSTRUCTOR_NAME', 68, "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 final CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS = new CompileTimeErrorCode('INVALID_FACTORY_NAME_NOT_A_CLASS', 69, "The name of the immediately enclosing class expected"); |
+ static final CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS = new CompileTimeErrorCode.con1('INVALID_FACTORY_NAME_NOT_A_CLASS', 69, "The name of the immediately enclosing class expected"); |
/** |
* 12.10 This: It is a compile-time error if this appears in a top-level function or variable |
* initializer, in a factory constructor, or in a static method or variable initializer, or in the |
* initializer of an instance variable. |
*/ |
- static final CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = new CompileTimeErrorCode('INVALID_REFERENCE_TO_THIS', 70, "Invalid reference to 'this' expression"); |
+ static final CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = new CompileTimeErrorCode.con1('INVALID_REFERENCE_TO_THIS', 70, "Invalid reference to 'this' expression"); |
/** |
* 12.6 Lists: It is a compile time error if the type argument of a constant list literal includes |
@@ -1197,7 +1236,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* @name the name of the type parameter |
*/ |
- static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST = new CompileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_LIST', 71, "Constant list literals cannot include a type parameter as a type argument, such as '%s'"); |
+ static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST = new CompileTimeErrorCode.con1('INVALID_TYPE_ARGUMENT_IN_CONST_LIST', 71, "Constant list literals cannot include a type parameter as a type argument, such as '%s'"); |
/** |
* 12.7 Maps: It is a compile time error if the type arguments of a constant map literal include a |
@@ -1205,7 +1244,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* @name the name of the type parameter |
*/ |
- static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = new CompileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 72, "Constant map literals cannot include a type parameter as a type argument, such as '%s'"); |
+ static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = new CompileTimeErrorCode.con1('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 72, "Constant map literals cannot include a type parameter as a type argument, such as '%s'"); |
/** |
* 14.2 Exports: It is a compile-time error if the compilation unit found at the specified URI is |
@@ -1220,7 +1259,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* @param uri the URI that is invalid |
* @see #URI_DOES_NOT_EXIST |
*/ |
- static final CompileTimeErrorCode INVALID_URI = new CompileTimeErrorCode('INVALID_URI', 73, "Invalid URI syntax: '%s'"); |
+ static final CompileTimeErrorCode INVALID_URI = new CompileTimeErrorCode.con1('INVALID_URI', 73, "Invalid URI syntax: '%s'"); |
/** |
* 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</sub></i> exists within |
@@ -1231,7 +1270,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* @param labelName the name of the unresolvable label |
*/ |
- static final CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = new CompileTimeErrorCode('LABEL_IN_OUTER_SCOPE', 74, "Cannot reference label '%s' declared in an outer method"); |
+ static final CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = new CompileTimeErrorCode.con1('LABEL_IN_OUTER_SCOPE', 74, "Cannot reference label '%s' declared in an outer method"); |
/** |
* 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</sub></i> exists within |
@@ -1242,7 +1281,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* @param labelName the name of the unresolvable label |
*/ |
- static final CompileTimeErrorCode LABEL_UNDEFINED = new CompileTimeErrorCode('LABEL_UNDEFINED', 75, "Cannot reference undefined label '%s'"); |
+ static final CompileTimeErrorCode LABEL_UNDEFINED = new CompileTimeErrorCode.con1('LABEL_UNDEFINED', 75, "Cannot reference undefined label '%s'"); |
/** |
* 12.6 Lists: A run-time list literal <<i>E</i>> [<i>e<sub>1</sub></i> ... |
@@ -1258,7 +1297,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<sub>j</sub>, 1 <= |
* j <= m</i>. |
*/ |
- static final CompileTimeErrorCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = new CompileTimeErrorCode('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 76, "The element type '%s' cannot be assigned to the list type '%s'"); |
+ static final CompileTimeErrorCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = new CompileTimeErrorCode.con1('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 76, "The element type '%s' cannot be assigned to the list type '%s'"); |
/** |
* 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</sub></i> : |
@@ -1274,7 +1313,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<sub>j</sub>, 1 <= |
* j <= m</i>. |
*/ |
- static final CompileTimeErrorCode MAP_KEY_TYPE_NOT_ASSIGNABLE = new CompileTimeErrorCode('MAP_KEY_TYPE_NOT_ASSIGNABLE', 77, "The element type '%s' cannot be assigned to the map key type '%s'"); |
+ static final CompileTimeErrorCode MAP_KEY_TYPE_NOT_ASSIGNABLE = new CompileTimeErrorCode.con1('MAP_KEY_TYPE_NOT_ASSIGNABLE', 77, "The element type '%s' cannot be assigned to the map key type '%s'"); |
/** |
* 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</sub></i> : |
@@ -1290,13 +1329,13 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<sub>j</sub>, 1 <= |
* j <= m</i>. |
*/ |
- static final CompileTimeErrorCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = new CompileTimeErrorCode('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 78, "The element type '%s' cannot be assigned to the map value type '%s'"); |
+ static final CompileTimeErrorCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = new CompileTimeErrorCode.con1('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 78, "The element type '%s' cannot be assigned to the map value type '%s'"); |
/** |
* 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 final CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = new CompileTimeErrorCode('MEMBER_WITH_CLASS_NAME', 79, "Class members cannot have the same name as the enclosing class"); |
+ static final CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = new CompileTimeErrorCode.con1('MEMBER_WITH_CLASS_NAME', 79, "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 method with the same |
@@ -1304,17 +1343,17 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* @param name the conflicting name of the getter and method |
*/ |
- static final CompileTimeErrorCode METHOD_AND_GETTER_WITH_SAME_NAME = new CompileTimeErrorCode('METHOD_AND_GETTER_WITH_SAME_NAME', 80, "'%s' cannot be used to name a method, there is already a getter with the same name"); |
+ static final CompileTimeErrorCode METHOD_AND_GETTER_WITH_SAME_NAME = new CompileTimeErrorCode.con1('METHOD_AND_GETTER_WITH_SAME_NAME', 80, "'%s' 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 final CompileTimeErrorCode MISSING_CONST_IN_LIST_LITERAL = new CompileTimeErrorCode('MISSING_CONST_IN_LIST_LITERAL', 81, "List literals must be prefixed with 'const' when used as a constant expression"); |
+ static final CompileTimeErrorCode MISSING_CONST_IN_LIST_LITERAL = new CompileTimeErrorCode.con1('MISSING_CONST_IN_LIST_LITERAL', 81, "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 final CompileTimeErrorCode MISSING_CONST_IN_MAP_LITERAL = new CompileTimeErrorCode('MISSING_CONST_IN_MAP_LITERAL', 82, "Map literals must be prefixed with 'const' when used as a constant expression"); |
+ static final CompileTimeErrorCode MISSING_CONST_IN_MAP_LITERAL = new CompileTimeErrorCode.con1('MISSING_CONST_IN_MAP_LITERAL', 82, "Map literals must be prefixed with 'const' when used as a constant expression"); |
/** |
* 9 Mixins: It is a compile-time error if a declared or derived mixin explicitly declares a |
@@ -1322,7 +1361,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* @param typeName the name of the mixin that is invalid |
*/ |
- static final CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = new CompileTimeErrorCode('MIXIN_DECLARES_CONSTRUCTOR', 83, "The class '%s' cannot be used as a mixin because it declares a constructor"); |
+ static final CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = new CompileTimeErrorCode.con1('MIXIN_DECLARES_CONSTRUCTOR', 83, "The class '%s' cannot be used as a mixin because it declares a constructor"); |
/** |
* 9 Mixins: It is a compile-time error if a mixin is derived from a class whose superclass is not |
@@ -1330,7 +1369,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* @param typeName the name of the mixin that is invalid |
*/ |
- static final CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = new CompileTimeErrorCode('MIXIN_INHERITS_FROM_NOT_OBJECT', 84, "The class '%s' cannot be used as a mixin because it extends a class other than Object"); |
+ static final CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = new CompileTimeErrorCode.con1('MIXIN_INHERITS_FROM_NOT_OBJECT', 84, "The class '%s' 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 implement Null. |
@@ -1349,43 +1388,43 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* @param typeName the name of the type that cannot be extended |
* @see #IMPLEMENTS_DISALLOWED_CLASS |
*/ |
- static final CompileTimeErrorCode MIXIN_OF_DISALLOWED_CLASS = new CompileTimeErrorCode('MIXIN_OF_DISALLOWED_CLASS', 85, "Classes cannot mixin '%s'"); |
+ static final CompileTimeErrorCode MIXIN_OF_DISALLOWED_CLASS = new CompileTimeErrorCode.con1('MIXIN_OF_DISALLOWED_CLASS', 85, "Classes cannot mixin '%s'"); |
/** |
* 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 final CompileTimeErrorCode MIXIN_OF_NON_CLASS = new CompileTimeErrorCode('MIXIN_OF_NON_CLASS', 86, "Classes can only mixin other classes"); |
+ static final CompileTimeErrorCode MIXIN_OF_NON_CLASS = new CompileTimeErrorCode.con1('MIXIN_OF_NON_CLASS', 86, "Classes can only mixin other classes"); |
/** |
* 9 Mixins: It is a compile-time error if a declared or derived mixin refers to super. |
*/ |
- static final CompileTimeErrorCode MIXIN_REFERENCES_SUPER = new CompileTimeErrorCode('MIXIN_REFERENCES_SUPER', 87, "The class '%s' cannot be used as a mixin because it references 'super'"); |
+ static final CompileTimeErrorCode MIXIN_REFERENCES_SUPER = new CompileTimeErrorCode.con1('MIXIN_REFERENCES_SUPER', 87, "The class '%s' 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 final CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = new CompileTimeErrorCode('MIXIN_WITH_NON_CLASS_SUPERCLASS', 88, "Mixin can only be applied to class"); |
+ static final CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = new CompileTimeErrorCode.con1('MIXIN_WITH_NON_CLASS_SUPERCLASS', 88, "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 final CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS = new CompileTimeErrorCode('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS', 89, "Constructor may have at most one 'this' redirection"); |
+ static final CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS = new CompileTimeErrorCode.con1('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS', 89, "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 final CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = new CompileTimeErrorCode('MULTIPLE_SUPER_INITIALIZERS', 90, "Constructor may have at most one 'super' initializer"); |
+ static final CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = new CompileTimeErrorCode.con1('MULTIPLE_SUPER_INITIALIZERS', 90, "Constructor may have at most one 'super' initializer"); |
/** |
* 11 Metadata: Metadata consists of a series of annotations, each of which begin with the |
* character @, followed by a constant expression that must be either a reference to a |
* compile-time constant variable, or a call to a constant constructor. |
*/ |
- static final CompileTimeErrorCode NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS = new CompileTimeErrorCode('NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS', 91, "Annotation creation must have arguments"); |
+ static final CompileTimeErrorCode NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS = new CompileTimeErrorCode.con1('NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS', 91, "Annotation creation must have arguments"); |
/** |
* 7.6.1 Generative Constructors: If no superinitializer is provided, an implicit superinitializer |
@@ -1395,7 +1434,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i> does not declare a |
* generative constructor named <i>S</i> (respectively <i>S.id</i>) |
*/ |
- static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT = new CompileTimeErrorCode('NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT', 92, "The class '%s' does not have a default constructor"); |
+ static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT = new CompileTimeErrorCode.con1('NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT', 92, "The class '%s' does not have a default constructor"); |
/** |
* 7.6 Constructors: Iff no constructor is specified for a class <i>C</i>, it implicitly has a |
@@ -1404,13 +1443,13 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i> does not declare a |
* generative constructor named <i>S</i> (respectively <i>S.id</i>) |
*/ |
- static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT = new CompileTimeErrorCode('NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT', 93, "The class '%s' does not have a default constructor"); |
+ static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT = new CompileTimeErrorCode.con1('NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT', 93, "The class '%s' 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 final CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = new CompileTimeErrorCode('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 94, "A non-constant map literal without type arguments cannot be used as an expression statement"); |
+ static final CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = new CompileTimeErrorCode.con1('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 94, "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) { label<sub>11</sub> … |
@@ -1421,44 +1460,44 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* s<sub>n</sub>}</i>, it is a 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 final CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = new CompileTimeErrorCode('NON_CONSTANT_CASE_EXPRESSION', 95, "Case expressions must be constant"); |
+ static final CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = new CompileTimeErrorCode.con1('NON_CONSTANT_CASE_EXPRESSION', 95, "Case expressions must be constant"); |
/** |
* 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 final CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = new CompileTimeErrorCode('NON_CONSTANT_DEFAULT_VALUE', 96, "Default values of an optional parameter must be constant"); |
+ static final CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = new CompileTimeErrorCode.con1('NON_CONSTANT_DEFAULT_VALUE', 96, "Default values of an optional parameter must be constant"); |
/** |
* 12.6 Lists: It is a compile time error if an element of a constant list literal is not a |
* compile-time constant. |
*/ |
- static final CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = new CompileTimeErrorCode('NON_CONSTANT_LIST_ELEMENT', 97, "'const' lists must have all constant values"); |
+ static final CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = new CompileTimeErrorCode.con1('NON_CONSTANT_LIST_ELEMENT', 97, "'const' lists must have all constant values"); |
/** |
* 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 final CompileTimeErrorCode NON_CONSTANT_MAP_KEY = new CompileTimeErrorCode('NON_CONSTANT_MAP_KEY', 98, "The keys in a map must be constant"); |
+ static final CompileTimeErrorCode NON_CONSTANT_MAP_KEY = new CompileTimeErrorCode.con1('NON_CONSTANT_MAP_KEY', 98, "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 entry in a constant map |
* literal is not a compile-time constant. |
*/ |
- static final CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = new CompileTimeErrorCode('NON_CONSTANT_MAP_VALUE', 99, "The values in a 'const' map must be constant"); |
+ static final CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = new CompileTimeErrorCode.con1('NON_CONSTANT_MAP_VALUE', 99, "The values in a 'const' map must be constant"); |
/** |
* 11 Metadata: Metadata consists of a series of annotations, each of which begin with the |
* character @, followed by a constant expression that must be either a reference to a |
* compile-time constant variable, or a call to a constant constructor. |
*/ |
- static final CompileTimeErrorCode NON_CONSTANT_ANNOTATION_CONSTRUCTOR = new CompileTimeErrorCode('NON_CONSTANT_ANNOTATION_CONSTRUCTOR', 100, "Annotation creation can use only 'const' constructor"); |
+ static final CompileTimeErrorCode NON_CONSTANT_ANNOTATION_CONSTRUCTOR = new CompileTimeErrorCode.con1('NON_CONSTANT_ANNOTATION_CONSTRUCTOR', 100, "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 final CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = new CompileTimeErrorCode('NON_CONSTANT_VALUE_IN_INITIALIZER', 101, "Initializer expressions in constant constructors must be constants"); |
+ static final CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = new CompileTimeErrorCode.con1('NON_CONSTANT_VALUE_IN_INITIALIZER', 101, "Initializer expressions in constant constructors must be constants"); |
/** |
* 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i> or if <i>m > n</i>. |
@@ -1469,7 +1508,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* @param requiredCount the expected number of required arguments |
* @param argumentCount the actual number of positional arguments given |
*/ |
- static final CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new CompileTimeErrorCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', 102, "%d required argument(s) expected, but %d found"); |
+ static final CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new CompileTimeErrorCode.con1('NOT_ENOUGH_REQUIRED_ARGUMENTS', 102, "%d required argument(s) expected, but %d found"); |
/** |
* 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the superinitializer appears |
@@ -1477,17 +1516,17 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* a compile-time error if class <i>S</i> does not declare a generative constructor named <i>S</i> |
* (respectively <i>S.id</i>) |
*/ |
- static final CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR = new CompileTimeErrorCode('NON_GENERATIVE_CONSTRUCTOR', 103, "The generative constructor '%s' expected, but factory found"); |
+ static final CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR = new CompileTimeErrorCode.con1('NON_GENERATIVE_CONSTRUCTOR', 103, "The generative constructor '%s' expected, but factory found"); |
/** |
* 7.9 Superclasses: It is a compile-time error to specify an extends clause for class Object. |
*/ |
- static final CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = new CompileTimeErrorCode('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 104, ""); |
+ static final CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = new CompileTimeErrorCode.con1('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 104, ""); |
/** |
* 7.1.1 Operators: It is a compile-time error to declare an optional parameter in an operator. |
*/ |
- static final CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = new CompileTimeErrorCode('OPTIONAL_PARAMETER_IN_OPERATOR', 105, "Optional parameters are not allowed when defining an operator"); |
+ static final CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = new CompileTimeErrorCode.con1('OPTIONAL_PARAMETER_IN_OPERATOR', 105, "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 valid part |
@@ -1495,25 +1534,25 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* @param uri the uri pointing to a non-library declaration |
*/ |
- static final CompileTimeErrorCode PART_OF_NON_PART = new CompileTimeErrorCode('PART_OF_NON_PART', 106, "The included part '%s' must have a part-of directive"); |
+ static final CompileTimeErrorCode PART_OF_NON_PART = new CompileTimeErrorCode.con1('PART_OF_NON_PART', 106, "The included part '%s' 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 final CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = new CompileTimeErrorCode('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 107, "The name '%s' is already used as an import prefix and cannot be used to name a top-level element"); |
+ static final CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = new CompileTimeErrorCode.con1('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 107, "The name '%s' 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 final CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = new CompileTimeErrorCode('PRIVATE_OPTIONAL_PARAMETER', 108, "Named optional parameters cannot start with an underscore"); |
+ static final CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = new CompileTimeErrorCode.con1('PRIVATE_OPTIONAL_PARAMETER', 108, "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 final CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = new CompileTimeErrorCode('RECURSIVE_COMPILE_TIME_CONSTANT', 109, ""); |
+ static final CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = new CompileTimeErrorCode.con1('RECURSIVE_COMPILE_TIME_CONSTANT', 109, ""); |
/** |
* 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its |
@@ -1524,13 +1563,13 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* https://code.google.com/p/dart/issues/detail?id=954 |
*/ |
- static final CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = new CompileTimeErrorCode('RECURSIVE_CONSTRUCTOR_REDIRECT', 110, "Cycle in redirecting generative constructors"); |
+ static final CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = new CompileTimeErrorCode.con1('RECURSIVE_CONSTRUCTOR_REDIRECT', 110, "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 final CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = new CompileTimeErrorCode('RECURSIVE_FACTORY_REDIRECT', 111, "Cycle in redirecting factory constructors"); |
+ static final CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = new CompileTimeErrorCode.con1('RECURSIVE_FACTORY_REDIRECT', 111, "Cycle in redirecting factory constructors"); |
/** |
* 7.10 Superinterfaces: It is a compile-time error if the interface of a class <i>C</i> is a |
@@ -1543,7 +1582,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* @param className the name of the class that implements itself recursively |
* @param strImplementsPath a string representation of the implements loop |
*/ |
- static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE', 112, "'%s' cannot be a superinterface of itself: %s"); |
+ static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = new CompileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE', 112, "'%s' cannot be a superinterface of itself: %s"); |
/** |
* 7.10 Superinterfaces: It is a compile-time error if the interface of a class <i>C</i> is a |
@@ -1555,7 +1594,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* @param className the name of the class that implements itself recursively |
*/ |
- static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS', 113, "'%s' cannot extend itself"); |
+ static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS = new CompileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS', 113, "'%s' cannot extend itself"); |
/** |
* 7.10 Superinterfaces: It is a compile-time error if the interface of a class <i>C</i> is a |
@@ -1567,31 +1606,31 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* @param className the name of the class that implements itself recursively |
*/ |
- static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS', 114, "'%s' cannot implement itself"); |
+ static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS = new CompileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS', 114, "'%s' cannot implement itself"); |
/** |
* 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 final CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = new CompileTimeErrorCode('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 115, "Constant factory constructor cannot delegate to a non-constant constructor"); |
+ static final CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = new CompileTimeErrorCode.con1('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 115, "Constant factory constructor cannot delegate to a non-constant constructor"); |
/** |
* 13.3 Local Variable Declaration: It is a compile-time error if <i>e</i> refers to the name |
* <i>v</i> or the name <i>v=</i>. |
*/ |
- static final CompileTimeErrorCode REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER = new CompileTimeErrorCode('REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER', 116, "The name '%s' cannot be referenced in the initializer of a variable with the same name"); |
+ static final CompileTimeErrorCode REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER = new CompileTimeErrorCode.con1('REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER', 116, "The name '%s' cannot be referenced in the initializer of a variable with the same name"); |
/** |
* 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 final CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = new CompileTimeErrorCode('RETHROW_OUTSIDE_CATCH', 117, "rethrow must be inside of a catch clause"); |
+ static final CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = new CompileTimeErrorCode.con1('RETHROW_OUTSIDE_CATCH', 117, "rethrow must be inside of a catch clause"); |
/** |
* 13.11 Return: It is a compile-time error if a return statement of the form <i>return e;</i> |
* appears in a generative constructor. |
*/ |
- static final CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = new CompileTimeErrorCode('RETURN_IN_GENERATIVE_CONSTRUCTOR', 118, "Constructors cannot return a value"); |
+ static final CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = new CompileTimeErrorCode.con1('RETURN_IN_GENERATIVE_CONSTRUCTOR', 118, "Constructors cannot return a value"); |
/** |
* 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form |
@@ -1601,19 +1640,19 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* initializer list, in class Object, in a factory constructor, or in a static method or variable |
* initializer. |
*/ |
- static final CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = new CompileTimeErrorCode('SUPER_IN_INVALID_CONTEXT', 119, "Invalid context for 'super' invocation"); |
+ static final CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = new CompileTimeErrorCode.con1('SUPER_IN_INVALID_CONTEXT', 119, "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 final CompileTimeErrorCode SUPER_IN_REDIRECTING_CONSTRUCTOR = new CompileTimeErrorCode('SUPER_IN_REDIRECTING_CONSTRUCTOR', 120, "The redirecting constructor cannot have a 'super' initializer"); |
+ static final CompileTimeErrorCode SUPER_IN_REDIRECTING_CONSTRUCTOR = new CompileTimeErrorCode.con1('SUPER_IN_REDIRECTING_CONSTRUCTOR', 120, "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 final CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = new CompileTimeErrorCode('SUPER_INITIALIZER_IN_OBJECT', 121, ""); |
+ static final CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = new CompileTimeErrorCode.con1('SUPER_INITIALIZER_IN_OBJECT', 121, ""); |
/** |
* 12.11 Instance Creation: It is a static type warning if any of the type arguments to a |
@@ -1632,19 +1671,19 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* @param boundingTypeName the name of the bounding type |
* @see StaticTypeWarningCode#TYPE_ARGUMENT_NOT_MATCHING_BOUNDS |
*/ |
- static final CompileTimeErrorCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = new CompileTimeErrorCode('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 122, "'%s' does not extend '%s'"); |
+ static final CompileTimeErrorCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = new CompileTimeErrorCode.con1('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 122, "'%s' does not extend '%s'"); |
/** |
* 15.3.1 Typedef: It is a compile-time error if a typedef refers to itself via a chain of |
* references that does not include a class declaration. |
*/ |
- static final CompileTimeErrorCode TYPE_ALIAS_CANNOT_REFERENCE_ITSELF = new CompileTimeErrorCode('TYPE_ALIAS_CANNOT_REFERENCE_ITSELF', 123, "Type alias can reference itself only via the bounds of its generic parameters"); |
+ static final CompileTimeErrorCode TYPE_ALIAS_CANNOT_REFERENCE_ITSELF = new CompileTimeErrorCode.con1('TYPE_ALIAS_CANNOT_REFERENCE_ITSELF', 123, "Type alias can reference itself only via the bounds of its generic parameters"); |
/** |
* 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 final CompileTimeErrorCode UNDEFINED_CLASS = new CompileTimeErrorCode('UNDEFINED_CLASS', 124, "Undefined class '%s'"); |
+ static final CompileTimeErrorCode UNDEFINED_CLASS = new CompileTimeErrorCode.con1('UNDEFINED_CLASS', 124, "Undefined class '%s'"); |
/** |
* 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the superinitializer appears |
@@ -1652,7 +1691,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* a compile-time error if class <i>S</i> does not declare a generative constructor named <i>S</i> |
* (respectively <i>S.id</i>) |
*/ |
- static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = new CompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 125, "The class '%s' does not have a generative constructor '%s'"); |
+ static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = new CompileTimeErrorCode.con1('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 125, "The class '%s' does not have a generative constructor '%s'"); |
/** |
* 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the superinitializer appears |
@@ -1660,7 +1699,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* a compile-time error if class <i>S</i> does not declare a generative constructor named <i>S</i> |
* (respectively <i>S.id</i>) |
*/ |
- static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT = new CompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT', 126, "The class '%s' does not have a default generative constructor"); |
+ static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT = new CompileTimeErrorCode.con1('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT', 126, "The class '%s' does not have a default generative constructor"); |
/** |
* 12.14.3 Unqualified Invocation: If there exists a lexically visible declaration named |
@@ -1670,7 +1709,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* @param methodName the name of the method that is undefined |
*/ |
- static final CompileTimeErrorCode UNDEFINED_FUNCTION = new CompileTimeErrorCode('UNDEFINED_FUNCTION', 127, "The function '%s' is not defined"); |
+ static final CompileTimeErrorCode UNDEFINED_FUNCTION = new CompileTimeErrorCode.con1('UNDEFINED_FUNCTION', 127, "The function '%s' is not defined"); |
/** |
* 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>, <i>1<=i<=l</i>, |
@@ -1682,7 +1721,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* @param name the name of the requested named parameter |
*/ |
- static final CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER = new CompileTimeErrorCode('UNDEFINED_NAMED_PARAMETER', 128, "The named parameter '%s' is not defined"); |
+ static final CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER = new CompileTimeErrorCode.con1('UNDEFINED_NAMED_PARAMETER', 128, "The named parameter '%s' is not defined"); |
/** |
* 14.2 Exports: It is a compile-time error if the compilation unit found at the specified URI is |
@@ -1697,7 +1736,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* @param uri the URI pointing to a non-existent file |
* @see #INVALID_URI |
*/ |
- static final CompileTimeErrorCode URI_DOES_NOT_EXIST = new CompileTimeErrorCode('URI_DOES_NOT_EXIST', 129, "Target of URI does not exist: '%s'"); |
+ static final CompileTimeErrorCode URI_DOES_NOT_EXIST = new CompileTimeErrorCode.con1('URI_DOES_NOT_EXIST', 129, "Target of URI does not exist: '%s'"); |
/** |
* 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time constant, or if |
@@ -1709,7 +1748,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that describes a URI is |
* not a compile-time constant, or if <i>x</i> involves string interpolation. |
*/ |
- static final CompileTimeErrorCode URI_WITH_INTERPOLATION = new CompileTimeErrorCode('URI_WITH_INTERPOLATION', 130, "URIs cannot use string interpolation"); |
+ static final CompileTimeErrorCode URI_WITH_INTERPOLATION = new CompileTimeErrorCode.con1('URI_WITH_INTERPOLATION', 130, "URIs cannot use string interpolation"); |
/** |
* 7.1.1 Operators: It is a compile-time error if the arity of the user-declared operator []= is |
@@ -1722,7 +1761,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* @param expectedNumberOfParameters the number of parameters expected |
* @param actualNumberOfParameters the number of parameters found in the operator declaration |
*/ |
- static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = new CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 131, "Operator '%s' should declare exactly %d parameter(s), but %d found"); |
+ static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = new CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 131, "Operator '%s' should declare exactly %d parameter(s), but %d found"); |
/** |
* 7.1.1 Operators: It is a compile time error if the arity of the user-declared operator - is not |
@@ -1730,13 +1769,13 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* |
* @param actualNumberOfParameters the number of parameters found in the operator declaration |
*/ |
- static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS = new CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS', 132, "Operator '-' should declare 0 or 1 parameter, but %d found"); |
+ static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS = new CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS', 132, "Operator '-' should declare 0 or 1 parameter, but %d 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 final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = new CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 133, "Setters should declare exactly one required parameter"); |
+ static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = new CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 133, "Setters should declare exactly one required parameter"); |
static final List<CompileTimeErrorCode> values = [ |
AMBIGUOUS_EXPORT, |
ARGUMENT_DEFINITION_TEST_NON_PARAMETER, |
@@ -1873,31 +1912,40 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS, |
WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]; |
- /// The name of this enum constant, as declared in the enum declaration. |
- final String name; |
- |
- /// The position in the enum declaration. |
- final int ordinal; |
- |
/** |
- * The message template used to create the message to be displayed for this error. |
+ * The template used to create the message to be displayed for this error. |
*/ |
String _message; |
/** |
+ * The template used to create the correction to be displayed for this error, or `null` if |
+ * there is no correction information for this error. |
+ */ |
+ String correction2; |
+ |
+ /** |
* Initialize a newly created error code to have the given message. |
* |
* @param message the message template used to create the message to be displayed for the error |
*/ |
- CompileTimeErrorCode(this.name, this.ordinal, String message) { |
+ CompileTimeErrorCode.con1(String name, int ordinal, String message) : super(name, ordinal) { |
+ this._message = message; |
+ } |
+ |
+ /** |
+ * Initialize a newly created error code to have the given message and correction. |
+ * |
+ * @param message the template used to create the message to be displayed for the error |
+ * @param correction the template used to create the correction to be displayed for the error |
+ */ |
+ CompileTimeErrorCode.con2(String name, int ordinal, String message, String correction) : super(name, ordinal) { |
this._message = message; |
+ this.correction2 = correction; |
} |
+ String get correction => correction2; |
ErrorSeverity get errorSeverity => ErrorType.COMPILE_TIME_ERROR.severity; |
String get message => _message; |
ErrorType get type => ErrorType.COMPILE_TIME_ERROR; |
- int compareTo(CompileTimeErrorCode other) => ordinal - other.ordinal; |
- int get hashCode => ordinal; |
- String toString() => name; |
} |
/** |
* The enumeration `PubSuggestionCode` defines the suggestions used for reporting deviations |
@@ -1905,7 +1953,7 @@ class CompileTimeErrorCode implements Enum<CompileTimeErrorCode>, ErrorCode { |
* indicate the problem that caused the suggestion to be generated and for the message to explain |
* what is wrong and, when appropriate, how the situation can be corrected. |
*/ |
-class PubSuggestionCode implements Enum<PubSuggestionCode>, ErrorCode { |
+class PubSuggestionCode extends Enum<PubSuggestionCode> implements ErrorCode { |
/** |
* It is a bad practice for a source file in a package "lib" directory hierarchy to traverse |
@@ -1913,7 +1961,7 @@ class PubSuggestionCode implements Enum<PubSuggestionCode>, ErrorCode { |
* contain a directive such as `import '../web/some.dart'` which references a file outside |
* the lib directory. |
*/ |
- static final PubSuggestionCode FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE = new PubSuggestionCode('FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE', 0, "A file in the 'lib' directory hierarchy should not reference a file outside that hierarchy"); |
+ static final PubSuggestionCode FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE = new PubSuggestionCode.con1('FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE', 0, "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 hierarchy to traverse |
@@ -1921,44 +1969,53 @@ class PubSuggestionCode implements Enum<PubSuggestionCode>, ErrorCode { |
* contain a directive such as `import '../lib/some.dart'` which references a file inside |
* the lib directory. |
*/ |
- static final PubSuggestionCode FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE = new PubSuggestionCode('FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE', 1, "A file outside the 'lib' directory hierarchy should not reference a file inside that hierarchy. Use a package: reference instead."); |
+ static final PubSuggestionCode FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE = new PubSuggestionCode.con1('FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE', 1, "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 given package, or |
* more generally, it is bad practice for a package import to contain a "..". For example, a |
* source file should not contain a directive such as `import 'package:foo/../some.dart'`. |
*/ |
- static final PubSuggestionCode PACKAGE_IMPORT_CONTAINS_DOT_DOT = new PubSuggestionCode('PACKAGE_IMPORT_CONTAINS_DOT_DOT', 2, "A package import should not contain '..'"); |
+ static final PubSuggestionCode PACKAGE_IMPORT_CONTAINS_DOT_DOT = new PubSuggestionCode.con1('PACKAGE_IMPORT_CONTAINS_DOT_DOT', 2, "A package import should not contain '..'"); |
static final List<PubSuggestionCode> values = [ |
FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE, |
FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE, |
PACKAGE_IMPORT_CONTAINS_DOT_DOT]; |
- /// The name of this enum constant, as declared in the enum declaration. |
- final String name; |
- |
- /// The position in the enum declaration. |
- final int ordinal; |
- |
/** |
- * The message template used to create the message to be displayed for this error. |
+ * The template used to create the message to be displayed for this error. |
*/ |
String _message; |
/** |
+ * The template used to create the correction to be displayed for this error, or `null` if |
+ * there is no correction information for this error. |
+ */ |
+ String correction5; |
+ |
+ /** |
* Initialize a newly created error code to have the given message. |
* |
* @param message the message template used to create the message to be displayed for the error |
*/ |
- PubSuggestionCode(this.name, this.ordinal, String message) { |
+ PubSuggestionCode.con1(String name, int ordinal, String message) : super(name, ordinal) { |
this._message = message; |
} |
+ |
+ /** |
+ * Initialize a newly created error code to have the given message and correction. |
+ * |
+ * @param message the template used to create the message to be displayed for the error |
+ * @param correction the template used to create the correction to be displayed for the error |
+ */ |
+ PubSuggestionCode.con2(String name, int ordinal, String message, String correction) : super(name, ordinal) { |
+ this._message = message; |
+ this.correction5 = correction; |
+ } |
+ String get correction => correction5; |
ErrorSeverity get errorSeverity => ErrorType.PUB_SUGGESTION.severity; |
String get message => _message; |
ErrorType get type => ErrorType.PUB_SUGGESTION; |
- int compareTo(PubSuggestionCode other) => ordinal - other.ordinal; |
- int get hashCode => ordinal; |
- String toString() => name; |
} |
/** |
* The enumeration `StaticWarningCode` defines the error codes used for static warnings. The |
@@ -1968,7 +2025,7 @@ class PubSuggestionCode implements Enum<PubSuggestionCode>, ErrorCode { |
* |
* @coverage dart.engine.error |
*/ |
-class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
+class StaticWarningCode extends Enum<StaticWarningCode> implements ErrorCode { |
/** |
* 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i>N</i> is introduced |
@@ -1984,7 +2041,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* @param firstLibraryName the name of the first library that the type is found |
* @param secondLibraryName the name of the second library that the type is found |
*/ |
- static final StaticWarningCode AMBIGUOUS_IMPORT = new StaticWarningCode('AMBIGUOUS_IMPORT', 0, "The type '%s' is defined in the libraries '%s' and '%s'"); |
+ static final StaticWarningCode AMBIGUOUS_IMPORT = new StaticWarningCode.con1('AMBIGUOUS_IMPORT', 0, "The type '%s' is defined in the libraries '%s' and '%s'"); |
/** |
* 12.11.1 New: It is a static warning if the static type of <i>a<sub>i</sub>, 1 <= i <= n+ |
@@ -2007,7 +2064,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* <i>T<sub>m+j</sub></i> may not be assigned to <i>S<sub>r</sub></i>, where <i>r = q<sub>j</sub>, |
* 1 <= j <= l</i>. |
*/ |
- static final StaticWarningCode ARGUMENT_TYPE_NOT_ASSIGNABLE = new StaticWarningCode('ARGUMENT_TYPE_NOT_ASSIGNABLE', 1, "The argument type '%s' cannot be assigned to the parameter type '%s'"); |
+ static final StaticWarningCode ARGUMENT_TYPE_NOT_ASSIGNABLE = new StaticWarningCode.con1('ARGUMENT_TYPE_NOT_ASSIGNABLE', 1, "The argument type '%s' cannot be assigned to the parameter type '%s'"); |
/** |
* 5 Variables: Attempting to assign to a final variable elsewhere will cause a NoSuchMethodError |
@@ -2016,32 +2073,32 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* |
* A constant variable is always implicitly final. |
*/ |
- static final StaticWarningCode ASSIGNMENT_TO_CONST = new StaticWarningCode('ASSIGNMENT_TO_CONST', 2, "Constant variables cannot be assigned a value"); |
+ static final StaticWarningCode ASSIGNMENT_TO_CONST = new StaticWarningCode.con1('ASSIGNMENT_TO_CONST', 2, "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 final StaticWarningCode ASSIGNMENT_TO_FINAL = new StaticWarningCode('ASSIGNMENT_TO_FINAL', 3, "Final variables cannot be assigned a value"); |
+ static final StaticWarningCode ASSIGNMENT_TO_FINAL = new StaticWarningCode.con1('ASSIGNMENT_TO_FINAL', 3, "Final variables 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 final StaticWarningCode ASSIGNMENT_TO_METHOD = new StaticWarningCode('ASSIGNMENT_TO_METHOD', 4, "Methods cannot be assigned a value"); |
+ static final StaticWarningCode ASSIGNMENT_TO_METHOD = new StaticWarningCode.con1('ASSIGNMENT_TO_METHOD', 4, "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 final StaticWarningCode CASE_BLOCK_NOT_TERMINATED = new StaticWarningCode('CASE_BLOCK_NOT_TERMINATED', 5, "The last statement of the 'case' should be 'break', 'continue', 'return' or 'throw'"); |
+ static final StaticWarningCode CASE_BLOCK_NOT_TERMINATED = new StaticWarningCode.con1('CASE_BLOCK_NOT_TERMINATED', 5, "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 final StaticWarningCode CAST_TO_NON_TYPE = new StaticWarningCode('CAST_TO_NON_TYPE', 6, "The name '%s' is not a type and cannot be used in an 'as' expression"); |
+ static final StaticWarningCode CAST_TO_NON_TYPE = new StaticWarningCode.con1('CAST_TO_NON_TYPE', 6, "The name '%s' is not a type and cannot be used in an 'as' expression"); |
/** |
* 16.1.2 Comments: A token of the form <i>[new c](uri)</i> will be replaced by a link in the |
@@ -2050,7 +2107,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* <i>L</i>, or if <i>c</i> is not the name of a constructor of a class declared in the exported |
* namespace of <i>L</i>. |
*/ |
- static final StaticWarningCode COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE = new StaticWarningCode('COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE', 7, ""); |
+ static final StaticWarningCode COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE = new StaticWarningCode.con1('COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE', 7, ""); |
/** |
* 16.1.2 Comments: A token of the form <i>[id](uri)</i> will be replaced by a link in the |
@@ -2058,19 +2115,19 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* of the link will be <i>id</i>. It is a static warning if uri is not the URI of a dart library |
* <i>L</i>, or if <i>id</i> is not a name declared in the exported namespace of <i>L</i>. |
*/ |
- static final StaticWarningCode COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE = new StaticWarningCode('COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE', 8, ""); |
+ static final StaticWarningCode COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE = new StaticWarningCode.con1('COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE', 8, ""); |
/** |
* 16.1.2 Comments: It is a static warning if <i>c</i> does not denote a constructor that |
* available in the scope of the documentation comment. |
*/ |
- static final StaticWarningCode COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR = new StaticWarningCode('COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR', 9, ""); |
+ static final StaticWarningCode COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR = new StaticWarningCode.con1('COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR', 9, ""); |
/** |
* 16.1.2 Comments: It is a static warning if <i>id</i> does not denote a declaration that |
* available in the scope of the documentation comment. |
*/ |
- static final StaticWarningCode COMMENT_REFERENCE_UNDECLARED_IDENTIFIER = new StaticWarningCode('COMMENT_REFERENCE_UNDECLARED_IDENTIFIER', 10, ""); |
+ static final StaticWarningCode COMMENT_REFERENCE_UNDECLARED_IDENTIFIER = new StaticWarningCode.con1('COMMENT_REFERENCE_UNDECLARED_IDENTIFIER', 10, ""); |
/** |
* 16.1.2 Comments: A token of the form <i>[id](uri)</i> will be replaced by a link in the |
@@ -2078,13 +2135,13 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* of the link will be <i>id</i>. It is a static warning if uri is not the URI of a dart library |
* <i>L</i>, or if <i>id</i> is not a name declared in the exported namespace of <i>L</i>. |
*/ |
- static final StaticWarningCode COMMENT_REFERENCE_URI_NOT_LIBRARY = new StaticWarningCode('COMMENT_REFERENCE_URI_NOT_LIBRARY', 11, ""); |
+ static final StaticWarningCode COMMENT_REFERENCE_URI_NOT_LIBRARY = new StaticWarningCode.con1('COMMENT_REFERENCE_URI_NOT_LIBRARY', 11, ""); |
/** |
* 7.4 Abstract Instance Members: It is a static warning if an abstract member is declared or |
* inherited in a concrete class. |
*/ |
- static final StaticWarningCode CONCRETE_CLASS_WITH_ABSTRACT_MEMBER = new StaticWarningCode('CONCRETE_CLASS_WITH_ABSTRACT_MEMBER', 12, "'%s' must have a method body because '%s' is not abstract"); |
+ static final StaticWarningCode CONCRETE_CLASS_WITH_ABSTRACT_MEMBER = new StaticWarningCode.con1('CONCRETE_CLASS_WITH_ABSTRACT_MEMBER', 12, "'%s' must have a method body because '%s' is not abstract"); |
/** |
* 7.2 Getters: It is a static warning if a class <i>C</i> declares an instance getter named |
@@ -2093,7 +2150,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* |
* @param superName the name of the super class declaring a static member |
*/ |
- static final StaticWarningCode CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER = new StaticWarningCode('CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER', 13, "Superclass '%s' declares static member with the same name"); |
+ static final StaticWarningCode CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER = new StaticWarningCode.con1('CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER', 13, "Superclass '%s' declares static member with the same name"); |
/** |
* 7.3 Setters: It is a static warning if a class <i>C</i> declares an instance setter named |
@@ -2102,31 +2159,31 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* |
* @param superName the name of the super class declaring a static member |
*/ |
- static final StaticWarningCode CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER = new StaticWarningCode('CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER', 14, "Superclass '%s' declares static member with the same name"); |
+ static final StaticWarningCode CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER = new StaticWarningCode.con1('CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER', 14, "Superclass '%s' 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 final StaticWarningCode CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER = new StaticWarningCode('CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER', 15, "Class '%s' declares non-static setter with the same name"); |
+ static final StaticWarningCode CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER = new StaticWarningCode.con1('CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER', 15, "Class '%s' declares non-static setter with the same name"); |
/** |
* 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 final StaticWarningCode CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER = new StaticWarningCode('CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER', 16, "Class '%s' declares non-static member with the same name"); |
+ static final StaticWarningCode CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER = new StaticWarningCode.con1('CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER', 16, "Class '%s' declares non-static member with the same name"); |
/** |
* 12.11.2 Const: Given an instance creation expression of the form <i>const q(a<sub>1</sub>, |
* … a<sub>n</sub>)</i> it is a static warning if <i>q</i> is the constructor of an |
* abstract class but <i>q</i> is not a factory constructor. |
*/ |
- static final StaticWarningCode CONST_WITH_ABSTRACT_CLASS = new StaticWarningCode('CONST_WITH_ABSTRACT_CLASS', 17, "Abstract classes cannot be created with a 'const' expression"); |
+ static final StaticWarningCode CONST_WITH_ABSTRACT_CLASS = new StaticWarningCode.con1('CONST_WITH_ABSTRACT_CLASS', 17, "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 final StaticWarningCode EQUAL_KEYS_IN_MAP = new StaticWarningCode('EQUAL_KEYS_IN_MAP', 18, "Keys in a map cannot be equal"); |
+ static final StaticWarningCode EQUAL_KEYS_IN_MAP = new StaticWarningCode.con1('EQUAL_KEYS_IN_MAP', 18, "Keys in a map cannot be equal"); |
/** |
* 14.2 Exports: It is a static warning to export two different libraries with the same name. |
@@ -2135,7 +2192,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* @param uri2 the uri pointing to a second library |
* @param name the shared name of the exported libraries |
*/ |
- static final StaticWarningCode EXPORT_DUPLICATED_LIBRARY_NAME = new StaticWarningCode('EXPORT_DUPLICATED_LIBRARY_NAME', 19, "The exported libraries '%s' and '%s' should not have the same name '%s'"); |
+ static final StaticWarningCode EXPORT_DUPLICATED_LIBRARY_NAME = new StaticWarningCode.con1('EXPORT_DUPLICATED_LIBRARY_NAME', 19, "The exported libraries '%s' and '%s' should not have the same name '%s'"); |
/** |
* 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i> or if <i>m > |
@@ -2145,13 +2202,13 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* @param argumentCount the actual number of positional arguments given |
* @see #NOT_ENOUGH_REQUIRED_ARGUMENTS |
*/ |
- static final StaticWarningCode EXTRA_POSITIONAL_ARGUMENTS = new StaticWarningCode('EXTRA_POSITIONAL_ARGUMENTS', 20, "%d positional arguments expected, but %d found"); |
+ static final StaticWarningCode EXTRA_POSITIONAL_ARGUMENTS = new StaticWarningCode.con1('EXTRA_POSITIONAL_ARGUMENTS', 20, "%d positional arguments expected, but %d 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 final StaticWarningCode FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION = new StaticWarningCode('FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION', 21, "Values cannot be set in the constructor if they are final, and have already been set"); |
+ static final StaticWarningCode FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION = new StaticWarningCode.con1('FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION', 21, "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 been initialized at |
@@ -2159,7 +2216,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* |
* @param name the name of the field in question |
*/ |
- static final StaticWarningCode FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR = new StaticWarningCode('FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR', 22, "'%s' is final and was given a value when it was declared, so it cannot be set to a new value"); |
+ static final StaticWarningCode FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR = new StaticWarningCode.con1('FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR', 22, "'%s' is final and was given a value when it was declared, so it cannot be set to a new value"); |
/** |
* 7.6.1 Generative Constructors: Execution of an initializer of the form <b>this</b>.<i>v</i> = |
@@ -2176,7 +2233,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* @param initializerType the name of the type of the initializer expression |
* @param fieldType the name of the type of the field |
*/ |
- static final StaticWarningCode FIELD_INITIALIZER_NOT_ASSIGNABLE = new StaticWarningCode('FIELD_INITIALIZER_NOT_ASSIGNABLE', 23, "The initializer type '%s' cannot be assigned to the field type '%s'"); |
+ static final StaticWarningCode FIELD_INITIALIZER_NOT_ASSIGNABLE = new StaticWarningCode.con1('FIELD_INITIALIZER_NOT_ASSIGNABLE', 23, "The initializer type '%s' cannot be assigned to the field type '%s'"); |
/** |
* 7.6.1 Generative Constructors: An initializing formal has the form <i>this.id</i>. It is a |
@@ -2185,7 +2242,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* @param parameterType the name of the type of the field formal parameter |
* @param fieldType the name of the type of the field |
*/ |
- static final StaticWarningCode FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE = new StaticWarningCode('FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE', 24, "The parameter type '%s' is incompatable with the field type '%s'"); |
+ static final StaticWarningCode FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE = new StaticWarningCode.con1('FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE', 24, "The parameter type '%s' is incompatable with the field type '%s'"); |
/** |
* 5 Variables: It is a static warning if a library, static or local variable <i>v</i> is final |
@@ -2202,7 +2259,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* |
* @param name the name of the uninitialized final variable |
*/ |
- static final StaticWarningCode FINAL_NOT_INITIALIZED = new StaticWarningCode('FINAL_NOT_INITIALIZED', 25, "The final variable '%s' must be initialized"); |
+ static final StaticWarningCode FINAL_NOT_INITIALIZED = new StaticWarningCode.con1('FINAL_NOT_INITIALIZED', 25, "The final variable '%s' must be initialized"); |
/** |
* 14.1 Imports: It is a static warning to import two different libraries with the same name. |
@@ -2211,7 +2268,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* @param uri2 the uri pointing to a second library |
* @param name the shared name of the imported libraries |
*/ |
- static final StaticWarningCode IMPORT_DUPLICATED_LIBRARY_NAME = new StaticWarningCode('IMPORT_DUPLICATED_LIBRARY_NAME', 26, "The imported libraries '%s' and '%s' should not have the same name '%s'"); |
+ static final StaticWarningCode IMPORT_DUPLICATED_LIBRARY_NAME = new StaticWarningCode.con1('IMPORT_DUPLICATED_LIBRARY_NAME', 26, "The imported libraries '%s' and '%s' should not have the same name '%s'"); |
/** |
* 8.1.1 Inheritance and Overriding: However, if there are multiple members <i>m<sub>1</sub>, |
@@ -2223,7 +2280,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* not all of the <i>m<sub>i</sub></i> are setters, none of the <i>m<sub>i</sub></i> are |
* inherited, and a static warning is issued. |
*/ |
- static final StaticWarningCode INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD = new StaticWarningCode('INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD', 27, "'%s' is inherited as a getter and also a method"); |
+ static final StaticWarningCode INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD = new StaticWarningCode.con1('INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD', 27, "'%s' 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 an instance method |
@@ -2233,7 +2290,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* @param memberName the name of the member with the name conflict |
* @param superclassName the name of the enclosing class that has the static member |
*/ |
- static final StaticWarningCode INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC = new StaticWarningCode('INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC', 28, "'%s' collides with a static member in the superclass '%s'"); |
+ static final StaticWarningCode INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC = new StaticWarningCode.con1('INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC', 28, "'%s' collides with a static member in the superclass '%s'"); |
/** |
* 7.2 Getters: It is a static warning if a getter <i>m1</i> overrides a getter <i>m2</i> and the |
@@ -2245,7 +2302,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* @param className the name of the class where the overridden getter is declared |
* @see #INVALID_METHOD_OVERRIDE_RETURN_TYPE |
*/ |
- static final StaticWarningCode INVALID_GETTER_OVERRIDE_RETURN_TYPE = new StaticWarningCode('INVALID_GETTER_OVERRIDE_RETURN_TYPE', 29, "The return type '%s' is not assignable to '%s' as required by the getter it is overriding from '%s'"); |
+ static final StaticWarningCode INVALID_GETTER_OVERRIDE_RETURN_TYPE = new StaticWarningCode.con1('INVALID_GETTER_OVERRIDE_RETURN_TYPE', 29, "The return type '%s' is not assignable to '%s' as required by the getter it is overriding from '%s'"); |
/** |
* 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i> overrides an |
@@ -2256,7 +2313,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* actualParamTypeName |
* @param className the name of the class where the overridden method is declared |
*/ |
- static final StaticWarningCode INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE = new StaticWarningCode('INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE', 30, "The parameter type '%s' is not assignable to '%s' as required by the method it is overriding from '%s'"); |
+ static final StaticWarningCode INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE = new StaticWarningCode.con1('INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE', 30, "The parameter type '%s' is not assignable to '%s' as required by the method it is overriding from '%s'"); |
/** |
* 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i> overrides an |
@@ -2268,7 +2325,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* @param className the name of the class where the overridden method is declared |
* @see #INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE |
*/ |
- static final StaticWarningCode INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE = new StaticWarningCode('INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE', 31, "The parameter type '%s' is not assignable to '%s' as required by the method it is overriding from '%s'"); |
+ static final StaticWarningCode INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE = new StaticWarningCode.con1('INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE', 31, "The parameter type '%s' is not assignable to '%s' as required by the method it is overriding from '%s'"); |
/** |
* 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i> overrides an |
@@ -2279,7 +2336,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* actualParamTypeName |
* @param className the name of the class where the overridden method is declared |
*/ |
- static final StaticWarningCode INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE = new StaticWarningCode('INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE', 32, "The parameter type '%s' is not assignable to '%s' as required by the method it is overriding from '%s'"); |
+ static final StaticWarningCode INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE = new StaticWarningCode.con1('INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE', 32, "The parameter type '%s' is not assignable to '%s' as required by the method it is overriding from '%s'"); |
/** |
* 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i> overrides an |
@@ -2291,7 +2348,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* @param className the name of the class where the overridden method is declared |
* @see #INVALID_GETTER_OVERRIDE_RETURN_TYPE |
*/ |
- static final StaticWarningCode INVALID_METHOD_OVERRIDE_RETURN_TYPE = new StaticWarningCode('INVALID_METHOD_OVERRIDE_RETURN_TYPE', 33, "The return type '%s' is not assignable to '%s' as required by the method it is overriding from '%s'"); |
+ static final StaticWarningCode INVALID_METHOD_OVERRIDE_RETURN_TYPE = new StaticWarningCode.con1('INVALID_METHOD_OVERRIDE_RETURN_TYPE', 33, "The return type '%s' is not assignable to '%s' as required by the method it is overriding from '%s'"); |
/** |
* 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i> overrides an |
@@ -2299,7 +2356,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a different default value |
* for <i>p</i>. |
*/ |
- static final StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED = new StaticWarningCode('INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED', 34, "Parameters cannot override default values, this method overrides '%s.%s' where '%s' has a different value"); |
+ static final StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED = new StaticWarningCode.con1('INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED', 34, "Parameters cannot override default values, this method overrides '%s.%s' where '%s' has a different value"); |
/** |
* 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i> overrides an |
@@ -2307,7 +2364,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a different default value |
* for <i>p</i>. |
*/ |
- static final StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL = new StaticWarningCode('INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL', 35, "Parameters cannot override default values, this method overrides '%s.%s' where this positional parameter has a different value"); |
+ static final StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL = new StaticWarningCode.con1('INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL', 35, "Parameters cannot override default values, this method overrides '%s.%s' where this positional parameter has a different value"); |
/** |
* 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i> overrides an |
@@ -2317,7 +2374,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* @param paramCount the number of named parameters in the overridden member |
* @param className the name of the class from the overridden method |
*/ |
- static final StaticWarningCode INVALID_OVERRIDE_NAMED = new StaticWarningCode('INVALID_OVERRIDE_NAMED', 36, "Missing the named parameter '%s' to match the overridden method from '%s'"); |
+ static final StaticWarningCode INVALID_OVERRIDE_NAMED = new StaticWarningCode.con1('INVALID_OVERRIDE_NAMED', 36, "Missing the named parameter '%s' to match the overridden method from '%s'"); |
/** |
* 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i> overrides an |
@@ -2327,7 +2384,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* @param paramCount the number of positional parameters in the overridden member |
* @param className the name of the class from the overridden method |
*/ |
- static final StaticWarningCode INVALID_OVERRIDE_POSITIONAL = new StaticWarningCode('INVALID_OVERRIDE_POSITIONAL', 37, "Must have at least %d optional parameters to match the overridden method from '%s'"); |
+ static final StaticWarningCode INVALID_OVERRIDE_POSITIONAL = new StaticWarningCode.con1('INVALID_OVERRIDE_POSITIONAL', 37, "Must have at least %d optional parameters to match the overridden method from '%s'"); |
/** |
* 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i> overrides an |
@@ -2337,7 +2394,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* @param paramCount the number of required parameters in the overridden member |
* @param className the name of the class from the overridden method |
*/ |
- static final StaticWarningCode INVALID_OVERRIDE_REQUIRED = new StaticWarningCode('INVALID_OVERRIDE_REQUIRED', 38, "Must have exactly %d required parameters to match the overridden method from '%s'"); |
+ static final StaticWarningCode INVALID_OVERRIDE_REQUIRED = new StaticWarningCode.con1('INVALID_OVERRIDE_REQUIRED', 38, "Must have exactly %d required parameters to match the overridden method from '%s'"); |
/** |
* 7.3 Setters: It is a static warning if a setter <i>m1</i> overrides a setter <i>m2</i> and the |
@@ -2349,7 +2406,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* @param className the name of the class where the overridden setter is declared |
* @see #INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE |
*/ |
- static final StaticWarningCode INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE = new StaticWarningCode('INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE', 39, "The parameter type '%s' is not assignable to '%s' as required by the setter it is overriding from '%s'"); |
+ static final StaticWarningCode INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE = new StaticWarningCode.con1('INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE', 39, "The parameter type '%s' is not assignable to '%s' as required by the setter it is overriding from '%s'"); |
/** |
* 12.6 Lists: A run-time list literal <<i>E</i>> [<i>e<sub>1</sub></i> ... |
@@ -2365,7 +2422,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<sub>j</sub>, 1 <= |
* j <= m</i>. |
*/ |
- static final StaticWarningCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = new StaticWarningCode('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 40, "The element type '%s' cannot be assigned to the list type '%s'"); |
+ static final StaticWarningCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = new StaticWarningCode.con1('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 40, "The element type '%s' cannot be assigned to the list type '%s'"); |
/** |
* 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</sub></i> : |
@@ -2381,7 +2438,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<sub>j</sub>, 1 <= |
* j <= m</i>. |
*/ |
- static final StaticWarningCode MAP_KEY_TYPE_NOT_ASSIGNABLE = new StaticWarningCode('MAP_KEY_TYPE_NOT_ASSIGNABLE', 41, "The element type '%s' cannot be assigned to the map key type '%s'"); |
+ static final StaticWarningCode MAP_KEY_TYPE_NOT_ASSIGNABLE = new StaticWarningCode.con1('MAP_KEY_TYPE_NOT_ASSIGNABLE', 41, "The element type '%s' cannot be assigned to the map key type '%s'"); |
/** |
* 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</sub></i> : |
@@ -2397,20 +2454,20 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<sub>j</sub>, 1 <= |
* j <= m</i>. |
*/ |
- static final StaticWarningCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = new StaticWarningCode('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 42, "The element type '%s' cannot be assigned to the map value type '%s'"); |
+ static final StaticWarningCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = new StaticWarningCode.con1('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 42, "The element type '%s' cannot be assigned to the map value type '%s'"); |
/** |
* 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 final StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES = new StaticWarningCode('MISMATCHED_GETTER_AND_SETTER_TYPES', 43, "The parameter type for setter '%s' is '%s' which is not assignable to its getter (of type '%s')"); |
+ static final StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES = new StaticWarningCode.con1('MISMATCHED_GETTER_AND_SETTER_TYPES', 43, "The parameter type for setter '%s' is '%s' which is not assignable to its getter (of type '%s')"); |
/** |
* 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 final StaticWarningCode NEW_WITH_ABSTRACT_CLASS = new StaticWarningCode('NEW_WITH_ABSTRACT_CLASS', 44, "Abstract classes cannot be created with a 'new' expression"); |
+ static final StaticWarningCode NEW_WITH_ABSTRACT_CLASS = new StaticWarningCode.con1('NEW_WITH_ABSTRACT_CLASS', 44, "Abstract classes cannot be created with a 'new' expression"); |
/** |
* 15.8 Parameterized Types: Any use of a malbounded type gives rise to a static warning. |
@@ -2421,7 +2478,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* @see CompileTimeErrorCode#CONST_WITH_INVALID_TYPE_PARAMETERS |
* @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS |
*/ |
- static final StaticWarningCode NEW_WITH_INVALID_TYPE_PARAMETERS = new StaticWarningCode('NEW_WITH_INVALID_TYPE_PARAMETERS', 45, "The type '%s' is declared with %d type parameters, but %d type arguments were given"); |
+ static final StaticWarningCode NEW_WITH_INVALID_TYPE_PARAMETERS = new StaticWarningCode.con1('NEW_WITH_INVALID_TYPE_PARAMETERS', 45, "The type '%s' is declared with %d type parameters, but %d type arguments were given"); |
/** |
* 12.11.1 New: It is a static warning if <i>T</i> is not a class accessible in the current scope, |
@@ -2429,7 +2486,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* |
* @param name the name of the non-type element |
*/ |
- static final StaticWarningCode NEW_WITH_NON_TYPE = new StaticWarningCode('NEW_WITH_NON_TYPE', 46, "The name '%s' is not a class"); |
+ static final StaticWarningCode NEW_WITH_NON_TYPE = new StaticWarningCode.con1('NEW_WITH_NON_TYPE', 46, "The name '%s' is not a class"); |
/** |
* 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the current scope then: |
@@ -2440,7 +2497,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* a<sub>n+1</sub>, … x<sub>n+k</sub>: 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 final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR = new StaticWarningCode('NEW_WITH_UNDEFINED_CONSTRUCTOR', 47, "The class '%s' does not have a constructor '%s'"); |
+ static final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR = new StaticWarningCode.con1('NEW_WITH_UNDEFINED_CONSTRUCTOR', 47, "The class '%s' does not have a constructor '%s'"); |
/** |
* 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the current scope then: |
@@ -2451,7 +2508,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* a<sub>n+1</sub>, … x<sub>n+k</sub>: 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 final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = new StaticWarningCode('NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 48, "The class '%s' does not have a default constructor"); |
+ static final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = new StaticWarningCode.con1('NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 48, "The class '%s' does not have a default constructor"); |
/** |
* 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an |
@@ -2471,7 +2528,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* @param memberName the name of the fourth member |
* @param additionalCount the number of additional missing members that aren't listed |
*/ |
- static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS', 49, "Missing inherited members: '%s', '%s', '%s', '%s' and %d more"); |
+ static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS = new StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS', 49, "Missing inherited members: '%s', '%s', '%s', '%s' and %d more"); |
/** |
* 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an |
@@ -2490,7 +2547,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* @param memberName the name of the third member |
* @param memberName the name of the fourth member |
*/ |
- static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR', 50, "Missing inherited members: '%s', '%s', '%s' and '%s'"); |
+ static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR = new StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR', 50, "Missing inherited members: '%s', '%s', '%s' and '%s'"); |
/** |
* 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an |
@@ -2506,7 +2563,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* |
* @param memberName the name of the member |
*/ |
- static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE', 51, "Missing inherited member '%s'"); |
+ static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE = new StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE', 51, "Missing inherited member '%s'"); |
/** |
* 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an |
@@ -2524,7 +2581,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* @param memberName the name of the second member |
* @param memberName the name of the third member |
*/ |
- static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE', 52, "Missing inherited members: '%s', '%s' and '%s'"); |
+ static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE = new StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE', 52, "Missing inherited members: '%s', '%s' and '%s'"); |
/** |
* 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an |
@@ -2541,7 +2598,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* @param memberName the name of the first member |
* @param memberName the name of the second member |
*/ |
- static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO', 53, "Missing inherited members: '%s' and '%s'"); |
+ static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO = new StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO', 53, "Missing inherited members: '%s' and '%s'"); |
/** |
* 13.11 Try: An on-catch clause of the form <i>on T catch (p<sub>1</sub>, p<sub>2</sub>) s</i> or |
@@ -2551,18 +2608,18 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* |
* @param name the name of the non-type element |
*/ |
- static final StaticWarningCode NON_TYPE_IN_CATCH_CLAUSE = new StaticWarningCode('NON_TYPE_IN_CATCH_CLAUSE', 54, "The name '%s' is not a type and cannot be used in an on-catch clause"); |
+ static final StaticWarningCode NON_TYPE_IN_CATCH_CLAUSE = new StaticWarningCode.con1('NON_TYPE_IN_CATCH_CLAUSE', 54, "The name '%s' 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 final StaticWarningCode NON_VOID_RETURN_FOR_OPERATOR = new StaticWarningCode('NON_VOID_RETURN_FOR_OPERATOR', 55, "The return type of the operator []= must be 'void'"); |
+ static final StaticWarningCode NON_VOID_RETURN_FOR_OPERATOR = new StaticWarningCode.con1('NON_VOID_RETURN_FOR_OPERATOR', 55, "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 final StaticWarningCode NON_VOID_RETURN_FOR_SETTER = new StaticWarningCode('NON_VOID_RETURN_FOR_SETTER', 56, "The return type of the setter must be 'void'"); |
+ static final StaticWarningCode NON_VOID_RETURN_FOR_SETTER = new StaticWarningCode.con1('NON_VOID_RETURN_FOR_SETTER', 56, "The return type of the setter must be 'void'"); |
/** |
* 15.1 Static Types: A type <i>T</i> is malformed iff: * <i>T</i> has the form <i>id</i> or the |
@@ -2576,7 +2633,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* |
* @param nonTypeName the name that is not a type |
*/ |
- static final StaticWarningCode NOT_A_TYPE = new StaticWarningCode('NOT_A_TYPE', 57, "%s is not a type"); |
+ static final StaticWarningCode NOT_A_TYPE = new StaticWarningCode.con1('NOT_A_TYPE', 57, "%s is not a type"); |
/** |
* 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i> or if <i>m > |
@@ -2586,7 +2643,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* @param argumentCount the actual number of positional arguments given |
* @see #EXTRA_POSITIONAL_ARGUMENTS |
*/ |
- static final StaticWarningCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new StaticWarningCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', 58, "%d required argument(s) expected, but %d found"); |
+ static final StaticWarningCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new StaticWarningCode.con1('NOT_ENOUGH_REQUIRED_ARGUMENTS', 58, "%d required argument(s) expected, but %d found"); |
/** |
* 14.3 Parts: It is a static warning if the referenced part declaration <i>p</i> names a library |
@@ -2595,7 +2652,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* @param expectedLibraryName the name of expected library name |
* @param actualLibraryName the non-matching actual library name from the "part of" declaration |
*/ |
- static final StaticWarningCode PART_OF_DIFFERENT_LIBRARY = new StaticWarningCode('PART_OF_DIFFERENT_LIBRARY', 59, "Expected this library to be part of '%s', not '%s'"); |
+ static final StaticWarningCode PART_OF_DIFFERENT_LIBRARY = new StaticWarningCode.con1('PART_OF_DIFFERENT_LIBRARY', 59, "Expected this library to be part of '%s', not '%s'"); |
/** |
* 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> is not a subtype of |
@@ -2604,7 +2661,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* @param redirectedName the name of the redirected constructor |
* @param redirectingName the name of the redirecting constructor |
*/ |
- static final StaticWarningCode REDIRECT_TO_INVALID_FUNCTION_TYPE = new StaticWarningCode('REDIRECT_TO_INVALID_FUNCTION_TYPE', 60, "The redirected constructor '%s' has incompatible parameters with '%s'"); |
+ static final StaticWarningCode REDIRECT_TO_INVALID_FUNCTION_TYPE = new StaticWarningCode.con1('REDIRECT_TO_INVALID_FUNCTION_TYPE', 60, "The redirected constructor '%s' has incompatible parameters with '%s'"); |
/** |
* 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> is not a subtype of |
@@ -2613,21 +2670,21 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* @param redirectedName the name of the redirected constructor return type |
* @param redirectingName the name of the redirecting constructor return type |
*/ |
- static final StaticWarningCode REDIRECT_TO_INVALID_RETURN_TYPE = new StaticWarningCode('REDIRECT_TO_INVALID_RETURN_TYPE', 61, "The return type '%s' of the redirected constructor is not a subclass of '%s'"); |
+ static final StaticWarningCode REDIRECT_TO_INVALID_RETURN_TYPE = new StaticWarningCode.con1('REDIRECT_TO_INVALID_RETURN_TYPE', 61, "The return type '%s' of the redirected constructor is not a subclass of '%s'"); |
/** |
* 7.6.2 Factories: It is a static warning if type does not denote a class accessible in the |
* current scope; if type does denote such a class <i>C</i> 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 final StaticWarningCode REDIRECT_TO_MISSING_CONSTRUCTOR = new StaticWarningCode('REDIRECT_TO_MISSING_CONSTRUCTOR', 62, "The constructor '%s' could not be found in '%s'"); |
+ static final StaticWarningCode REDIRECT_TO_MISSING_CONSTRUCTOR = new StaticWarningCode.con1('REDIRECT_TO_MISSING_CONSTRUCTOR', 62, "The constructor '%s' could not be found in '%s'"); |
/** |
* 7.6.2 Factories: It is a static warning if type does not denote a class accessible in the |
* current scope; if type does denote such a class <i>C</i> 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 final StaticWarningCode REDIRECT_TO_NON_CLASS = new StaticWarningCode('REDIRECT_TO_NON_CLASS', 63, "The name '%s' is not a type and cannot be used in a redirected constructor"); |
+ static final StaticWarningCode REDIRECT_TO_NON_CLASS = new StaticWarningCode.con1('REDIRECT_TO_NON_CLASS', 63, "The name '%s' is not a type and cannot be used in a redirected constructor"); |
/** |
* 13.11 Return: Let <i>f</i> be the function immediately enclosing a return statement of the form |
@@ -2637,7 +2694,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* * The return type of <i>f</i> may not be assigned to void. |
* </ol> |
*/ |
- static final StaticWarningCode RETURN_WITHOUT_VALUE = new StaticWarningCode('RETURN_WITHOUT_VALUE', 64, "Missing return value after 'return'"); |
+ static final StaticWarningCode RETURN_WITHOUT_VALUE = new StaticWarningCode.con1('RETURN_WITHOUT_VALUE', 64, "Missing return value after 'return'"); |
/** |
* 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not declare a static method |
@@ -2645,19 +2702,19 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* |
* @param memberName the name of the instance member |
*/ |
- static final StaticWarningCode STATIC_ACCESS_TO_INSTANCE_MEMBER = new StaticWarningCode('STATIC_ACCESS_TO_INSTANCE_MEMBER', 65, "Instance member '%s' cannot be accessed using static access"); |
+ static final StaticWarningCode STATIC_ACCESS_TO_INSTANCE_MEMBER = new StaticWarningCode.con1('STATIC_ACCESS_TO_INSTANCE_MEMBER', 65, "Instance member '%s' 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 final StaticWarningCode SWITCH_EXPRESSION_NOT_ASSIGNABLE = new StaticWarningCode('SWITCH_EXPRESSION_NOT_ASSIGNABLE', 66, "Type '%s' of the switch expression is not assignable to the type '%s' of case expressions"); |
+ static final StaticWarningCode SWITCH_EXPRESSION_NOT_ASSIGNABLE = new StaticWarningCode.con1('SWITCH_EXPRESSION_NOT_ASSIGNABLE', 66, "Type '%s' of the switch expression is not assignable to the type '%s' of case expressions"); |
/** |
* 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 final StaticWarningCode TYPE_TEST_NON_TYPE = new StaticWarningCode('TYPE_TEST_NON_TYPE', 67, "The name '%s' is not a type and cannot be used in an 'is' expression"); |
+ static final StaticWarningCode TYPE_TEST_NON_TYPE = new StaticWarningCode.con1('TYPE_TEST_NON_TYPE', 67, "The name '%s' is not a type and cannot be used in an 'is' expression"); |
/** |
* 10 Generics: However, a type parameter is considered to be a malformed type when referenced by |
@@ -2666,7 +2723,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* 15.1 Static Types: Any use of a malformed type gives rise to a static warning. A malformed type |
* is then interpreted as dynamic by the static type checker and the runtime. |
*/ |
- static final StaticWarningCode TYPE_PARAMETER_REFERENCED_BY_STATIC = new StaticWarningCode('TYPE_PARAMETER_REFERENCED_BY_STATIC', 68, "Static members cannot reference type parameters"); |
+ static final StaticWarningCode TYPE_PARAMETER_REFERENCED_BY_STATIC = new StaticWarningCode.con1('TYPE_PARAMETER_REFERENCED_BY_STATIC', 68, "Static members cannot reference type parameters"); |
/** |
* 12.15.3 Static Invocation: A static method invocation <i>i</i> has the form |
@@ -2676,12 +2733,12 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* |
* @param undefinedClassName the name of the undefined class |
*/ |
- static final StaticWarningCode UNDEFINED_CLASS = new StaticWarningCode('UNDEFINED_CLASS', 69, "Undefined class '%s'"); |
+ static final StaticWarningCode UNDEFINED_CLASS = new StaticWarningCode.con1('UNDEFINED_CLASS', 69, "Undefined class '%s'"); |
/** |
* Same as [UNDEFINED_CLASS], but to catch using "boolean" instead of "bool". |
*/ |
- static final StaticWarningCode UNDEFINED_CLASS_BOOLEAN = new StaticWarningCode('UNDEFINED_CLASS_BOOLEAN', 70, "Undefined class 'boolean'; did you mean 'bool'?"); |
+ static final StaticWarningCode UNDEFINED_CLASS_BOOLEAN = new StaticWarningCode.con1('UNDEFINED_CLASS_BOOLEAN', 70, "Undefined class 'boolean'; did you mean 'bool'?"); |
/** |
* 12.17 Getter Invocation: It is a static warning if there is no class <i>C</i> in the enclosing |
@@ -2691,7 +2748,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* @param getterName the name of the getter |
* @param enclosingType the name of the enclosing type where the getter is being looked for |
*/ |
- static final StaticWarningCode UNDEFINED_GETTER = new StaticWarningCode('UNDEFINED_GETTER', 71, "There is no such getter '%s' in '%s'"); |
+ static final StaticWarningCode UNDEFINED_GETTER = new StaticWarningCode.con1('UNDEFINED_GETTER', 71, "There is no such getter '%s' in '%s'"); |
/** |
* 12.30 Identifier Reference: It is as static warning if an identifier expression of the form |
@@ -2699,7 +2756,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* setter) or variable initializer and there is no declaration <i>d</i> with name <i>id</i> in the |
* lexical scope enclosing the expression. |
*/ |
- static final StaticWarningCode UNDEFINED_IDENTIFIER = new StaticWarningCode('UNDEFINED_IDENTIFIER', 72, "Undefined name '%s'"); |
+ static final StaticWarningCode UNDEFINED_IDENTIFIER = new StaticWarningCode.con1('UNDEFINED_IDENTIFIER', 72, "Undefined name '%s'"); |
/** |
* 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>, <i>1<=i<=l</i>, |
@@ -2708,7 +2765,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* |
* @param name the name of the requested named parameter |
*/ |
- static final StaticWarningCode UNDEFINED_NAMED_PARAMETER = new StaticWarningCode('UNDEFINED_NAMED_PARAMETER', 73, "The named parameter '%s' is not defined"); |
+ static final StaticWarningCode UNDEFINED_NAMED_PARAMETER = new StaticWarningCode.con1('UNDEFINED_NAMED_PARAMETER', 73, "The named parameter '%s' is not defined"); |
/** |
* 12.18 Assignment: It is as static warning if an assignment of the form <i>v = e</i> occurs |
@@ -2723,7 +2780,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* @param setterName the name of the getter |
* @param enclosingType the name of the enclosing type where the setter is being looked for |
*/ |
- static final StaticWarningCode UNDEFINED_SETTER = new StaticWarningCode('UNDEFINED_SETTER', 74, "There is no such setter '%s' in '%s'"); |
+ static final StaticWarningCode UNDEFINED_SETTER = new StaticWarningCode.con1('UNDEFINED_SETTER', 74, "There is no such setter '%s' in '%s'"); |
/** |
* 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not declare a static method |
@@ -2732,7 +2789,7 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
* @param methodName the name of the method |
* @param enclosingType the name of the enclosing type where the method is being looked for |
*/ |
- static final StaticWarningCode UNDEFINED_STATIC_METHOD_OR_GETTER = new StaticWarningCode('UNDEFINED_STATIC_METHOD_OR_GETTER', 75, "There is no such static method '%s' in '%s'"); |
+ static final StaticWarningCode UNDEFINED_STATIC_METHOD_OR_GETTER = new StaticWarningCode.con1('UNDEFINED_STATIC_METHOD_OR_GETTER', 75, "There is no such static method '%s' in '%s'"); |
static final List<StaticWarningCode> values = [ |
AMBIGUOUS_IMPORT, |
ARGUMENT_TYPE_NOT_ASSIGNABLE, |
@@ -2811,31 +2868,40 @@ class StaticWarningCode implements Enum<StaticWarningCode>, ErrorCode { |
UNDEFINED_SETTER, |
UNDEFINED_STATIC_METHOD_OR_GETTER]; |
- /// The name of this enum constant, as declared in the enum declaration. |
- final String name; |
- |
- /// The position in the enum declaration. |
- final int ordinal; |
- |
/** |
- * The message template used to create the message to be displayed for this error. |
+ * The template used to create the message to be displayed for this error. |
*/ |
String _message; |
/** |
- * Initialize a newly created error code to have the given type and message. |
+ * The template used to create the correction to be displayed for this error, or `null` if |
+ * there is no correction information for this error. |
+ */ |
+ String correction7; |
+ |
+ /** |
+ * Initialize a newly created error code to have the given message. |
* |
* @param message the message template used to create the message to be displayed for the error |
*/ |
- StaticWarningCode(this.name, this.ordinal, String message) { |
+ StaticWarningCode.con1(String name, int ordinal, String message) : super(name, ordinal) { |
+ this._message = message; |
+ } |
+ |
+ /** |
+ * Initialize a newly created error code to have the given message and correction. |
+ * |
+ * @param message the template used to create the message to be displayed for the error |
+ * @param correction the template used to create the correction to be displayed for the error |
+ */ |
+ StaticWarningCode.con2(String name, int ordinal, String message, String correction) : super(name, ordinal) { |
this._message = message; |
+ this.correction7 = correction; |
} |
+ String get correction => correction7; |
ErrorSeverity get errorSeverity => ErrorType.STATIC_WARNING.severity; |
String get message => _message; |
ErrorType get type => ErrorType.STATIC_WARNING; |
- int compareTo(StaticWarningCode other) => ordinal - other.ordinal; |
- int get hashCode => ordinal; |
- String toString() => name; |
} |
/** |
* The interface `AnalysisErrorListener` defines the behavior of objects that listen for |
@@ -2869,7 +2935,7 @@ class AnalysisErrorListener_5 implements AnalysisErrorListener { |
* |
* @coverage dart.engine.error |
*/ |
-class HtmlWarningCode implements Enum<HtmlWarningCode>, ErrorCode { |
+class HtmlWarningCode extends Enum<HtmlWarningCode> implements ErrorCode { |
/** |
* An error code indicating that the value of the 'src' attribute of a Dart script tag is not a |
@@ -2877,7 +2943,7 @@ class HtmlWarningCode implements Enum<HtmlWarningCode>, ErrorCode { |
* |
* @param uri the URI that is invalid |
*/ |
- static final HtmlWarningCode INVALID_URI = new HtmlWarningCode('INVALID_URI', 0, "Invalid URI syntax: '%s'"); |
+ static final HtmlWarningCode INVALID_URI = new HtmlWarningCode.con1('INVALID_URI', 0, "Invalid URI syntax: '%s'"); |
/** |
* An error code indicating that the value of the 'src' attribute of a Dart script tag references |
@@ -2885,34 +2951,43 @@ class HtmlWarningCode implements Enum<HtmlWarningCode>, ErrorCode { |
* |
* @param uri the URI pointing to a non-existent file |
*/ |
- static final HtmlWarningCode URI_DOES_NOT_EXIST = new HtmlWarningCode('URI_DOES_NOT_EXIST', 1, "Target of URI does not exist: '%s'"); |
+ static final HtmlWarningCode URI_DOES_NOT_EXIST = new HtmlWarningCode.con1('URI_DOES_NOT_EXIST', 1, "Target of URI does not exist: '%s'"); |
static final List<HtmlWarningCode> values = [INVALID_URI, URI_DOES_NOT_EXIST]; |
- /// The name of this enum constant, as declared in the enum declaration. |
- final String name; |
- |
- /// The position in the enum declaration. |
- final int ordinal; |
- |
/** |
- * The message template used to create the message to be displayed for this error. |
+ * The template used to create the message to be displayed for this error. |
*/ |
String _message; |
/** |
- * Initialize a newly created error code to have the given type and message. |
+ * The template used to create the correction to be displayed for this error, or `null` if |
+ * there is no correction information for this error. |
+ */ |
+ String correction4; |
+ |
+ /** |
+ * Initialize a newly created error code to have the given message. |
* |
* @param message the message template used to create the message to be displayed for the error |
*/ |
- HtmlWarningCode(this.name, this.ordinal, String message) { |
+ HtmlWarningCode.con1(String name, int ordinal, String message) : super(name, ordinal) { |
+ this._message = message; |
+ } |
+ |
+ /** |
+ * Initialize a newly created error code to have the given message and correction. |
+ * |
+ * @param message the template used to create the message to be displayed for the error |
+ * @param correction the template used to create the correction to be displayed for the error |
+ */ |
+ HtmlWarningCode.con2(String name, int ordinal, String message, String correction) : super(name, ordinal) { |
this._message = message; |
+ this.correction4 = correction; |
} |
+ String get correction => correction4; |
ErrorSeverity get errorSeverity => ErrorSeverity.WARNING; |
String get message => _message; |
ErrorType get type => ErrorType.STATIC_WARNING; |
- int compareTo(HtmlWarningCode other) => ordinal - other.ordinal; |
- int get hashCode => ordinal; |
- String toString() => name; |
} |
/** |
* The enumeration `StaticTypeWarningCode` defines the error codes used for static type |
@@ -2922,7 +2997,7 @@ class HtmlWarningCode implements Enum<HtmlWarningCode>, ErrorCode { |
* |
* @coverage dart.engine.error |
*/ |
-class StaticTypeWarningCode implements Enum<StaticTypeWarningCode>, ErrorCode { |
+class StaticTypeWarningCode extends Enum<StaticTypeWarningCode> implements ErrorCode { |
/** |
* 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. It is a static type |
@@ -2930,7 +3005,7 @@ class StaticTypeWarningCode implements Enum<StaticTypeWarningCode>, ErrorCode { |
* |
* @see #UNDEFINED_SETTER |
*/ |
- static final StaticTypeWarningCode INACCESSIBLE_SETTER = new StaticTypeWarningCode('INACCESSIBLE_SETTER', 0, ""); |
+ static final StaticTypeWarningCode INACCESSIBLE_SETTER = new StaticTypeWarningCode.con1('INACCESSIBLE_SETTER', 0, ""); |
/** |
* 8.1.1 Inheritance and Overriding: However, if there are multiple members <i>m<sub>1</sub>, |
@@ -2952,7 +3027,7 @@ class StaticTypeWarningCode implements Enum<StaticTypeWarningCode>, ErrorCode { |
* * Otherwise none of the members <i>m<sub>1</sub>, …, m<sub>k</sub></i> is inherited. |
* </ol> |
*/ |
- static final StaticTypeWarningCode INCONSISTENT_METHOD_INHERITANCE = new StaticTypeWarningCode('INCONSISTENT_METHOD_INHERITANCE', 1, "'%s' is inherited by at least two interfaces inconsistently"); |
+ static final StaticTypeWarningCode INCONSISTENT_METHOD_INHERITANCE = new StaticTypeWarningCode.con1('INCONSISTENT_METHOD_INHERITANCE', 1, "'%s' is inherited by at least two interfaces inconsistently"); |
/** |
* 12.15.1 Ordinary Invocation: It is a static type warning if <i>T</i> does not have an |
@@ -2961,7 +3036,7 @@ class StaticTypeWarningCode implements Enum<StaticTypeWarningCode>, ErrorCode { |
* @param memberName the name of the static member |
* @see UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER |
*/ |
- static final StaticTypeWarningCode INSTANCE_ACCESS_TO_STATIC_MEMBER = new StaticTypeWarningCode('INSTANCE_ACCESS_TO_STATIC_MEMBER', 2, "Static member '%s' cannot be accessed using instance access"); |
+ static final StaticTypeWarningCode INSTANCE_ACCESS_TO_STATIC_MEMBER = new StaticTypeWarningCode.con1('INSTANCE_ACCESS_TO_STATIC_MEMBER', 2, "Static member '%s' cannot be accessed using instance access"); |
/** |
* 12.18 Assignment: It is a static type warning if the static type of <i>e</i> may not be |
@@ -2978,7 +3053,7 @@ class StaticTypeWarningCode implements Enum<StaticTypeWarningCode>, ErrorCode { |
* @param rhsTypeName the name of the right hand side type |
* @param lhsTypeName the name of the left hand side type |
*/ |
- static final StaticTypeWarningCode INVALID_ASSIGNMENT = new StaticTypeWarningCode('INVALID_ASSIGNMENT', 3, "A value of type '%s' cannot be assigned to a variable of type '%s'"); |
+ static final StaticTypeWarningCode INVALID_ASSIGNMENT = new StaticTypeWarningCode.con1('INVALID_ASSIGNMENT', 3, "A value of type '%s' cannot be assigned to a variable of type '%s'"); |
/** |
* 12.15.1 Ordinary Invocation: An ordinary method invocation <i>i</i> has the form |
@@ -3000,7 +3075,7 @@ class StaticTypeWarningCode implements Enum<StaticTypeWarningCode>, ErrorCode { |
* |
* @param nonFunctionIdentifier the name of the identifier that is not a function type |
*/ |
- static final StaticTypeWarningCode INVOCATION_OF_NON_FUNCTION = new StaticTypeWarningCode('INVOCATION_OF_NON_FUNCTION', 4, "'%s' is not a method"); |
+ static final StaticTypeWarningCode INVOCATION_OF_NON_FUNCTION = new StaticTypeWarningCode.con1('INVOCATION_OF_NON_FUNCTION', 4, "'%s' is not a method"); |
/** |
* 12.14.4 Function Expression Invocation: A function expression invocation <i>i</i> has the form |
@@ -3010,7 +3085,7 @@ class StaticTypeWarningCode implements Enum<StaticTypeWarningCode>, 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 final StaticTypeWarningCode INVOCATION_OF_NON_FUNCTION_EXPRESSION = new StaticTypeWarningCode('INVOCATION_OF_NON_FUNCTION_EXPRESSION', 5, "Cannot invoke a non-function"); |
+ static final StaticTypeWarningCode INVOCATION_OF_NON_FUNCTION_EXPRESSION = new StaticTypeWarningCode.con1('INVOCATION_OF_NON_FUNCTION_EXPRESSION', 5, "Cannot invoke a non-function"); |
/** |
* 12.19 Conditional: It is a static type warning if the type of <i>e<sub>1</sub></i> may not be |
@@ -3023,19 +3098,19 @@ class StaticTypeWarningCode implements Enum<StaticTypeWarningCode>, ErrorCode { |
* |
* 13.8 Do: It is a static type warning if the type of <i>e</i> cannot be assigned to bool. |
*/ |
- static final StaticTypeWarningCode NON_BOOL_CONDITION = new StaticTypeWarningCode('NON_BOOL_CONDITION', 6, "Conditions must have a static type of 'bool'"); |
+ static final StaticTypeWarningCode NON_BOOL_CONDITION = new StaticTypeWarningCode.con1('NON_BOOL_CONDITION', 6, "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 final StaticTypeWarningCode NON_BOOL_EXPRESSION = new StaticTypeWarningCode('NON_BOOL_EXPRESSION', 7, "Assertions must be on either a 'bool' or '() -> bool'"); |
+ static final StaticTypeWarningCode NON_BOOL_EXPRESSION = new StaticTypeWarningCode.con1('NON_BOOL_EXPRESSION', 7, "Assertions must be on either a 'bool' or '() -> 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 final StaticTypeWarningCode NON_TYPE_AS_TYPE_ARGUMENT = new StaticTypeWarningCode('NON_TYPE_AS_TYPE_ARGUMENT', 8, "The name '%s' is not a type and cannot be used as a parameterized type"); |
+ static final StaticTypeWarningCode NON_TYPE_AS_TYPE_ARGUMENT = new StaticTypeWarningCode.con1('NON_TYPE_AS_TYPE_ARGUMENT', 8, "The name '%s' 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 be assigned to the |
@@ -3045,7 +3120,7 @@ class StaticTypeWarningCode implements Enum<StaticTypeWarningCode>, ErrorCode { |
* @param expectedReturnType the expected return type as defined by the method |
* @param methodName the name of the method |
*/ |
- static final StaticTypeWarningCode RETURN_OF_INVALID_TYPE = new StaticTypeWarningCode('RETURN_OF_INVALID_TYPE', 9, "The return type '%s' is not a '%s', as defined by the method '%s'"); |
+ static final StaticTypeWarningCode RETURN_OF_INVALID_TYPE = new StaticTypeWarningCode.con1('RETURN_OF_INVALID_TYPE', 9, "The return type '%s' is not a '%s', as defined by the method '%s'"); |
/** |
* 12.11 Instance Creation: It is a static type warning if any of the type arguments to a |
@@ -3070,7 +3145,7 @@ class StaticTypeWarningCode implements Enum<StaticTypeWarningCode>, ErrorCode { |
* limited by the bound as specified in the class declaration |
* @param boundingTypeName the name of the bounding type |
*/ |
- static final StaticTypeWarningCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = new StaticTypeWarningCode('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 10, "'%s' does not extend '%s'"); |
+ static final StaticTypeWarningCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = new StaticTypeWarningCode.con1('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 10, "'%s' does not extend '%s'"); |
/** |
* 12.17 Getter Invocation: Let <i>T</i> be the static type of <i>e</i>. It is a static type |
@@ -3079,7 +3154,7 @@ class StaticTypeWarningCode implements Enum<StaticTypeWarningCode>, ErrorCode { |
* @param getterName the name of the getter |
* @param enclosingType the name of the enclosing type where the getter is being looked for |
*/ |
- static final StaticTypeWarningCode UNDEFINED_GETTER = new StaticTypeWarningCode('UNDEFINED_GETTER', 11, "There is no such getter '%s' in '%s'"); |
+ static final StaticTypeWarningCode UNDEFINED_GETTER = new StaticTypeWarningCode.con1('UNDEFINED_GETTER', 11, "There is no such getter '%s' in '%s'"); |
/** |
* 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>. It is a static type |
@@ -3088,7 +3163,7 @@ class StaticTypeWarningCode implements Enum<StaticTypeWarningCode>, ErrorCode { |
* @param methodName the name of the method that is undefined |
* @param typeName the resolved type name that the method lookup is happening on |
*/ |
- static final StaticTypeWarningCode UNDEFINED_METHOD = new StaticTypeWarningCode('UNDEFINED_METHOD', 12, "The method '%s' is not defined for the class '%s'"); |
+ static final StaticTypeWarningCode UNDEFINED_METHOD = new StaticTypeWarningCode.con1('UNDEFINED_METHOD', 12, "The method '%s' is not defined for the class '%s'"); |
/** |
* 12.18 Assignment: Evaluation of an assignment of the form |
@@ -3106,7 +3181,7 @@ class StaticTypeWarningCode implements Enum<StaticTypeWarningCode>, ErrorCode { |
* @param operator the name of the operator |
* @param enclosingType the name of the enclosing type where the operator is being looked for |
*/ |
- static final StaticTypeWarningCode UNDEFINED_OPERATOR = new StaticTypeWarningCode('UNDEFINED_OPERATOR', 13, "There is no such operator '%s' in '%s'"); |
+ static final StaticTypeWarningCode UNDEFINED_OPERATOR = new StaticTypeWarningCode.con1('UNDEFINED_OPERATOR', 13, "There is no such operator '%s' in '%s'"); |
/** |
* 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. It is a static type |
@@ -3116,7 +3191,7 @@ class StaticTypeWarningCode implements Enum<StaticTypeWarningCode>, ErrorCode { |
* @param enclosingType the name of the enclosing type where the setter is being looked for |
* @see #INACCESSIBLE_SETTER |
*/ |
- static final StaticTypeWarningCode UNDEFINED_SETTER = new StaticTypeWarningCode('UNDEFINED_SETTER', 14, "There is no such setter '%s' in '%s'"); |
+ static final StaticTypeWarningCode UNDEFINED_SETTER = new StaticTypeWarningCode.con1('UNDEFINED_SETTER', 14, "There is no such setter '%s' in '%s'"); |
/** |
* 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form |
@@ -3127,7 +3202,7 @@ class StaticTypeWarningCode implements Enum<StaticTypeWarningCode>, ErrorCode { |
* @param methodName the name of the method that is undefined |
* @param typeName the resolved type name that the method lookup is happening on |
*/ |
- static final StaticTypeWarningCode UNDEFINED_SUPER_METHOD = new StaticTypeWarningCode('UNDEFINED_SUPER_METHOD', 15, "There is no such method '%s' in '%s'"); |
+ static final StaticTypeWarningCode UNDEFINED_SUPER_METHOD = new StaticTypeWarningCode.con1('UNDEFINED_SUPER_METHOD', 15, "There is no such method '%s' in '%s'"); |
/** |
* 12.15.1 Ordinary Invocation: It is a static type warning if <i>T</i> does not have an |
@@ -3137,7 +3212,7 @@ class StaticTypeWarningCode implements Enum<StaticTypeWarningCode>, ErrorCode { |
* able to find the name defined in a supertype. It exists to provide a more informative error |
* message. |
*/ |
- static final StaticTypeWarningCode UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER = new StaticTypeWarningCode('UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER', 16, "Static members from supertypes must be qualified by the name of the defining type"); |
+ static final StaticTypeWarningCode UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER = new StaticTypeWarningCode.con1('UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER', 16, "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 generic type with |
@@ -3149,7 +3224,7 @@ class StaticTypeWarningCode implements Enum<StaticTypeWarningCode>, ErrorCode { |
* @see CompileTimeErrorCode#CONST_WITH_INVALID_TYPE_PARAMETERS |
* @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS |
*/ |
- static final StaticTypeWarningCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = new StaticTypeWarningCode('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 17, "The type '%s' is declared with %d type parameters, but %d type arguments were given"); |
+ static final StaticTypeWarningCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = new StaticTypeWarningCode.con1('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 17, "The type '%s' is declared with %d type parameters, but %d type arguments were given"); |
static final List<StaticTypeWarningCode> values = [ |
INACCESSIBLE_SETTER, |
INCONSISTENT_METHOD_INHERITANCE, |
@@ -3170,29 +3245,38 @@ class StaticTypeWarningCode implements Enum<StaticTypeWarningCode>, ErrorCode { |
UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER, |
WRONG_NUMBER_OF_TYPE_ARGUMENTS]; |
- /// The name of this enum constant, as declared in the enum declaration. |
- final String name; |
- |
- /// The position in the enum declaration. |
- final int ordinal; |
- |
/** |
- * The message template used to create the message to be displayed for this error. |
+ * The template used to create the message to be displayed for this error. |
*/ |
String _message; |
/** |
- * Initialize a newly created error code to have the given type and message. |
+ * The template used to create the correction to be displayed for this error, or `null` if |
+ * there is no correction information for this error. |
+ */ |
+ String correction6; |
+ |
+ /** |
+ * Initialize a newly created error code to have the given message. |
* |
* @param message the message template used to create the message to be displayed for the error |
*/ |
- StaticTypeWarningCode(this.name, this.ordinal, String message) { |
+ StaticTypeWarningCode.con1(String name, int ordinal, String message) : super(name, ordinal) { |
+ this._message = message; |
+ } |
+ |
+ /** |
+ * Initialize a newly created error code to have the given message and correction. |
+ * |
+ * @param message the template used to create the message to be displayed for the error |
+ * @param correction the template used to create the correction to be displayed for the error |
+ */ |
+ StaticTypeWarningCode.con2(String name, int ordinal, String message, String correction) : super(name, ordinal) { |
this._message = message; |
+ this.correction6 = correction; |
} |
+ String get correction => correction6; |
ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; |
String get message => _message; |
ErrorType get type => ErrorType.STATIC_TYPE_WARNING; |
- int compareTo(StaticTypeWarningCode other) => ordinal - other.ordinal; |
- int get hashCode => ordinal; |
- String toString() => name; |
} |