blob: 7e467d4ebb4be21997f8c443afa596d8353b104c [file] [log] [blame]
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// THIS FILE IS GENERATED. DO NOT EDIT.
//
// Instead modify 'pkg/analyzer/messages.yaml' and run
// 'dart run pkg/analyzer/tool/messages/generate.dart' to update.
// We allow some snake_case and SCREAMING_SNAKE_CASE identifiers in generated
// code, as they match names declared in the source configuration files.
// ignore_for_file: constant_identifier_names
// While transitioning `HintCodes` to `WarningCodes`, we refer to deprecated
// codes here.
// ignore_for_file: deprecated_member_use_from_same_package
//
// Generated comments don't quite align with flutter style.
// ignore_for_file: flutter_style_todos
import "package:analyzer/error/error.dart";
import "package:analyzer/src/error/analyzer_error_code.dart";
class CompileTimeErrorCode extends AnalyzerErrorCode {
/// No parameters.
static const CompileTimeErrorCode ABSTRACT_FIELD_CONSTRUCTOR_INITIALIZER =
CompileTimeErrorCode(
'ABSTRACT_FIELD_INITIALIZER',
"Abstract fields can't have initializers.",
correctionMessage:
"Try removing the field initializer or the 'abstract' keyword from the "
"field declaration.",
hasPublishedDocs: true,
uniqueName: 'ABSTRACT_FIELD_CONSTRUCTOR_INITIALIZER',
);
/// No parameters.
static const CompileTimeErrorCode ABSTRACT_FIELD_INITIALIZER =
CompileTimeErrorCode(
'ABSTRACT_FIELD_INITIALIZER',
"Abstract fields can't have initializers.",
correctionMessage:
"Try removing the initializer or the 'abstract' keyword.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the display name for the kind of the found abstract member
/// 1: the name of the member
static const CompileTimeErrorCode ABSTRACT_SUPER_MEMBER_REFERENCE =
CompileTimeErrorCode(
'ABSTRACT_SUPER_MEMBER_REFERENCE',
"The {0} '{1}' is always abstract in the supertype.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the ambiguous element
/// 1: the name of the first library in which the type is found
/// 2: the name of the second library in which the type is found
static const CompileTimeErrorCode AMBIGUOUS_EXPORT = CompileTimeErrorCode(
'AMBIGUOUS_EXPORT',
"The name '{0}' is defined in the libraries '{1}' and '{2}'.",
correctionMessage:
"Try removing the export of one of the libraries, or explicitly hiding "
"the name in one of the export directives.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the member
/// 1: the names of the declaring extensions
static const CompileTimeErrorCode AMBIGUOUS_EXTENSION_MEMBER_ACCESS =
CompileTimeErrorCode(
'AMBIGUOUS_EXTENSION_MEMBER_ACCESS',
"A member named '{0}' is defined in {1}, and none are more specific.",
correctionMessage:
"Try using an extension override to specify the extension you want to "
"be chosen.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the ambiguous type
/// 1: the names of the libraries that the type is found
static const CompileTimeErrorCode AMBIGUOUS_IMPORT = CompileTimeErrorCode(
'AMBIGUOUS_IMPORT',
"The name '{0}' is defined in the libraries {1}.",
correctionMessage:
"Try using 'as prefix' for one of the import directives, or hiding the "
"name from all but one of the imports.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH =
CompileTimeErrorCode(
'AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH',
"The literal can't be either a map or a set because it contains at least "
"one literal map entry or a spread operator spreading a 'Map', and at "
"least one element which is neither of these.",
correctionMessage:
"Try removing or changing some of the elements so that all of the "
"elements are consistent.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER =
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 work.",
correctionMessage:
"Try adding type arguments to the literal (one for sets, two for "
"maps).",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the actual argument type
/// 1: the name of the expected type
/// 2: additional information, if any, when problem is associated with records
static const CompileTimeErrorCode ARGUMENT_TYPE_NOT_ASSIGNABLE =
CompileTimeErrorCode(
'ARGUMENT_TYPE_NOT_ASSIGNABLE',
"The argument type '{0}' can't be assigned to the parameter type '{1}'. "
"{2}",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode ASSERT_IN_REDIRECTING_CONSTRUCTOR =
CompileTimeErrorCode(
'ASSERT_IN_REDIRECTING_CONSTRUCTOR',
"A redirecting constructor can't have an 'assert' initializer.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode ASSIGNMENT_TO_CONST = CompileTimeErrorCode(
'ASSIGNMENT_TO_CONST',
"Constant variables can't be assigned a value.",
correctionMessage:
"Try removing the assignment, or remove the modifier 'const' from the "
"variable.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the final variable
static const CompileTimeErrorCode ASSIGNMENT_TO_FINAL = CompileTimeErrorCode(
'ASSIGNMENT_TO_FINAL',
"'{0}' can't be used as a setter because it's final.",
correctionMessage:
"Try finding a different setter, or making '{0}' non-final.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the variable
static const CompileTimeErrorCode ASSIGNMENT_TO_FINAL_LOCAL =
CompileTimeErrorCode(
'ASSIGNMENT_TO_FINAL_LOCAL',
"The final variable '{0}' can only be set once.",
correctionMessage: "Try making '{0}' non-final.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the reference
/// 1: the name of the class
static const CompileTimeErrorCode ASSIGNMENT_TO_FINAL_NO_SETTER =
CompileTimeErrorCode(
'ASSIGNMENT_TO_FINAL_NO_SETTER',
"There isn't a setter named '{0}' in class '{1}'.",
correctionMessage:
"Try correcting the name to reference an existing setter, or declare "
"the setter.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode ASSIGNMENT_TO_FUNCTION =
CompileTimeErrorCode(
'ASSIGNMENT_TO_FUNCTION',
"Functions can't be assigned a value.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode ASSIGNMENT_TO_METHOD = CompileTimeErrorCode(
'ASSIGNMENT_TO_METHOD',
"Methods can't be assigned a value.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode ASSIGNMENT_TO_TYPE = CompileTimeErrorCode(
'ASSIGNMENT_TO_TYPE',
"Types can't be assigned a value.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode ASYNC_FOR_IN_WRONG_CONTEXT =
CompileTimeErrorCode(
'ASYNC_FOR_IN_WRONG_CONTEXT',
"The async for-in loop can only be used in an async function.",
correctionMessage:
"Try marking the function body with either 'async' or 'async*', or "
"removing the 'await' before the for-in loop.",
hasPublishedDocs: true,
);
static const CompileTimeErrorCode
AUGMENTATION_EXTENDS_CLAUSE_ALREADY_PRESENT = CompileTimeErrorCode(
'AUGMENTATION_EXTENDS_CLAUSE_ALREADY_PRESENT',
"The augmentation has an 'extends' clause, but an augmentation target "
"already includes an 'extends' clause and it isn't allowed to be "
"repeated or changed.",
correctionMessage:
"Try removing the 'extends' clause, either here or in the augmentation "
"target.",
);
/// Parameters:
/// 0: the lexeme of the modifier.
static const CompileTimeErrorCode AUGMENTATION_MODIFIER_EXTRA =
CompileTimeErrorCode(
'AUGMENTATION_MODIFIER_EXTRA',
"The augmentation has the '{0}' modifier that the declaration doesn't "
"have.",
correctionMessage:
"Try removing the '{0}' modifier, or adding it to the declaration.",
);
/// Parameters:
/// 0: the lexeme of the modifier.
static const CompileTimeErrorCode AUGMENTATION_MODIFIER_MISSING =
CompileTimeErrorCode(
'AUGMENTATION_MODIFIER_MISSING',
"The augmentation is missing the '{0}' modifier that the declaration has.",
correctionMessage:
"Try adding the '{0}' modifier, or removing it from the declaration.",
);
/// Parameters:
/// 0: the name of the declaration kind.
/// 1: the name of the augmentation kind.
static const CompileTimeErrorCode AUGMENTATION_OF_DIFFERENT_DECLARATION_KIND =
CompileTimeErrorCode(
'AUGMENTATION_OF_DIFFERENT_DECLARATION_KIND',
"Can't augment a {0} with a {1}.",
correctionMessage:
"Try changing the augmentation to match the declaration kind.",
);
static const CompileTimeErrorCode AUGMENTATION_TYPE_PARAMETER_BOUND =
CompileTimeErrorCode(
'AUGMENTATION_TYPE_PARAMETER_BOUND',
"The augmentation type parameter must have the same bound as the "
"corresponding type parameter of the declaration.",
correctionMessage:
"Try changing the augmentation to match the declaration type "
"parameters.",
);
static const CompileTimeErrorCode AUGMENTATION_TYPE_PARAMETER_COUNT =
CompileTimeErrorCode(
'AUGMENTATION_TYPE_PARAMETER_COUNT',
"The augmentation must have the same number of type parameters as the "
"declaration.",
correctionMessage:
"Try changing the augmentation to match the declaration type "
"parameters.",
);
static const CompileTimeErrorCode AUGMENTATION_TYPE_PARAMETER_NAME =
CompileTimeErrorCode(
'AUGMENTATION_TYPE_PARAMETER_NAME',
"The augmentation type parameter must have the same name as the "
"corresponding type parameter of the declaration.",
correctionMessage:
"Try changing the augmentation to match the declaration type "
"parameters.",
);
static const CompileTimeErrorCode AUGMENTATION_WITHOUT_DECLARATION =
CompileTimeErrorCode(
'AUGMENTATION_WITHOUT_DECLARATION',
"The declaration being augmented doesn't exist.",
correctionMessage:
"Try changing the augmentation to match an existing declaration.",
);
static const CompileTimeErrorCode AUGMENTED_EXPRESSION_IS_NOT_SETTER =
CompileTimeErrorCode(
'AUGMENTED_EXPRESSION_IS_NOT_SETTER',
"The augmented declaration is not a setter, it can't be used to write a "
"value.",
correctionMessage: "Try assigning a value to a setter.",
);
static const CompileTimeErrorCode AUGMENTED_EXPRESSION_IS_SETTER =
CompileTimeErrorCode(
'AUGMENTED_EXPRESSION_IS_SETTER',
"The augmented declaration is a setter, it can't be used to read a value.",
correctionMessage: "Try assigning a value to the augmented setter.",
);
/// Parameters:
/// 0: the lexeme of the operator.
static const CompileTimeErrorCode AUGMENTED_EXPRESSION_NOT_OPERATOR =
CompileTimeErrorCode(
'AUGMENTED_EXPRESSION_NOT_OPERATOR',
"The enclosing augmentation doesn't augment the operator '{0}'.",
correctionMessage: "Try augmenting or invoking the correct operator.",
);
/// No parameters.
static const CompileTimeErrorCode AWAIT_IN_LATE_LOCAL_VARIABLE_INITIALIZER =
CompileTimeErrorCode(
'AWAIT_IN_LATE_LOCAL_VARIABLE_INITIALIZER',
"The 'await' expression can't be used in a 'late' local variable's "
"initializer.",
correctionMessage:
"Try removing the 'late' modifier, or rewriting the initializer "
"without using the 'await' expression.",
hasPublishedDocs: true,
);
/// 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.)
static const CompileTimeErrorCode AWAIT_IN_WRONG_CONTEXT =
CompileTimeErrorCode(
'AWAIT_IN_WRONG_CONTEXT',
"The await expression can only be used in an async function.",
correctionMessage:
"Try marking the function body with either 'async' or 'async*'.",
);
static const CompileTimeErrorCode AWAIT_OF_INCOMPATIBLE_TYPE =
CompileTimeErrorCode(
'AWAIT_OF_INCOMPATIBLE_TYPE',
"The 'await' expression can't be used for an expression with an extension "
"type that is not a subtype of 'Future'.",
correctionMessage:
"Try removing the `await`, or updating the extension type to implement "
"'Future'.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the base class being implemented
static const CompileTimeErrorCode BASE_CLASS_IMPLEMENTED_OUTSIDE_OF_LIBRARY =
CompileTimeErrorCode(
'INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY',
"The class '{0}' can't be implemented outside of its library because it's "
"a base class.",
hasPublishedDocs: true,
uniqueName: 'BASE_CLASS_IMPLEMENTED_OUTSIDE_OF_LIBRARY',
);
/// Parameters:
/// 0: the name of the base mixin being implemented
static const CompileTimeErrorCode BASE_MIXIN_IMPLEMENTED_OUTSIDE_OF_LIBRARY =
CompileTimeErrorCode(
'INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY',
"The mixin '{0}' can't be implemented outside of its library because it's "
"a base mixin.",
hasPublishedDocs: true,
uniqueName: 'BASE_MIXIN_IMPLEMENTED_OUTSIDE_OF_LIBRARY',
);
/// Parameters:
/// 0: the name of the return type
static const CompileTimeErrorCode BODY_MIGHT_COMPLETE_NORMALLY =
CompileTimeErrorCode(
'BODY_MIGHT_COMPLETE_NORMALLY',
"The body might complete normally, causing 'null' to be returned, but the "
"return type, '{0}', is a potentially non-nullable type.",
correctionMessage:
"Try adding either a return or a throw statement at the end.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode BREAK_LABEL_ON_SWITCH_MEMBER =
CompileTimeErrorCode(
'BREAK_LABEL_ON_SWITCH_MEMBER',
"A break label resolves to the 'case' or 'default' statement.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the built-in identifier that is being used
static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_EXTENSION_NAME =
CompileTimeErrorCode(
'BUILT_IN_IDENTIFIER_IN_DECLARATION',
"The built-in identifier '{0}' can't be used as an extension name.",
correctionMessage: "Try choosing a different name for the extension.",
hasPublishedDocs: true,
uniqueName: 'BUILT_IN_IDENTIFIER_AS_EXTENSION_NAME',
);
/// Parameters:
/// 0: the built-in identifier that is being used
static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_EXTENSION_TYPE_NAME =
CompileTimeErrorCode(
'BUILT_IN_IDENTIFIER_IN_DECLARATION',
"The built-in identifier '{0}' can't be used as an extension type name.",
correctionMessage: "Try choosing a different name for the extension type.",
hasPublishedDocs: true,
uniqueName: 'BUILT_IN_IDENTIFIER_AS_EXTENSION_TYPE_NAME',
);
/// Parameters:
/// 0: the built-in identifier that is being used
static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_PREFIX_NAME =
CompileTimeErrorCode(
'BUILT_IN_IDENTIFIER_IN_DECLARATION',
"The built-in identifier '{0}' can't be used as a prefix name.",
correctionMessage: "Try choosing a different name for the prefix.",
hasPublishedDocs: true,
uniqueName: 'BUILT_IN_IDENTIFIER_AS_PREFIX_NAME',
);
/// Parameters:
/// 0: the built-in identifier that is being used
static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE =
CompileTimeErrorCode(
'BUILT_IN_IDENTIFIER_AS_TYPE',
"The built-in identifier '{0}' can't be used as a type.",
correctionMessage: "Try correcting the name to match an existing type.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the built-in identifier that is being used
static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME =
CompileTimeErrorCode(
'BUILT_IN_IDENTIFIER_IN_DECLARATION',
"The built-in identifier '{0}' can't be used as a typedef name.",
correctionMessage: "Try choosing a different name for the typedef.",
hasPublishedDocs: true,
uniqueName: 'BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME',
);
/// Parameters:
/// 0: the built-in identifier that is being used
static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_NAME =
CompileTimeErrorCode(
'BUILT_IN_IDENTIFIER_IN_DECLARATION',
"The built-in identifier '{0}' can't be used as a type name.",
correctionMessage: "Try choosing a different name for the type.",
hasPublishedDocs: true,
uniqueName: 'BUILT_IN_IDENTIFIER_AS_TYPE_NAME',
);
/// Parameters:
/// 0: the built-in identifier that is being used
static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME =
CompileTimeErrorCode(
'BUILT_IN_IDENTIFIER_IN_DECLARATION',
"The built-in identifier '{0}' can't be used as a type parameter name.",
correctionMessage: "Try choosing a different name for the type parameter.",
hasPublishedDocs: true,
uniqueName: 'BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME',
);
/// Parameters:
/// 0: the this of the switch case expression
static const CompileTimeErrorCode CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS =
CompileTimeErrorCode(
'CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS',
"The switch case expression type '{0}' can't override the '==' operator.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the type of the case expression
/// 1: the type of the switch expression
static const CompileTimeErrorCode
CASE_EXPRESSION_TYPE_IS_NOT_SWITCH_EXPRESSION_SUBTYPE =
CompileTimeErrorCode(
'CASE_EXPRESSION_TYPE_IS_NOT_SWITCH_EXPRESSION_SUBTYPE',
"The switch case expression type '{0}' must be a subtype of the switch "
"expression type '{1}'.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the type
static const CompileTimeErrorCode CAST_TO_NON_TYPE = CompileTimeErrorCode(
'CAST_TO_NON_TYPE',
"The name '{0}' isn't a type, so it can't be used in an 'as' expression.",
correctionMessage:
"Try changing the name to the name of an existing type, or creating a "
"type with the name '{0}'.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the member
static const CompileTimeErrorCode
CLASS_INSTANTIATION_ACCESS_TO_INSTANCE_MEMBER = CompileTimeErrorCode(
'CLASS_INSTANTIATION_ACCESS_TO_MEMBER',
"The instance member '{0}' can't be accessed on a class instantiation.",
correctionMessage:
"Try changing the member name to the name of a constructor.",
uniqueName: 'CLASS_INSTANTIATION_ACCESS_TO_INSTANCE_MEMBER',
);
/// Parameters:
/// 0: the name of the member
static const CompileTimeErrorCode
CLASS_INSTANTIATION_ACCESS_TO_STATIC_MEMBER = CompileTimeErrorCode(
'CLASS_INSTANTIATION_ACCESS_TO_MEMBER',
"The static member '{0}' can't be accessed on a class instantiation.",
correctionMessage:
"Try removing the type arguments from the class name, or changing the "
"member name to the name of a constructor.",
uniqueName: 'CLASS_INSTANTIATION_ACCESS_TO_STATIC_MEMBER',
);
/// Parameters:
/// 0: the name of the class
/// 1: the name of the member
static const CompileTimeErrorCode
CLASS_INSTANTIATION_ACCESS_TO_UNKNOWN_MEMBER = CompileTimeErrorCode(
'CLASS_INSTANTIATION_ACCESS_TO_MEMBER',
"The class '{0}' doesn't have a constructor named '{1}'.",
correctionMessage:
"Try invoking a different constructor, or defining a constructor named "
"'{1}'.",
uniqueName: 'CLASS_INSTANTIATION_ACCESS_TO_UNKNOWN_MEMBER',
);
/// Parameters:
/// 0: the name of the class being used as a mixin
static const CompileTimeErrorCode CLASS_USED_AS_MIXIN = CompileTimeErrorCode(
'CLASS_USED_AS_MIXIN',
"The class '{0}' can't be used as a mixin because it's neither a mixin "
"class nor a mixin.",
hasPublishedDocs: true,
);
static const CompileTimeErrorCode CONCRETE_CLASS_HAS_ENUM_SUPERINTERFACE =
CompileTimeErrorCode(
'CONCRETE_CLASS_HAS_ENUM_SUPERINTERFACE',
"Concrete classes can't have 'Enum' as a superinterface.",
correctionMessage:
"Try specifying a different interface, or remove it from the list.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the abstract method
/// 1: the name of the enclosing class
static const CompileTimeErrorCode CONCRETE_CLASS_WITH_ABSTRACT_MEMBER =
CompileTimeErrorCode(
'CONCRETE_CLASS_WITH_ABSTRACT_MEMBER',
"'{0}' must have a method body because '{1}' isn't abstract.",
correctionMessage: "Try making '{1}' abstract, or adding a body to '{0}'.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the constructor and field
static const CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD =
CompileTimeErrorCode(
'CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER',
"'{0}' can't be used to name both a constructor and a static field in this "
"class.",
correctionMessage: "Try renaming either the constructor or the field.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD',
);
/// Parameters:
/// 0: the name of the constructor and getter
static const CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_AND_STATIC_GETTER =
CompileTimeErrorCode(
'CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER',
"'{0}' can't be used to name both a constructor and a static getter in "
"this class.",
correctionMessage: "Try renaming either the constructor or the getter.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_CONSTRUCTOR_AND_STATIC_GETTER',
);
/// Parameters:
/// 0: the name of the constructor
static const CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_AND_STATIC_METHOD =
CompileTimeErrorCode(
'CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER',
"'{0}' can't be used to name both a constructor and a static method in "
"this class.",
correctionMessage: "Try renaming either the constructor or the method.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_CONSTRUCTOR_AND_STATIC_METHOD',
);
/// Parameters:
/// 0: the name of the constructor and setter
static const CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_AND_STATIC_SETTER =
CompileTimeErrorCode(
'CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER',
"'{0}' can't be used to name both a constructor and a static setter in "
"this class.",
correctionMessage: "Try renaming either the constructor or the setter.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_CONSTRUCTOR_AND_STATIC_SETTER',
);
/// 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`.
///
/// Parameters:
/// 0: the name of the class defining the conflicting field
/// 1: the name of the conflicting field
/// 2: the name of the class defining the method with which the field conflicts
static const CompileTimeErrorCode CONFLICTING_FIELD_AND_METHOD =
CompileTimeErrorCode(
'CONFLICTING_FIELD_AND_METHOD',
"Class '{0}' can't define field '{1}' and have method '{2}.{1}' with the "
"same name.",
correctionMessage:
"Try converting the getter to a method, or renaming the field to a "
"name that doesn't conflict.",
);
/// Parameters:
/// 0: the name of the kind of the element implementing the conflicting interface
/// 1: the name of the element implementing the conflicting interface
/// 2: the first conflicting type
/// 3: the second conflicting type
static const CompileTimeErrorCode CONFLICTING_GENERIC_INTERFACES =
CompileTimeErrorCode(
'CONFLICTING_GENERIC_INTERFACES',
"The {0} '{1}' can't implement both '{2}' and '{3}' because the type "
"arguments are different.",
hasPublishedDocs: true,
);
/// 10.11 Class Member Conflicts: Let `C` be a class. It is a compile-time
/// error if the interface of `C` has an instance method named `n` and an
/// instance setter with basename `n`.
///
/// Parameters:
/// 0: the name of the enclosing element kind - class, extension type, etc
/// 1: the name of the enclosing element
/// 2: the name of the conflicting method / setter
static const CompileTimeErrorCode CONFLICTING_INHERITED_METHOD_AND_SETTER =
CompileTimeErrorCode(
'CONFLICTING_INHERITED_METHOD_AND_SETTER',
"The {0} '{1}' can't inherit both a method and a setter named '{2}'.",
);
/// 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`.
///
/// Parameters:
/// 0: the name of the class defining the conflicting method
/// 1: the name of the conflicting method
/// 2: the name of the class defining the field with which the method conflicts
static const CompileTimeErrorCode CONFLICTING_METHOD_AND_FIELD =
CompileTimeErrorCode(
'CONFLICTING_METHOD_AND_FIELD',
"Class '{0}' can't define method '{1}' and have field '{2}.{1}' with the "
"same name.",
correctionMessage:
"Try converting the method to a getter, or renaming the method to a "
"name that doesn't conflict.",
);
/// 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`.
///
/// Parameters:
/// 0: the name of the class defining the conflicting member
/// 1: the name of the conflicting static member
/// 2: the name of the class defining the field with which the method conflicts
static const CompileTimeErrorCode CONFLICTING_STATIC_AND_INSTANCE =
CompileTimeErrorCode(
'CONFLICTING_STATIC_AND_INSTANCE',
"Class '{0}' can't define static member '{1}' and have instance member "
"'{2}.{1}' with the same name.",
correctionMessage:
"Try renaming the member to a name that doesn't conflict.",
);
/// Parameters:
/// 0: the name of the type variable
static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_CLASS =
CompileTimeErrorCode(
'CONFLICTING_TYPE_VARIABLE_AND_CONTAINER',
"'{0}' can't be used to name both a type variable and the class in which "
"the type variable is defined.",
correctionMessage: "Try renaming either the type variable or the class.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_CLASS',
);
/// Parameters:
/// 0: the name of the type variable
static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_ENUM =
CompileTimeErrorCode(
'CONFLICTING_TYPE_VARIABLE_AND_CONTAINER',
"'{0}' can't be used to name both a type variable and the enum in which "
"the type variable is defined.",
correctionMessage: "Try renaming either the type variable or the enum.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_ENUM',
);
/// Parameters:
/// 0: the name of the type variable
static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_EXTENSION =
CompileTimeErrorCode(
'CONFLICTING_TYPE_VARIABLE_AND_CONTAINER',
"'{0}' can't be used to name both a type variable and the extension in "
"which the type variable is defined.",
correctionMessage:
"Try renaming either the type variable or the extension.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_EXTENSION',
);
/// Parameters:
/// 0: the name of the type variable
static const CompileTimeErrorCode
CONFLICTING_TYPE_VARIABLE_AND_EXTENSION_TYPE = CompileTimeErrorCode(
'CONFLICTING_TYPE_VARIABLE_AND_CONTAINER',
"'{0}' can't be used to name both a type variable and the extension type "
"in which the type variable is defined.",
correctionMessage:
"Try renaming either the type variable or the extension.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_EXTENSION_TYPE',
);
/// Parameters:
/// 0: the name of the type variable
static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_MEMBER_CLASS =
CompileTimeErrorCode(
'CONFLICTING_TYPE_VARIABLE_AND_MEMBER',
"'{0}' can't be used to name both a type variable and a member in this "
"class.",
correctionMessage: "Try renaming either the type variable or the member.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_MEMBER_CLASS',
);
/// Parameters:
/// 0: the name of the type variable
static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_MEMBER_ENUM =
CompileTimeErrorCode(
'CONFLICTING_TYPE_VARIABLE_AND_MEMBER',
"'{0}' can't be used to name both a type variable and a member in this "
"enum.",
correctionMessage: "Try renaming either the type variable or the member.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_MEMBER_ENUM',
);
/// Parameters:
/// 0: the name of the type variable
static const CompileTimeErrorCode
CONFLICTING_TYPE_VARIABLE_AND_MEMBER_EXTENSION = CompileTimeErrorCode(
'CONFLICTING_TYPE_VARIABLE_AND_MEMBER',
"'{0}' can't be used to name both a type variable and a member in this "
"extension.",
correctionMessage: "Try renaming either the type variable or the member.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_MEMBER_EXTENSION',
);
/// Parameters:
/// 0: the name of the type variable
static const CompileTimeErrorCode
CONFLICTING_TYPE_VARIABLE_AND_MEMBER_EXTENSION_TYPE =
CompileTimeErrorCode(
'CONFLICTING_TYPE_VARIABLE_AND_MEMBER',
"'{0}' can't be used to name both a type variable and a member in this "
"extension type.",
correctionMessage: "Try renaming either the type variable or the member.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_MEMBER_EXTENSION_TYPE',
);
/// Parameters:
/// 0: the name of the type variable
static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_MEMBER_MIXIN =
CompileTimeErrorCode(
'CONFLICTING_TYPE_VARIABLE_AND_MEMBER',
"'{0}' can't be used to name both a type variable and a member in this "
"mixin.",
correctionMessage: "Try renaming either the type variable or the member.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_MEMBER_MIXIN',
);
/// Parameters:
/// 0: the name of the type variable
static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_MIXIN =
CompileTimeErrorCode(
'CONFLICTING_TYPE_VARIABLE_AND_CONTAINER',
"'{0}' can't be used to name both a type variable and the mixin in which "
"the type variable is defined.",
correctionMessage: "Try renaming either the type variable or the mixin.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_MIXIN',
);
/// No parameters.
static const CompileTimeErrorCode
CONSTANT_PATTERN_WITH_NON_CONSTANT_EXPRESSION = CompileTimeErrorCode(
'CONSTANT_PATTERN_WITH_NON_CONSTANT_EXPRESSION',
"The expression of a constant pattern must be a valid constant.",
correctionMessage: "Try making the expression a valid constant.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode
CONST_CONSTRUCTOR_CONSTANT_FROM_DEFERRED_LIBRARY = CompileTimeErrorCode(
'COLLECTION_ELEMENT_FROM_DEFERRED_LIBRARY',
"Constant values from a deferred library can't be used as values in a "
"'const' constructor.",
correctionMessage:
"Try removing the keyword 'const' from the constructor or removing the "
"keyword 'deferred' from the import.",
hasPublishedDocs: true,
uniqueName: 'CONST_CONSTRUCTOR_CONSTANT_FROM_DEFERRED_LIBRARY',
);
/// 16.12.2 Const: It is a compile-time error if evaluation of a constant
/// object results in an uncaught exception being thrown.
///
/// Parameters:
/// 0: the type of the runtime value of the argument
/// 1: the name of the field
/// 2: the type of the field
static const CompileTimeErrorCode CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH =
CompileTimeErrorCode(
'CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH',
"In a const constructor, a value of type '{0}' can't be assigned to the "
"field '{1}', which has type '{2}'.",
correctionMessage: "Try using a subtype, or removing the keyword 'const'.",
);
/// Parameters:
/// 0: the type of the runtime value of the argument
/// 1: the static type of the parameter
static const CompileTimeErrorCode CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH =
CompileTimeErrorCode(
'CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH',
"A value of type '{0}' can't be assigned to a parameter of type '{1}' in a "
"const constructor.",
correctionMessage: "Try using a subtype, or removing the keyword 'const'.",
hasPublishedDocs: true,
);
/// 16.12.2 Const: It is a compile-time error if evaluation of a constant
/// object results in an uncaught exception being thrown.
static const CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION =
CompileTimeErrorCode(
'CONST_CONSTRUCTOR_THROWS_EXCEPTION',
"Const constructors can't throw exceptions.",
correctionMessage:
"Try removing the throw statement, or removing the keyword 'const'.",
);
/// Parameters:
/// 0: the name of the field
static const CompileTimeErrorCode
CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST =
CompileTimeErrorCode(
'CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST',
"Can't define the 'const' constructor because the field '{0}' is "
"initialized with a non-constant value.",
correctionMessage:
"Try initializing the field to a constant value, or removing the "
"keyword 'const' from the constructor.",
hasPublishedDocs: true,
);
/// 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.
///
/// 12.1 Mixin Application: For each generative constructor named ... an
/// implicitly declared constructor named ... is declared. If Sq is a
/// generative const constructor, and M does not declare any fields, Cq is
/// also a const constructor.
///
/// Parameters:
/// 0: the name of the instance field.
static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD =
CompileTimeErrorCode(
'CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD',
"This constructor can't be declared 'const' because a mixin adds the "
"instance field: {0}.",
correctionMessage:
"Try removing the 'const' keyword or removing the 'with' clause from "
"the class declaration, or removing the field from the mixin class.",
);
/// 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.
///
/// 12.1 Mixin Application: For each generative constructor named ... an
/// implicitly declared constructor named ... is declared. If Sq is a
/// generative const constructor, and M does not declare any fields, Cq is
/// also a const constructor.
///
/// Parameters:
/// 0: the names of the instance fields.
static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELDS =
CompileTimeErrorCode(
'CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD',
"This constructor can't be declared 'const' because the mixins add the "
"instance fields: {0}.",
correctionMessage:
"Try removing the 'const' keyword or removing the 'with' clause from "
"the class declaration, or removing the fields from the mixin classes.",
uniqueName: 'CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELDS',
);
/// Parameters:
/// 0: the name of the superclass
static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER =
CompileTimeErrorCode(
'CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER',
"A constant constructor can't call a non-constant super constructor of "
"'{0}'.",
correctionMessage:
"Try calling a constant constructor in the superclass, or removing the "
"keyword 'const' from the constructor.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD =
CompileTimeErrorCode(
'CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD',
"Can't define a const constructor for a class with non-final fields.",
correctionMessage:
"Try making all of the fields final, or removing the keyword 'const' "
"from the constructor.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode CONST_DEFERRED_CLASS = CompileTimeErrorCode(
'CONST_DEFERRED_CLASS',
"Deferred classes can't be created with 'const'.",
correctionMessage:
"Try using 'new' to create the instance, or changing the import to not "
"be deferred.",
hasPublishedDocs: true,
);
static const CompileTimeErrorCode CONST_EVAL_ASSERTION_FAILURE =
CompileTimeErrorCode(
'CONST_EVAL_ASSERTION_FAILURE',
"The assertion in this constant expression failed.",
);
/// Parameters:
/// 0: the message of the assertion
static const CompileTimeErrorCode CONST_EVAL_ASSERTION_FAILURE_WITH_MESSAGE =
CompileTimeErrorCode(
'CONST_EVAL_ASSERTION_FAILURE_WITH_MESSAGE',
"An assertion failed with message '{0}'.",
);
static const CompileTimeErrorCode CONST_EVAL_EXTENSION_METHOD =
CompileTimeErrorCode(
'CONST_EVAL_EXTENSION_METHOD',
"Extension methods can't be used in constant expressions.",
);
static const CompileTimeErrorCode CONST_EVAL_EXTENSION_TYPE_METHOD =
CompileTimeErrorCode(
'CONST_EVAL_EXTENSION_TYPE_METHOD',
"Extension type methods can't be used in constant expressions.",
);
static const CompileTimeErrorCode CONST_EVAL_FOR_ELEMENT =
CompileTimeErrorCode(
'CONST_EVAL_FOR_ELEMENT',
"Constant expressions don't support 'for' elements.",
correctionMessage:
"Try replacing the 'for' element with a spread, or removing 'const'.",
);
static const CompileTimeErrorCode CONST_EVAL_METHOD_INVOCATION =
CompileTimeErrorCode(
'CONST_EVAL_METHOD_INVOCATION',
"Methods can't be invoked in constant expressions.",
);
/// Parameters:
/// 0: the name of the property being accessed
/// 1: the type with the property being accessed
static const CompileTimeErrorCode CONST_EVAL_PROPERTY_ACCESS =
CompileTimeErrorCode(
'CONST_EVAL_PROPERTY_ACCESS',
"The property '{0}' can't be accessed on the type '{1}' in a constant "
"expression.",
);
/// 16.12.2 Const: It is a compile-time error if evaluation of a constant
/// object results in an uncaught exception being thrown.
static const CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION =
CompileTimeErrorCode(
'CONST_EVAL_THROWS_EXCEPTION',
"Evaluation of this constant expression throws an exception.",
);
/// 16.12.2 Const: It is a compile-time error if evaluation of a constant
/// object results in an uncaught exception being thrown.
static const CompileTimeErrorCode CONST_EVAL_THROWS_IDBZE =
CompileTimeErrorCode(
'CONST_EVAL_THROWS_IDBZE',
"Evaluation of this constant expression throws an "
"IntegerDivisionByZeroException.",
);
/// See https://spec.dart.dev/DartLangSpecDraft.pdf#constants, "Constants",
/// for text about "An expression of the form !e1", "An expression of the form
/// e1 && e2", and "An expression of the form e1 || e2".
static const CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = CompileTimeErrorCode(
'CONST_EVAL_TYPE_BOOL',
"In constant expressions, operands of this operator must be of type "
"'bool'.",
);
/// See https://spec.dart.dev/DartLangSpecDraft.pdf#constants, "Constants",
/// for text about "An expression of the form e1 & e2".
static const CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_INT =
CompileTimeErrorCode(
'CONST_EVAL_TYPE_BOOL_INT',
"In constant expressions, operands of this operator must be of type 'bool' "
"or 'int'.",
);
/// See https://spec.dart.dev/DartLangSpecDraft.pdf#constants, "Constants",
/// for text about "A literal string".
static const CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_NUM_STRING =
CompileTimeErrorCode(
'CONST_EVAL_TYPE_BOOL_NUM_STRING',
"In constant expressions, operands of this operator must be of type "
"'bool', 'num', 'String' or 'null'.",
);
/// See https://spec.dart.dev/DartLangSpecDraft.pdf#constants, "Constants",
/// for text about "An expression of the form ~e1", "An expression of one of
/// the forms e1 >> e2".
static const CompileTimeErrorCode CONST_EVAL_TYPE_INT = CompileTimeErrorCode(
'CONST_EVAL_TYPE_INT',
"In constant expressions, operands of this operator must be of type 'int'.",
);
/// See https://spec.dart.dev/DartLangSpecDraft.pdf#constants, "Constants",
/// for text about "An expression of the form e1 - e2".
static const CompileTimeErrorCode CONST_EVAL_TYPE_NUM = CompileTimeErrorCode(
'CONST_EVAL_TYPE_NUM',
"In constant expressions, operands of this operator must be of type 'num'.",
);
/// See https://spec.dart.dev/DartLangSpecDraft.pdf#constants, "Constants",
/// for text about "An expression of the form e1 + e2".
static const CompileTimeErrorCode CONST_EVAL_TYPE_NUM_STRING =
CompileTimeErrorCode(
'CONST_EVAL_TYPE_NUM_STRING',
"In constant expressions, operands of this operator must be of type 'num' "
"or 'String'.",
);
/// No parameters.
static const CompileTimeErrorCode CONST_EVAL_TYPE_STRING =
CompileTimeErrorCode(
'CONST_EVAL_TYPE_STRING',
"In constant expressions, operands of this operator must be of type "
"'String'.",
);
static const CompileTimeErrorCode CONST_EVAL_TYPE_TYPE = CompileTimeErrorCode(
'CONST_EVAL_TYPE_TYPE',
"In constant expressions, operands of this operator must be of type "
"'Type'.",
);
/// Parameters:
/// 0: the name of the type of the initializer expression
/// 1: the name of the type of the field
static const CompileTimeErrorCode CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE =
CompileTimeErrorCode(
'FIELD_INITIALIZER_NOT_ASSIGNABLE',
"The initializer type '{0}' can't be assigned to the field type '{1}' in a "
"const constructor.",
correctionMessage: "Try using a subtype, or removing the 'const' keyword",
hasPublishedDocs: true,
uniqueName: 'CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE',
);
/// No parameters.
static const CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE =
CompileTimeErrorCode(
'CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE',
"Const variables must be initialized with a constant value.",
correctionMessage:
"Try changing the initializer to be a constant expression.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode
CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY =
CompileTimeErrorCode(
'CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY',
"Constant values from a deferred library can't be used to initialize a "
"'const' variable.",
correctionMessage:
"Try initializing the variable without referencing members of the "
"deferred library, or changing the import to not be deferred.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode CONST_INSTANCE_FIELD = CompileTimeErrorCode(
'CONST_INSTANCE_FIELD',
"Only static fields can be declared as const.",
correctionMessage:
"Try declaring the field as final, or adding the keyword 'static'.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the type of the entry's key
static const CompileTimeErrorCode CONST_MAP_KEY_NOT_PRIMITIVE_EQUALITY =
CompileTimeErrorCode(
'CONST_MAP_KEY_NOT_PRIMITIVE_EQUALITY',
"The type of a key in a constant map can't override the '==' operator, or "
"'hashCode', but the class '{0}' does.",
correctionMessage:
"Try using a different value for the key, or removing the keyword "
"'const' from the map.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the uninitialized final variable
static const CompileTimeErrorCode CONST_NOT_INITIALIZED =
CompileTimeErrorCode(
'CONST_NOT_INITIALIZED',
"The constant '{0}' must be initialized.",
correctionMessage: "Try adding an initialization to the declaration.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the type of the element
static const CompileTimeErrorCode CONST_SET_ELEMENT_NOT_PRIMITIVE_EQUALITY =
CompileTimeErrorCode(
'CONST_SET_ELEMENT_NOT_PRIMITIVE_EQUALITY',
"An element in a constant set can't override the '==' operator, or "
"'hashCode', but the type '{0}' does.",
correctionMessage:
"Try using a different value for the element, or removing the keyword "
"'const' from the set.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode CONST_SPREAD_EXPECTED_LIST_OR_SET =
CompileTimeErrorCode(
'CONST_SPREAD_EXPECTED_LIST_OR_SET',
"A list or a set is expected in this spread.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode CONST_SPREAD_EXPECTED_MAP =
CompileTimeErrorCode(
'CONST_SPREAD_EXPECTED_MAP',
"A map is expected in this spread.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode CONST_TYPE_PARAMETER = CompileTimeErrorCode(
'CONST_TYPE_PARAMETER',
"Type parameters can't be used in a constant expression.",
correctionMessage:
"Try replacing the type parameter with a different type.",
);
/// No parameters.
static const CompileTimeErrorCode CONST_WITH_NON_CONST = CompileTimeErrorCode(
'CONST_WITH_NON_CONST',
"The constructor being called isn't a const constructor.",
correctionMessage: "Try removing 'const' from the constructor invocation.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT =
CompileTimeErrorCode(
'CONST_WITH_NON_CONSTANT_ARGUMENT',
"Arguments of a constant creation must be constant expressions.",
correctionMessage:
"Try making the argument a valid constant, or use 'new' to call the "
"constructor.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the non-type element
static const CompileTimeErrorCode CONST_WITH_NON_TYPE = CompileTimeErrorCode(
'CREATION_WITH_NON_TYPE',
"The name '{0}' isn't a class.",
correctionMessage: "Try correcting the name to match an existing class.",
hasPublishedDocs: true,
isUnresolvedIdentifier: true,
uniqueName: 'CONST_WITH_NON_TYPE',
);
/// No parameters.
static const CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS =
CompileTimeErrorCode(
'CONST_WITH_TYPE_PARAMETERS',
"A constant creation can't use a type parameter as a type argument.",
correctionMessage:
"Try replacing the type parameter with a different type.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode
CONST_WITH_TYPE_PARAMETERS_CONSTRUCTOR_TEAROFF = CompileTimeErrorCode(
'CONST_WITH_TYPE_PARAMETERS',
"A constant constructor tearoff can't use a type parameter as a type "
"argument.",
correctionMessage:
"Try replacing the type parameter with a different type.",
hasPublishedDocs: true,
uniqueName: 'CONST_WITH_TYPE_PARAMETERS_CONSTRUCTOR_TEAROFF',
);
/// No parameters.
static const CompileTimeErrorCode
CONST_WITH_TYPE_PARAMETERS_FUNCTION_TEAROFF = CompileTimeErrorCode(
'CONST_WITH_TYPE_PARAMETERS',
"A constant function tearoff can't use a type parameter as a type "
"argument.",
correctionMessage:
"Try replacing the type parameter with a different type.",
hasPublishedDocs: true,
uniqueName: 'CONST_WITH_TYPE_PARAMETERS_FUNCTION_TEAROFF',
);
/// 16.12.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
/// a constant constructor declared by the type <i>T</i>.
///
/// Parameters:
/// 0: the name of the type
/// 1: the name of the requested constant constructor
static const CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR =
CompileTimeErrorCode(
'CONST_WITH_UNDEFINED_CONSTRUCTOR',
"The class '{0}' doesn't have a constant constructor '{1}'.",
correctionMessage: "Try calling a different constructor.",
);
/// 16.12.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
/// a constant constructor declared by the type <i>T</i>.
///
/// Parameters:
/// 0: the name of the type
static const CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT =
CompileTimeErrorCode(
'CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT',
"The class '{0}' doesn't have an unnamed constant constructor.",
correctionMessage: "Try calling a different constructor.",
);
/// No parameters.
static const CompileTimeErrorCode CONTINUE_LABEL_INVALID =
CompileTimeErrorCode(
'CONTINUE_LABEL_INVALID',
"The label used in a 'continue' statement must be defined on either a loop "
"or a switch member.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the type parameter
/// 1: detail text explaining why the type could not be inferred
static const CompileTimeErrorCode COULD_NOT_INFER = CompileTimeErrorCode(
'COULD_NOT_INFER',
"Couldn't infer type parameter '{0}'.{1}",
);
/// No parameters.
static const CompileTimeErrorCode
DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR = CompileTimeErrorCode(
'DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR',
"Default values aren't allowed in factory constructors that redirect to "
"another constructor.",
correctionMessage: "Try removing the default value.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode DEFAULT_VALUE_ON_REQUIRED_PARAMETER =
CompileTimeErrorCode(
'DEFAULT_VALUE_ON_REQUIRED_PARAMETER',
"Required named parameters can't have a default value.",
correctionMessage:
"Try removing either the default value or the 'required' modifier.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode DEFERRED_IMPORT_OF_EXTENSION =
CompileTimeErrorCode(
'DEFERRED_IMPORT_OF_EXTENSION',
"Imports of deferred libraries must hide all extensions.",
correctionMessage:
"Try adding either a show combinator listing the names you need to "
"reference or a hide combinator listing all of the extensions.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the variable that is invalid
static const CompileTimeErrorCode DEFINITELY_UNASSIGNED_LATE_LOCAL_VARIABLE =
CompileTimeErrorCode(
'DEFINITELY_UNASSIGNED_LATE_LOCAL_VARIABLE',
"The late local variable '{0}' is definitely unassigned at this point.",
correctionMessage:
"Ensure that it is assigned on necessary execution paths.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode DISALLOWED_TYPE_INSTANTIATION_EXPRESSION =
CompileTimeErrorCode(
'DISALLOWED_TYPE_INSTANTIATION_EXPRESSION',
"Only a generic type, generic function, generic instance method, or "
"generic constructor can have type arguments.",
correctionMessage:
"Try removing the type arguments, or instantiating the type(s) of a "
"generic type, generic function, generic instance method, or generic "
"constructor.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT =
CompileTimeErrorCode(
'DUPLICATE_CONSTRUCTOR',
"The unnamed constructor is already defined.",
correctionMessage: "Try giving one of the constructors a name.",
hasPublishedDocs: true,
uniqueName: 'DUPLICATE_CONSTRUCTOR_DEFAULT',
);
/// Parameters:
/// 0: the name of the duplicate entity
static const CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME =
CompileTimeErrorCode(
'DUPLICATE_CONSTRUCTOR',
"The constructor with name '{0}' is already defined.",
correctionMessage: "Try renaming one of the constructors.",
hasPublishedDocs: true,
uniqueName: 'DUPLICATE_CONSTRUCTOR_NAME',
);
/// Parameters:
/// 0: the name of the duplicate entity
static const CompileTimeErrorCode DUPLICATE_DEFINITION = CompileTimeErrorCode(
'DUPLICATE_DEFINITION',
"The name '{0}' is already defined.",
correctionMessage: "Try renaming one of the declarations.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the field
static const CompileTimeErrorCode DUPLICATE_FIELD_FORMAL_PARAMETER =
CompileTimeErrorCode(
'DUPLICATE_FIELD_FORMAL_PARAMETER',
"The field '{0}' can't be initialized by multiple parameters in the same "
"constructor.",
correctionMessage:
"Try removing one of the parameters, or using different fields.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the duplicated name
static const CompileTimeErrorCode DUPLICATE_FIELD_NAME = CompileTimeErrorCode(
'DUPLICATE_FIELD_NAME',
"The field name '{0}' is already used in this record.",
correctionMessage: "Try renaming the field.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the parameter that was duplicated
static const CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT =
CompileTimeErrorCode(
'DUPLICATE_NAMED_ARGUMENT',
"The argument for the named parameter '{0}' was already specified.",
correctionMessage:
"Try removing one of the named arguments, or correcting one of the "
"names to reference a different named parameter.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the URI of the duplicate part
static const CompileTimeErrorCode DUPLICATE_PART = CompileTimeErrorCode(
'DUPLICATE_PART',
"The library already contains a part with the URI '{0}'.",
correctionMessage:
"Try removing all except one of the duplicated part directives.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the variable
static const CompileTimeErrorCode DUPLICATE_PATTERN_ASSIGNMENT_VARIABLE =
CompileTimeErrorCode(
'DUPLICATE_PATTERN_ASSIGNMENT_VARIABLE',
"The variable '{0}' is already assigned in this pattern.",
correctionMessage: "Try renaming the variable.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the field
static const CompileTimeErrorCode DUPLICATE_PATTERN_FIELD =
CompileTimeErrorCode(
'DUPLICATE_PATTERN_FIELD',
"The field '{0}' is already matched in this pattern.",
correctionMessage: "Try removing the duplicate field.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode DUPLICATE_REST_ELEMENT_IN_PATTERN =
CompileTimeErrorCode(
'DUPLICATE_REST_ELEMENT_IN_PATTERN',
"At most one rest element is allowed in a list or map pattern.",
correctionMessage: "Try removing the duplicate rest element.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the variable
static const CompileTimeErrorCode DUPLICATE_VARIABLE_PATTERN =
CompileTimeErrorCode(
'DUPLICATE_VARIABLE_PATTERN',
"The variable '{0}' is already defined in this pattern.",
correctionMessage: "Try renaming the variable.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode EMPTY_MAP_PATTERN = CompileTimeErrorCode(
'EMPTY_MAP_PATTERN',
"A map pattern must have at least one entry.",
correctionMessage: "Try replacing it with an object pattern 'Map()'.",
hasPublishedDocs: true,
);
static const CompileTimeErrorCode ENUM_CONSTANT_INVOKES_FACTORY_CONSTRUCTOR =
CompileTimeErrorCode(
'ENUM_CONSTANT_INVOKES_FACTORY_CONSTRUCTOR',
"An enum value can't invoke a factory constructor.",
correctionMessage: "Try using a generative constructor.",
);
static const CompileTimeErrorCode ENUM_CONSTANT_SAME_NAME_AS_ENCLOSING =
CompileTimeErrorCode(
'ENUM_CONSTANT_SAME_NAME_AS_ENCLOSING',
"The name of the enum value can't be the same as the enum's name.",
correctionMessage: "Try renaming the constant.",
hasPublishedDocs: true,
);
static const CompileTimeErrorCode
ENUM_INSTANTIATED_TO_BOUNDS_IS_NOT_WELL_BOUNDED = CompileTimeErrorCode(
'ENUM_INSTANTIATED_TO_BOUNDS_IS_NOT_WELL_BOUNDED',
"The result of instantiating the enum to bounds is not well-bounded.",
correctionMessage: "Try using different bounds for type parameters.",
);
static const CompileTimeErrorCode ENUM_MIXIN_WITH_INSTANCE_VARIABLE =
CompileTimeErrorCode(
'ENUM_MIXIN_WITH_INSTANCE_VARIABLE',
"Mixins applied to enums can't have instance variables.",
correctionMessage: "Try replacing the instance variables with getters.",
hasPublishedDocs: true,
);
static const CompileTimeErrorCode ENUM_WITHOUT_CONSTANTS =
CompileTimeErrorCode(
'ENUM_WITHOUT_CONSTANTS',
"The enum must have at least one constant.",
correctionMessage: "Try declaring a constant.",
);
/// Parameters:
/// 0: the name of the abstract method
/// 1: the name of the enclosing enum
static const CompileTimeErrorCode ENUM_WITH_ABSTRACT_MEMBER =
CompileTimeErrorCode(
'ENUM_WITH_ABSTRACT_MEMBER',
"'{0}' must have a method body because '{1}' is an enum.",
correctionMessage: "Try adding a body to '{0}'.",
hasPublishedDocs: true,
);
static const CompileTimeErrorCode ENUM_WITH_NAME_VALUES =
CompileTimeErrorCode(
'ENUM_WITH_NAME_VALUES',
"The name 'values' is not a valid name for an enum.",
correctionMessage: "Try using a different name.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode EQUAL_ELEMENTS_IN_CONST_SET =
CompileTimeErrorCode(
'EQUAL_ELEMENTS_IN_CONST_SET',
"Two elements in a constant set literal can't be equal.",
correctionMessage: "Change or remove the duplicate element.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode EQUAL_KEYS_IN_CONST_MAP =
CompileTimeErrorCode(
'EQUAL_KEYS_IN_CONST_MAP',
"Two keys in a constant map literal can't be equal.",
correctionMessage: "Change or remove the duplicate key.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode EQUAL_KEYS_IN_MAP_PATTERN =
CompileTimeErrorCode(
'EQUAL_KEYS_IN_MAP_PATTERN',
"Two keys in a map pattern can't be equal.",
correctionMessage: "Change or remove the duplicate key.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the number of provided type arguments
static const CompileTimeErrorCode EXPECTED_ONE_LIST_PATTERN_TYPE_ARGUMENTS =
CompileTimeErrorCode(
'EXPECTED_ONE_LIST_PATTERN_TYPE_ARGUMENTS',
"List patterns require one type argument or none, but {0} found.",
correctionMessage: "Try adjusting the number of type arguments.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the number of provided type arguments
static const CompileTimeErrorCode EXPECTED_ONE_LIST_TYPE_ARGUMENTS =
CompileTimeErrorCode(
'EXPECTED_ONE_LIST_TYPE_ARGUMENTS',
"List literals require one type argument or none, but {0} found.",
correctionMessage: "Try adjusting the number of type arguments.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the number of provided type arguments
static const CompileTimeErrorCode EXPECTED_ONE_SET_TYPE_ARGUMENTS =
CompileTimeErrorCode(
'EXPECTED_ONE_SET_TYPE_ARGUMENTS',
"Set literals require one type argument or none, but {0} were found.",
correctionMessage: "Try adjusting the number of type arguments.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the number of provided type arguments
static const CompileTimeErrorCode EXPECTED_TWO_MAP_PATTERN_TYPE_ARGUMENTS =
CompileTimeErrorCode(
'EXPECTED_TWO_MAP_PATTERN_TYPE_ARGUMENTS',
"Map patterns require two type arguments or none, but {0} found.",
correctionMessage: "Try adjusting the number of type arguments.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the number of provided type arguments
static const CompileTimeErrorCode EXPECTED_TWO_MAP_TYPE_ARGUMENTS =
CompileTimeErrorCode(
'EXPECTED_TWO_MAP_TYPE_ARGUMENTS',
"Map literals require two type arguments or none, but {0} found.",
correctionMessage: "Try adjusting the number of type arguments.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the URI pointing to a library
static const CompileTimeErrorCode EXPORT_INTERNAL_LIBRARY =
CompileTimeErrorCode(
'EXPORT_INTERNAL_LIBRARY',
"The library '{0}' is internal and can't be exported.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the URI pointing to a non-library declaration
static const CompileTimeErrorCode EXPORT_OF_NON_LIBRARY =
CompileTimeErrorCode(
'EXPORT_OF_NON_LIBRARY',
"The exported library '{0}' can't have a part-of directive.",
correctionMessage: "Try exporting the library that the part is a part of.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode EXPRESSION_IN_MAP = CompileTimeErrorCode(
'EXPRESSION_IN_MAP',
"Expressions can't be used in a map literal.",
correctionMessage:
"Try removing the expression or converting it to be a map entry.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode EXTENDS_DEFERRED_CLASS =
CompileTimeErrorCode(
'SUBTYPE_OF_DEFERRED_CLASS',
"Classes can't extend deferred classes.",
correctionMessage:
"Try specifying a different superclass, or removing the extends "
"clause.",
hasPublishedDocs: true,
uniqueName: 'EXTENDS_DEFERRED_CLASS',
);
/// Parameters:
/// 0: the name of the disallowed type
static const CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS =
CompileTimeErrorCode(
'SUBTYPE_OF_DISALLOWED_TYPE',
"Classes can't extend '{0}'.",
correctionMessage:
"Try specifying a different superclass, or removing the extends "
"clause.",
hasPublishedDocs: true,
uniqueName: 'EXTENDS_DISALLOWED_CLASS',
);
/// No parameters.
static const CompileTimeErrorCode EXTENDS_NON_CLASS = CompileTimeErrorCode(
'EXTENDS_NON_CLASS',
"Classes can only extend other classes.",
correctionMessage:
"Try specifying a different superclass, or removing the extends "
"clause.",
hasPublishedDocs: true,
isUnresolvedIdentifier: true,
);
/// No parameters.
static const CompileTimeErrorCode
EXTENDS_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER = CompileTimeErrorCode(
'SUPERTYPE_EXPANDS_TO_TYPE_PARAMETER',
"A type alias that expands to a type parameter can't be used as a "
"superclass.",
correctionMessage:
"Try specifying a different superclass, or removing the extends "
"clause.",
hasPublishedDocs: true,
uniqueName: 'EXTENDS_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER',
);
/// Parameters:
/// 0: the name of the extension
static const CompileTimeErrorCode EXTENSION_AS_EXPRESSION =
CompileTimeErrorCode(
'EXTENSION_AS_EXPRESSION',
"Extension '{0}' can't be used as an expression.",
correctionMessage: "Try replacing it with a valid expression.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the conflicting static member
static const CompileTimeErrorCode EXTENSION_CONFLICTING_STATIC_AND_INSTANCE =
CompileTimeErrorCode(
'EXTENSION_CONFLICTING_STATIC_AND_INSTANCE',
"An extension can't define static member '{0}' and an instance member with "
"the same name.",
correctionMessage:
"Try renaming the member to a name that doesn't conflict.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode EXTENSION_DECLARES_MEMBER_OF_OBJECT =
CompileTimeErrorCode(
'EXTENSION_DECLARES_MEMBER_OF_OBJECT',
"Extensions can't declare members with the same name as a member declared "
"by 'Object'.",
correctionMessage: "Try specifying a different name for the member.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode EXTENSION_OVERRIDE_ACCESS_TO_STATIC_MEMBER =
CompileTimeErrorCode(
'EXTENSION_OVERRIDE_ACCESS_TO_STATIC_MEMBER',
"An extension override can't be used to access a static member from an "
"extension.",
correctionMessage: "Try using just the name of the extension.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the type of the argument
/// 1: the extended type
static const CompileTimeErrorCode EXTENSION_OVERRIDE_ARGUMENT_NOT_ASSIGNABLE =
CompileTimeErrorCode(
'EXTENSION_OVERRIDE_ARGUMENT_NOT_ASSIGNABLE',
"The type of the argument to the extension override '{0}' isn't assignable "
"to the extended type '{1}'.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode EXTENSION_OVERRIDE_WITHOUT_ACCESS =
CompileTimeErrorCode(
'EXTENSION_OVERRIDE_WITHOUT_ACCESS',
"An extension override can only be used to access instance members.",
correctionMessage: "Consider adding an access to an instance member.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode EXTENSION_OVERRIDE_WITH_CASCADE =
CompileTimeErrorCode(
'EXTENSION_OVERRIDE_WITH_CASCADE',
"Extension overrides have no value so they can't be used as the receiver "
"of a cascade expression.",
correctionMessage: "Try using '.' instead of '..'.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode
EXTENSION_TYPE_CONSTRUCTOR_WITH_SUPER_FORMAL_PARAMETER =
CompileTimeErrorCode(
'EXTENSION_TYPE_CONSTRUCTOR_WITH_SUPER_FORMAL_PARAMETER',
"Extension type constructors can't declare super formal parameters.",
correctionMessage: "Try removing the super formal parameter declaration.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode
EXTENSION_TYPE_CONSTRUCTOR_WITH_SUPER_INVOCATION = CompileTimeErrorCode(
'EXTENSION_TYPE_CONSTRUCTOR_WITH_SUPER_INVOCATION',
"Extension type constructors can't include super initializers.",
correctionMessage: "Try removing the super constructor invocation.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode EXTENSION_TYPE_DECLARES_INSTANCE_FIELD =
CompileTimeErrorCode(
'EXTENSION_TYPE_DECLARES_INSTANCE_FIELD',
"Extension types can't declare instance fields.",
correctionMessage: "Try replacing the field with a getter.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode EXTENSION_TYPE_DECLARES_MEMBER_OF_OBJECT =
CompileTimeErrorCode(
'EXTENSION_TYPE_DECLARES_MEMBER_OF_OBJECT',
"Extension types can't declare members with the same name as a member "
"declared by 'Object'.",
correctionMessage: "Try specifying a different name for the member.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the display string of the disallowed type
static const CompileTimeErrorCode EXTENSION_TYPE_IMPLEMENTS_DISALLOWED_TYPE =
CompileTimeErrorCode(
'EXTENSION_TYPE_IMPLEMENTS_DISALLOWED_TYPE',
"Extension types can't implement '{0}'.",
correctionMessage:
"Try specifying a different type, or remove the type from the list.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode EXTENSION_TYPE_IMPLEMENTS_ITSELF =
CompileTimeErrorCode(
'EXTENSION_TYPE_IMPLEMENTS_ITSELF',
"The extension type can't implement itself.",
correctionMessage:
"Try removing the superinterface that references this extension type.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the implemented not extension type
/// 1: the ultimate representation type
static const CompileTimeErrorCode EXTENSION_TYPE_IMPLEMENTS_NOT_SUPERTYPE =
CompileTimeErrorCode(
'EXTENSION_TYPE_IMPLEMENTS_NOT_SUPERTYPE',
"'{0}' is not a supertype of '{1}', the representation type.",
correctionMessage:
"Try specifying a different type, or remove the type from the list.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the representation type of the implemented extension type
/// 1: the name of the implemented extension type
/// 2: the representation type of the this extension type
/// 3: the name of the this extension type
static const CompileTimeErrorCode
EXTENSION_TYPE_IMPLEMENTS_REPRESENTATION_NOT_SUPERTYPE =
CompileTimeErrorCode(
'EXTENSION_TYPE_IMPLEMENTS_REPRESENTATION_NOT_SUPERTYPE',
"'{0}', the representation type of '{1}', is not a supertype of '{2}', the "
"representation type of '{3}'.",
correctionMessage:
"Try specifying a different type, or remove the type from the list.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the extension type
/// 1: the name of the conflicting member
static const CompileTimeErrorCode EXTENSION_TYPE_INHERITED_MEMBER_CONFLICT =
CompileTimeErrorCode(
'EXTENSION_TYPE_INHERITED_MEMBER_CONFLICT',
"The extension type '{0}' has more than one distinct member named '{1}' "
"from implemented types.",
correctionMessage:
"Try redeclaring the corresponding member in this extension type.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode
EXTENSION_TYPE_REPRESENTATION_DEPENDS_ON_ITSELF = CompileTimeErrorCode(
'EXTENSION_TYPE_REPRESENTATION_DEPENDS_ON_ITSELF',
"The extension type representation can't depend on itself.",
correctionMessage: "Try specifying a different type.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode EXTENSION_TYPE_REPRESENTATION_TYPE_BOTTOM =
CompileTimeErrorCode(
'EXTENSION_TYPE_REPRESENTATION_TYPE_BOTTOM',
"The representation type can't be a bottom type.",
correctionMessage: "Try specifying a different type.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the abstract method
/// 1: the name of the enclosing extension type
static const CompileTimeErrorCode EXTENSION_TYPE_WITH_ABSTRACT_MEMBER =
CompileTimeErrorCode(
'EXTENSION_TYPE_WITH_ABSTRACT_MEMBER',
"'{0}' must have a method body because '{1}' is an extension type.",
correctionMessage: "Try adding a body to '{0}'.",
hasPublishedDocs: true,
);
static const CompileTimeErrorCode EXTERNAL_FIELD_CONSTRUCTOR_INITIALIZER =
CompileTimeErrorCode(
'EXTERNAL_WITH_INITIALIZER',
"External fields can't have initializers.",
correctionMessage:
"Try removing the field initializer or the 'external' keyword from the "
"field declaration.",
hasPublishedDocs: true,
uniqueName: 'EXTERNAL_FIELD_CONSTRUCTOR_INITIALIZER',
);
static const CompileTimeErrorCode EXTERNAL_FIELD_INITIALIZER =
CompileTimeErrorCode(
'EXTERNAL_WITH_INITIALIZER',
"External fields can't have initializers.",
correctionMessage:
"Try removing the initializer or the 'external' keyword.",
hasPublishedDocs: true,
uniqueName: 'EXTERNAL_FIELD_INITIALIZER',
);
static const CompileTimeErrorCode EXTERNAL_VARIABLE_INITIALIZER =
CompileTimeErrorCode(
'EXTERNAL_WITH_INITIALIZER',
"External variables can't have initializers.",
correctionMessage:
"Try removing the initializer or the 'external' keyword.",
hasPublishedDocs: true,
uniqueName: 'EXTERNAL_VARIABLE_INITIALIZER',
);
/// Parameters:
/// 0: the maximum number of positional arguments
/// 1: the actual number of positional arguments given
static const CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS =
CompileTimeErrorCode(
'EXTRA_POSITIONAL_ARGUMENTS',
"Too many positional arguments: {0} expected, but {1} found.",
correctionMessage: "Try removing the extra arguments.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the maximum number of positional arguments
/// 1: the actual number of positional arguments given
static const CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED =
CompileTimeErrorCode(
'EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED',
"Too many positional arguments: {0} expected, but {1} found.",
correctionMessage:
"Try removing the extra positional arguments, or specifying the name "
"for named arguments.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the field being initialized multiple times
static const CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS =
CompileTimeErrorCode(
'FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS',
"The field '{0}' can't be initialized twice in the same constructor.",
correctionMessage: "Try removing one of the initializations.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode
FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION = CompileTimeErrorCode(
'FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION',
"Fields can't be initialized in the constructor if they are final and were "
"already initialized at their declaration.",
correctionMessage: "Try removing one of the initializations.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode
FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER = CompileTimeErrorCode(
'FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER',
"Fields can't be initialized in both the parameter list and the "
"initializers.",
correctionMessage: "Try removing one of the initializations.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode FIELD_INITIALIZER_FACTORY_CONSTRUCTOR =
CompileTimeErrorCode(
'FIELD_INITIALIZER_FACTORY_CONSTRUCTOR',
"Initializing formal parameters can't be used in factory constructors.",
correctionMessage: "Try using a normal parameter.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the type of the initializer expression
/// 1: the name of the type of the field
static const CompileTimeErrorCode FIELD_INITIALIZER_NOT_ASSIGNABLE =
CompileTimeErrorCode(
'FIELD_INITIALIZER_NOT_ASSIGNABLE',
"The initializer type '{0}' can't be assigned to the field type '{1}'.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR =
CompileTimeErrorCode(
'FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR',
"Initializing formal parameters can only be used in constructors.",
correctionMessage: "Try using a normal parameter.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR =
CompileTimeErrorCode(
'FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR',
"The redirecting constructor can't have a field initializer.",
correctionMessage:
"Try initializing the field in the constructor being redirected to.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the type of the field formal parameter
/// 1: the name of the type of the field
static const CompileTimeErrorCode FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE =
CompileTimeErrorCode(
'FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE',
"The parameter type '{0}' is incompatible with the field type '{1}'.",
correctionMessage:
"Try changing or removing the parameter's type, or changing the "
"field's type.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the final class being extended.
static const CompileTimeErrorCode FINAL_CLASS_EXTENDED_OUTSIDE_OF_LIBRARY =
CompileTimeErrorCode(
'INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY',
"The class '{0}' can't be extended outside of its library because it's a "
"final class.",
hasPublishedDocs: true,
uniqueName: 'FINAL_CLASS_EXTENDED_OUTSIDE_OF_LIBRARY',
);
/// Parameters:
/// 0: the name of the final class being implemented.
static const CompileTimeErrorCode FINAL_CLASS_IMPLEMENTED_OUTSIDE_OF_LIBRARY =
CompileTimeErrorCode(
'INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY',
"The class '{0}' can't be implemented outside of its library because it's "
"a final class.",
hasPublishedDocs: true,
uniqueName: 'FINAL_CLASS_IMPLEMENTED_OUTSIDE_OF_LIBRARY',
);
/// Parameters:
/// 0: the name of the final class being used as a mixin superclass constraint.
static const CompileTimeErrorCode
FINAL_CLASS_USED_AS_MIXIN_CONSTRAINT_OUTSIDE_OF_LIBRARY =
CompileTimeErrorCode(
'INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY',
"The class '{0}' can't be used as a mixin superclass constraint outside of "
"its library because it's a final class.",
hasPublishedDocs: true,
uniqueName: 'FINAL_CLASS_USED_AS_MIXIN_CONSTRAINT_OUTSIDE_OF_LIBRARY',
);
/// Parameters:
/// 0: the name of the field in question
static const CompileTimeErrorCode
FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR = CompileTimeErrorCode(
'FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR',
"'{0}' is final and was given a value when it was declared, so it can't be "
"set to a new value.",
correctionMessage: "Try removing one of the initializations.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the uninitialized final variable
static const CompileTimeErrorCode FINAL_NOT_INITIALIZED =
CompileTimeErrorCode(
'FINAL_NOT_INITIALIZED',
"The final variable '{0}' must be initialized.",
correctionMessage: "Try initializing the variable.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the uninitialized final variable
static const CompileTimeErrorCode FINAL_NOT_INITIALIZED_CONSTRUCTOR_1 =
CompileTimeErrorCode(
'FINAL_NOT_INITIALIZED_CONSTRUCTOR',
"All final variables must be initialized, but '{0}' isn't.",
correctionMessage: "Try adding an initializer for the field.",
hasPublishedDocs: true,
uniqueName: 'FINAL_NOT_INITIALIZED_CONSTRUCTOR_1',
);
/// Parameters:
/// 0: the name of the uninitialized final variable
/// 1: the name of the uninitialized final variable
static const CompileTimeErrorCode FINAL_NOT_INITIALIZED_CONSTRUCTOR_2 =
CompileTimeErrorCode(
'FINAL_NOT_INITIALIZED_CONSTRUCTOR',
"All final variables must be initialized, but '{0}' and '{1}' aren't.",
correctionMessage: "Try adding initializers for the fields.",
hasPublishedDocs: true,
uniqueName: 'FINAL_NOT_INITIALIZED_CONSTRUCTOR_2',
);
/// Parameters:
/// 0: the name of the uninitialized final variable
/// 1: the name of the uninitialized final variable
/// 2: the number of additional not initialized variables that aren't listed
static const CompileTimeErrorCode FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS =
CompileTimeErrorCode(
'FINAL_NOT_INITIALIZED_CONSTRUCTOR',
"All final variables must be initialized, but '{0}', '{1}', and {2} others "
"aren't.",
correctionMessage: "Try adding initializers for the fields.",
hasPublishedDocs: true,
uniqueName: 'FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS',
);
/// Parameters:
/// 0: the type of the iterable expression.
/// 1: the sequence type -- Iterable for `for` or Stream for `await for`.
/// 2: the loop variable type.
static const CompileTimeErrorCode FOR_IN_OF_INVALID_ELEMENT_TYPE =
CompileTimeErrorCode(
'FOR_IN_OF_INVALID_ELEMENT_TYPE',
"The type '{0}' used in the 'for' loop must implement '{1}' with a type "
"argument that can be assigned to '{2}'.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the type of the iterable expression.
/// 1: the sequence type -- Iterable for `for` or Stream for `await for`.
static const CompileTimeErrorCode FOR_IN_OF_INVALID_TYPE =
CompileTimeErrorCode(
'FOR_IN_OF_INVALID_TYPE',
"The type '{0}' used in the 'for' loop must implement '{1}'.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode FOR_IN_WITH_CONST_VARIABLE =
CompileTimeErrorCode(
'FOR_IN_WITH_CONST_VARIABLE',
"A for-in loop variable can't be a 'const'.",
correctionMessage:
"Try removing the 'const' modifier from the variable, or use a "
"different variable.",
hasPublishedDocs: true,
);
/// 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.
static const CompileTimeErrorCode GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND =
CompileTimeErrorCode(
'GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND',
"Generic function types can't be used as type parameter bounds.",
correctionMessage:
"Try making the free variable in the function type part of the larger "
"declaration signature.",
);
/// It is a compile-time error if a generic function type is used as an actual
/// type argument.
static const CompileTimeErrorCode
GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT = CompileTimeErrorCode(
'GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT',
"A generic function type can't be a type argument.",
correctionMessage:
"Try removing type parameters from the generic function type, or using "
"'dynamic' as the type argument here.",
);
/// No parameters.
static const CompileTimeErrorCode
GENERIC_METHOD_TYPE_INSTANTIATION_ON_DYNAMIC = CompileTimeErrorCode(
'GENERIC_METHOD_TYPE_INSTANTIATION_ON_DYNAMIC',
"A method tear-off on a receiver whose type is 'dynamic' can't have type "
"arguments.",
correctionMessage:
"Specify the type of the receiver, or remove the type arguments from "
"the method tear-off.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the getter
/// 1: the type of the getter
/// 2: the type of the setter
/// 3: the name of the setter
static const CompileTimeErrorCode GETTER_NOT_ASSIGNABLE_SETTER_TYPES =
CompileTimeErrorCode(
'GETTER_NOT_ASSIGNABLE_SETTER_TYPES',
"The return type of getter '{0}' is '{1}' which isn't assignable to the "
"type '{2}' of its setter '{3}'.",
correctionMessage: "Try changing the types so that they are compatible.",
);
/// Parameters:
/// 0: the name of the getter
/// 1: the type of the getter
/// 2: the type of the setter
/// 3: the name of the setter
static const CompileTimeErrorCode GETTER_NOT_SUBTYPE_SETTER_TYPES =
CompileTimeErrorCode(
'GETTER_NOT_SUBTYPE_SETTER_TYPES',
"The return type of getter '{0}' is '{1}' which isn't a subtype of the "
"type '{2}' of its setter '{3}'.",
correctionMessage: "Try changing the types so that they are compatible.",
hasPublishedDocs: true,
);
static const CompileTimeErrorCode IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY =
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 collection literal.",
correctionMessage: "Try making the deferred import non-deferred.",
);
/// No parameters.
static const CompileTimeErrorCode ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE =
CompileTimeErrorCode(
'ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE',
"Functions marked 'async*' must have a return type that is a supertype of "
"'Stream<T>' for some type 'T'.",
correctionMessage:
"Try fixing the return type of the function, or removing the modifier "
"'async*' from the function body.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode ILLEGAL_ASYNC_RETURN_TYPE =
CompileTimeErrorCode(
'ILLEGAL_ASYNC_RETURN_TYPE',
"Functions marked 'async' must have a return type which is a supertype of "
"'Future'.",
correctionMessage:
"Try fixing the return type of the function, or removing the modifier "
"'async' from the function body.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of member that cannot be declared
static const CompileTimeErrorCode ILLEGAL_CONCRETE_ENUM_MEMBER_DECLARATION =
CompileTimeErrorCode(
'ILLEGAL_CONCRETE_ENUM_MEMBER',
"A concrete instance member named '{0}' can't be declared in a class that "
"implements 'Enum'.",
correctionMessage: "Try using a different name.",
hasPublishedDocs: true,
uniqueName: 'ILLEGAL_CONCRETE_ENUM_MEMBER_DECLARATION',
);
/// Parameters:
/// 0: the name of member that cannot be inherited
/// 1: the name of the class that declares the member
static const CompileTimeErrorCode ILLEGAL_CONCRETE_ENUM_MEMBER_INHERITANCE =
CompileTimeErrorCode(
'ILLEGAL_CONCRETE_ENUM_MEMBER',
"A concrete instance member named '{0}' can't be inherited from '{1}' in a "
"class that implements 'Enum'.",
correctionMessage: "Try using a different name.",
hasPublishedDocs: true,
uniqueName: 'ILLEGAL_CONCRETE_ENUM_MEMBER_INHERITANCE',
);
static const CompileTimeErrorCode ILLEGAL_ENUM_VALUES_DECLARATION =
CompileTimeErrorCode(
'ILLEGAL_ENUM_VALUES',
"An instance member named 'values' can't be declared in a class that "
"implements 'Enum'.",
correctionMessage: "Try using a different name.",
hasPublishedDocs: true,
uniqueName: 'ILLEGAL_ENUM_VALUES_DECLARATION',
);
/// Parameters:
/// 0: the name of the class that declares 'values'
static const CompileTimeErrorCode ILLEGAL_ENUM_VALUES_INHERITANCE =
CompileTimeErrorCode(
'ILLEGAL_ENUM_VALUES',
"An instance member named 'values' can't be inherited from '{0}' in a "
"class that implements 'Enum'.",
correctionMessage: "Try using a different name.",
hasPublishedDocs: true,
uniqueName: 'ILLEGAL_ENUM_VALUES_INHERITANCE',
);
/// Parameters:
/// 0: the required language version
static const CompileTimeErrorCode ILLEGAL_LANGUAGE_VERSION_OVERRIDE =
CompileTimeErrorCode(
'ILLEGAL_LANGUAGE_VERSION_OVERRIDE',
"The language version must be {0}.",
correctionMessage:
"Try removing the language version override and migrating the code.",
);
/// No parameters.
static const CompileTimeErrorCode ILLEGAL_SYNC_GENERATOR_RETURN_TYPE =
CompileTimeErrorCode(
'ILLEGAL_SYNC_GENERATOR_RETURN_TYPE',
"Functions marked 'sync*' must have a return type that is a supertype of "
"'Iterable<T>' for some type 'T'.",
correctionMessage:
"Try fixing the return type of the function, or removing the modifier "
"'sync*' from the function body.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode IMPLEMENTS_DEFERRED_CLASS =
CompileTimeErrorCode(
'SUBTYPE_OF_DEFERRED_CLASS',
"Classes and mixins can't implement deferred classes.",
correctionMessage:
"Try specifying a different interface, removing the class from the "
"list, or changing the import to not be deferred.",
hasPublishedDocs: true,
uniqueName: 'IMPLEMENTS_DEFERRED_CLASS',
);
/// Parameters:
/// 0: the name of the disallowed type
static const CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS =
CompileTimeErrorCode(
'SUBTYPE_OF_DISALLOWED_TYPE',
"Classes and mixins can't implement '{0}'.",
correctionMessage:
"Try specifying a different interface, or remove the class from the "
"list.",
hasPublishedDocs: true,
uniqueName: 'IMPLEMENTS_DISALLOWED_CLASS',
);
/// No parameters.
static const CompileTimeErrorCode IMPLEMENTS_NON_CLASS = CompileTimeErrorCode(
'IMPLEMENTS_NON_CLASS',
"Classes and mixins can only implement other classes and mixins.",
correctionMessage:
"Try specifying a class or mixin, or remove the name from the list.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the interface that is implemented more than once
static const CompileTimeErrorCode IMPLEMENTS_REPEATED = CompileTimeErrorCode(
'IMPLEMENTS_REPEATED',
"'{0}' can only be implemented once.",
correctionMessage: "Try removing all but one occurrence of the class name.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the class that appears in both "extends" and "implements"
/// clauses
static const CompileTimeErrorCode IMPLEMENTS_SUPER_CLASS =
CompileTimeErrorCode(
'IMPLEMENTS_SUPER_CLASS',
"'{0}' can't be used in both the 'extends' and 'implements' clauses.",
correctionMessage: "Try removing one of the occurrences.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode
IMPLEMENTS_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER = CompileTimeErrorCode(
'SUPERTYPE_EXPANDS_TO_TYPE_PARAMETER',
"A type alias that expands to a type parameter can't be implemented.",
correctionMessage: "Try specifying a class or mixin, or removing the list.",
hasPublishedDocs: true,
uniqueName: 'IMPLEMENTS_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER',
);
/// Parameters:
/// 0: the name of the superclass
static const CompileTimeErrorCode
IMPLICIT_SUPER_INITIALIZER_MISSING_ARGUMENTS = CompileTimeErrorCode(
'IMPLICIT_SUPER_INITIALIZER_MISSING_ARGUMENTS',
"The implicitly invoked unnamed constructor from '{0}' has required "
"parameters.",
correctionMessage:
"Try adding an explicit super parameter with the required arguments.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the instance member
static const CompileTimeErrorCode IMPLICIT_THIS_REFERENCE_IN_INITIALIZER =
CompileTimeErrorCode(
'IMPLICIT_THIS_REFERENCE_IN_INITIALIZER',
"The instance member '{0}' can't be accessed in an initializer.",
correctionMessage:
"Try replacing the reference to the instance member with a different "
"expression",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the URI pointing to a library
static const CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY =
CompileTimeErrorCode(
'IMPORT_INTERNAL_LIBRARY',
"The library '{0}' is internal and can't be imported.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the URI pointing to a non-library declaration
static const CompileTimeErrorCode IMPORT_OF_NON_LIBRARY =
CompileTimeErrorCode(
'IMPORT_OF_NON_LIBRARY',
"The imported library '{0}' can't have a part-of directive.",
correctionMessage: "Try importing the library that the part is a part of.",
hasPublishedDocs: true,
);
/// 13.9 Switch: It is a compile-time error if values of the expressions
/// <i>e<sub>k</sub></i> are not instances of the same class <i>C</i>, for all
/// <i>1 &lt;= k &lt;= n</i>.
///
/// Parameters:
/// 0: the expression source code that is the unexpected type
/// 1: the name of the expected type
static const CompileTimeErrorCode INCONSISTENT_CASE_EXPRESSION_TYPES =
CompileTimeErrorCode(
'INCONSISTENT_CASE_EXPRESSION_TYPES',
"Case expressions must have the same types, '{0}' isn't a '{1}'.",
);
/// Parameters:
/// 0: the name of the instance member with inconsistent inheritance.
/// 1: the list of all inherited signatures for this member.
static const CompileTimeErrorCode INCONSISTENT_INHERITANCE =
CompileTimeErrorCode(
'INCONSISTENT_INHERITANCE',
"Superinterfaces don't have a valid override for '{0}': {1}.",
correctionMessage:
"Try adding an explicit override that is consistent with all of the "
"inherited members.",
hasPublishedDocs: true,
);
/// 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.
///
/// Parameters:
/// 0: the name of the instance member with inconsistent inheritance.
/// 1: the name of the superinterface that declares the name as a getter.
/// 2: the name of the superinterface that declares the name as a method.
static const CompileTimeErrorCode INCONSISTENT_INHERITANCE_GETTER_AND_METHOD =
CompileTimeErrorCode(
'INCONSISTENT_INHERITANCE_GETTER_AND_METHOD',
"'{0}' is inherited as a getter (from '{1}') and also a method (from "
"'{2}').",
correctionMessage:
"Try adjusting the supertypes of this class to remove the "
"inconsistency.",
);
/// No parameters.
static const CompileTimeErrorCode INCONSISTENT_LANGUAGE_VERSION_OVERRIDE =
CompileTimeErrorCode(
'INCONSISTENT_LANGUAGE_VERSION_OVERRIDE',
"Parts must have exactly the same language version override as the "
"library.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the pattern variable
static const CompileTimeErrorCode INCONSISTENT_PATTERN_VARIABLE_LOGICAL_OR =
CompileTimeErrorCode(
'INCONSISTENT_PATTERN_VARIABLE_LOGICAL_OR',
"The variable '{0}' has a different type and/or finality in this branch of "
"the logical-or pattern.",
correctionMessage:
"Try declaring the variable pattern with the same type and finality in "
"both branches.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the initializing formal that is not an instance variable in
/// the immediately enclosing class
static const CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTENT_FIELD =
CompileTimeErrorCode(
'INITIALIZER_FOR_NON_EXISTENT_FIELD',
"'{0}' isn't a field in the enclosing class.",
correctionMessage:
"Try correcting the name to match an existing field, or defining a "
"field named '{0}'.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the initializing formal that is a static variable in the
/// immediately enclosing class
static const CompileTimeErrorCode INITIALIZER_FOR_STATIC_FIELD =
CompileTimeErrorCode(
'INITIALIZER_FOR_STATIC_FIELD',
"'{0}' is a static field in the enclosing class. Fields initialized in a "
"constructor can't be static.",
correctionMessage: "Try removing the initialization.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the initializing formal that is not an instance variable in
/// the immediately enclosing class
static const CompileTimeErrorCode INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD =
CompileTimeErrorCode(
'INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD',
"'{0}' isn't a field in the enclosing class.",
correctionMessage:
"Try correcting the name to match an existing field, or defining a "
"field named '{0}'.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the static member
/// 1: the kind of the static member (field, getter, setter, or method)
/// 2: the name of the static member's enclosing element
/// 3: the kind of the static member's enclosing element (class, mixin, or extension)
static const CompileTimeErrorCode INSTANCE_ACCESS_TO_STATIC_MEMBER =
CompileTimeErrorCode(
'INSTANCE_ACCESS_TO_STATIC_MEMBER',
"The static {1} '{0}' can't be accessed through an instance.",
correctionMessage: "Try using the {3} '{2}' to access the {1}.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the static member
/// 1: the kind of the static member (field, getter, setter, or method)
static const CompileTimeErrorCode
INSTANCE_ACCESS_TO_STATIC_MEMBER_OF_UNNAMED_EXTENSION =
CompileTimeErrorCode(
'INSTANCE_ACCESS_TO_STATIC_MEMBER',
"The static {1} '{0}' can't be accessed through an instance.",
hasPublishedDocs: true,
uniqueName: 'INSTANCE_ACCESS_TO_STATIC_MEMBER_OF_UNNAMED_EXTENSION',
);
/// No parameters.
static const CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_FACTORY =
CompileTimeErrorCode(
'INSTANCE_MEMBER_ACCESS_FROM_FACTORY',
"Instance members can't be accessed from a factory constructor.",
correctionMessage: "Try removing the reference to the instance member.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_STATIC =
CompileTimeErrorCode(
'INSTANCE_MEMBER_ACCESS_FROM_STATIC',
"Instance members can't be accessed from a static method.",
correctionMessage:
"Try removing the reference to the instance member, or removing the "
"keyword 'static' from the method.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode INSTANTIATE_ABSTRACT_CLASS =
CompileTimeErrorCode(
'INSTANTIATE_ABSTRACT_CLASS',
"Abstract classes can't be instantiated.",
correctionMessage: "Try creating an instance of a concrete subtype.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode INSTANTIATE_ENUM = CompileTimeErrorCode(
'INSTANTIATE_ENUM',
"Enums can't be instantiated.",
correctionMessage: "Try using one of the defined constants.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode
INSTANTIATE_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER = CompileTimeErrorCode(
'INSTANTIATE_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER',
"Type aliases that expand to a type parameter can't be instantiated.",
correctionMessage: "Try replacing it with a class.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the lexeme of the integer
/// 1: the closest valid double
static const CompileTimeErrorCode INTEGER_LITERAL_IMPRECISE_AS_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 or loss of precision: '{0}'.",
correctionMessage:
"Try using the class 'BigInt', or switch to the closest valid double: "
"'{1}'.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the value of the literal
static const CompileTimeErrorCode INTEGER_LITERAL_OUT_OF_RANGE =
CompileTimeErrorCode(
'INTEGER_LITERAL_OUT_OF_RANGE',
"The integer literal {0} can't be represented in 64 bits.",
correctionMessage:
"Try using the 'BigInt' class if you need an integer larger than "
"9,223,372,036,854,775,807 or less than -9,223,372,036,854,775,808.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the interface class being extended.
static const CompileTimeErrorCode
INTERFACE_CLASS_EXTENDED_OUTSIDE_OF_LIBRARY = CompileTimeErrorCode(
'INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY',
"The class '{0}' can't be extended outside of its library because it's an "
"interface class.",
hasPublishedDocs: true,
uniqueName: 'INTERFACE_CLASS_EXTENDED_OUTSIDE_OF_LIBRARY',
);
/// No parameters.
static const CompileTimeErrorCode INVALID_ANNOTATION = CompileTimeErrorCode(
'INVALID_ANNOTATION',
"Annotation must be either a const variable reference or const constructor "
"invocation.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode
INVALID_ANNOTATION_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY =
CompileTimeErrorCode(
'INVALID_ANNOTATION_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY',
"Constant values from a deferred library can't be used in annotations.",
correctionMessage:
"Try moving the constant from the deferred library, or removing "
"'deferred' from the import.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY =
CompileTimeErrorCode(
'INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY',
"Constant values from a deferred library can't be used as annotations.",
correctionMessage:
"Try removing the annotation, or changing the import to not be "
"deferred.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the right hand side type
/// 1: the name of the left hand side type
static const CompileTimeErrorCode INVALID_ASSIGNMENT = CompileTimeErrorCode(
'INVALID_ASSIGNMENT',
"A value of type '{0}' can't be assigned to a variable of type '{1}'.",
correctionMessage:
"Try changing the type of the variable, or casting the right-hand type "
"to '{1}'.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the function
/// 1: the type of the function
/// 2: the expected function type
///
/// This error is only reported in libraries which are not null safe.
static const CompileTimeErrorCode INVALID_CAST_FUNCTION =
CompileTimeErrorCode(
'INVALID_CAST_FUNCTION',
"The function '{0}' has type '{1}' that isn't of expected type '{2}'. This "
"means its parameter or return type doesn't match what is expected.",
);
/// Parameters:
/// 0: the type of the torn-off function expression
/// 1: the expected function type
///
/// This error is only reported in libraries which are not null safe.
static const CompileTimeErrorCode INVALID_CAST_FUNCTION_EXPR =
CompileTimeErrorCode(
'INVALID_CAST_FUNCTION_EXPR',
"The function expression type '{0}' isn't of type '{1}'. This means its "
"parameter or return type doesn't match what is expected. Consider "
"changing parameter type(s) or the returned type(s).",
);
/// Parameters:
/// 0: the lexeme of the literal
/// 1: the type of the literal
/// 2: the expected type
///
/// This error is only reported in libraries which are not null safe.
static const CompileTimeErrorCode INVALID_CAST_LITERAL = CompileTimeErrorCode(
'INVALID_CAST_LITERAL',
"The literal '{0}' with type '{1}' isn't of expected type '{2}'.",
);
/// Parameters:
/// 0: the type of the list literal
/// 1: the expected type
///
/// This error is only reported in libraries which are not null safe.
static const CompileTimeErrorCode INVALID_CAST_LITERAL_LIST =
CompileTimeErrorCode(
'INVALID_CAST_LITERAL_LIST',
"The list literal type '{0}' isn't of expected type '{1}'. The list's type "
"can be changed with an explicit generic type argument or by changing "
"the element types.",
);
/// Parameters:
/// 0: the type of the map literal
/// 1: the expected type
///
/// This error is only reported in libraries which are not null safe.
static const CompileTimeErrorCode INVALID_CAST_LITERAL_MAP =
CompileTimeErrorCode(
'INVALID_CAST_LITERAL_MAP',
"The map literal type '{0}' isn't of expected type '{1}'. The map's type "
"can be changed with an explicit generic type arguments or by changing "
"the key and value types.",
);
/// Parameters:
/// 0: the type of the set literal
/// 1: the expected type
///
/// This error is only reported in libraries which are not null safe.
static const CompileTimeErrorCode INVALID_CAST_LITERAL_SET =
CompileTimeErrorCode(
'INVALID_CAST_LITERAL_SET',
"The set literal type '{0}' isn't of expected type '{1}'. The set's type "
"can be changed with an explicit generic type argument or by changing "
"the element types.",
);
/// Parameters:
/// 0: the name of the torn-off method
/// 1: the type of the torn-off method
/// 2: the expected function type
///
/// This error is only reported in libraries which are not null safe.
static const CompileTimeErrorCode INVALID_CAST_METHOD = CompileTimeErrorCode(
'INVALID_CAST_METHOD',
"The method tear-off '{0}' has type '{1}' that isn't of expected type "
"'{2}'. This means its parameter or return type doesn't match what is "
"expected.",
);
/// Parameters:
/// 0: the type of the instantiated object
/// 1: the expected type
///
/// This error is only reported in libraries which are not null safe.
static const CompileTimeErrorCode INVALID_CAST_NEW_EXPR =
CompileTimeErrorCode(
'INVALID_CAST_NEW_EXPR',
"The constructor returns type '{0}' that isn't of expected type '{1}'.",
);
/// 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.
///
/// See TODOs in ConstantVisitor
static const CompileTimeErrorCode INVALID_CONSTANT = CompileTimeErrorCode(
'INVALID_CONSTANT',
"Invalid constant value.",
);
/// No parameters.
static const CompileTimeErrorCode INVALID_EXTENSION_ARGUMENT_COUNT =
CompileTimeErrorCode(
'INVALID_EXTENSION_ARGUMENT_COUNT',
"Extension overrides must have exactly one argument: the value of 'this' "
"in the extension method.",
correctionMessage: "Try specifying exactly one argument.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS =
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.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode INVALID_FIELD_NAME_FROM_OBJECT =
CompileTimeErrorCode(
'INVALID_FIELD_NAME',
"Record field names can't be the same as a member from 'Object'.",
correctionMessage: "Try using a different name for the field.",
hasPublishedDocs: true,
uniqueName: 'INVALID_FIELD_NAME_FROM_OBJECT',
);
/// No parameters.
static const CompileTimeErrorCode INVALID_FIELD_NAME_POSITIONAL =
CompileTimeErrorCode(
'INVALID_FIELD_NAME',
"Record field names can't be a dollar sign followed by an integer when the "
"integer is the index of a positional field.",
correctionMessage: "Try using a different name for the field.",
hasPublishedDocs: true,
uniqueName: 'INVALID_FIELD_NAME_POSITIONAL',
);
/// No parameters.
static const CompileTimeErrorCode INVALID_FIELD_NAME_PRIVATE =
CompileTimeErrorCode(
'INVALID_FIELD_NAME',
"Record field names can't be private.",
correctionMessage: "Try removing the leading underscore.",
hasPublishedDocs: true,
uniqueName: 'INVALID_FIELD_NAME_PRIVATE',
);
/// 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.
/// 3: the name of the interface with the overridden member.
/// 4: the type of the overridden member.
///
/// These parameters must be kept in sync with those of
/// [CompileTimeErrorCode.INVALID_OVERRIDE].
static const CompileTimeErrorCode INVALID_IMPLEMENTATION_OVERRIDE =
CompileTimeErrorCode(
'INVALID_IMPLEMENTATION_OVERRIDE',
"'{1}.{0}' ('{2}') isn't a valid concrete implementation of '{3}.{0}' "
"('{4}').",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the declared setter that is not a valid override.
/// 1: the name of the interface that declares the setter.
/// 2: the type of the declared setter in the interface.
/// 3: the name of the interface with the overridden setter.
/// 4: the type of the overridden setter.
///
/// These parameters must be kept in sync with those of
/// [CompileTimeErrorCode.INVALID_OVERRIDE].
static const CompileTimeErrorCode INVALID_IMPLEMENTATION_OVERRIDE_SETTER =
CompileTimeErrorCode(
'INVALID_IMPLEMENTATION_OVERRIDE',
"The setter '{1}.{0}' ('{2}') isn't a valid concrete implementation of "
"'{3}.{0}' ('{4}').",
hasPublishedDocs: true,
uniqueName: 'INVALID_IMPLEMENTATION_OVERRIDE_SETTER',
);
/// No parameters.
static const CompileTimeErrorCode INVALID_INLINE_FUNCTION_TYPE =
CompileTimeErrorCode(
'INVALID_INLINE_FUNCTION_TYPE',
"Inline function types can't be used for parameters in a generic function "
"type.",
correctionMessage:
"Try using a generic function type (returnType 'Function(' parameters "
"')').",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the list of target kind names
static const CompileTimeErrorCode INVALID_MACRO_APPLICATION_TARGET =
CompileTimeErrorCode(
'INVALID_MACRO_APPLICATION_TARGET',
"The macro can be applied only to a {0}.",
);
/// Parameters:
/// 0: the invalid modifier
static const CompileTimeErrorCode INVALID_MODIFIER_ON_CONSTRUCTOR =
CompileTimeErrorCode(
'INVALID_MODIFIER_ON_CONSTRUCTOR',
"The modifier '{0}' can't be applied to the body of a constructor.",
correctionMessage: "Try removing the modifier.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode INVALID_MODIFIER_ON_SETTER =
CompileTimeErrorCode(
'INVALID_MODIFIER_ON_SETTER',
"Setters can't use 'async', 'async*', or 'sync*'.",
correctionMessage: "Try removing the modifier.",
hasPublishedDocs: true,
);
/// 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.
/// 3: the name of the interface with the overridden member.
/// 4: the type of the overridden member.
static const CompileTimeErrorCode INVALID_OVERRIDE = CompileTimeErrorCode(
'INVALID_OVERRIDE',
"'{1}.{0}' ('{2}') isn't a valid override of '{3}.{0}' ('{4}').",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the declared setter that is not a valid override.
/// 1: the name of the interface that declares the setter.
/// 2: the type of the declared setter in the interface.
/// 3: the name of the interface with the overridden setter.
/// 4: the type of the overridden setter.
static const CompileTimeErrorCode INVALID_OVERRIDE_SETTER =
CompileTimeErrorCode(
'INVALID_OVERRIDE',
"The setter '{1}.{0}' ('{2}') isn't a valid override of '{3}.{0}' ('{4}').",
hasPublishedDocs: true,
uniqueName: 'INVALID_OVERRIDE_SETTER',
);
static const CompileTimeErrorCode
INVALID_REFERENCE_TO_GENERATIVE_ENUM_CONSTRUCTOR = CompileTimeErrorCode(
'INVALID_REFERENCE_TO_GENERATIVE_ENUM_CONSTRUCTOR',
"Generative enum constructors can only be used as targets of redirection.",
correctionMessage: "Try using an enum value, or a factory constructor.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode INVALID_REFERENCE_TO_THIS =
CompileTimeErrorCode(
'INVALID_REFERENCE_TO_THIS',
"Invalid reference to 'this' expression.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode INVALID_SUPER_FORMAL_PARAMETER_LOCATION =
CompileTimeErrorCode(
'INVALID_SUPER_FORMAL_PARAMETER_LOCATION',
"Super parameters can only be used in non-redirecting generative "
"constructors.",
correctionMessage:
"Try removing the 'super' modifier, or changing the constructor to be "
"non-redirecting and generative.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the type parameter
static const CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST =
CompileTimeErrorCode(
'INVALID_TYPE_ARGUMENT_IN_CONST_LITERAL',
"Constant list literals can't include a type parameter as a type argument, "
"such as '{0}'.",
correctionMessage:
"Try replacing the type parameter with a different type.",
hasPublishedDocs: true,
uniqueName: 'INVALID_TYPE_ARGUMENT_IN_CONST_LIST',
);
/// Parameters:
/// 0: the name of the type parameter
static const CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP =
CompileTimeErrorCode(
'INVALID_TYPE_ARGUMENT_IN_CONST_LITERAL',
"Constant map literals can't include a type parameter as a type argument, "
"such as '{0}'.",
correctionMessage:
"Try replacing the type parameter with a different type.",
hasPublishedDocs: true,
uniqueName: 'INVALID_TYPE_ARGUMENT_IN_CONST_MAP',
);
/// Parameters:
/// 0: the name of the type parameter
static const CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_SET =
CompileTimeErrorCode(
'INVALID_TYPE_ARGUMENT_IN_CONST_LITERAL',
"Constant set literals can't include a type parameter as a type argument, "
"such as '{0}'.",
correctionMessage:
"Try replacing the type parameter with a different type.",
hasPublishedDocs: true,
uniqueName: 'INVALID_TYPE_ARGUMENT_IN_CONST_SET',
);
/// Parameters:
/// 0: the URI that is invalid
static const CompileTimeErrorCode INVALID_URI = CompileTimeErrorCode(
'INVALID_URI',
"Invalid URI syntax: '{0}'.",
hasPublishedDocs: true,
);
/// The 'covariant' keyword was found in an inappropriate location.
static const CompileTimeErrorCode INVALID_USE_OF_COVARIANT =
CompileTimeErrorCode(
'INVALID_USE_OF_COVARIANT',
"The 'covariant' keyword can only be used for parameters in instance "
"methods or before non-final instance fields.",
correctionMessage: "Try removing the 'covariant' keyword.",
);
/// No parameters.
static const CompileTimeErrorCode INVALID_USE_OF_NULL_VALUE =
CompileTimeErrorCode(
'INVALID_USE_OF_NULL_VALUE',
"An expression whose value is always 'null' can't be dereferenced.",
correctionMessage: "Try changing the type of the expression.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the extension
static const CompileTimeErrorCode INVOCATION_OF_EXTENSION_WITHOUT_CALL =
CompileTimeErrorCode(
'INVOCATION_OF_EXTENSION_WITHOUT_CALL',
"The extension '{0}' doesn't define a 'call' method so the override can't "
"be used in an invocation.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the identifier that is not a function type
static const CompileTimeErrorCode INVOCATION_OF_NON_FUNCTION =
CompileTimeErrorCode(
'INVOCATION_OF_NON_FUNCTION',
"'{0}' isn't a function.",
correctionMessage:
"Try correcting the name to match an existing function, or define a "
"method or function named '{0}'.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode INVOCATION_OF_NON_FUNCTION_EXPRESSION =
CompileTimeErrorCode(
'INVOCATION_OF_NON_FUNCTION_EXPRESSION',
"The expression doesn't evaluate to a function, so it can't be invoked.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the unresolvable label
static const CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = CompileTimeErrorCode(
'LABEL_IN_OUTER_SCOPE',
"Can't reference label '{0}' declared in an outer method.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the unresolvable label
static const CompileTimeErrorCode LABEL_UNDEFINED = CompileTimeErrorCode(
'LABEL_UNDEFINED',
"Can't reference an undefined label '{0}'.",
correctionMessage:
"Try defining the label, or correcting the name to match an existing "
"label.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode LATE_FINAL_FIELD_WITH_CONST_CONSTRUCTOR =
CompileTimeErrorCode(
'LATE_FINAL_FIELD_WITH_CONST_CONSTRUCTOR',
"Can't have a late final field in a class with a generative const "
"constructor.",
correctionMessage:
"Try removing the 'late' modifier, or don't declare 'const' "
"constructors.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode LATE_FINAL_LOCAL_ALREADY_ASSIGNED =
CompileTimeErrorCode(
'LATE_FINAL_LOCAL_ALREADY_ASSIGNED',
"The late final local variable is already assigned.",
correctionMessage:
"Try removing the 'final' modifier, or don't reassign the value.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the actual type of the list element
/// 1: the expected type of the list element
static const CompileTimeErrorCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE =
CompileTimeErrorCode(
'LIST_ELEMENT_TYPE_NOT_ASSIGNABLE',
"The element type '{0}' can't be assigned to the list type '{1}'.",
hasPublishedDocs: true,
);
/// Reported when there is an issue converting a macro application argument
/// into a value. So, we cannot instantiate the macro, and run it.
/// Parameters:
/// 0: the message
static const CompileTimeErrorCode MACRO_APPLICATION_ARGUMENT_ERROR =
CompileTimeErrorCode(
'MACRO_APPLICATION_ARGUMENT_ERROR',
"{0}",
);
/// Parameters:
/// 0: the name of the introspected declaration
static const CompileTimeErrorCode
MACRO_DECLARATIONS_PHASE_INTROSPECTION_CYCLE = CompileTimeErrorCode(
'MACRO_DECLARATIONS_PHASE_INTROSPECTION_CYCLE',
"The declaration '{0}' can't be introspected because there is a cycle of "
"macro applications.",
correctionMessage:
"Try removing one or more macro applications to break the cycle.",
);
/// Parameters:
/// 0: the name of the macro class
static const CompileTimeErrorCode
MACRO_DEFINITION_APPLICATION_SAME_LIBRARY_CYCLE = CompileTimeErrorCode(
'MACRO_DEFINITION_APPLICATION_SAME_LIBRARY_CYCLE',
"The macro '{0}' can't be applied in the same library cycle where it is "
"defined.",
correctionMessage:
"Try moving it to a different library that does not import the one "
"where it is applied.",
);
/// Reported when the macro uses `Builder.report()` with `Severity.error`.
/// Parameters:
/// 0: the message
static const CompileTimeErrorCode MACRO_ERROR = CompileTimeErrorCode(
'MACRO_ERROR',
"{0}",
);
/// Reported when there is an exception inside the analyzer when running
/// macros. Should not happen, but just in case.
/// Parameters:
/// 0: the message
/// 1: the stack trace
static const CompileTimeErrorCode MACRO_INTERNAL_EXCEPTION =
CompileTimeErrorCode(
'MACRO_INTERNAL_EXCEPTION',
"{0} {1}",
);
/// Parameters:
/// 0: the macro phase
/// 1: the list of ranges in the code
/// 2: the generated code
static const CompileTimeErrorCode MACRO_NOT_ALLOWED_DECLARATION =
CompileTimeErrorCode(
'MACRO_NOT_ALLOWED_DECLARATION',
"The macro attempted to add declaration(s) not allowed during the {0} "
"phase.\nLocations: {1}\n---\n{2}\n---",
correctionMessage: "Try adding these declaration during an earlier phase.",
);
/// No parameters.
static const CompileTimeErrorCode MAIN_FIRST_POSITIONAL_PARAMETER_TYPE =
CompileTimeErrorCode(
'MAIN_FIRST_POSITIONAL_PARAMETER_TYPE',
"The type of the first positional parameter of the 'main' function must be "
"a supertype of 'List<String>'.",
correctionMessage: "Try changing the type of the parameter.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode MAIN_HAS_REQUIRED_NAMED_PARAMETERS =
CompileTimeErrorCode(
'MAIN_HAS_REQUIRED_NAMED_PARAMETERS',
"The function 'main' can't have any required named parameters.",
correctionMessage:
"Try using a different name for the function, or removing the "
"'required' modifier.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode
MAIN_HAS_TOO_MANY_REQUIRED_POSITIONAL_PARAMETERS = CompileTimeErrorCode(
'MAIN_HAS_TOO_MANY_REQUIRED_POSITIONAL_PARAMETERS',
"The function 'main' can't have more than two required positional "
"parameters.",
correctionMessage:
"Try using a different name for the function, or removing extra "
"parameters.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode MAIN_IS_NOT_FUNCTION = CompileTimeErrorCode(
'MAIN_IS_NOT_FUNCTION',
"The declaration named 'main' must be a function.",
correctionMessage: "Try using a different name for this declaration.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode MAP_ENTRY_NOT_IN_MAP = CompileTimeErrorCode(
'MAP_ENTRY_NOT_IN_MAP',
"Map entries can only be used in a map literal.",
correctionMessage:
"Try converting the collection to a map or removing the map entry.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the type of the expression being used as a key
/// 1: the type of keys declared for the map
static const CompileTimeErrorCode MAP_KEY_TYPE_NOT_ASSIGNABLE =
CompileTimeErrorCode(
'MAP_KEY_TYPE_NOT_ASSIGNABLE',
"The element type '{0}' can't be assigned to the map key type '{1}'.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the type of the expression being used as a value
/// 1: the type of values declared for the map
static const CompileTimeErrorCode MAP_VALUE_TYPE_NOT_ASSIGNABLE =
CompileTimeErrorCode(
'MAP_VALUE_TYPE_NOT_ASSIGNABLE',
"The element type '{0}' can't be assigned to the map value type '{1}'.",
hasPublishedDocs: true,
);
/// 12.1 Constants: A constant expression is ... a constant list literal.
///
/// Note: This diagnostic is never displayed to the user, so it doesn't need
/// to be documented.
static const CompileTimeErrorCode MISSING_CONST_IN_LIST_LITERAL =
CompileTimeErrorCode(
'MISSING_CONST_IN_LIST_LITERAL',
"Seeing this message constitutes a bug. Please report it.",
);
/// 12.1 Constants: A constant expression is ... a constant map literal.
///
/// Note: This diagnostic is never displayed to the user, so it doesn't need
/// to be documented.
static const CompileTimeErrorCode MISSING_CONST_IN_MAP_LITERAL =
CompileTimeErrorCode(
'MISSING_CONST_IN_MAP_LITERAL',
"Seeing this message constitutes a bug. Please report it.",
);
/// 12.1 Constants: A constant expression is ... a constant set literal.
///
/// Note: This diagnostic is never displayed to the user, so it doesn't need
/// to be documented.
static const CompileTimeErrorCode MISSING_CONST_IN_SET_LITERAL =
CompileTimeErrorCode(
'MISSING_CONST_IN_SET_LITERAL',
"Seeing this message constitutes a bug. Please report it.",
);
/// Parameters:
/// 0: the name of the library
static const CompileTimeErrorCode MISSING_DART_LIBRARY = CompileTimeErrorCode(
'MISSING_DART_LIBRARY',
"Required library '{0}' is missing.",
correctionMessage: "Re-install the Dart or Flutter SDK.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the parameter
static const CompileTimeErrorCode MISSING_DEFAULT_VALUE_FOR_PARAMETER =
CompileTimeErrorCode(
'MISSING_DEFAULT_VALUE_FOR_PARAMETER',
"The parameter '{0}' can't have a value of 'null' because of its type, but "
"the implicit default value is 'null'.",
correctionMessage:
"Try adding either an explicit non-'null' default value or the "
"'required' modifier.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the parameter
static const CompileTimeErrorCode
MISSING_DEFAULT_VALUE_FOR_PARAMETER_POSITIONAL = CompileTimeErrorCode(
'MISSING_DEFAULT_VALUE_FOR_PARAMETER',
"The parameter '{0}' can't have a value of 'null' because of its type, but "
"the implicit default value is 'null'.",
correctionMessage: "Try adding an explicit non-'null' default value.",
hasPublishedDocs: true,
uniqueName: 'MISSING_DEFAULT_VALUE_FOR_PARAMETER_POSITIONAL',
);
/// No parameters.
static const CompileTimeErrorCode
MISSING_DEFAULT_VALUE_FOR_PARAMETER_WITH_ANNOTATION =
CompileTimeErrorCode(
'MISSING_DEFAULT_VALUE_FOR_PARAMETER',
"With null safety, use the 'required' keyword, not the '@required' "
"annotation.",
correctionMessage: "Try removing the '@'.",
hasPublishedDocs: true,
uniqueName: 'MISSING_DEFAULT_VALUE_FOR_PARAMETER_WITH_ANNOTATION',
);
/// No parameters.
static const CompileTimeErrorCode MISSING_NAMED_PATTERN_FIELD_NAME =
CompileTimeErrorCode(
'MISSING_NAMED_PATTERN_FIELD_NAME',
"The getter name is not specified explicitly, and the pattern is not a "
"variable.",
correctionMessage:
"Try specifying the getter name explicitly, or using a variable "
"pattern.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the parameter
static const CompileTimeErrorCode MISSING_REQUIRED_ARGUMENT =
CompileTimeErrorCode(
'MISSING_REQUIRED_ARGUMENT',
"The named parameter '{0}' is required, but there's no corresponding "
"argument.",
correctionMessage: "Try adding the required argument.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the variable pattern
static const CompileTimeErrorCode MISSING_VARIABLE_PATTERN =
CompileTimeErrorCode(
'MISSING_VARIABLE_PATTERN',
"Variable pattern '{0}' is missing in this branch of the logical-or "
"pattern.",
correctionMessage: "Try declaring this variable pattern in the branch.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the class that appears in both "extends" and "with" clauses
static const CompileTimeErrorCode MIXINS_SUPER_CLASS = CompileTimeErrorCode(
'IMPLEMENTS_SUPER_CLASS',
"'{0}' can't be used in both the 'extends' and 'with' clauses.",
correctionMessage: "Try removing one of the occurrences.",
hasPublishedDocs: true,
uniqueName: 'MIXINS_SUPER_CLASS',
);
/// Parameters:
/// 0: the name of the super-invoked member
/// 1: the display name of the type of the super-invoked member in the mixin
/// 2: the display name of the type of the concrete member in the class
static const CompileTimeErrorCode
MIXIN_APPLICATION_CONCRETE_SUPER_INVOKED_MEMBER_TYPE =
CompileTimeErrorCode(
'MIXIN_APPLICATION_CONCRETE_SUPER_INVOKED_MEMBER_TYPE',
"The super-invoked member '{0}' has the type '{1}', and the concrete "
"member in the class has the type '{2}'.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the display name of the mixin
/// 1: the display name of the superclass
/// 2: the display name of the type that is not implemented
static const CompileTimeErrorCode
MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE = CompileTimeErrorCode(
'MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE',
"'{0}' can't be mixed onto '{1}' because '{1}' doesn't implement '{2}'.",
correctionMessage: "Try extending the class '{0}'.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the display name of the member without a concrete implementation
static const CompileTimeErrorCode
MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_MEMBER = CompileTimeErrorCode(
'MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_MEMBER',
"The class doesn't have a concrete implementation of the super-invoked "
"member '{0}'.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the display name of the setter without a concrete implementation
static const CompileTimeErrorCode
MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_SETTER = CompileTimeErrorCode(
'MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_MEMBER',
"The class doesn't have a concrete implementation of the super-invoked "
"setter '{0}'.",
hasPublishedDocs: true,
uniqueName: 'MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_SETTER',
);
/// Parameters:
/// 0: the name of the mixin class that is invalid
static const CompileTimeErrorCode MIXIN_CLASS_DECLARATION_EXTENDS_NOT_OBJECT =
CompileTimeErrorCode(
'MIXIN_CLASS_DECLARATION_EXTENDS_NOT_OBJECT',
"The class '{0}' can't be declared a mixin because it extends a class "
"other than 'Object'.",
correctionMessage:
"Try removing the 'mixin' modifier or changing the superclass to "
"'Object'.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the mixin that is invalid
static const CompileTimeErrorCode MIXIN_CLASS_DECLARES_CONSTRUCTOR =
CompileTimeErrorCode(
'MIXIN_CLASS_DECLARES_CONSTRUCTOR',
"The class '{0}' can't be used as a mixin because it declares a "
"constructor.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode MIXIN_DEFERRED_CLASS = CompileTimeErrorCode(
'SUBTYPE_OF_DEFERRED_CLASS',
"Classes can't mixin deferred classes.",
correctionMessage: "Try changing the import to not be deferred.",
hasPublishedDocs: true,
uniqueName: 'MIXIN_DEFERRED_CLASS',
);
/// Parameters:
/// 0: the name of the mixin that is invalid
static const CompileTimeErrorCode MIXIN_INHERITS_FROM_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'.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode MIXIN_INSTANTIATE = CompileTimeErrorCode(
'MIXIN_INSTANTIATE',
"Mixins can't be instantiated.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the disallowed type
static const CompileTimeErrorCode MIXIN_OF_DISALLOWED_CLASS =
CompileTimeErrorCode(
'SUBTYPE_OF_DISALLOWED_TYPE',
"Classes can't mixin '{0}'.",
correctionMessage:
"Try specifying a different class or mixin, or remove the class or "
"mixin from the list.",
hasPublishedDocs: true,
uniqueName: 'MIXIN_OF_DISALLOWED_CLASS',
);
/// No parameters.
static const CompileTimeErrorCode MIXIN_OF_NON_CLASS = CompileTimeErrorCode(