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
Implementers

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
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.
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. [...]
CompileTimeErrorCode('AMBIGUOUS_EXPORT', 'The name '{0}' is defined in the libraries '{1}' and '{2}'.', correction: 'Try removing the export of one of the l…
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
CompileTimeErrorCode('AMBIGUOUS_EXTENSION_MEMBER_ACCESS', 'A member named '{0}' is defined in extensions '{1}' and '{2}' and ' 'neither is more specific.…
AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH → const CompileTimeErrorCode
No parameters.
CompileTimeErrorCode('AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH', 'This literal contains both 'Map' and 'Iterable' spreads, ' 'which makes it impossible to determine whethe…
AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER → const CompileTimeErrorCode
No parameters.
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 inference to…
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. [...]
CompileTimeErrorCode('ANNOTATION_WITH_NON_CLASS', 'The name '{0}' isn't a class.', correction: 'Try importing the library that declares the class, ' 'correcting…
ANNOTATION_WITH_TYPE_ARGUMENTS → const ParserErrorCode
@Deprecated('Use ParserErrorCode.ANNOTATION_WITH_TYPE_ARGUMENTS')
ParserErrorCode.ANNOTATION_WITH_TYPE_ARGUMENTS
ASSERT_IN_REDIRECTING_CONSTRUCTOR → const CompileTimeErrorCode
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.
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 'async'…
AWAIT_IN_LATE_LOCAL_VARIABLE_INITIALIZER → const CompileTimeErrorCode
nnbd/feature-specification.md [...]
CompileTimeErrorCode('AWAIT_IN_LATE_LOCAL_VARIABLE_INITIALIZER', 'The await expression can't be used in a 'late' local variable.', correction: 'Try removing the 'la…
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.)
CompileTimeErrorCode('AWAIT_IN_WRONG_CONTEXT', 'The await expression can only be used in an async function.', correction: 'Try marking the function body with either 'async'…
BREAK_LABEL_ON_SWITCH_MEMBER → const CompileTimeErrorCode
CompileTimeErrorCode('BREAK_LABEL_ON_SWITCH_MEMBER', 'Break label resolves to case or default statement')
BUILT_IN_IDENTIFIER_AS_EXTENSION_NAME → const CompileTimeErrorCode
Parameters: 0: the built-in identifier that is being used
CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_EXTENSION_NAME', 'The built-in identifier '{0}' can't be used as an extension name.', correction: 'Try choosing a different…
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. [...]
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 name f…
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. [...]
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 existing …
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. [...]
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 for t…
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. [...]
CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME', 'The built-in identifier '{0}' can't be used as a type parameter ' 'name.', correction: 'Try …
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. [...]
CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME', 'The built-in identifier '{0}' can't be used as a typedef name.', correction: 'Try choosing a different name…
CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS → const CompileTimeErrorCode
13.9 Switch: It is a compile-time error if the class C implements the operator ==. [...]
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. [...]
CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD', ''{0}' can't be used to name both a constructor and a static field ' 'in this class.', correction: …
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. [...]
CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_AND_STATIC_METHOD', ''{0}' can't be used to name both a constructor and a static method ' 'in this class.', correction…
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. [...]
CompileTimeErrorCode('CONFLICTING_FIELD_AND_METHOD', 'Class '{0}' can't define field '{1}' and have method '{2}.{1}' ' 'with the same name.', correc…
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. [...]
CompileTimeErrorCode('CONFLICTING_GENERIC_INTERFACES', 'The class '{0}' cannot implement both '{1}' and '{2}' because the ' 'type arguments are different.&#…
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. [...]
CompileTimeErrorCode('CONFLICTING_METHOD_AND_FIELD', 'Class '{0}' can't define method '{1}' and have field '{2}.{1}' ' 'with the same name.', correc…
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. [...]
CompileTimeErrorCode('CONFLICTING_STATIC_AND_INSTANCE', 'Class '{0}' can't define static member '{1}' and have instance ' 'member '{2}.{1}' with the sam…
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.
  • [...]
    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 defined.…
    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.
  • [...]
    CompileTimeErrorCode('CONFLICTING_TYPE_VARIABLE_AND_MEMBER', ''{0}' can't be used to name both a type variable and a member in ' 'this class.', correction: 'Try…
    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.
    CompileTimeErrorCode('CONST_CONSTRUCTOR_THROWS_EXCEPTION', 'Const constructors can't throw exceptions.', correction: 'Try removing the throw statement, or ' 'removing t…
    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. [...]
    CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST', 'Can't define the const constructor because the field '{0}' ' 'is initialized with a non-c…
    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. [...]
    CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD', 'Const constructor can't be declared for a class with a mixin ' 'that declares an instance field.', correcti…
    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. [...]
    CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER', 'Constant constructor can't call non-constant super constructor of ' ''{0}'.', correction: 'Try c…
    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. [...]
    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 fields …
    CONST_DEFERRED_CLASS → const CompileTimeErrorCode
    12.12.2 Const: It is a compile-time error if T is a deferred type.
    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.
    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.
    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.
    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.
    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.
    CompileTimeErrorCode('CONST_EVAL_TYPE_BOOL_NUM_STRING', 'In constant expressions, operands of this operator must be of type ' ''bool', 'num', 'String' or &#…
    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.
    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.
    CompileTimeErrorCode('CONST_EVAL_TYPE_NUM', 'In constant expressions, operands of this operator must be of type ' ''num'.')
    CONST_EVAL_TYPE_TYPE → const CompileTimeErrorCode
    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.
    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.
    CompileTimeErrorCode('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', 'Const variables must be initialized with a constant value.', correction: 'Try changing the initializer to be a co…
    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. [...]
    CompileTimeErrorCode('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY', 'Constant values from a deferred library can't be used to ' 'initialized a const variabl…
    CONST_INSTANCE_FIELD → const CompileTimeErrorCode
    No parameters.
    CompileTimeErrorCode('CONST_INSTANCE_FIELD', 'Only static fields can be declared as const.', correction: 'Try declaring the field as final, or adding the keyword ' ''st…
    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. [...]
    CompileTimeErrorCode('CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS', 'The constant map entry key expression type '{0}' can't override ' 'the == operator.', corre…
    CONST_NOT_INITIALIZED → const CompileTimeErrorCode
    Parameters: 0: the name of the uninitialized final variable
    CompileTimeErrorCode('CONST_NOT_INITIALIZED', 'The constant '{0}' must be initialized.', correction: 'Try adding an initialization to the declaration.', hasPublishedDoc…
    CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS → const CompileTimeErrorCode
    Parameters: 0: the type of the element
    CompileTimeErrorCode('CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS', 'The constant set element type '{0}' can't override ' 'the == operator.', correction: 'Try usin…
    CONST_SPREAD_EXPECTED_LIST_OR_SET → const CompileTimeErrorCode
    No parameters.
    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.
    CompileTimeErrorCode('CONST_SPREAD_EXPECTED_MAP', 'A map is expected in this spread.', hasPublishedDocs: true)
    CONST_WITH_NON_CONST → const CompileTimeErrorCode
    No parameters.
    CompileTimeErrorCode('CONST_WITH_NON_CONST', 'The constructor being called isn't a const constructor.', correction: 'Try removing 'const' from the constructor invocatio…
    CONST_WITH_NON_CONSTANT_ARGUMENT → const CompileTimeErrorCode
    No parameters.
    CompileTimeErrorCode('CONST_WITH_NON_CONSTANT_ARGUMENT', 'Arguments of a constant creation must be constant expressions.', correction: 'Try making the argument a valid constant, or…
    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. [...]
    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.
    CompileTimeErrorCode('CONST_WITH_TYPE_PARAMETERS', 'A constant creation can't use a type parameter as a type argument.', correction: 'Try replacing the type parameter with a di…
    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. [...]
    CompileTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR', 'The class '{0}' doesn't have a constant constructor '{1}'.', correction: 'Try calling a different cons…
    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. [...]
    CompileTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 'The class '{0}' doesn't have a default constant constructor.', correction: 'Try calling a different co…
    CONTINUE_LABEL_ON_SWITCH → const CompileTimeErrorCode
    CompileTimeErrorCode('CONTINUE_LABEL_ON_SWITCH', 'A continue label resolves to switch, must be loop or switch member')
    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.
    CompileTimeErrorCode('DEFAULT_LIST_CONSTRUCTOR_MISMATCH', 'A list whose values can't be 'null' can't be given an initial ' 'length because the initial values would …
    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.
    CompileTimeErrorCode('DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER', 'Default values aren't allowed in function typed parameters.', correction: 'Try removing the default value.…
    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.
    CompileTimeErrorCode('DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR', 'Default values aren't allowed in factory constructors that redirect ' 'to another constructor.', c…
    DEFAULT_VALUE_ON_REQUIRED_PARAMETER → const CompileTimeErrorCode
    No parameters.
    CompileTimeErrorCode('DEFAULT_VALUE_ON_REQUIRED_PARAMETER', 'Required named parameters can't have a default value.', correction: 'Try removing either the default value or the &…
    DEFERRED_IMPORT_OF_EXTENSION → const CompileTimeErrorCode
    No parameters.
    CompileTimeErrorCode('DEFERRED_IMPORT_OF_EXTENSION', 'Imports of deferred libraries must hide all extensions', correction: 'Try adding either a show combinator listing the names yo…
    DUPLICATE_CONSTRUCTOR_DEFAULT → const CompileTimeErrorCode
    No parameters.
    CompileTimeErrorCodeWithUniqueName('DUPLICATE_CONSTRUCTOR', 'DUPLICATE_CONSTRUCTOR_DEFAULT', 'The default constructor is already defined.', correction: 'Try giving one of t…
    DUPLICATE_CONSTRUCTOR_NAME → const CompileTimeErrorCode
    Parameters: 0: the name of the duplicate entity
    CompileTimeErrorCodeWithUniqueName('DUPLICATE_CONSTRUCTOR', 'DUPLICATE_CONSTRUCTOR_NAME', 'The constructor with name '{0}' is already defined.', correction: 'Try re…
    DUPLICATE_DEFINITION → const CompileTimeErrorCode
    Parameters: 0: the name of the duplicate entity
    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. [...]
    CompileTimeErrorCode('DUPLICATE_NAMED_ARGUMENT', 'The argument for the named parameter '{0}' was already specified.', correction: 'Try removing one of the named arguments, …
    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. [...]
    CompileTimeErrorCode('DUPLICATE_PART', 'The library already contains a part with the uri '{0}'.', correction: 'Try removing all but one of the duplicated part directives.&#…
    EQUAL_ELEMENTS_IN_CONST_SET → const CompileTimeErrorCode
    No parameters.
    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.
    CompileTimeErrorCode('EQUAL_KEYS_IN_CONST_MAP', 'Two keys in a constant map literal can't be equal.', correction: 'Change or remove the duplicate key.', hasPublishedDocs: t…
    EXPORT_INTERNAL_LIBRARY → const CompileTimeErrorCode
    SDK implementation libraries can be exported only by other SDK libraries. [...]
    CompileTimeErrorCode('EXPORT_INTERNAL_LIBRARY', 'The library '{0}' is internal and can't be exported.')
    EXPORT_LEGACY_SYMBOL → const CompileTimeErrorCode
    It is an error for an opted-in library to re-export symbols which are defined in a legacy library. [...]
    CompileTimeErrorCode('EXPORT_LEGACY_SYMBOL', 'The symbol '{0}' is defined in a legacy library, and can't be ' 're-exported from a non-nullable by default library.',…
    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. [...]
    CompileTimeErrorCode('EXPORT_OF_NON_LIBRARY', 'The exported library '{0}' can't have a part-of directive.', correction: 'Try exporting the library that the part is a pa…
    EXPRESSION_IN_MAP → const CompileTimeErrorCode
    No parameters.
    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 ' 'entry.…
    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. [...]
    CompileTimeErrorCode('EXTENDS_DEFERRED_CLASS', 'Classes can't extend deferred classes.', correction: 'Try specifying a different superclass, or ' 'removing the extends …
    EXTENDS_DISALLOWED_CLASS → const CompileTimeErrorCode
    12.2 Null: It is a compile-time error for a class to attempt to extend or implement Null. [...]
    CompileTimeErrorCode('EXTENDS_DISALLOWED_CLASS', 'Classes can't extend '{0}'.', correction: 'Try specifying a different superclass, or ' 'removing the extends c…
    EXTENDS_NON_CLASS → const CompileTimeErrorCode
    Parameters: 0: the name in the extends clause
    CompileTimeErrorCode('EXTENDS_NON_CLASS', 'Classes can only extend other classes.', correction: 'Try specifying a different superclass, or removing the extends ' 'clause.&#…
    EXTENSION_AS_EXPRESSION → const CompileTimeErrorCode
    Parameters: 0: the name of the extension
    CompileTimeErrorCode('EXTENSION_AS_EXPRESSION', 'Extension '{0}' can't be used as an expression.', correction: 'Try replacing it with a valid expression.', hasPubli…
    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
    CompileTimeErrorCode('EXTENSION_CONFLICTING_STATIC_AND_INSTANCE', 'Extension '{0}' can't define static member '{1}' and an instance ' 'member with the same name…
    EXTENSION_DECLARES_MEMBER_OF_OBJECT → const CompileTimeErrorCode
    No parameters.
    CompileTimeErrorCode('EXTENSION_DECLARES_MEMBER_OF_OBJECT', 'Extensions can't declare members with the same name as a member ' 'declared by 'Object'.', correction: …
    EXTENSION_OVERRIDE_ACCESS_TO_STATIC_MEMBER → const CompileTimeErrorCode
    No parameters.
    CompileTimeErrorCode('EXTENSION_OVERRIDE_ACCESS_TO_STATIC_MEMBER', 'An extension override can't be used to access a static member from ' 'an extension.', correction: 'T…
    EXTENSION_OVERRIDE_ARGUMENT_NOT_ASSIGNABLE → const CompileTimeErrorCode
    Parameters: 0: the type of the argument 1: the extended type
    CompileTimeErrorCode('EXTENSION_OVERRIDE_ARGUMENT_NOT_ASSIGNABLE', 'The type of the argument to the extension override '{0}' ' 'isn't assignable to the extended type &#…
    EXTENSION_OVERRIDE_WITH_CASCADE → const CompileTimeErrorCode
    No parameters.
    CompileTimeErrorCode('EXTENSION_OVERRIDE_WITH_CASCADE', 'Extension overrides have no value so they can't be used as the ' 'target of a cascade expression.', correction: …
    EXTENSION_OVERRIDE_WITHOUT_ACCESS → const CompileTimeErrorCode
    No parameters.
    CompileTimeErrorCode('EXTENSION_OVERRIDE_WITHOUT_ACCESS', 'An extension override can only be used to access instance members.', correction: 'Consider adding an access to an instanc…
    EXTRA_POSITIONAL_ARGUMENTS → const CompileTimeErrorCode
    Parameters: 0: the maximum number of positional arguments 1: the actual number of positional arguments given
    CompileTimeErrorCode('EXTRA_POSITIONAL_ARGUMENTS', 'Too many positional arguments: {0} expected, but {1} found.', correction: 'Try removing the extra arguments.', hasPublishedD…
    EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED → const CompileTimeErrorCode
    Parameters: 0: the maximum number of positional arguments 1: the actual number of positional arguments given
    CompileTimeErrorCode('EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED', 'Too many positional arguments: {0} expected, but {1} found.', correction: 'Try removing the extra positional argu…
    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. [...]
    CompileTimeErrorCode('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 'The field '{0}' can't be initialized twice in the same constructor.', correction: 'Try removing one …
    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.
    CompileTimeErrorCode('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER', 'Fields can't be initialized in both the parameter list and the ' 'initializers.', correction: 'T…
    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.
    CompileTimeErrorCode('FIELD_INITIALIZER_FACTORY_CONSTRUCTOR', 'Initializing formal parameters can't be used in factory ' 'constructors.', correction: 'Try using a norma…
    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.
    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. [...]
    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. [...]
    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 initializations…
    FOR_IN_WITH_CONST_VARIABLE → const CompileTimeErrorCode
    CompileTimeErrorCode('FOR_IN_WITH_CONST_VARIABLE', 'A for-in loop-variable can't be 'const'.', correction: 'Try removing the 'const' modifier from the variable,…
    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.
    CompileTimeErrorCode('GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND', 'Generic function types can't be used as type parameter bounds', correction: 'Try making the free variable in the …
    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.
    CompileTimeErrorCode('GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT', 'A generic function type can't be a type argument.', correction: 'Try removing type parameters from the ge…
    IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY → const CompileTimeErrorCode
    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 collect…
    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. [...]
    CompileTimeErrorCode('IMPLEMENTS_DEFERRED_CLASS', 'Classes and mixins can't implement deferred classes.', correction: 'Try specifying a different interface, ' 'removing…
    IMPLEMENTS_DISALLOWED_CLASS → const CompileTimeErrorCode
    12.2 Null: It is a compile-time error for a class to attempt to extend or implement Null. [...]
    CompileTimeErrorCode('IMPLEMENTS_DISALLOWED_CLASS', 'Classes and mixins can't implement '{0}'.', correction: 'Try specifying a different interface, or ' 'remove…
    IMPLEMENTS_NON_CLASS → const CompileTimeErrorCode
    Parameters: 0: the name of the interface that was not found
    CompileTimeErrorCode('IMPLEMENTS_NON_CLASS', 'Classes and mixins can only implement other classes and mixins.', correction: 'Try specifying a class or mixin, or remove the name fro…
    IMPLEMENTS_REPEATED → const CompileTimeErrorCode
    Parameters: 0: the name of the interface that is implemented more than once
    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. [...]
    CompileTimeErrorCode('IMPLEMENTS_SUPER_CLASS', ''{0}' can't be used in both 'extends' and 'implements' clauses.', correction: 'Try removing one of the o…
    IMPLICIT_THIS_REFERENCE_IN_INITIALIZER → const CompileTimeErrorCode
    No parameters.
    CompileTimeErrorCode('IMPLICIT_THIS_REFERENCE_IN_INITIALIZER', 'Only static members can be accessed in initializers.', hasPublishedDocs: true)
    IMPORT_INTERNAL_LIBRARY → const CompileTimeErrorCode
    SDK implementation libraries can be imported only by other SDK libraries. [...]
    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. [...]
    CompileTimeErrorCode('IMPORT_OF_NON_LIBRARY', 'The imported library '{0}' can't have a part-of directive.', correction: 'Try importing the library that the part is a pa…
    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. [...]
    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. [...]
    CompileTimeErrorCode('INCONSISTENT_INHERITANCE', 'Superinterfaces don't have a valid override for '{0}': {1}.', correction: 'Try adding an explicit override that is con…
    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. [...]
    CompileTimeErrorCode('INCONSISTENT_INHERITANCE_GETTER_AND_METHOD', ''{0}' is inherited as a getter (from '{1}') and also a ' 'method (from '{2}').', cor…
    INITIALIZER_FOR_NON_EXISTENT_FIELD → const CompileTimeErrorCode
    Parameters: 0: the name of the initializing formal that is not an instance variable in the immediately enclosing class
    CompileTimeErrorCode('INITIALIZER_FOR_NON_EXISTENT_FIELD', ''{0}' isn't a field in the enclosing class.', correction: 'Try correcting the name to match an existing fiel…
    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. [...]
    CompileTimeErrorCode('INITIALIZER_FOR_STATIC_FIELD', ''{0}' is a static field in the enclosing class. Fields initialized ' 'in a constructor can't be static.', corr…
    INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD → const CompileTimeErrorCode
    Parameters: 0: the name of the initializing formal that is not an instance variable in the immediately enclosing class
    CompileTimeErrorCode('INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD', ''{0}' isn't a field in the enclosing class.', correction: 'Try correcting the name to match an exist…
    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. [...]
    CompileTimeErrorCode('INITIALIZING_FORMAL_FOR_STATIC_FIELD', ''{0}' is a static field in the enclosing class. Fields initialized ' 'in a constructor can't be static.…
    INSTANCE_MEMBER_ACCESS_FROM_FACTORY → const CompileTimeErrorCode
    No parameters.
    CompileTimeErrorCode('INSTANCE_MEMBER_ACCESS_FROM_FACTORY', 'Instance members can't be accessed from a factory constructor.', correction: 'Try removing the reference to the ins…
    INSTANCE_MEMBER_ACCESS_FROM_STATIC → const CompileTimeErrorCode
    No parameters.
    CompileTimeErrorCode('INSTANCE_MEMBER_ACCESS_FROM_STATIC', 'Instance members can't be accessed from a static method.', correction: 'Try removing the reference to the instance m…
    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.
    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.
    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 overflow and&…
    INTEGER_LITERAL_OUT_OF_RANGE → const CompileTimeErrorCode
    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 integer …
    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.
    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. [...]
    CompileTimeErrorCode('INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY', 'Constant values from a deferred library can't be used as ' 'annotations.', correction: 'Try removing t…
    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.
    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. [...]
    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.
    CompileTimeErrorCode('INVALID_CONSTRUCTOR_NAME', 'Invalid constructor name.')
    INVALID_EXTENSION_ARGUMENT_COUNT → const CompileTimeErrorCode
    No parameters.
    CompileTimeErrorCode('INVALID_EXTENSION_ARGUMENT_COUNT', 'Extension overrides must have exactly one argument: ' 'the value of 'this' in the extension method.', correcti…
    INVALID_FACTORY_NAME_NOT_A_CLASS → const CompileTimeErrorCode
    No parameters.
    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
    CompileTimeErrorCode('INVALID_INLINE_FUNCTION_TYPE', 'Inline function types can't be used for parameters in a generic ' 'function type.', correction: 'Try using a gener…
    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.
  • CompileTimeErrorCode('INVALID_MODIFIER_ON_CONSTRUCTOR', 'The modifier '{0}' can't be applied to the body of a constructor.', correction: 'Try removing the modifier.'…
    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.
  • CompileTimeErrorCode('INVALID_MODIFIER_ON_SETTER', 'The modifier '{0}' can't be applied to the body of a setter.', correction: 'Try removing the modifier.')
    INVALID_OVERRIDE → const CompileTimeErrorCode
    Parameters: 0: the name of the declared member that is not a valid override. 1: the name of the interface that declares the member. 2: the type of the declared member in the interface. [...]
    CompileTimeErrorCode('INVALID_OVERRIDE', ''{1}.{0}' ('{2}') isn't a valid override of '{3}.{0}' ('{4}').', hasPublishedDocs: true)
    INVALID_REFERENCE_TO_THIS → const CompileTimeErrorCode
    No parameters.
    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. [...]
    CompileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_LIST', 'Constant list literals can't include a type parameter as a type ' 'argument, such as '{0}'.', correctio…
    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. [...]
    CompileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 'Constant map literals can't include a type parameter as a type ' 'argument, such as '{0}'.', correction:…
    INVALID_TYPE_ARGUMENT_IN_CONST_SET → const CompileTimeErrorCode
    CompileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_SET', 'Constant set literals can't include a type parameter as a type ' 'argument, such as '{0}'.', correction:…
    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. [...]
    CompileTimeErrorCode('INVALID_URI', 'Invalid URI syntax: '{0}'.')
    INVALID_USE_OF_COVARIANT → const CompileTimeErrorCode
    The 'covariant' keyword was found in an inappropriate location.
    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
    CompileTimeErrorCode('INVOCATION_OF_EXTENSION_WITHOUT_CALL', 'The extension '{0}' doesn't define a 'call' method so the override ' 'can't be used in an invo…
    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. [...]
    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. [...]
    CompileTimeErrorCode('LABEL_UNDEFINED', 'Can't reference undefined label '{0}'.', correction: 'Try defining the label, or ' 'correcting the name to match an exi…
    LATE_FINAL_FIELD_WITH_CONST_CONSTRUCTOR → const CompileTimeErrorCode
    nnbd/feature-specification.md [...]
    CompileTimeErrorCode('LATE_FINAL_FIELD_WITH_CONST_CONSTRUCTOR', 'Can't have a late final field in a class with a const constructor.', correction: 'Try removing the 'late…
    MAP_ENTRY_NOT_IN_MAP → const CompileTimeErrorCode
    No parameters.
    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 ' 'en…
    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.
    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.
    CompileTimeErrorCode('MISSING_CONST_IN_LIST_LITERAL', 'List literals must be prefixed with 'const' when used as a constant ' 'expression.', correction: 'Try adding …
    MISSING_CONST_IN_MAP_LITERAL → const CompileTimeErrorCode
    12.1 Constants: A constant expression is ... a constant map literal.
    CompileTimeErrorCode('MISSING_CONST_IN_MAP_LITERAL', 'Map literals must be prefixed with 'const' when used as a constant ' 'expression.', correction: 'Try adding th…
    MISSING_CONST_IN_SET_LITERAL → const CompileTimeErrorCode
    12.1 Constants: A constant expression is ... a constant set literal.
    CompileTimeErrorCode('MISSING_CONST_IN_SET_LITERAL', 'Set literals must be prefixed with 'const' when used as a constant ' 'expression.', correction: 'Try adding th…
    MISSING_DART_LIBRARY → const CompileTimeErrorCode
    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.
    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 a req…
    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. [...]
    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. [...]
    CompileTimeErrorCode('MIXIN_APPLICATION_CONCRETE_SUPER_INVOKED_MEMBER_TYPE', 'The super-invoked member '{0}' has the type '{1}', but the ' 'concrete member in the c…
    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. [...]
    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. [...]
    CompileTimeErrorCode('MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE', ''{0}' can't be mixed onto '{1}' because '{1}' doesn't implement ' ''{2}'…
    MIXIN_CLASS_DECLARES_CONSTRUCTOR → const CompileTimeErrorCode
    9 Mixins: It is a compile-time error if a declared or derived mixin explicitly declares a constructor. [...]
    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).
    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. [...]
    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
    CompileTimeErrorCode('MIXIN_INFERENCE_INCONSISTENT_MATCHING_CLASSES', 'Type parameters couldn't be inferred for the mixin '{0}' because ' 'the base class implements the…
    MIXIN_INFERENCE_NO_MATCHING_CLASS → const CompileTimeErrorCode
    CompileTimeErrorCode('MIXIN_INFERENCE_NO_MATCHING_CLASS', 'Type parameters couldn't be inferred for the mixin '{0}' because ' 'the base class doesn't implement the …
    MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION → const CompileTimeErrorCode
    CompileTimeErrorCode('MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION', 'Type parameters couldn't be inferred for the mixin '{0}' because ' 'no type parameter substitution cou…
    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. [...]
    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.
    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. [...]
    CompileTimeErrorCode('MIXIN_OF_DISALLOWED_CLASS', 'Classes can't mixin '{0}'.')
    MIXIN_OF_NON_CLASS → const CompileTimeErrorCode
    No parameters.
    CompileTimeErrorCode('MIXIN_OF_NON_CLASS', 'Classes can only mix in mixins and classes.')
    MIXIN_REFERENCES_SUPER → const CompileTimeErrorCode
    9 Mixins: It is a compile-time error if a declared or derived mixin refers to super.
    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
    CompileTimeErrorCode('MIXIN_SUPER_CLASS_CONSTRAINT_DEFERRED_CLASS', 'Deferred classes can't be used as super-class constraints.', correction: 'Try changing the import to not be…
    MIXIN_SUPER_CLASS_CONSTRAINT_DISALLOWED_CLASS → const CompileTimeErrorCode
    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
    No parameters.
    CompileTimeErrorCode('MIXIN_SUPER_CLASS_CONSTRAINT_NON_INTERFACE', 'Only classes and mixins can be used as superclass constraints.', hasPublishedDocs: true)
    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.
    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.
    CompileTimeErrorCode('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS', 'Constructors can have at most one 'this' redirection.', correction: 'Try removing all but one of the r…
    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.
    CompileTimeErrorCode('MULTIPLE_SUPER_INITIALIZERS', 'Constructor may have at most one 'super' initializer.', correction: 'Try removing all but one of the 'super' in…
    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.
    CompileTimeErrorCode('NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS', 'Annotation creation must have arguments.', correction: 'Try adding an empty argument list.')
    NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT → const CompileTimeErrorCode
    Parameters: 0: the name of the superclass that does not define an implicitly invoked constructor
    CompileTimeErrorCodeWithUniqueName('NO_DEFAULT_SUPER_CONSTRUCTOR', 'NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT', 'The superclass '{0}' doesn't have a zero argument construct…
    NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT → const CompileTimeErrorCode
    Parameters: 0: the name of the superclass that does not define an implicitly invoked constructor 1: the name of the subclass that does not contain any explicit constructors
    CompileTimeErrorCodeWithUniqueName('NO_DEFAULT_SUPER_CONSTRUCTOR', 'NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT', 'The superclass '{0}' doesn't have a zero argument construct…
    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.
    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. [...]
    CompileTimeErrorCode('NON_CONSTANT_ANNOTATION_CONSTRUCTOR', 'Annotation creation can only call a const constructor.')
    NON_CONSTANT_CASE_EXPRESSION → const CompileTimeErrorCode
    No parameters.
    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. [...]
    CompileTimeErrorCode('NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY', 'Constant values from a deferred library can't be used as a case ' 'expression.', correction: …
    NON_CONSTANT_DEFAULT_VALUE → const CompileTimeErrorCode
    No parameters.
    CompileTimeErrorCode('NON_CONSTANT_DEFAULT_VALUE', 'The default value of an optional parameter must be constant.', hasPublishedDocs: true)
    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. [...]
    CompileTimeErrorCode('NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY', 'Constant values from a deferred library can't be used as a default ' 'parameter value.', correctio…
    NON_CONSTANT_LIST_ELEMENT → const CompileTimeErrorCode
    No parameters.
    CompileTimeErrorCode('NON_CONSTANT_LIST_ELEMENT', 'The values in a const list literal must be constants.', correction: 'Try removing the keyword 'const' from the list liter…
    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. [...]
    CompileTimeErrorCode('NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY', 'Constant values from a deferred library can't be used as values in ' 'a 'const' list.', cor…
    NON_CONSTANT_MAP_ELEMENT → const CompileTimeErrorCode
    No parameters.
    CompileTimeErrorCode('NON_CONSTANT_MAP_ELEMENT', 'The elements in a const map literal must be constant.', correction: 'Try removing the keyword 'const' from the map literal…
    NON_CONSTANT_MAP_KEY → const CompileTimeErrorCode
    No parameters.
    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. [...]
    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.', correction: &…
    NON_CONSTANT_MAP_VALUE → const CompileTimeErrorCode
    No parameters.
    CompileTimeErrorCode('NON_CONSTANT_MAP_VALUE', 'The values in a const map literal must be constant.', correction: 'Try removing the keyword 'const' from the map literal.…
    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. [...]
    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.', correctio…
    NON_CONSTANT_SET_ELEMENT → const CompileTimeErrorCode
    No parameters.
    CompileTimeErrorCode('NON_CONSTANT_SET_ELEMENT', 'The values in a const set literal must be constants.', correction: 'Try removing the keyword 'const' from the set literal.…
    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.
    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)
    CompileTimeErrorCode('NON_GENERATIVE_CONSTRUCTOR', 'The generative constructor '{0}' expected, but factory found.', correction: 'Try calling a different constructor in the …
    NON_SYNC_FACTORY → const CompileTimeErrorCode
    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. [...]
    CompileTimeErrorCode('NOT_ASSIGNED_POTENTIALLY_NON_NULLABLE_LOCAL_VARIABLE', 'The non-nullable local variable '{0}' must be assigned before it ' 'can be used.', correct…
    NOT_ENOUGH_POSITIONAL_ARGUMENTS → const CompileTimeErrorCode
    Parameters: 0: the expected number of required arguments 1: the actual number of positional arguments given
    CompileTimeErrorCode('NOT_ENOUGH_POSITIONAL_ARGUMENTS', '{0} positional argument(s) expected, but {1} found.', correction: 'Try adding the missing arguments.', hasPublishedDocs…
    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. [...]
    CompileTimeErrorCode('NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD', 'Non-nullable instance field '{0}' must be initialized.', correction: 'Try adding an initializer express…
    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. [...]
    CompileTimeErrorCode('NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD_CONSTRUCTOR', 'Non-nullable instance field '{0}' must be initialized.', correction: 'Try adding an initial…
    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. [...]
    CompileTimeErrorCode('NOT_INITIALIZED_NON_NULLABLE_VARIABLE', 'The non-nullable variable '{0}' must be initialized.', correction: 'Try adding an initializer expression.'…
    NOT_ITERABLE_SPREAD → const CompileTimeErrorCode
    No parameters.
    CompileTimeErrorCode('NOT_ITERABLE_SPREAD', 'Spread elements in list or set literals must implement 'Iterable'.', hasPublishedDocs: true)
    NOT_MAP_SPREAD → const CompileTimeErrorCode
    No parameters.
    CompileTimeErrorCode('NOT_MAP_SPREAD', 'Spread elements in map literals must implement 'Map'.', hasPublishedDocs: true)
    NOT_NULL_AWARE_NULL_SPREAD → const CompileTimeErrorCode
    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.
    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'.', corr…
    NULLABLE_TYPE_IN_EXTENDS_CLAUSE → const CompileTimeErrorCode
    No parameters.
    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.
    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.
    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.
    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.
    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. [...]
    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.
    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
    Parameters: 0: the uri pointing to a non-library declaration
    CompileTimeErrorCode('PART_OF_NON_PART', 'The included part '{0}' must have a part-of directive.', correction: 'Try adding a part-of directive to '{0}'.')
    PART_OF_UNNAMED_LIBRARY → const CompileTimeErrorCode
    Parts: It is a static warning if the referenced part declaration p names a library that does not have a library tag. [...]
    CompileTimeErrorCode('PART_OF_UNNAMED_LIBRARY', 'Library is unnamed. Expected a URI not a library name '{0}' in the ' 'part-of directive.', correction: 'Try changin…
    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.
    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 '.'.
    CompileTimeErrorCode('PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT', 'The name '{0}' refers to an import prefix, so it must be followed ' 'by '.'.', correction: 'T…
    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.
    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.
    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.
    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. [...]
    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.
    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. [...]
    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. [...]
    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. [...]
    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
    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. [...]
    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.
    CompileTimeErrorCode('REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR', 'The constructor '{0}' couldn't be found in '{1}'.', correction: 'Try redirecting to a differ…
    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.
    CompileTimeErrorCode('REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTRUCTOR', 'Generative constructor can't redirect to a factory constructor.', correction: 'Try redirecting to a d…
    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.
    CompileTimeErrorCode('REDIRECT_TO_MISSING_CONSTRUCTOR', 'The constructor '{0}' couldn't be found in '{1}'.', correction: 'Try redirecting to a different constru…
    REDIRECT_TO_NON_CLASS → const CompileTimeErrorCode
    Parameters: 0: the name of the non-type referenced in the redirect
    CompileTimeErrorCode('REDIRECT_TO_NON_CLASS', 'The name '{0}' isn't a type and can't be used in a redirected ' 'constructor.', correction: 'Try redirecting …
    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.
    CompileTimeErrorCode('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 'Constant redirecting constructor can't redirect to a non-constant ' 'constructor.', correction: 'Try redirect…
    REFERENCED_BEFORE_DECLARATION → const CompileTimeErrorCode
    No parameters.
    CompileTimeErrorCode('REFERENCED_BEFORE_DECLARATION', 'Local variable '{0}' can't be referenced before it is declared.', correction: 'Try moving the declaration to befo…
    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.
    CompileTimeErrorCode('RETHROW_OUTSIDE_CATCH', 'Rethrow must be inside of catch clause.', correction: 'Try moving the expression into a catch clause, or using a ' ''thro…
    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.
    CompileTimeErrorCode('RETURN_IN_GENERATIVE_CONSTRUCTOR', 'Constructors can't return values.', correction: 'Try removing the return statement or using a factory ' 'const…
    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.
    CompileTimeErrorCode('RETURN_IN_GENERATOR', 'Can't return a value from a generator function (using the '{0}' ' 'modifier).', correction: 'Try removing the value…
    SET_ELEMENT_FROM_DEFERRED_LIBRARY → const CompileTimeErrorCode
    CompileTimeErrorCode('SET_ELEMENT_FROM_DEFERRED_LIBRARY', 'Constant values from a deferred library can't be used as values in ' 'a const set.', correction: 'Try making …
    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.
    CompileTimeErrorCode('SHARED_DEFERRED_PREFIX', 'The prefix of a deferred import can't be used in other import ' 'directives.', correction: 'Try renaming one of the pref…
    SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY → const CompileTimeErrorCode
    CompileTimeErrorCode('SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY', 'Constant values from a deferred library can't be spread into a ' 'const literal.', correction: 'Try mak…
    SUPER_IN_EXTENSION → const CompileTimeErrorCode
    No parameters.
    CompileTimeErrorCode('SUPER_IN_EXTENSION', 'The 'super' keyword can't be used in an extension because an ' 'extension doesn't have a superclass.', hasPublishedD…
    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.
    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.
    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.
    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.
    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
    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 ParserErrorCode
    @Deprecated('Use ParserErrorCode.TYPE_PARAMETER_ON_CONSTRUCTOR')
    ParserErrorCode.TYPE_PARAMETER_ON_CONSTRUCTOR
    UNDEFINED_ANNOTATION → const CompileTimeErrorCode
    No parameters.
    CompileTimeErrorCode('UNDEFINED_ANNOTATION', 'Undefined name '{0}' used as an annotation.', correction: 'Try defining the name or importing it from another library.', h…
    UNDEFINED_CLASS → const CompileTimeErrorCode
    Parameters: 0: the name of the undefined class
    CompileTimeErrorCode('UNDEFINED_CLASS', 'Undefined class '{0}'.', correction: 'Try changing the name to the name of an existing class, or ' 'creating a class with t…
    UNDEFINED_CONSTRUCTOR_IN_INITIALIZER → const CompileTimeErrorCode
    Parameters: 0: the name of the superclass that does not define the invoked constructor 1: the name of the constructor being invoked
    CompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 'The class '{0}' doesn't have a constructor named '{1}'.', correction: 'Try defining a constructor …
    UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT → const CompileTimeErrorCode
    Parameters: 0: the name of the superclass that does not define the invoked constructor
    CompileTimeErrorCodeWithUniqueName('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 'UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT', 'The class '{0}' doesn't have an unnamed cons…
    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
    CompileTimeErrorCode('UNDEFINED_EXTENSION_GETTER', 'The getter '{0}' isn't defined for the extension '{1}'.', correction: 'Try correcting the name to the name o…
    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
    CompileTimeErrorCode('UNDEFINED_EXTENSION_METHOD', 'The method '{0}' isn't defined for the extension '{1}'.', correction: 'Try correcting the name to the name o…
    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
    CompileTimeErrorCode('UNDEFINED_EXTENSION_OPERATOR', 'The operator '{0}' isn't defined for the extension '{1}'.', correction: 'Try defining the operator '{0…
    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
    CompileTimeErrorCode('UNDEFINED_EXTENSION_SETTER', 'The setter '{0}' isn't defined for the extension '{1}'.', correction: 'Try correcting the name to the name o…
    UNDEFINED_NAMED_PARAMETER → const CompileTimeErrorCode
    Parameters: 0: the name of the requested named parameter
    CompileTimeErrorCode('UNDEFINED_NAMED_PARAMETER', 'The named parameter '{0}' isn't defined.', correction: 'Try correcting the name to an existing named parameter's …
    UNQUALIFIED_REFERENCE_TO_STATIC_MEMBER_OF_EXTENDED_TYPE → const CompileTimeErrorCode
    Parameters: 0: the name of the defining type
    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 name o…
    URI_DOES_NOT_EXIST → const CompileTimeErrorCode
    Parameters: 0: the URI pointing to a non-existent file
    CompileTimeErrorCode('URI_DOES_NOT_EXIST', 'Target of URI doesn't exist: '{0}'.', correction: 'Try creating the file referenced by the URI, or ' 'Try using a UR…
    URI_HAS_NOT_BEEN_GENERATED → const CompileTimeErrorCode
    Parameters: 0: the URI pointing to a non-existent file
    CompileTimeErrorCode('URI_HAS_NOT_BEEN_GENERATED', 'Target of URI hasn't been generated: '{0}'.', correction: 'Try running the generator that will generate the file …
    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. [...]
    CompileTimeErrorCode('URI_WITH_INTERPOLATION', 'URIs can't use string interpolation.')
    WRONG_EXPLICIT_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. [...]
    CompileTimeErrorCode('WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE', ''{0}' is an '{1}' type parameter and can't be used in an '{2}' position in …
    WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR → const CompileTimeErrorCode
    Parameters: 0: the name of the declared operator 1: the number of parameters expected 2: the number of parameters found in the operator declaration
    CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 'Operator '{0}' should declare exactly {1} parameters, but {2} ' 'found.', hasPublishedDocs: true)
    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. [...]
    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.
    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.
    CompileTimeErrorCode('WRONG_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE', ''{0}' can't be used contravariantly or invariantly in '{1}'.', correction: 'Try not usi…
    WRONG_TYPE_PARAMETER_VARIANCE_POSITION → const CompileTimeErrorCode
    Let C be a generic class that declares a formal type parameter X. [...]
    CompileTimeErrorCode('WRONG_TYPE_PARAMETER_VARIANCE_POSITION', 'The '{0}' type parameter '{1}' can't be used in an '{2}' position.', correction: 'Try re…
    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.
    CompileTimeErrorCode('YIELD_EACH_IN_NON_GENERATOR', 'Yield-each statements must be in a generator function ' '(one marked with either 'async*' or 'sync*').', co…
    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.
    CompileTimeErrorCode('YIELD_IN_NON_GENERATOR', 'Yield statements must be in a generator function ' '(one marked with either 'async*' or 'sync*').', correction: …