CompileTimeErrorCode class

The error codes used for compile time errors. The convention for this class is for the name of the error code to indicate the problem that caused the error to be generated and for the error message to explain what is wrong and, when appropriate, how the problem can be corrected.

Inheritance

Constructors

CompileTimeErrorCode(String name, { String message, { String correction, bool hasPublishedDocs bool isUnresolvedIdentifier: false })
Initialize a newly created error code to have the given name. The message associated with the error will be created from the given message template. The correction associated with the error will be created from the given correction template.
const

Properties

errorSeverity ErrorSeverity
The severity of the error.
read-only, override
type ErrorType
The type of the error.
read-only, override
correction → String
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.
final, inherited
hashCode → int
The hash code for this object.
read-only, inherited
hasPublishedDocs → bool
Return true if diagnostics with this code have documentation for them that has been published.
final, inherited
isUnresolvedIdentifier → bool
Whether this error is caused by an unresolved identifier.
final, inherited
message → String
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.
final, inherited
name → String
The name of the error code.
final, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited
uniqueName → String
The unique name of this error code.
read-only, inherited
url → String
Return a URL that can be used to access documentation for diagnostics with this code, or null if there is no published documentation.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited

Constants

ABSTRACT_SUPER_MEMBER_REFERENCE → const CompileTimeErrorCode
Parameters: 0: the display name for the kind of the found abstract member 1: the name of the member
const CompileTimeErrorCode('ABSTRACT_SUPER_MEMBER_REFERENCE', 'The {0} '{1}' is always abstract in the supertype.', hasPublishedDocs: true)
ACCESS_PRIVATE_ENUM_FIELD → const CompileTimeErrorCode
Enum proposal: It is also a compile-time error to explicitly instantiate an enum via 'new' or 'const' or to access its private fields.
const CompileTimeErrorCode('ACCESS_PRIVATE_ENUM_FIELD', 'The private fields of an enum can't be accessed, even within the ' 'same library.')
AMBIGUOUS_EXPORT → const CompileTimeErrorCode
14.2 Exports: It is a compile-time error if a name N is re-exported by a library L and N is introduced into the export namespace of L by more than one export, unless each all exports refer to same declaration for the name N. [...]
const CompileTimeErrorCode('AMBIGUOUS_EXPORT', 'The name '{0}' is defined in the libraries '{1}' and '{2}'.', correction: 'Try removing the export of one of…
AMBIGUOUS_EXTENSION_MEMBER_ACCESS → const CompileTimeErrorCode
Parameters: 0: the name of the member 1: the name of the first declaring extension 2: the name of the second declaring extension
const CompileTimeErrorCode('AMBIGUOUS_EXTENSION_MEMBER_ACCESS', 'A member named '{0}' is defined in extensions '{1}' and '{2}' and ' 'neither is more specif…
AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH → const CompileTimeErrorCode
No parameters.
const CompileTimeErrorCode('AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH', 'This literal contains both 'Map' and 'Iterable' spreads, ' 'which makes it impossible to determine …
AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER → const CompileTimeErrorCode
No parameters.
const CompileTimeErrorCode('AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER', 'This literal must be either a map or a set, but the elements don't ' 'have enough information for type infere…
ANNOTATION_WITH_NON_CLASS → const CompileTimeErrorCode
15 Metadata: The constant expression given in an annotation is type checked and evaluated in the scope surrounding the declaration being annotated. [...]
const CompileTimeErrorCode('ANNOTATION_WITH_NON_CLASS', 'The name '{0}' isn't a class.', correction: 'Try importing the library that declares the class, ' 'corr…
ANNOTATION_WITH_TYPE_ARGUMENTS → const ParserErrorCode
@Deprecated('Use ParserErrorCode.ANNOTATION_WITH_TYPE_ARGUMENTS')
ParserErrorCode.ANNOTATION_WITH_TYPE_ARGUMENTS
ASSERT_IN_REDIRECTING_CONSTRUCTOR → const CompileTimeErrorCode
const CompileTimeErrorCode('ASSERT_IN_REDIRECTING_CONSTRUCTOR', 'A redirecting constructor can't have an 'assert' initializer.')
ASYNC_FOR_IN_WRONG_CONTEXT → const CompileTimeErrorCode
17.6.3 Asynchronous For-in: It is a compile-time error if an asynchronous for-in statement appears inside a synchronous function.
const CompileTimeErrorCode('ASYNC_FOR_IN_WRONG_CONTEXT', 'The async for-in can only be used in an async function.', correction: 'Try marking the function body with either 'asyn…
AWAIT_IN_WRONG_CONTEXT → const CompileTimeErrorCode
16.30 Await Expressions: It is a compile-time error if the function immediately enclosing a is not declared asynchronous. (Where a is the await expression.)
const CompileTimeErrorCode('AWAIT_IN_WRONG_CONTEXT', 'The await expression can only be used in an async function.', correction: 'Try marking the function body with either 'asyn…
BUILT_IN_IDENTIFIER_AS_EXTENSION_NAME → const CompileTimeErrorCode
Parameters: 0: the built-in identifier that is being used
const CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_EXTENSION_NAME', 'The built-in identifier '{0}' can't be used as an extension name.', correction: 'Try choosing a dif…
BUILT_IN_IDENTIFIER_AS_PREFIX_NAME → const CompileTimeErrorCode
16.33 Identifier Reference: It is a compile-time error if a built-in identifier is used as the declared name of a prefix, class, type parameter or type alias. [...]
const CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_PREFIX_NAME', 'The built-in identifier '{0}' can't be used as a prefix name.', correction: 'Try choosing a different …
BUILT_IN_IDENTIFIER_AS_TYPE → const CompileTimeErrorCode
12.30 Identifier Reference: It is a compile-time error to use a built-in identifier other than dynamic as a type annotation. [...]
const CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE', 'The built-in identifier '{0}' can't be used as a type.', correction: 'Try correcting the name to match an exi…
BUILT_IN_IDENTIFIER_AS_TYPE_NAME → const CompileTimeErrorCode
16.33 Identifier Reference: It is a compile-time error if a built-in identifier is used as the declared name of a prefix, class, type parameter or type alias. [...]
const CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE_NAME', 'The built-in identifier '{0}' can't be used as a type name.', correction: 'Try choosing a different name…
BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME → const CompileTimeErrorCode
16.33 Identifier Reference: It is a compile-time error if a built-in identifier is used as the declared name of a prefix, class, type parameter or type alias. [...]
const CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME', 'The built-in identifier '{0}' can't be used as a type parameter ' 'name.', correction: …
BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME → const CompileTimeErrorCode
16.33 Identifier Reference: It is a compile-time error if a built-in identifier is used as the declared name of a prefix, class, type parameter or type alias. [...]
const CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME', 'The built-in identifier '{0}' can't be used as a typedef name.', correction: 'Try choosing a differen…
CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS → const CompileTimeErrorCode
13.9 Switch: It is a compile-time error if the class C implements the operator ==. [...]
const CompileTimeErrorCode('CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS', 'The switch case expression type '{0}' can't override the == ' 'operator.')
CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD → const CompileTimeErrorCode
10.11 Class Member Conflicts: Let C be a class. It is a compile-time error if C declares a constructor named C.n, and a static member with basename n. [...]
const CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD', ''{0}' can't be used to name both a constructor and a static field ' 'in this class.', correc…
CONFLICTING_CONSTRUCTOR_AND_STATIC_METHOD → const CompileTimeErrorCode
10.11 Class Member Conflicts: Let C be a class. It is a compile-time error if C declares a constructor named C.n, and a static member with basename n. [...]
const CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_AND_STATIC_METHOD', ''{0}' can't be used to name both a constructor and a static method ' 'in this class.', corr…
CONFLICTING_FIELD_AND_METHOD → const CompileTimeErrorCode
10.11 Class Member Conflicts: Let C be a class. It is a compile-time error if C declares a getter or a setter with basename n, and has a method named n. [...]
const CompileTimeErrorCode('CONFLICTING_FIELD_AND_METHOD', 'Class '{0}' can't define field '{1}' and have method '{2}.{1}' ' 'with the same name.', …
CONFLICTING_GENERIC_INTERFACES → const CompileTimeErrorCode
10.10 Superinterfaces: It is a compile-time error if a class C has two superinterfaces that are different instantiations of the same generic class. For example, a class may not have both List<int> and List<num> as superinterfaces. [...]
const CompileTimeErrorCode('CONFLICTING_GENERIC_INTERFACES', 'The class '{0}' cannot implement both '{1}' and '{2}' because the ' 'type arguments are differ…
CONFLICTING_METHOD_AND_FIELD → const CompileTimeErrorCode
10.11 Class Member Conflicts: Let C be a class. It is a compile-time error if C declares a method named n, and has a getter or a setter with basename n. [...]
const CompileTimeErrorCode('CONFLICTING_METHOD_AND_FIELD', 'Class '{0}' can't define method '{1}' and have field '{2}.{1}' ' 'with the same name.', …
CONFLICTING_STATIC_AND_INSTANCE → const CompileTimeErrorCode
10.11 Class Member Conflicts: Let C be a class. It is a compile-time error if C declares a static member with basename n, and has an instance member with basename n. [...]
const CompileTimeErrorCode('CONFLICTING_STATIC_AND_INSTANCE', 'Class '{0}' can't define static member '{1}' and have instance ' 'member '{2}.{1}' with t…
CONFLICTING_TYPE_VARIABLE_AND_CLASS → const CompileTimeErrorCode
  • Classes: It is a compile time error if a generic class declares a type variable with the same name as the class or any of its members or constructors.
  • [...]
    const CompileTimeErrorCode('CONFLICTING_TYPE_VARIABLE_AND_CLASS', ''{0}' can't be used to name both a type variable and the class in ' 'which the type variable is defin…
    CONFLICTING_TYPE_VARIABLE_AND_MEMBER → const CompileTimeErrorCode
  • Classes: It is a compile time error if a generic class declares a type variable with the same name as the class or any of its members or constructors.
  • [...]
    const CompileTimeErrorCode('CONFLICTING_TYPE_VARIABLE_AND_MEMBER', ''{0}' can't be used to name both a type variable and a member in ' 'this class.', correction: &#…
    CONST_CONSTRUCTOR_THROWS_EXCEPTION → const CompileTimeErrorCode
    16.12.2 Const: It is a compile-time error if evaluation of a constant object results in an uncaught exception being thrown.
    const CompileTimeErrorCode('CONST_CONSTRUCTOR_THROWS_EXCEPTION', 'Const constructors can't throw exceptions.', correction: 'Try removing the throw statement, or ' 'remo…
    CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST → const CompileTimeErrorCode
    10.6.3 Constant Constructors: It is a compile-time error if a constant constructor is declared by a class C if any instance variable declared in C is initialized with an expression that is not a constant expression. [...]
    const CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST', 'Can't define the const constructor because the field '{0}' ' 'is initialized with a…
    CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD → const CompileTimeErrorCode
    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. [...]
    const CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD', 'Const constructor can't be declared for a class with a mixin ' 'that declares an instance field.', co…
    CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER → const CompileTimeErrorCode
    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. [...]
    const CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER', 'Constant constructor can't call non-constant super constructor of ' ''{0}'.', correction: '…
    CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD → const CompileTimeErrorCode
    7.6.3 Constant Constructors: It is a compile-time error if a constant constructor is declared by a class that has a non-final instance variable. [...]
    const CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD', 'Can't define a const constructor for a class with non-final fields.', correction: 'Try making all of the f…
    CONST_DEFERRED_CLASS → const CompileTimeErrorCode
    12.12.2 Const: It is a compile-time error if T is a deferred type.
    const CompileTimeErrorCode('CONST_DEFERRED_CLASS', 'Deferred classes can't be created with 'const'.', correction: 'Try using 'new' to create the instance, or &#…
    CONST_EVAL_THROWS_EXCEPTION → const CompileTimeErrorCode
    16.12.2 Const: It is a compile-time error if evaluation of a constant object results in an uncaught exception being thrown.
    const CompileTimeErrorCode('CONST_EVAL_THROWS_EXCEPTION', 'Evaluation of this constant expression throws an exception.')
    CONST_EVAL_THROWS_IDBZE → const CompileTimeErrorCode
    16.12.2 Const: It is a compile-time error if evaluation of a constant object results in an uncaught exception being thrown.
    const CompileTimeErrorCode('CONST_EVAL_THROWS_IDBZE', 'Evaluation of this constant expression throws an ' 'IntegerDivisionByZeroException.')
    CONST_EVAL_TYPE_BOOL → const CompileTimeErrorCode
    16.12.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.
    const CompileTimeErrorCode('CONST_EVAL_TYPE_BOOL', 'In constant expressions, operands of this operator must be of type ' ''bool'.')
    CONST_EVAL_TYPE_BOOL_INT → const CompileTimeErrorCode
    16.12.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.
    const CompileTimeErrorCode('CONST_EVAL_TYPE_BOOL_INT', 'In constant expressions, operands of this operator must be of type ' ''bool' or 'int'.')
    CONST_EVAL_TYPE_BOOL_NUM_STRING → const CompileTimeErrorCode
    16.12.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.
    const CompileTimeErrorCode('CONST_EVAL_TYPE_BOOL_NUM_STRING', 'In constant expressions, operands of this operator must be of type ' ''bool', 'num', 'String'…
    CONST_EVAL_TYPE_INT → const CompileTimeErrorCode
    16.12.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.
    const CompileTimeErrorCode('CONST_EVAL_TYPE_INT', 'In constant expressions, operands of this operator must be of type ' ''int'.')
    CONST_EVAL_TYPE_NUM → const CompileTimeErrorCode
    16.12.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.
    const CompileTimeErrorCode('CONST_EVAL_TYPE_NUM', 'In constant expressions, operands of this operator must be of type ' ''num'.')
    CONST_EVAL_TYPE_TYPE → const CompileTimeErrorCode
    const CompileTimeErrorCode('CONST_EVAL_TYPE_TYPE', 'In constant expressions, operands of this operator must be of type ' ''Type'.')
    CONST_FORMAL_PARAMETER → const CompileTimeErrorCode
    6.2 Formal Parameters: It is a compile-time error if a formal parameter is declared as a constant variable.
    const CompileTimeErrorCode('CONST_FORMAL_PARAMETER', 'Parameters can't be const.', correction: 'Try removing the 'const' keyword.')
    CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE → const CompileTimeErrorCode
    No parameters.
    const CompileTimeErrorCode('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', 'Const variables must be initialized with a constant value.', correction: 'Try changing the initializer to b…
    CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY → const CompileTimeErrorCode
    5 Variables: A constant variable must be initialized to a compile-time constant or a compile-time error occurs. [...]
    const CompileTimeErrorCode('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY', 'Constant values from a deferred library can't be used to ' 'initialized a const v…
    CONST_INSTANCE_FIELD → const CompileTimeErrorCode
    7.5 Instance Variables: It is a compile-time error if an instance variable is declared to be constant.
    const CompileTimeErrorCode('CONST_INSTANCE_FIELD', 'Only static fields can be declared as const.', correction: 'Try declaring the field as final, or adding the keyword ' '&…
    CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS → const CompileTimeErrorCode
    12.8 Maps: It is a compile-time error if the key of an entry in a constant map literal is an instance of a class that implements the operator == unless the key is a string or integer. [...]
    const CompileTimeErrorCode('CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS', 'The constant map entry key expression type '{0}' can't override ' 'the == operator.',…
    CONST_NOT_INITIALIZED → const CompileTimeErrorCode
    5 Variables: A constant variable must be initialized to a compile-time constant (12.1) or a compile-time error occurs. [...]
    const CompileTimeErrorCode('CONST_NOT_INITIALIZED', 'The const variable '{0}' must be initialized.', correction: 'Try adding an initialization to the declaration.')
    CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS → const CompileTimeErrorCode
    Parameters: 0: the type of the element
    const CompileTimeErrorCode('CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS', 'The constant set element type '{0}' can't override ' 'the == operator.', correction: 'Tr…
    CONST_SPREAD_EXPECTED_LIST_OR_SET → const CompileTimeErrorCode
    No parameters.
    const CompileTimeErrorCode('CONST_SPREAD_EXPECTED_LIST_OR_SET', 'A list or a set is expected in this spread.', hasPublishedDocs: true)
    CONST_SPREAD_EXPECTED_MAP → const CompileTimeErrorCode
    No parameters.
    const CompileTimeErrorCode('CONST_SPREAD_EXPECTED_MAP', 'A map is expected in this spread.', hasPublishedDocs: true)
    CONST_WITH_INVALID_TYPE_PARAMETERS → const CompileTimeErrorCode
    16.12.2 Const: If T is a parameterized type S<U1, …, Um>, let R = S; It is a compile time error if S is not a generic type with m type parameters. [...]
    const CompileTimeErrorCode('CONST_WITH_INVALID_TYPE_PARAMETERS', 'The type '{0}' is declared with {1} type parameters, but {2} type ' 'arguments were given.', correctio…
    CONST_WITH_NON_CONST → const CompileTimeErrorCode
    16.12.2 Const: If e is of the form const T(a1, …, an, xn+1: an+1, …, xn+k: an+k) it is a compile-time error if the type T does not declare a constant constructor with the same name as the declaration of T.
    const CompileTimeErrorCode('CONST_WITH_NON_CONST', 'The constructor being called isn't a const constructor.', correction: 'Try using 'new' to call the constructor.'…
    CONST_WITH_NON_CONSTANT_ARGUMENT → const CompileTimeErrorCode
    No parameters.
    const CompileTimeErrorCode('CONST_WITH_NON_CONSTANT_ARGUMENT', 'Arguments of a constant creation must be constant expressions.', correction: 'Try making the argument a valid consta…
    CONST_WITH_NON_TYPE → const CompileTimeErrorCode
    16.12.2 Const: It is a compile-time error if T is not a class accessible in the current scope, optionally followed by type arguments. [...]
    const CompileTimeErrorCode('CONST_WITH_NON_TYPE', 'The name '{0}' isn't a class.', correction: 'Try correcting the name to match an existing class.')
    CONST_WITH_TYPE_PARAMETERS → const CompileTimeErrorCode
    16.12.2 Const: If T is a parameterized type, it is a compile-time error if T includes a type variable among its type arguments.
    const CompileTimeErrorCode('CONST_WITH_TYPE_PARAMETERS', 'A constant creation can't use a type parameter as a type argument.', correction: 'Try replacing the type parameter wit…
    CONST_WITH_UNDEFINED_CONSTRUCTOR → const CompileTimeErrorCode
    16.12.2 Const: It is a compile-time error if T.id is not the name of a constant constructor declared by the type T. [...]
    const CompileTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR', 'The class '{0}' doesn't have a constant constructor '{1}'.', correction: 'Try calling a differen…
    CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT → const CompileTimeErrorCode
    16.12.2 Const: It is a compile-time error if T.id is not the name of a constant constructor declared by the type T. [...]
    const CompileTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 'The class '{0}' doesn't have a default constant constructor.', correction: 'Try calling a differ…
    DEFAULT_LIST_CONSTRUCTOR_MISMATCH → const CompileTimeErrorCode
    It is an error to call the default List constructor with a length argument and a type argument which is potentially non-nullable.
    const CompileTimeErrorCode('DEFAULT_LIST_CONSTRUCTOR_MISMATCH', 'A list whose values can't be 'null' can't be given an initial ' 'length because the initial values …
    DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS → const CompileTimeErrorCode
    15.3.1 Typedef: It is a compile-time error if any default values are specified in the signature of a function type alias.
    const CompileTimeErrorCode('DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS', 'Default parameter values aren't allowed in typedefs.', correction: 'Try removing the default value.')
    DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER → const CompileTimeErrorCode
    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.
    const CompileTimeErrorCode('DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER', 'Default values aren't allowed in function typed parameters.', correction: 'Try removing the default val…
    DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR → const CompileTimeErrorCode
    7.6.2 Factories: It is a compile-time error if k explicitly specifies a default value for an optional parameter.
    const CompileTimeErrorCode('DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR', 'Default values aren't allowed in factory constructors that redirect ' 'to another constructor.&#…
    DEFAULT_VALUE_ON_REQUIRED_PARAMETER → const CompileTimeErrorCode
    No parameters.
    const CompileTimeErrorCode('DEFAULT_VALUE_ON_REQUIRED_PARAMETER', 'Required named parameters can't have a default value.', correction: 'Try removing either the default value or…
    DUPLICATE_CONSTRUCTOR_DEFAULT → const CompileTimeErrorCode
    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.
    const CompileTimeErrorCode('DUPLICATE_CONSTRUCTOR_DEFAULT', 'The default constructor is already defined.', correction: 'Try giving one of the constructors a name.')
    DUPLICATE_CONSTRUCTOR_NAME → const CompileTimeErrorCode
    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. [...]
    const CompileTimeErrorCode('DUPLICATE_CONSTRUCTOR_NAME', 'The constructor with name '{0}' is already defined.', correction: 'Try renaming one of the constructors.')
    DUPLICATE_DEFINITION → const CompileTimeErrorCode
    Parameters: 0: the name of the duplicate entity
    const CompileTimeErrorCode('DUPLICATE_DEFINITION', 'The name '{0}' is already defined.', correction: 'Try renaming one of the declarations.', hasPublishedDocs: true)
    DUPLICATE_NAMED_ARGUMENT → const CompileTimeErrorCode
    12.14.2 Binding Actuals to Formals: It is a compile-time error if qi = qj for any i != j where <i>q<sub>i</sub></i> is the label for a named argument. [...]
    const CompileTimeErrorCode('DUPLICATE_NAMED_ARGUMENT', 'The argument for the named parameter '{0}' was already specified.', correction: 'Try removing one of the named argum…
    DUPLICATE_PART → const CompileTimeErrorCode
    18.3 Parts: It's a compile-time error if the same library contains two part directives with the same URI. [...]
    const CompileTimeErrorCode('DUPLICATE_PART', 'The library already contains a part with the uri '{0}'.', correction: 'Try removing all but one of the duplicated part directi…
    EQUAL_ELEMENTS_IN_CONST_SET → const CompileTimeErrorCode
    No parameters.
    const CompileTimeErrorCode('EQUAL_ELEMENTS_IN_CONST_SET', 'Two values in a constant set can't be equal.', hasPublishedDocs: true)
    EQUAL_KEYS_IN_CONST_MAP → const CompileTimeErrorCode
    No parameters.
    const CompileTimeErrorCode('EQUAL_KEYS_IN_CONST_MAP', 'Two keys in a constant map literal can't be equal.', correction: 'Change or remove the duplicate key.', hasPublishedD…
    EXPORT_INTERNAL_LIBRARY → const CompileTimeErrorCode
    SDK implementation libraries can be exported only by other SDK libraries. [...]
    const CompileTimeErrorCode('EXPORT_INTERNAL_LIBRARY', 'The library '{0}' is internal and can't be exported.')
    EXPORT_OF_NON_LIBRARY → const CompileTimeErrorCode
    14.2 Exports: It is a compile-time error if the compilation unit found at the specified URI is not a library declaration. [...]
    const CompileTimeErrorCode('EXPORT_OF_NON_LIBRARY', 'The exported library '{0}' can't have a part-of directive.', correction: 'Try exporting the library that the part i…
    EXPRESSION_IN_MAP → const CompileTimeErrorCode
    No parameters.
    const CompileTimeErrorCode('EXPRESSION_IN_MAP', 'Expressions can't be used in a map literal.', correction: 'Try removing the expression or converting it to be a map ' '…
    EXTENDS_DEFERRED_CLASS → const CompileTimeErrorCode
    7.9 Superclasses: It is a compile-time error if the extends clause of a class C includes a deferred type expression. [...]
    const CompileTimeErrorCode('EXTENDS_DEFERRED_CLASS', 'Classes can't extend deferred classes.', correction: 'Try specifying a different superclass, or ' 'removing the ex…
    EXTENDS_DISALLOWED_CLASS → const CompileTimeErrorCode
    12.2 Null: It is a compile-time error for a class to attempt to extend or implement Null. [...]
    const CompileTimeErrorCode('EXTENDS_DISALLOWED_CLASS', 'Classes can't extend '{0}'.', correction: 'Try specifying a different superclass, or ' 'removing the ext…
    EXTENDS_NON_CLASS → const CompileTimeErrorCode
    7.9 Superclasses: It is a compile-time error if the extends clause of a class C includes a type expression that does not denote a class available in the lexical scope of C. [...]
    const CompileTimeErrorCode('EXTENDS_NON_CLASS', 'Classes can only extend other classes.', correction: 'Try specifying a different superclass, or removing the extends ' 'cla…
    EXTENSION_AS_EXPRESSION → const CompileTimeErrorCode
    Parameters: 0: the name of the extension
    const CompileTimeErrorCode('EXTENSION_AS_EXPRESSION', 'Extension '{0}' can't be used as an expression.', correction: 'Try replacing it with a valid expression.', ha…
    EXTENSION_CONFLICTING_STATIC_AND_INSTANCE → const CompileTimeErrorCode
    Parameters: 0: the name of the extension defining the conflicting member 1: the name of the conflicting static member
    const CompileTimeErrorCode('EXTENSION_CONFLICTING_STATIC_AND_INSTANCE', 'Extension '{0}' can't define static member '{1}' and an instance ' 'member with the sam…
    EXTENSION_DECLARES_MEMBER_OF_OBJECT → const CompileTimeErrorCode
    No parameters.
    const CompileTimeErrorCode('EXTENSION_DECLARES_MEMBER_OF_OBJECT', 'Extensions can't declare members with the same name as a member ' 'declared by 'Object'.', correc…
    EXTENSION_OVERRIDE_ACCESS_TO_STATIC_MEMBER → const CompileTimeErrorCode
    No parameters.
    const CompileTimeErrorCode('EXTENSION_OVERRIDE_ACCESS_TO_STATIC_MEMBER', 'An extension override can't be used to access a static member from ' 'an extension.', correction: …
    EXTENSION_OVERRIDE_ARGUMENT_NOT_ASSIGNABLE → const CompileTimeErrorCode
    Parameters: 0: the type of the argument 1: the extended type
    const CompileTimeErrorCode('EXTENSION_OVERRIDE_ARGUMENT_NOT_ASSIGNABLE', 'The type of the argument to the extension override '{0}' ' 'isn't assignable to the extended t…
    EXTENSION_OVERRIDE_WITH_CASCADE → const CompileTimeErrorCode
    No parameters.
    const CompileTimeErrorCode('EXTENSION_OVERRIDE_WITH_CASCADE', 'Extension overrides have no value so they can't be used as the ' 'target of a cascade expression.', correctio…
    EXTENSION_OVERRIDE_WITHOUT_ACCESS → const CompileTimeErrorCode
    No parameters.
    const CompileTimeErrorCode('EXTENSION_OVERRIDE_WITHOUT_ACCESS', 'An extension override can only be used to access instance members.', correction: 'Consider adding an access to an i…
    EXTRA_POSITIONAL_ARGUMENTS → const CompileTimeErrorCode
    Parameters: 0: the maximum number of positional arguments 1: the actual number of positional arguments given
    const CompileTimeErrorCode('EXTRA_POSITIONAL_ARGUMENTS', 'Too many positional arguments: {0} expected, but {1} found.', correction: 'Try removing the extra arguments.', hasPubl…
    EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED → const CompileTimeErrorCode
    Parameters: 0: the maximum number of positional arguments 1: the actual number of positional arguments given
    const CompileTimeErrorCode('EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED', 'Too many positional arguments: {0} expected, but {1} found.', correction: 'Try removing the extra positiona…
    FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS → const CompileTimeErrorCode
    7.6.1 Generative Constructors: Let k be a generative constructor. It is a compile time error if more than one initializer corresponding to a given instance variable appears in k's list. [...]
    const CompileTimeErrorCode('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 'The field '{0}' can't be initialized twice in the same constructor.', correction: 'Try removin…
    FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER → const CompileTimeErrorCode
    7.6.1 Generative Constructors: Let k be a generative constructor. It is a compile time error if k's initializer list contains an initializer for a variable that is initialized by means of an initializing formal of k.
    const CompileTimeErrorCode('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER', 'Fields can't be initialized in both the parameter list and the ' 'initializers.', correction: …
    FIELD_INITIALIZER_FACTORY_CONSTRUCTOR → const CompileTimeErrorCode
    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.
    const CompileTimeErrorCode('FIELD_INITIALIZER_FACTORY_CONSTRUCTOR', 'Initializing formal parameters can't be used in factory ' 'constructors.', correction: 'Try using a…
    FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR → const CompileTimeErrorCode
    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.
    const CompileTimeErrorCode('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 'Initializing formal parameters can only be used in constructors.', correction: 'Try using a normal parameter.&#…
    FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR → const CompileTimeErrorCode
    7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its only action is to invoke another generative constructor. [...]
    const CompileTimeErrorCode('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', 'The redirecting constructor can't have a field initializer.', correction: 'Try using a normal parameter…
    FINAL_INITIALIZED_MULTIPLE_TIMES → const CompileTimeErrorCode
    5 Variables: It is a compile-time error if a final instance variable that has is initialized by means of an initializing formal of a constructor is also initialized elsewhere in the same constructor. [...]
    const CompileTimeErrorCode('FINAL_INITIALIZED_MULTIPLE_TIMES', ''{0}' is a final field and so can only be set once.', correction: 'Try removing all but one of the initializ…
    FOR_IN_WITH_CONST_VARIABLE → const CompileTimeErrorCode
    const CompileTimeErrorCode('FOR_IN_WITH_CONST_VARIABLE', 'A for-in loop-variable can't be 'const'.', correction: 'Try removing the 'const' modifier from the var…
    GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND → const CompileTimeErrorCode
    It is a compile-time error if a generic function type is used as a bound for a formal type parameter of a class or a function.
    const CompileTimeErrorCode('GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND', 'Generic function types can't be used as type parameter bounds', correction: 'Try making the free variable i…
    GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT → const CompileTimeErrorCode
    It is a compile-time error if a generic function type is used as an actual type argument.
    const CompileTimeErrorCode('GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT', 'A generic function type can't be a type argument.', correction: 'Try removing type parameters from …
    IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY → const CompileTimeErrorCode
    const CompileTimeErrorCode('IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY', 'Constant values from a deferred library can't be used as values in ' 'an if condition inside a const c…
    IMPLEMENTS_DEFERRED_CLASS → const CompileTimeErrorCode
    7.10 Superinterfaces: It is a compile-time error if the implements clause of a class C specifies a malformed type or deferred type as a superinterface. [...]
    const CompileTimeErrorCode('IMPLEMENTS_DEFERRED_CLASS', 'Classes and mixins can't implement deferred classes.', correction: 'Try specifying a different interface, ' 're…
    IMPLEMENTS_DISALLOWED_CLASS → const CompileTimeErrorCode
    12.2 Null: It is a compile-time error for a class to attempt to extend or implement Null. [...]
    const CompileTimeErrorCode('IMPLEMENTS_DISALLOWED_CLASS', 'Classes and mixins can't implement '{0}'.', correction: 'Try specifying a different interface, or ' '…
    IMPLEMENTS_NON_CLASS → const CompileTimeErrorCode
    Parameters: 0: the name of the interface that was not found
    const CompileTimeErrorCode('IMPLEMENTS_NON_CLASS', 'Classes and mixins can only implement other classes and mixins.', correction: 'Try specifying a class or mixin, or remove the na…
    IMPLEMENTS_REPEATED → const CompileTimeErrorCode
    10.10 Superinterfaces: It is a compile-time error if two elements in the type list of the implements clause of a class C specifies the same type T. [...]
    const CompileTimeErrorCode('IMPLEMENTS_REPEATED', ''{0}' can only be implemented once.', correction: 'Try removing all but one occurrence of the class name.')
    IMPLEMENTS_SUPER_CLASS → const CompileTimeErrorCode
    7.10 Superinterfaces: It is a compile-time error if the superclass of a class C appears in the implements clause of C. [...]
    const CompileTimeErrorCode('IMPLEMENTS_SUPER_CLASS', ''{0}' can't be used in both 'extends' and 'implements' clauses.', correction: 'Try removing one of…
    IMPLICIT_THIS_REFERENCE_IN_INITIALIZER → const CompileTimeErrorCode
    7.6.1 Generative Constructors: Note that this is not in scope on the right hand side of an initializer. [...]
    const CompileTimeErrorCode('IMPLICIT_THIS_REFERENCE_IN_INITIALIZER', 'Only static members can be accessed in initializers.')
    IMPORT_INTERNAL_LIBRARY → const CompileTimeErrorCode
    SDK implementation libraries can be imported only by other SDK libraries. [...]
    const CompileTimeErrorCode('IMPORT_INTERNAL_LIBRARY', 'The library '{0}' is internal and can't be imported.')
    IMPORT_OF_NON_LIBRARY → const CompileTimeErrorCode
    14.1 Imports: It is a compile-time error if the specified URI of an immediate import does not refer to a library declaration. [...]
    const CompileTimeErrorCode('IMPORT_OF_NON_LIBRARY', 'The imported library '{0}' can't have a part-of directive.', correction: 'Try importing the library that the part i…
    INCONSISTENT_CASE_EXPRESSION_TYPES → const CompileTimeErrorCode
    13.9 Switch: It is a compile-time error if values of the expressions ek are not instances of the same class C, for all 1 <= k <= n. [...]
    const CompileTimeErrorCode('INCONSISTENT_CASE_EXPRESSION_TYPES', 'Case expressions must have the same types, '{0}' isn't a '{1}'.')
    INCONSISTENT_INHERITANCE → const CompileTimeErrorCode
    If a class declaration does not have a member declaration with a particular name, but some super-interfaces do have a member with that name, it's a compile-time error if there is no signature among the super-interfaces that is a valid override of all the other super-interface signatures with the same name. That "most specific" signature becomes the signature of the class's interface. [...]
    const CompileTimeErrorCode('INCONSISTENT_INHERITANCE', 'Superinterfaces don't have a valid override for '{0}': {1}.', correction: 'Try adding an explicit override that …
    INCONSISTENT_INHERITANCE_GETTER_AND_METHOD → const CompileTimeErrorCode
    11.1.1 Inheritance and Overriding. Let I be the implicit interface of a class C declared in library L. I inherits all members of inherited(I, L) and I overrides m' if m' ∈ overrides(I, L). It is a compile-time error if m is a method and m' is a getter, or if m is a getter and m' is a method. [...]
    const CompileTimeErrorCode('INCONSISTENT_INHERITANCE_GETTER_AND_METHOD', ''{0}' is inherited as a getter (from '{1}') and also a ' 'method (from '{2}').'…
    INITIALIZER_FOR_NON_EXISTENT_FIELD → const CompileTimeErrorCode
    7.6.1 Generative Constructors: Let k be a generative constructor. It is a compile-time error if k's initializer list contains an initializer for a variable that is not an instance variable declared in the immediately surrounding class. [...]
    const CompileTimeErrorCode('INITIALIZER_FOR_NON_EXISTENT_FIELD', ''{0}' isn't a field in the enclosing class.', correction: 'Try correcting the name to match an existin…
    INITIALIZER_FOR_STATIC_FIELD → const CompileTimeErrorCode
    7.6.1 Generative Constructors: Let k be a generative constructor. It is a compile-time error if k's initializer list contains an initializer for a variable that is not an instance variable declared in the immediately surrounding class. [...]
    const CompileTimeErrorCode('INITIALIZER_FOR_STATIC_FIELD', ''{0}' is a static field in the enclosing class. Fields initialized ' 'in a constructor can't be static.'…
    INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD → const CompileTimeErrorCode
    7.6.1 Generative Constructors: An initializing formal has the form this.id. It is a compile-time error if id is not the name of an instance variable of the immediately enclosing class. [...]
    const CompileTimeErrorCode('INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD', ''{0}' isn't a field in the enclosing class.', correction: 'Try correcting the name to match an…
    INITIALIZING_FORMAL_FOR_STATIC_FIELD → const CompileTimeErrorCode
    7.6.1 Generative Constructors: An initializing formal has the form this.id. It is a compile-time error if id is not the name of an instance variable of the immediately enclosing class. [...]
    const CompileTimeErrorCode('INITIALIZING_FORMAL_FOR_STATIC_FIELD', ''{0}' is a static field in the enclosing class. Fields initialized ' 'in a constructor can't be stat…
    INSTANCE_MEMBER_ACCESS_FROM_FACTORY → const CompileTimeErrorCode
    12.30 Identifier Reference: Otherwise, e is equivalent to the property extraction this.id.
    const CompileTimeErrorCode('INSTANCE_MEMBER_ACCESS_FROM_FACTORY', 'Instance members can't be accessed from a factory constructor.', correction: 'Try removing the reference to t…
    INSTANCE_MEMBER_ACCESS_FROM_STATIC → const CompileTimeErrorCode
    12.30 Identifier Reference: Otherwise, e is equivalent to the property extraction this.id.
    const CompileTimeErrorCode('INSTANCE_MEMBER_ACCESS_FROM_STATIC', 'Instance members can't be accessed from a static method.', correction: 'Try removing the reference to the inst…
    INSTANTIATE_ENUM → const CompileTimeErrorCode
    Enum proposal: It is also a compile-time error to explicitly instantiate an enum via 'new' or 'const' or to access its private fields.
    const CompileTimeErrorCode('INSTANTIATE_ENUM', 'Enums can't be instantiated.', correction: 'Try using one of the defined constants.')
    INTEGER_LITERAL_IMPRECISE_AS_DOUBLE → const CompileTimeErrorCode
    An integer literal with static type double and numeric value i evaluates to an instance of the double class representing the value i. It is a compile-time error if the value i cannot be represented precisely by the an instace of double.
    const CompileTimeErrorCode('INTEGER_LITERAL_IMPRECISE_AS_DOUBLE', 'The integer literal is being used as a double, but can't be ' 'represented as a 64 bit double without overflo…
    INTEGER_LITERAL_OUT_OF_RANGE → const CompileTimeErrorCode
    const CompileTimeErrorCode('INTEGER_LITERAL_OUT_OF_RANGE', 'The integer literal {0} can't be represented in 64 bits.', correction: 'Try using the BigInt class if you need an in…
    INVALID_ANNOTATION → const CompileTimeErrorCode
    15 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.
    const CompileTimeErrorCode('INVALID_ANNOTATION', 'Annotation must be either a const variable reference or const ' 'constructor invocation.')
    INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY → const CompileTimeErrorCode
    15 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. [...]
    const CompileTimeErrorCode('INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY', 'Constant values from a deferred library can't be used as ' 'annotations.', correction: 'Try remo…
    INVALID_ANNOTATION_GETTER → const CompileTimeErrorCode
    15 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.
    const CompileTimeErrorCode('INVALID_ANNOTATION_GETTER', 'Getters can't be used as annotations.', correction: 'Try using a top-level variable or a field.')
    INVALID_CONSTANT → const CompileTimeErrorCode
    TODO(brianwilkerson) Remove this when we have decided on how to report errors in compile-time constants. Until then, this acts as a placeholder for more informative errors. [...]
    const CompileTimeErrorCode('INVALID_CONSTANT', 'Invalid constant value.')
    INVALID_CONSTRUCTOR_NAME → const CompileTimeErrorCode
    7.6 Constructors: It is a compile-time error if the name of a constructor is not a constructor name.
    const CompileTimeErrorCode('INVALID_CONSTRUCTOR_NAME', 'Invalid constructor name.')
    INVALID_EXTENSION_ARGUMENT_COUNT → const CompileTimeErrorCode
    No parameters.
    const CompileTimeErrorCode('INVALID_EXTENSION_ARGUMENT_COUNT', 'Extension overrides must have exactly one argument: ' 'the value of 'this' in the extension method.', co…
    INVALID_FACTORY_NAME_NOT_A_CLASS → const CompileTimeErrorCode
    7.6.2 Factories: It is a compile-time error if M is not the name of the immediately enclosing class.
    const CompileTimeErrorCode('INVALID_FACTORY_NAME_NOT_A_CLASS', 'The name of a factory constructor must be the same as the name of ' 'the immediately enclosing class.')
    INVALID_INLINE_FUNCTION_TYPE → const CompileTimeErrorCode
    const CompileTimeErrorCode('INVALID_INLINE_FUNCTION_TYPE', 'Inline function types can't be used for parameters in a generic ' 'function type.', correction: 'Try using a…
    INVALID_MODIFIER_ON_CONSTRUCTOR → const CompileTimeErrorCode
  • Functions: It is a compile-time error if an async, async* or sync* modifier is attached to the body of a setter or constructor.
  • const CompileTimeErrorCode('INVALID_MODIFIER_ON_CONSTRUCTOR', 'The modifier '{0}' can't be applied to the body of a constructor.', correction: 'Try removing the modifie…
    INVALID_MODIFIER_ON_SETTER → const CompileTimeErrorCode
  • Functions: It is a compile-time error if an async, async* or sync* modifier is attached to the body of a setter or constructor.
  • const CompileTimeErrorCode('INVALID_MODIFIER_ON_SETTER', 'The modifier '{0}' can't be applied to the body of a setter.', correction: 'Try removing the modifier.')
    INVALID_OPTIONAL_PARAMETER_TYPE → const CompileTimeErrorCode
    It is an error if an optional parameter (named or otherwise) with no default value has a potentially non-nullable type. This is produced in cases where there is no valid default value.
    const CompileTimeErrorCode('INVALID_OPTIONAL_PARAMETER_TYPE', 'The parameter '{0}' can't have a value of 'null' because of its ' 'type, but no non-null default …
    INVALID_OVERRIDE → const CompileTimeErrorCode
    If a class declaration has a member declaration, the signature of that member declaration becomes the signature in the interface. It's a compile-time error if that signature is not a valid override of all super-interface member signatures with the same name. (Not just the members of the immediate super-interfaces, but all of them. For non-covariant parameters, it's sufficient to check just the immediate super-interfaces). [...]
    const CompileTimeErrorCode('INVALID_OVERRIDE', ''{1}.{0}' ('{2}') isn't a valid override of '{3}.{0}' ('{4}').')
    INVALID_REFERENCE_TO_THIS → const CompileTimeErrorCode
    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.
    const CompileTimeErrorCode('INVALID_REFERENCE_TO_THIS', 'Invalid reference to 'this' expression.')
    INVALID_TYPE_ARGUMENT_IN_CONST_LIST → const CompileTimeErrorCode
    12.6 Lists: It is a compile time error if the type argument of a constant list literal includes a type parameter. [...]
    const CompileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_LIST', 'Constant list literals can't include a type parameter as a type ' 'argument, such as '{0}'.', cor…
    INVALID_TYPE_ARGUMENT_IN_CONST_MAP → const CompileTimeErrorCode
    12.7 Maps: It is a compile time error if the type arguments of a constant map literal include a type parameter. [...]
    const CompileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 'Constant map literals can't include a type parameter as a type ' 'argument, such as '{0}'.', corre…
    INVALID_TYPE_ARGUMENT_IN_CONST_SET → const CompileTimeErrorCode
    const CompileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_SET', 'Constant set literals can't include a type parameter as a type ' 'argument, such as '{0}'.', corre…
    INVALID_URI → const CompileTimeErrorCode
    14.2 Exports: It is a compile-time error if the compilation unit found at the specified URI is not a library declaration. [...]
    const CompileTimeErrorCode('INVALID_URI', 'Invalid URI syntax: '{0}'.')
    INVALID_USE_OF_COVARIANT → const CompileTimeErrorCode
    The 'covariant' keyword was found in an inappropriate location.
    const CompileTimeErrorCode('INVALID_USE_OF_COVARIANT', 'The 'covariant' keyword can only be used for parameters in instance ' 'methods or before non-final instance fields.&…
    INVALID_USE_OF_COVARIANT_IN_EXTENSION → const ParserErrorCode
    @Deprecated('Use ParserErrorCode.INVALID_USE_OF_COVARIANT_IN_EXTENSION')
    ParserErrorCode.INVALID_USE_OF_COVARIANT_IN_EXTENSION
    INVOCATION_OF_EXTENSION_WITHOUT_CALL → const CompileTimeErrorCode
    Parameters: 0: the name of the extension
    const CompileTimeErrorCode('INVOCATION_OF_EXTENSION_WITHOUT_CALL', 'The extension '{0}' does not define a 'call' method so the override ' 'can't be used in an i…
    LABEL_IN_OUTER_SCOPE → const CompileTimeErrorCode
    13.13 Break: It is a compile-time error if no such statement sE exists within the innermost function in which sb occurs. [...]
    const CompileTimeErrorCode('LABEL_IN_OUTER_SCOPE', 'Can't reference label '{0}' declared in an outer method.')
    LABEL_UNDEFINED → const CompileTimeErrorCode
    13.13 Break: It is a compile-time error if no such statement sE exists within the innermost function in which sb occurs. [...]
    const CompileTimeErrorCode('LABEL_UNDEFINED', 'Can't reference undefined label '{0}'.', correction: 'Try defining the label, or ' 'correcting the name to match …
    MAP_ENTRY_NOT_IN_MAP → const CompileTimeErrorCode
    No parameters.
    const CompileTimeErrorCode('MAP_ENTRY_NOT_IN_MAP', 'Map entries can only be used in a map literal.', correction: 'Try converting the collection to a map or removing the map ' &…
    MEMBER_WITH_CLASS_NAME → const CompileTimeErrorCode
    7 Classes: It is a compile time error if a class C declares a member with the same name as C.
    const CompileTimeErrorCode('MEMBER_WITH_CLASS_NAME', 'Class members can't have the same name as the enclosing class.')
    MISSING_CONST_IN_LIST_LITERAL → const CompileTimeErrorCode
    12.1 Constants: A constant expression is ... a constant list literal.
    const CompileTimeErrorCode('MISSING_CONST_IN_LIST_LITERAL', 'List literals must be prefixed with 'const' when used as a constant ' 'expression.', correction: 'Try a…
    MISSING_CONST_IN_MAP_LITERAL → const CompileTimeErrorCode
    12.1 Constants: A constant expression is ... a constant map literal.
    const CompileTimeErrorCode('MISSING_CONST_IN_MAP_LITERAL', 'Map literals must be prefixed with 'const' when used as a constant ' 'expression.', correction: 'Try add…
    MISSING_CONST_IN_SET_LITERAL → const CompileTimeErrorCode
    12.1 Constants: A constant expression is ... a constant set literal.
    const CompileTimeErrorCode('MISSING_CONST_IN_SET_LITERAL', 'Set literals must be prefixed with 'const' when used as a constant ' 'expression.', correction: 'Try add…
    MISSING_DART_LIBRARY → const CompileTimeErrorCode
    const CompileTimeErrorCode('MISSING_DART_LIBRARY', 'Required library '{0}' is missing.', correction: 'Check your Dart SDK installation for completeness.')
    MISSING_DEFAULT_VALUE_FOR_PARAMETER → const CompileTimeErrorCode
    No parameters.
    const CompileTimeErrorCode('MISSING_DEFAULT_VALUE_FOR_PARAMETER', 'The parameter '{0}' can't have a value of 'null' because of its ' 'type, so it must either be…
    MISSING_REQUIRED_ARGUMENT → const CompileTimeErrorCode
    It is an error if a named parameter that is marked as being required is not bound to an argument at a call site. [...]
    const CompileTimeErrorCode('MISSING_REQUIRED_ARGUMENT', 'The named parameter '{0}' is required but was not provided.', correction: 'Try adding the required argument.')
    MIXIN_APPLICATION_CONCRETE_SUPER_INVOKED_MEMBER_TYPE → const CompileTimeErrorCode
    It's a compile-time error to apply a mixin containing super-invocations to a class that doesn't have a concrete implementation of the super-invoked members compatible with the super-constraint interface. [...]
    const CompileTimeErrorCode('MIXIN_APPLICATION_CONCRETE_SUPER_INVOKED_MEMBER_TYPE', 'The super-invoked member '{0}' has the type '{1}', but the ' 'concrete member in…
    MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_MEMBER → const CompileTimeErrorCode
    It's a compile-time error to apply a mixin containing super-invocations to a class that doesn't have a concrete implementation of the super-invoked members compatible with the super-constraint interface. [...]
    const CompileTimeErrorCode('MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_MEMBER', 'The class doesn't have a concrete implementation of the ' 'super-invoked member '{0}'.…
    MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE → const CompileTimeErrorCode
    It's a compile-time error to apply a mixin to a class that doesn't implement all the on type requirements of the mixin declaration. [...]
    const CompileTimeErrorCode('MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE', ''{0}' can't be mixed onto '{1}' because '{1}' doesn't implement ' ''{…
    MIXIN_CLASS_DECLARES_CONSTRUCTOR → const CompileTimeErrorCode
    9 Mixins: It is a compile-time error if a declared or derived mixin explicitly declares a constructor. [...]
    const CompileTimeErrorCode('MIXIN_CLASS_DECLARES_CONSTRUCTOR', 'The class '{0}' can't be used as a mixin because it declares a ' 'constructor.')
    MIXIN_DECLARES_CONSTRUCTOR → const CompileTimeErrorCode
    The mixinMember production allows the same instance or static members that a class would allow, but no constructors (for now).
    const CompileTimeErrorCode('MIXIN_DECLARES_CONSTRUCTOR', 'Mixins can't declare constructors.')
    MIXIN_DEFERRED_CLASS → const CompileTimeErrorCode
    9.1 Mixin Application: It is a compile-time error if the with clause of a mixin application C includes a deferred type expression. [...]
    const CompileTimeErrorCode('MIXIN_DEFERRED_CLASS', 'Classes can't mixin deferred classes.', correction: 'Try changing the import to not be deferred.')
    MIXIN_INFERENCE_INCONSISTENT_MATCHING_CLASSES → const CompileTimeErrorCode
    const CompileTimeErrorCode('MIXIN_INFERENCE_INCONSISTENT_MATCHING_CLASSES', 'Type parameters couldn't be inferred for the mixin '{0}' because ' 'the base class implemen…
    MIXIN_INFERENCE_NO_MATCHING_CLASS → const CompileTimeErrorCode
    const CompileTimeErrorCode('MIXIN_INFERENCE_NO_MATCHING_CLASS', 'Type parameters couldn't be inferred for the mixin '{0}' because ' 'the base class doesn't implemen…
    MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION → const CompileTimeErrorCode
    const CompileTimeErrorCode('MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION', 'Type parameters couldn't be inferred for the mixin '{0}' because ' 'no type parameter substituti…
    MIXIN_INHERITS_FROM_NOT_OBJECT → const CompileTimeErrorCode
    9 Mixins: It is a compile-time error if a mixin is derived from a class whose superclass is not Object. [...]
    const CompileTimeErrorCode('MIXIN_INHERITS_FROM_NOT_OBJECT', 'The class '{0}' can't be used as a mixin because it extends a class ' 'other than Object.')
    MIXIN_INSTANTIATE → const CompileTimeErrorCode
    A mixin declaration introduces a mixin and an interface, but not a class.
    const CompileTimeErrorCode('MIXIN_INSTANTIATE', 'Mixins can't be instantiated.')
    MIXIN_OF_DISALLOWED_CLASS → const CompileTimeErrorCode
    12.2 Null: It is a compile-time error for a class to attempt to extend or implement Null. [...]
    const CompileTimeErrorCode('MIXIN_OF_DISALLOWED_CLASS', 'Classes can't mixin '{0}'.')
    MIXIN_OF_NON_CLASS → const CompileTimeErrorCode
    9.1 Mixin Application: It is a compile-time error if M does not denote a class or mixin available in the immediately enclosing scope.
    const CompileTimeErrorCode('MIXIN_OF_NON_CLASS', 'Classes can only mixin other classes.')
    MIXIN_REFERENCES_SUPER → const CompileTimeErrorCode
    9 Mixins: It is a compile-time error if a declared or derived mixin refers to super.
    const CompileTimeErrorCode('MIXIN_REFERENCES_SUPER', 'The class '{0}' can't be used as a mixin because it references ' ''super'.')
    MIXIN_SUPER_CLASS_CONSTRAINT_DEFERRED_CLASS → const CompileTimeErrorCode
    const CompileTimeErrorCode('MIXIN_SUPER_CLASS_CONSTRAINT_DEFERRED_CLASS', 'Deferred classes can't be used as super-class constraints.', correction: 'Try changing the import to …
    MIXIN_SUPER_CLASS_CONSTRAINT_DISALLOWED_CLASS → const CompileTimeErrorCode
    const CompileTimeErrorCode('MIXIN_SUPER_CLASS_CONSTRAINT_DISALLOWED_CLASS', ''{0}' can't be used as a super-class constraint.')
    MIXIN_SUPER_CLASS_CONSTRAINT_NON_INTERFACE → const CompileTimeErrorCode
    const CompileTimeErrorCode('MIXIN_SUPER_CLASS_CONSTRAINT_NON_INTERFACE', 'Only classes and mixins can be used as super-class constraints.')
    MIXIN_WITH_NON_CLASS_SUPERCLASS → const CompileTimeErrorCode
    9.1 Mixin Application: It is a compile-time error if S does not denote a class available in the immediately enclosing scope.
    const CompileTimeErrorCode('MIXIN_WITH_NON_CLASS_SUPERCLASS', 'Mixin can only be applied to class.')
    MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS → const CompileTimeErrorCode
    7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its only action is to invoke another generative constructor.
    const CompileTimeErrorCode('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS', 'Constructors can have at most one 'this' redirection.', correction: 'Try removing all but one of…
    MULTIPLE_SUPER_INITIALIZERS → const CompileTimeErrorCode
    7.6.1 Generative Constructors: Let k be a generative constructor. Then k may include at most one superinitializer in its initializer list or a compile time error occurs.
    const CompileTimeErrorCode('MULTIPLE_SUPER_INITIALIZERS', 'Constructor may have at most one 'super' initializer.', correction: 'Try removing all but one of the 'super&#…
    NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS → const CompileTimeErrorCode
    15 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.
    const CompileTimeErrorCode('NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS', 'Annotation creation must have arguments.', correction: 'Try adding an empty argument list.')
    NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT → const CompileTimeErrorCode
    This error is generated if a constructor declaration has an implicit invocation of a zero argument super constructor (super()), but the superclass does not define a zero argument constructor. [...]
    const CompileTimeErrorCode('NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT', 'The superclass '{0}' doesn't have a zero argument constructor.', correction: 'Try declaring a zero …
    NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT → const CompileTimeErrorCode
    This error is generated if a class declaration has an implicit default constructor, which implicitly invokes a zero argument super constructor (super()), but the superclass does not define a zero argument constructor. [...]
    const CompileTimeErrorCode('NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT', 'The superclass '{0}' doesn't have a zero argument constructor.', correction: 'Try declaring a zero …
    NON_CONST_MAP_AS_EXPRESSION_STATEMENT → const CompileTimeErrorCode
    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.
    const CompileTimeErrorCode('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 'A non-constant map or set literal without type arguments can't be ' 'used as an expression statement.')
    NON_CONSTANT_ANNOTATION_CONSTRUCTOR → const CompileTimeErrorCode
    15 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. [...]
    const CompileTimeErrorCode('NON_CONSTANT_ANNOTATION_CONSTRUCTOR', 'Annotation creation can only call a const constructor.')
    NON_CONSTANT_CASE_EXPRESSION → const CompileTimeErrorCode
    No parameters.
    const CompileTimeErrorCode('NON_CONSTANT_CASE_EXPRESSION', 'Case expressions must be constant.', hasPublishedDocs: true)
    NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY → const CompileTimeErrorCode
    13.9 Switch: Given a switch statement of the form switch (e) { label11 … label1j1 case e1: s1 … labeln1 … labelnjn case en: sn default: sn+1} or the form switch (e) { label11 … label1j1 case e1: s1 … labeln1 … labelnjn case en: sn}, it is a compile-time error if the expressions ek are not compile-time constants, for all 1 <= k <= n. [...]
    const CompileTimeErrorCode('NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY', 'Constant values from a deferred library can't be used as a case ' 'expression.', correctio…
    NON_CONSTANT_DEFAULT_VALUE → const CompileTimeErrorCode
    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.
    const CompileTimeErrorCode('NON_CONSTANT_DEFAULT_VALUE', 'Default values of an optional parameter must be constant.')
    NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY → const CompileTimeErrorCode
    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. [...]
    const CompileTimeErrorCode('NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY', 'Constant values from a deferred library can't be used as a default ' 'parameter value.', cor…
    NON_CONSTANT_LIST_ELEMENT → const CompileTimeErrorCode
    No parameters.
    const CompileTimeErrorCode('NON_CONSTANT_LIST_ELEMENT', 'The values in a const list literal must be constants.', correction: 'Try removing the keyword 'const' from the list…
    NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY → const CompileTimeErrorCode
    12.6 Lists: It is a compile time error if an element of a constant list literal is not a compile-time constant. [...]
    const CompileTimeErrorCode('NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY', 'Constant values from a deferred library can't be used as values in ' 'a 'const' list.'…
    NON_CONSTANT_MAP_ELEMENT → const CompileTimeErrorCode
    No parameters.
    const CompileTimeErrorCode('NON_CONSTANT_MAP_ELEMENT', 'The elements in a const map literal must be constant.', correction: 'Try removing the keyword 'const' from the map l…
    NON_CONSTANT_MAP_KEY → const CompileTimeErrorCode
    No parameters.
    const CompileTimeErrorCode('NON_CONSTANT_MAP_KEY', 'The keys in a const map literal must be constant.', correction: 'Try removing the keyword 'const' from the map literal.&…
    NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY → const CompileTimeErrorCode
    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. [...]
    const CompileTimeErrorCode('NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY', 'Constant values from a deferred library can't be used as keys in a ' 'const map literal.', correct…
    NON_CONSTANT_MAP_VALUE → const CompileTimeErrorCode
    No parameters.
    const CompileTimeErrorCode('NON_CONSTANT_MAP_VALUE', 'The values in a const map literal must be constant.', correction: 'Try removing the keyword 'const' from the map liter…
    NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY → const CompileTimeErrorCode
    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. [...]
    const CompileTimeErrorCode('NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY', 'Constant values from a deferred library can't be used as values in ' 'a const map literal.', cor…
    NON_CONSTANT_SET_ELEMENT → const CompileTimeErrorCode
    const CompileTimeErrorCode('NON_CONSTANT_SET_ELEMENT', 'The values in a const set literal must be constants.', correction: 'Try removing the keyword 'const' from the set li…
    NON_CONSTANT_VALUE_IN_INITIALIZER → const CompileTimeErrorCode
    This error code is no longer being generated. It should be removed when the reference to it in the linter has been removed and rolled into the SDK.
    const CompileTimeErrorCode('NON_CONSTANT_VALUE_IN_INITIALIZER', 'Initializer expressions in constant constructors must be ' 'constants.')
    NON_GENERATIVE_CONSTRUCTOR → const CompileTimeErrorCode
    7.6.1 Generative Constructors: Let C be the class in which the superinitializer appears and let S be the superclass of C. Let k be a generative constructor. It is a compile-time error if class S does not declare a generative constructor named S (respectively S.id)
    const CompileTimeErrorCode('NON_GENERATIVE_CONSTRUCTOR', 'The generative constructor '{0}' expected, but factory found.', correction: 'Try calling a different constructor i…
    NON_SYNC_FACTORY → const CompileTimeErrorCode
    const CompileTimeErrorCode('NON_SYNC_FACTORY', 'Factory bodies can't use 'async', 'async*', or 'sync*'.')
    NOT_ASSIGNED_POTENTIALLY_NON_NULLABLE_LOCAL_VARIABLE → const CompileTimeErrorCode
    It is an error if a potentially non-nullable local variable which has no initializer expression and is not marked late is used before it is definitely assigned. [...]
    const CompileTimeErrorCode('NOT_ASSIGNED_POTENTIALLY_NON_NULLABLE_LOCAL_VARIABLE', 'The non-nullable local variable '{0}' must be assigned before it ' 'can be used.', c…
    NOT_ENOUGH_POSITIONAL_ARGUMENTS → const CompileTimeErrorCode
    Parameters: 0: the expected number of required arguments 1: the actual number of positional arguments given
    const CompileTimeErrorCode('NOT_ENOUGH_POSITIONAL_ARGUMENTS', '{0} positional argument(s) expected, but {1} found.', correction: 'Try adding the missing arguments.', hasPublish…
    NOT_ENOUGH_REQUIRED_ARGUMENTS → const CompileTimeErrorCode
    @Deprecated('Use CompileTimeErrorCode.NOT_ENOUGH_POSITIONAL_ARGUMENTS')
    NOT_ENOUGH_POSITIONAL_ARGUMENTS
    NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD → const CompileTimeErrorCode
    It is an error if an instance field with potentially non-nullable type has no initializer expression and is not initialized in a constructor via an initializing formal or an initializer list entry, unless the field is marked with the late modifier. [...]
    const CompileTimeErrorCode('NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD', 'Non-nullable instance field '{0}' must be initialized.', correction: 'Try adding an initializer e…
    NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD_CONSTRUCTOR → const CompileTimeErrorCode
    It is an error if an instance field with potentially non-nullable type has no initializer expression and is not initialized in a constructor via an initializing formal or an initializer list entry, unless the field is marked with the late modifier. [...]
    const CompileTimeErrorCode('NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD_CONSTRUCTOR', 'Non-nullable instance field '{0}' must be initialized.', correction: 'Try adding an i…
    NOT_INITIALIZED_NON_NULLABLE_VARIABLE → const CompileTimeErrorCode
    It is an error if a static field or top-level variable with potentially non-nullable type has no initializer expression. [...]
    const CompileTimeErrorCode('NOT_INITIALIZED_NON_NULLABLE_VARIABLE', 'The non-nullable variable '{0}' must be initialized.', correction: 'Try adding an initializer expressio…
    NOT_ITERABLE_SPREAD → const CompileTimeErrorCode
    No parameters.
    const CompileTimeErrorCode('NOT_ITERABLE_SPREAD', 'Spread elements in list or set literals must implement 'Iterable'.', hasPublishedDocs: true)
    NOT_MAP_SPREAD → const CompileTimeErrorCode
    No parameters.
    const CompileTimeErrorCode('NOT_MAP_SPREAD', 'Spread elements in map literals must implement 'Map'.', hasPublishedDocs: true)
    NOT_NULL_AWARE_NULL_SPREAD → const CompileTimeErrorCode
    const CompileTimeErrorCode('NOT_NULL_AWARE_NULL_SPREAD', 'The Null typed expression can't be used with a non-null-aware ' 'spread.')
    NULLABLE_TYPE_IN_CATCH_CLAUSE → const CompileTimeErrorCode
    It is an error if the type T in the on-catch clause on T catch is potentially nullable.
    const CompileTimeErrorCode('NULLABLE_TYPE_IN_CATCH_CLAUSE', 'A nullable type can't be used in an 'on' clause because it isn't ' 'valid to throw 'null'.'…
    NULLABLE_TYPE_IN_EXTENDS_CLAUSE → const CompileTimeErrorCode
    No parameters.
    const CompileTimeErrorCode('NULLABLE_TYPE_IN_EXTENDS_CLAUSE', 'A class can't extend a nullable type.', correction: 'Try removing the question mark.')
    NULLABLE_TYPE_IN_IMPLEMENTS_CLAUSE → const CompileTimeErrorCode
    It is a compile-time error for a class to extend, implement, or mixin a type of the form T? for any T.
    const CompileTimeErrorCode('NULLABLE_TYPE_IN_IMPLEMENTS_CLAUSE', 'A class or mixin can't implement a nullable type.', correction: 'Try removing the question mark.')
    NULLABLE_TYPE_IN_ON_CLAUSE → const CompileTimeErrorCode
    It is a compile-time error for a class to extend, implement, or mixin a type of the form T? for any T.
    const CompileTimeErrorCode('NULLABLE_TYPE_IN_ON_CLAUSE', 'A mixin can't have a nullable type as a superclass constraint.', correction: 'Try removing the question mark.')
    NULLABLE_TYPE_IN_WITH_CLAUSE → const CompileTimeErrorCode
    It is a compile-time error for a class to extend, implement, or mixin a type of the form T? for any T.
    const CompileTimeErrorCode('NULLABLE_TYPE_IN_WITH_CLAUSE', 'A class or mixin can't mix in a nullable type.', correction: 'Try removing the question mark.')
    OBJECT_CANNOT_EXTEND_ANOTHER_CLASS → const CompileTimeErrorCode
    7.9 Superclasses: It is a compile-time error to specify an extends clause for class Object.
    const CompileTimeErrorCode('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 'The class 'Object' can't extend any other class.')
    ON_REPEATED → const CompileTimeErrorCode
    10.10 Superinterfaces: It is a compile-time error if two elements in the type list of the implements clause of a class C specifies the same type T. [...]
    const CompileTimeErrorCode('ON_REPEATED', ''{0}' can only be used in super-class constraints only once.', correction: 'Try removing all but one occurrence of the class name…
    OPTIONAL_PARAMETER_IN_OPERATOR → const CompileTimeErrorCode
    7.1.1 Operators: It is a compile-time error to declare an optional parameter in an operator.
    const CompileTimeErrorCode('OPTIONAL_PARAMETER_IN_OPERATOR', 'Optional parameters aren't allowed when defining an operator.', correction: 'Try removing the optional parameters.…
    PART_OF_NON_PART → const CompileTimeErrorCode
    14.3 Parts: It is a compile time error if the contents of the URI are not a valid part declaration. [...]
    const CompileTimeErrorCode('PART_OF_NON_PART', 'The included part '{0}' must have a part-of directive.', correction: 'Try adding a part-of directive to '{0}'.')
    PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER → const CompileTimeErrorCode
    14.1 Imports: It is a compile-time error if the current library declares a top-level member named p.
    const CompileTimeErrorCode('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 'The name '{0}' is already used as an import prefix and can't be ' 'used to name a top-level element…
    PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT → const CompileTimeErrorCode
    16.32 Identifier Reference: If d is a prefix p, a compile-time error occurs unless the token immediately following d is '.'.
    const CompileTimeErrorCode('PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT', 'The name '{0}' refers to an import prefix, so it must be followed ' 'by '.'.', correction: …
    PRIVATE_COLLISION_IN_MIXIN_APPLICATION → const CompileTimeErrorCode
    It is an error for a mixin to add a private name that conflicts with a private name added by a superclass or another mixin.
    const CompileTimeErrorCode('PRIVATE_COLLISION_IN_MIXIN_APPLICATION', 'The private name '{0}', defined by '{1}', ' 'conflicts with the same name defined by '{2}&…
    PRIVATE_OPTIONAL_PARAMETER → const CompileTimeErrorCode
    6.2.2 Optional Formals: It is a compile-time error if the name of a named optional parameter begins with an '_' character.
    const CompileTimeErrorCode('PRIVATE_OPTIONAL_PARAMETER', 'Named optional parameters can't start with an underscore.')
    RECURSIVE_COMPILE_TIME_CONSTANT → const CompileTimeErrorCode
    12.1 Constants: It is a compile-time error if the value of a compile-time constant expression depends on itself.
    const CompileTimeErrorCode('RECURSIVE_COMPILE_TIME_CONSTANT', 'Compile-time constant expression depends on itself.')
    RECURSIVE_CONSTRUCTOR_REDIRECT → const CompileTimeErrorCode
    7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its only action is to invoke another generative constructor. [...]
    const CompileTimeErrorCode('RECURSIVE_CONSTRUCTOR_REDIRECT', 'Cycle in redirecting generative constructors.')
    RECURSIVE_FACTORY_REDIRECT → const CompileTimeErrorCode
    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.
    const CompileTimeErrorCode('RECURSIVE_FACTORY_REDIRECT', 'Cycle in redirecting factory constructors.')
    RECURSIVE_INTERFACE_INHERITANCE → const CompileTimeErrorCode
    7.10 Superinterfaces: It is a compile-time error if the interface of a class C is a superinterface of itself. [...]
    const CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE', ''{0}' can't be a superinterface of itself: {1}.')
    RECURSIVE_INTERFACE_INHERITANCE_EXTENDS → const CompileTimeErrorCode
    7.10 Superinterfaces: It is a compile-time error if the interface of a class C is a superinterface of itself. [...]
    const CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_EXTENDS', ''{0}' can't extend itself.')
    RECURSIVE_INTERFACE_INHERITANCE_IMPLEMENTS → const CompileTimeErrorCode
    7.10 Superinterfaces: It is a compile-time error if the interface of a class C is a superinterface of itself. [...]
    const CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_IMPLEMENTS', ''{0}' can't implement itself.')
    RECURSIVE_INTERFACE_INHERITANCE_ON → const CompileTimeErrorCode
    Parameters: 0: the name of the mixin that constraints itself recursively
    const CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_ON', ''{0}' can't use itself as a superclass constraint.')
    RECURSIVE_INTERFACE_INHERITANCE_WITH → const CompileTimeErrorCode
    7.10 Superinterfaces: It is a compile-time error if the interface of a class C is a superinterface of itself. [...]
    const CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_WITH', ''{0}' can't use itself as a mixin.')
    REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR → const CompileTimeErrorCode
    7.6.1 Generative constructors: A generative constructor may be redirecting, in which case its only action is to invoke another generative constructor.
    const CompileTimeErrorCode('REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR', 'The constructor '{0}' couldn't be found in '{1}'.', correction: 'Try redirecting to a …
    REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTRUCTOR → const CompileTimeErrorCode
    7.6.1 Generative constructors: A generative constructor may be redirecting, in which case its only action is to invoke another generative constructor.
    const CompileTimeErrorCode('REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTRUCTOR', 'Generative constructor can't redirect to a factory constructor.', correction: 'Try redirecting …
    REDIRECT_TO_MISSING_CONSTRUCTOR → const CompileTimeErrorCode
    7.6.2 Factories: It is a compile-time error if k is prefixed with the const modifier but k' is not a constant constructor.
    const CompileTimeErrorCode('REDIRECT_TO_MISSING_CONSTRUCTOR', 'The constructor '{0}' couldn't be found in '{1}'.', correction: 'Try redirecting to a different c…
    REDIRECT_TO_NON_CLASS → const CompileTimeErrorCode
    Parameters: 0: the name of the non-type referenced in the redirect
    const CompileTimeErrorCode('REDIRECT_TO_NON_CLASS', 'The name '{0}' isn't a type and can't be used in a redirected ' 'constructor.', correction: 'Try redire…
    REDIRECT_TO_NON_CONST_CONSTRUCTOR → const CompileTimeErrorCode
    7.6.2 Factories: It is a compile-time error if k is prefixed with the const modifier but k' is not a constant constructor.
    const CompileTimeErrorCode('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 'Constant redirecting constructor can't redirect to a non-constant ' 'constructor.', correction: 'Try re…
    REFERENCED_BEFORE_DECLARATION → const CompileTimeErrorCode
    No parameters.
    const CompileTimeErrorCode('REFERENCED_BEFORE_DECLARATION', 'Local variable '{0}' can't be referenced before it is declared.', correction: 'Try moving the declaration t…
    RETHROW_OUTSIDE_CATCH → const CompileTimeErrorCode
    12.8.1 Rethrow: It is a compile-time error if an expression of the form rethrow; is not enclosed within a on-catch clause.
    const CompileTimeErrorCode('RETHROW_OUTSIDE_CATCH', 'Rethrow must be inside of catch clause.', correction: 'Try moving the expression into a catch clause, or using a ' '…
    RETURN_IN_GENERATIVE_CONSTRUCTOR → const CompileTimeErrorCode
    13.12 Return: It is a compile-time error if a return statement of the form return e; appears in a generative constructor.
    const CompileTimeErrorCode('RETURN_IN_GENERATIVE_CONSTRUCTOR', 'Constructors can't return values.', correction: 'Try removing the return statement or using a factory ' '…
    RETURN_IN_GENERATOR → const CompileTimeErrorCode
    13.12 Return: It is a compile-time error if a return statement of the form return e; appears in a generator function.
    const CompileTimeErrorCode('RETURN_IN_GENERATOR', 'Can't return a value from a generator function (using the '{0}' ' 'modifier).', correction: 'Try removing the…
    SET_ELEMENT_FROM_DEFERRED_LIBRARY → const CompileTimeErrorCode
    const CompileTimeErrorCode('SET_ELEMENT_FROM_DEFERRED_LIBRARY', 'Constant values from a deferred library can't be used as values in ' 'a const set.', correction: 'Try m…
    SHARED_DEFERRED_PREFIX → const CompileTimeErrorCode
    14.1 Imports: It is a compile-time error if a prefix used in a deferred import is used in another import clause.
    const CompileTimeErrorCode('SHARED_DEFERRED_PREFIX', 'The prefix of a deferred import can't be used in other import ' 'directives.', correction: 'Try renaming one of th…
    SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY → const CompileTimeErrorCode
    const CompileTimeErrorCode('SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY', 'Constant values from a deferred library can't be spread into a ' 'const literal.', correction: 'T…
    SUPER_IN_EXTENSION → const CompileTimeErrorCode
    No parameters.
    const CompileTimeErrorCode('SUPER_IN_EXTENSION', 'The 'super' keyword can't be used in an extension because an ' 'extension doesn't have a superclass.', hasPubl…
    SUPER_IN_INVALID_CONTEXT → const CompileTimeErrorCode
    12.15.4 Super Invocation: A super method invocation i has the form super.m(a1, …, an, xn+1: an+1, … xn+k: an+k). It is a compile-time error if a super method invocation occurs in a top-level function or variable initializer, in an instance variable initializer or initializer list, in class Object, in a factory constructor, or in a static method or variable initializer.
    const CompileTimeErrorCode('SUPER_IN_INVALID_CONTEXT', 'Invalid context for 'super' invocation.')
    SUPER_IN_REDIRECTING_CONSTRUCTOR → const CompileTimeErrorCode
    7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its only action is to invoke another generative constructor.
    const CompileTimeErrorCode('SUPER_IN_REDIRECTING_CONSTRUCTOR', 'The redirecting constructor can't have a 'super' initializer.')
    SUPER_INITIALIZER_IN_OBJECT → const CompileTimeErrorCode
    7.6.1 Generative Constructors: Let k be a generative constructor. It is a compile-time error if a generative constructor of class Object includes a superinitializer.
    const CompileTimeErrorCode('SUPER_INITIALIZER_IN_OBJECT', 'The class 'Object' can't invoke a constructor from a superclass.')
    TYPE_ALIAS_CANNOT_REFERENCE_ITSELF → const CompileTimeErrorCode
    15.3.1 Typedef: Any self reference, either directly, or recursively via another typedef, is a compile time error.
    const CompileTimeErrorCode('TYPE_ALIAS_CANNOT_REFERENCE_ITSELF', 'Typedefs can't reference themselves directly or recursively via ' 'another typedef.')
    TYPE_ARGUMENT_NOT_MATCHING_BOUNDS → const CompileTimeErrorCode
    Parameters: 0: the name of the type used in the instance creation that should be limited by the bound as specified in the class declaration 1: the name of the bounding type
    const CompileTimeErrorCode('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', ''{0}' doesn't extend '{1}'.', correction: 'Try using a type that is or is a subclass of '{1…
    TYPE_PARAMETER_ON_CONSTRUCTOR → const CompileTimeErrorCode
    const CompileTimeErrorCode('TYPE_PARAMETER_ON_CONSTRUCTOR', 'Constructors can't have type parameters.', correction: 'Try removing the type parameters.')
    UNDEFINED_ANNOTATION → const CompileTimeErrorCode
    No parameters.
    const CompileTimeErrorCode('UNDEFINED_ANNOTATION', 'Undefined name '{0}' used as an annotation.', correction: 'Try defining the name or importing it from another library.&#…
    UNDEFINED_CLASS → const CompileTimeErrorCode
    Parameters: 0: the name of the undefined class
    const CompileTimeErrorCode('UNDEFINED_CLASS', 'Undefined class '{0}'.', correction: 'Try changing the name to the name of an existing class, or ' 'creating a class …
    UNDEFINED_CONSTRUCTOR_IN_INITIALIZER → const CompileTimeErrorCode
    7.6.1 Generative Constructors: Let C be the class in which the superinitializer appears and let S be the superclass of C. Let k be a generative constructor. It is a compile-time error if class S does not declare a generative constructor named S (respectively S.id) [...]
    const CompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 'The class '{0}' doesn't have a constructor named '{1}'.', correction: 'Try defining a constr…
    UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT → const CompileTimeErrorCode
    7.6.1 Generative Constructors: Let C be the class in which the superinitializer appears and let S be the superclass of C. Let k be a generative constructor. It is a compile-time error if class S does not declare a generative constructor named S (respectively S.id) [...]
    const CompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT', 'The class '{0}' doesn't have an unnamed constructor.', correction: 'Try defining an unnamed …
    UNDEFINED_EXTENSION_GETTER → const CompileTimeErrorCode
    Parameters: 0: the name of the getter that is undefined 1: the name of the extension that was explicitly specified
    const CompileTimeErrorCode('UNDEFINED_EXTENSION_GETTER', 'The getter '{0}' isn't defined for the extension '{1}'.', correction: 'Try correcting the name to the …
    UNDEFINED_EXTENSION_METHOD → const CompileTimeErrorCode
    Parameters: 0: the name of the method that is undefined 1: the name of the extension that was explicitly specified
    const CompileTimeErrorCode('UNDEFINED_EXTENSION_METHOD', 'The method '{0}' isn't defined for the extension '{1}'.', correction: 'Try correcting the name to the …
    UNDEFINED_EXTENSION_OPERATOR → const CompileTimeErrorCode
    Parameters: 0: the name of the operator that is undefined 1: the name of the extension that was explicitly specified
    const CompileTimeErrorCode('UNDEFINED_EXTENSION_OPERATOR', 'The operator '{0}' isn't defined for the extension '{1}'.', correction: 'Try defining the operator &…
    UNDEFINED_EXTENSION_SETTER → const CompileTimeErrorCode
    Parameters: 0: the name of the setter that is undefined 1: the name of the extension that was explicitly specified
    const CompileTimeErrorCode('UNDEFINED_EXTENSION_SETTER', 'The setter '{0}' isn't defined for the extension '{1}'.', correction: 'Try correcting the name to the …
    UNDEFINED_NAMED_PARAMETER → const CompileTimeErrorCode
    Parameters: 0: the name of the requested named parameter
    const CompileTimeErrorCode('UNDEFINED_NAMED_PARAMETER', 'The named parameter '{0}' isn't defined.', correction: 'Try correcting the name to an existing named parameter&…
    UNQUALIFIED_REFERENCE_TO_STATIC_MEMBER_OF_EXTENDED_TYPE → const CompileTimeErrorCode
    Parameters: 0: the name of the defining type
    const CompileTimeErrorCode('UNQUALIFIED_REFERENCE_TO_STATIC_MEMBER_OF_EXTENDED_TYPE', 'Static members from the extended type or one of its superclasses ' 'must be qualified by the …
    URI_DOES_NOT_EXIST → const CompileTimeErrorCode
    Parameters: 0: the URI pointing to a non-existent file
    const CompileTimeErrorCode('URI_DOES_NOT_EXIST', 'Target of URI doesn't exist: '{0}'.', correction: 'Try creating the file referenced by the URI, or ' 'Try usin…
    URI_HAS_NOT_BEEN_GENERATED → const CompileTimeErrorCode
    Parameters: 0: the URI pointing to a non-existent file
    const CompileTimeErrorCode('URI_HAS_NOT_BEEN_GENERATED', 'Target of URI hasn't been generated: '{0}'.', correction: 'Try running the generator that will generate the fi…
    URI_WITH_INTERPOLATION → const CompileTimeErrorCode
    14.1 Imports: It is a compile-time error if x is not a compile-time constant, or if x involves string interpolation. [...]
    const CompileTimeErrorCode('URI_WITH_INTERPOLATION', 'URIs can't use string interpolation.')
    WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR → const CompileTimeErrorCode
    7.1.1 Operators: It is a compile-time error if the arity of the user-declared operator []= is not 2. It is a compile time error if the arity of a user-declared operator with one of the names: <, >, <=, >=, ==, +, /, ~/, *, %, |, ^, &, <<, >>, [] is not 1. It is a compile time error if the arity of the user-declared operator - is not 0 or 1. It is a compile time error if the arity of the user-declared operator ~ is not 0. [...]
    const CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 'Operator '{0}' should declare exactly {1} parameter(s), but {2} ' 'found.')
    WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS → const CompileTimeErrorCode
    7.1.1 Operators: It is a compile time error if the arity of the user-declared operator - is not 0 or 1. [...]
    const CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS', 'Operator '-' should declare 0 or 1 parameter, but {0} found.')
    WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER → const CompileTimeErrorCode
    7.3 Setters: It is a compile-time error if a setter's formal parameter list does not include exactly one required formal parameter p.
    const CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 'Setters should declare exactly one required parameter.')
    WRONG_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE → const CompileTimeErrorCode
    Let C be a generic class that declares a formal type parameter X, and assume that T is a direct superinterface of C. It is a compile-time error if X occurs contravariantly or invariantly in T.
    const CompileTimeErrorCode('WRONG_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE', ''{0}' can't be used contravariantly or invariantly in '{1}'.', correction: 'Try n…
    YIELD_EACH_IN_NON_GENERATOR → const CompileTimeErrorCode
    ?? Yield: It is a compile-time error if a yield statement appears in a function that is not a generator function.
    const CompileTimeErrorCode('YIELD_EACH_IN_NON_GENERATOR', 'Yield-each statements must be in a generator function ' '(one marked with either 'async*' or 'sync*').…
    YIELD_IN_NON_GENERATOR → const CompileTimeErrorCode
    ?? Yield: It is a compile-time error if a yield statement appears in a function that is not a generator function.
    const CompileTimeErrorCode('YIELD_IN_NON_GENERATOR', 'Yield statements must be in a generator function ' '(one marked with either 'async*' or 'sync*').', correc…