diff --git a/pkg/_fe_analyzer_shared/lib/src/messages/codes.dart b/pkg/_fe_analyzer_shared/lib/src/messages/codes.dart index 9ab87a730dc..1dc1d19a595 100644 --- a/pkg/_fe_analyzer_shared/lib/src/messages/codes.dart +++ b/pkg/_fe_analyzer_shared/lib/src/messages/codes.dart @@ -107,20 +107,23 @@ class MessageCode extends Code implements Message { } } -class Template extends Code { +class Template extends Code { String get messageCode => name; final String problemMessageTemplate; final String? correctionMessageTemplate; - final T withArgumentsOld; + final TOld withArgumentsOld; + + final T withArguments; const Template( super.name, { this.correctionMessageTemplate, required this.problemMessageTemplate, required this.withArgumentsOld, + required this.withArguments, super.index = -1, super.analyzerCodes, super.severity = CfeSeverity.error, diff --git a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart index 95f742dae14..d9e2f45a13e 100644 --- a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart +++ b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart @@ -18,14 +18,18 @@ const MessageCode codeAbstractClassConstructorTearOff = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeAbstractClassInstantiation = - const Template( - "AbstractClassInstantiation", - problemMessageTemplate: - r"""The class '#name' is abstract and can't be instantiated.""", - withArgumentsOld: _withArgumentsOldAbstractClassInstantiation, - analyzerCodes: ["NEW_WITH_ABSTRACT_CLASS"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeAbstractClassInstantiation = const Template( + "AbstractClassInstantiation", + problemMessageTemplate: + r"""The class '#name' is abstract and can't be instantiated.""", + withArgumentsOld: _withArgumentsOldAbstractClassInstantiation, + withArguments: _withArgumentsAbstractClassInstantiation, + analyzerCodes: ["NEW_WITH_ABSTRACT_CLASS"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsAbstractClassInstantiation({required String name}) { @@ -120,15 +124,18 @@ const MessageCode codeAbstractNotSync = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeAbstractRedirectedClassInstantiation = - const Template( - "AbstractRedirectedClassInstantiation", - problemMessageTemplate: - r"""Factory redirects to class '#name', which is abstract and can't be instantiated.""", - withArgumentsOld: _withArgumentsOldAbstractRedirectedClassInstantiation, - analyzerCodes: ["FACTORY_REDIRECTS_TO_ABSTRACT_CLASS"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeAbstractRedirectedClassInstantiation = const Template( + "AbstractRedirectedClassInstantiation", + problemMessageTemplate: + r"""Factory redirects to class '#name', which is abstract and can't be instantiated.""", + withArgumentsOld: _withArgumentsOldAbstractRedirectedClassInstantiation, + withArguments: _withArgumentsAbstractRedirectedClassInstantiation, + analyzerCodes: ["FACTORY_REDIRECTS_TO_ABSTRACT_CLASS"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsAbstractRedirectedClassInstantiation({ @@ -203,12 +210,16 @@ const MessageCode codeAnonymousContinueTargetOutsideFunction = ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeAsciiControlCharacter = const Template( +const Template< + Message Function(int unicode), + Message Function({required int unicode}) +> +codeAsciiControlCharacter = const Template( "AsciiControlCharacter", problemMessageTemplate: r"""The control character #unicode can only be used in strings and comments.""", withArgumentsOld: _withArgumentsOldAsciiControlCharacter, + withArguments: _withArgumentsAsciiControlCharacter, analyzerCodes: ["ILLEGAL_CHARACTER"], ); @@ -275,15 +286,18 @@ const MessageCode codeAwaitOfExtensionTypeNotFuture = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeBaseClassImplementedOutsideOfLibrary = - const Template( - "BaseClassImplementedOutsideOfLibrary", - problemMessageTemplate: - r"""The class '#name' can't be implemented outside of its library because it's a base class.""", - withArgumentsOld: _withArgumentsOldBaseClassImplementedOutsideOfLibrary, - analyzerCodes: ["BASE_CLASS_IMPLEMENTED_OUTSIDE_OF_LIBRARY"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeBaseClassImplementedOutsideOfLibrary = const Template( + "BaseClassImplementedOutsideOfLibrary", + problemMessageTemplate: + r"""The class '#name' can't be implemented outside of its library because it's a base class.""", + withArgumentsOld: _withArgumentsOldBaseClassImplementedOutsideOfLibrary, + withArguments: _withArgumentsBaseClassImplementedOutsideOfLibrary, + analyzerCodes: ["BASE_CLASS_IMPLEMENTED_OUTSIDE_OF_LIBRARY"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsBaseClassImplementedOutsideOfLibrary({ @@ -311,15 +325,18 @@ const MessageCode codeBaseEnum = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeBaseMixinImplementedOutsideOfLibrary = - const Template( - "BaseMixinImplementedOutsideOfLibrary", - problemMessageTemplate: - r"""The mixin '#name' can't be implemented outside of its library because it's a base mixin.""", - withArgumentsOld: _withArgumentsOldBaseMixinImplementedOutsideOfLibrary, - analyzerCodes: ["BASE_MIXIN_IMPLEMENTED_OUTSIDE_OF_LIBRARY"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeBaseMixinImplementedOutsideOfLibrary = const Template( + "BaseMixinImplementedOutsideOfLibrary", + problemMessageTemplate: + r"""The mixin '#name' can't be implemented outside of its library because it's a base mixin.""", + withArgumentsOld: _withArgumentsOldBaseMixinImplementedOutsideOfLibrary, + withArguments: _withArgumentsBaseMixinImplementedOutsideOfLibrary, + analyzerCodes: ["BASE_MIXIN_IMPLEMENTED_OUTSIDE_OF_LIBRARY"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsBaseMixinImplementedOutsideOfLibrary({ @@ -339,16 +356,19 @@ Message _withArgumentsOldBaseMixinImplementedOutsideOfLibrary(String name) => _withArgumentsBaseMixinImplementedOutsideOfLibrary(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeBaseOrFinalClassImplementedOutsideOfLibraryCause = - const Template( - "BaseOrFinalClassImplementedOutsideOfLibraryCause", - problemMessageTemplate: - r"""The type '#name' is a subtype of '#name2', and '#name2' is defined here.""", - withArgumentsOld: - _withArgumentsOldBaseOrFinalClassImplementedOutsideOfLibraryCause, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name, String name2), + Message Function({required String name, required String name2}) +> +codeBaseOrFinalClassImplementedOutsideOfLibraryCause = const Template( + "BaseOrFinalClassImplementedOutsideOfLibraryCause", + problemMessageTemplate: + r"""The type '#name' is a subtype of '#name2', and '#name2' is defined here.""", + withArgumentsOld: + _withArgumentsOldBaseOrFinalClassImplementedOutsideOfLibraryCause, + withArguments: _withArgumentsBaseOrFinalClassImplementedOutsideOfLibraryCause, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsBaseOrFinalClassImplementedOutsideOfLibraryCause({ @@ -375,17 +395,19 @@ Message _withArgumentsOldBaseOrFinalClassImplementedOutsideOfLibraryCause( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeBinaryOperatorWrittenOut = - const Template( - "BinaryOperatorWrittenOut", - problemMessageTemplate: - r"""Binary operator '#string' is written as '#string2' instead of the written out word.""", - correctionMessageTemplate: - r"""Try replacing '#string' with '#string2'.""", - withArgumentsOld: _withArgumentsOldBinaryOperatorWrittenOut, - index: 112, - ); +const Template< + Message Function(String string, String string2), + Message Function({required String string, required String string2}) +> +codeBinaryOperatorWrittenOut = const Template( + "BinaryOperatorWrittenOut", + problemMessageTemplate: + r"""Binary operator '#string' is written as '#string2' instead of the written out word.""", + correctionMessageTemplate: r"""Try replacing '#string' with '#string2'.""", + withArgumentsOld: _withArgumentsOldBinaryOperatorWrittenOut, + withArguments: _withArgumentsBinaryOperatorWrittenOut, + index: 112, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsBinaryOperatorWrittenOut({ @@ -410,17 +432,20 @@ Message _withArgumentsOldBinaryOperatorWrittenOut( ) => _withArgumentsBinaryOperatorWrittenOut(string: string, string2: string2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeBoundIssueViaCycleNonSimplicity = - const Template( - "BoundIssueViaCycleNonSimplicity", - problemMessageTemplate: - r"""Generic type '#name' can't be used without type arguments in the bounds of its own type variables. It is referenced indirectly through '#name2'.""", - correctionMessageTemplate: - r"""Try providing type arguments to '#name2' here or to some other raw types in the bounds along the reference chain.""", - withArgumentsOld: _withArgumentsOldBoundIssueViaCycleNonSimplicity, - analyzerCodes: ["NOT_INSTANTIATED_BOUND"], - ); +const Template< + Message Function(String name, String name2), + Message Function({required String name, required String name2}) +> +codeBoundIssueViaCycleNonSimplicity = const Template( + "BoundIssueViaCycleNonSimplicity", + problemMessageTemplate: + r"""Generic type '#name' can't be used without type arguments in the bounds of its own type variables. It is referenced indirectly through '#name2'.""", + correctionMessageTemplate: + r"""Try providing type arguments to '#name2' here or to some other raw types in the bounds along the reference chain.""", + withArgumentsOld: _withArgumentsOldBoundIssueViaCycleNonSimplicity, + withArguments: _withArgumentsBoundIssueViaCycleNonSimplicity, + analyzerCodes: ["NOT_INSTANTIATED_BOUND"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsBoundIssueViaCycleNonSimplicity({ @@ -446,14 +471,18 @@ Message _withArgumentsOldBoundIssueViaCycleNonSimplicity( ) => _withArgumentsBoundIssueViaCycleNonSimplicity(name: name, name2: name2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeBoundIssueViaLoopNonSimplicity = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeBoundIssueViaLoopNonSimplicity = const Template( "BoundIssueViaLoopNonSimplicity", problemMessageTemplate: r"""Generic type '#name' can't be used without type arguments in the bounds of its own type variables.""", correctionMessageTemplate: r"""Try providing type arguments to '#name' here.""", withArgumentsOld: _withArgumentsOldBoundIssueViaLoopNonSimplicity, + withArguments: _withArgumentsBoundIssueViaLoopNonSimplicity, analyzerCodes: ["NOT_INSTANTIATED_BOUND"], ); @@ -474,18 +503,20 @@ Message _withArgumentsOldBoundIssueViaLoopNonSimplicity(String name) => _withArgumentsBoundIssueViaLoopNonSimplicity(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeBoundIssueViaRawTypeWithNonSimpleBounds = - const Template( - "BoundIssueViaRawTypeWithNonSimpleBounds", - problemMessageTemplate: - r"""Generic type '#name' can't be used without type arguments in a type variable bound.""", - correctionMessageTemplate: - r"""Try providing type arguments to '#name' here.""", - withArgumentsOld: - _withArgumentsOldBoundIssueViaRawTypeWithNonSimpleBounds, - analyzerCodes: ["NOT_INSTANTIATED_BOUND"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeBoundIssueViaRawTypeWithNonSimpleBounds = const Template( + "BoundIssueViaRawTypeWithNonSimpleBounds", + problemMessageTemplate: + r"""Generic type '#name' can't be used without type arguments in a type variable bound.""", + correctionMessageTemplate: + r"""Try providing type arguments to '#name' here.""", + withArgumentsOld: _withArgumentsOldBoundIssueViaRawTypeWithNonSimpleBounds, + withArguments: _withArgumentsBoundIssueViaRawTypeWithNonSimpleBounds, + analyzerCodes: ["NOT_INSTANTIATED_BOUND"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsBoundIssueViaRawTypeWithNonSimpleBounds({ @@ -515,14 +546,18 @@ const MessageCode codeBreakOutsideOfLoop = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeBreakTargetOutsideFunction = - const Template( - "BreakTargetOutsideFunction", - problemMessageTemplate: - r"""Can't break to '#name' in a different function.""", - withArgumentsOld: _withArgumentsOldBreakTargetOutsideFunction, - analyzerCodes: ["LABEL_IN_OUTER_SCOPE"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeBreakTargetOutsideFunction = const Template( + "BreakTargetOutsideFunction", + problemMessageTemplate: + r"""Can't break to '#name' in a different function.""", + withArgumentsOld: _withArgumentsOldBreakTargetOutsideFunction, + withArguments: _withArgumentsBreakTargetOutsideFunction, + analyzerCodes: ["LABEL_IN_OUTER_SCOPE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsBreakTargetOutsideFunction({required String name}) { @@ -539,14 +574,18 @@ Message _withArgumentsOldBreakTargetOutsideFunction(String name) => _withArgumentsBreakTargetOutsideFunction(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeBuiltInIdentifierAsType = - const Template( - "BuiltInIdentifierAsType", - problemMessageTemplate: - r"""The built-in identifier '#lexeme' can't be used as a type.""", - withArgumentsOld: _withArgumentsOldBuiltInIdentifierAsType, - analyzerCodes: ["BUILT_IN_IDENTIFIER_AS_TYPE"], - ); +const Template< + Message Function(Token lexeme), + Message Function({required Token lexeme}) +> +codeBuiltInIdentifierAsType = const Template( + "BuiltInIdentifierAsType", + problemMessageTemplate: + r"""The built-in identifier '#lexeme' can't be used as a type.""", + withArgumentsOld: _withArgumentsOldBuiltInIdentifierAsType, + withArguments: _withArgumentsBuiltInIdentifierAsType, + analyzerCodes: ["BUILT_IN_IDENTIFIER_AS_TYPE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsBuiltInIdentifierAsType({required Token lexeme}) { @@ -564,14 +603,17 @@ Message _withArgumentsOldBuiltInIdentifierAsType(Token lexeme) => _withArgumentsBuiltInIdentifierAsType(lexeme: lexeme); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeBuiltInIdentifierInDeclaration = - const Template( - "BuiltInIdentifierInDeclaration", - problemMessageTemplate: r"""Can't use '#lexeme' as a name here.""", - withArgumentsOld: _withArgumentsOldBuiltInIdentifierInDeclaration, - analyzerCodes: ["BUILT_IN_IDENTIFIER_IN_DECLARATION"], - ); +const Template< + Message Function(Token lexeme), + Message Function({required Token lexeme}) +> +codeBuiltInIdentifierInDeclaration = const Template( + "BuiltInIdentifierInDeclaration", + problemMessageTemplate: r"""Can't use '#lexeme' as a name here.""", + withArgumentsOld: _withArgumentsOldBuiltInIdentifierInDeclaration, + withArguments: _withArgumentsBuiltInIdentifierInDeclaration, + analyzerCodes: ["BUILT_IN_IDENTIFIER_IN_DECLARATION"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsBuiltInIdentifierInDeclaration({required Token lexeme}) { @@ -595,15 +637,18 @@ const MessageCode codeCandidateFound = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeCandidateFoundIsDefaultConstructor = - const Template( - "CandidateFoundIsDefaultConstructor", - problemMessageTemplate: - r"""The class '#name' has a constructor that takes no arguments.""", - withArgumentsOld: _withArgumentsOldCandidateFoundIsDefaultConstructor, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeCandidateFoundIsDefaultConstructor = const Template( + "CandidateFoundIsDefaultConstructor", + problemMessageTemplate: + r"""The class '#name' has a constructor that takes no arguments.""", + withArgumentsOld: _withArgumentsOldCandidateFoundIsDefaultConstructor, + withArguments: _withArgumentsCandidateFoundIsDefaultConstructor, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsCandidateFoundIsDefaultConstructor({ @@ -623,13 +668,16 @@ Message _withArgumentsOldCandidateFoundIsDefaultConstructor(String name) => _withArgumentsCandidateFoundIsDefaultConstructor(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeCannotAssignToConstVariable = - const Template( - "CannotAssignToConstVariable", - problemMessageTemplate: - r"""Can't assign to the const variable '#name'.""", - withArgumentsOld: _withArgumentsOldCannotAssignToConstVariable, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeCannotAssignToConstVariable = const Template( + "CannotAssignToConstVariable", + problemMessageTemplate: r"""Can't assign to the const variable '#name'.""", + withArgumentsOld: _withArgumentsOldCannotAssignToConstVariable, + withArguments: _withArgumentsCannotAssignToConstVariable, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsCannotAssignToConstVariable({required String name}) { @@ -652,13 +700,16 @@ const MessageCode codeCannotAssignToExtensionThis = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeCannotAssignToFinalVariable = - const Template( - "CannotAssignToFinalVariable", - problemMessageTemplate: - r"""Can't assign to the final variable '#name'.""", - withArgumentsOld: _withArgumentsOldCannotAssignToFinalVariable, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeCannotAssignToFinalVariable = const Template( + "CannotAssignToFinalVariable", + problemMessageTemplate: r"""Can't assign to the final variable '#name'.""", + withArgumentsOld: _withArgumentsOldCannotAssignToFinalVariable, + withArguments: _withArgumentsCannotAssignToFinalVariable, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsCannotAssignToFinalVariable({required String name}) { @@ -695,14 +746,18 @@ const MessageCode codeCannotAssignToTypeLiteral = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeCannotReadSdkSpecification = - const Template( - "CannotReadSdkSpecification", - problemMessageTemplate: - r"""Unable to read the 'libraries.json' specification file: +const Template< + Message Function(String string), + Message Function({required String string}) +> +codeCannotReadSdkSpecification = const Template( + "CannotReadSdkSpecification", + problemMessageTemplate: + r"""Unable to read the 'libraries.json' specification file: #string.""", - withArgumentsOld: _withArgumentsOldCannotReadSdkSpecification, - ); + withArgumentsOld: _withArgumentsOldCannotReadSdkSpecification, + withArguments: _withArgumentsCannotReadSdkSpecification, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsCannotReadSdkSpecification({required String string}) { @@ -736,13 +791,17 @@ const MessageCode codeCantDisambiguateNotEnoughInformation = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeCantHaveNamedParameters = - const Template( - "CantHaveNamedParameters", - problemMessageTemplate: - r"""'#name' can't be declared with named parameters.""", - withArgumentsOld: _withArgumentsOldCantHaveNamedParameters, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeCantHaveNamedParameters = const Template( + "CantHaveNamedParameters", + problemMessageTemplate: + r"""'#name' can't be declared with named parameters.""", + withArgumentsOld: _withArgumentsOldCantHaveNamedParameters, + withArguments: _withArgumentsCantHaveNamedParameters, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsCantHaveNamedParameters({required String name}) { @@ -759,13 +818,17 @@ Message _withArgumentsOldCantHaveNamedParameters(String name) => _withArgumentsCantHaveNamedParameters(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeCantHaveOptionalParameters = - const Template( - "CantHaveOptionalParameters", - problemMessageTemplate: - r"""'#name' can't be declared with optional parameters.""", - withArgumentsOld: _withArgumentsOldCantHaveOptionalParameters, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeCantHaveOptionalParameters = const Template( + "CantHaveOptionalParameters", + problemMessageTemplate: + r"""'#name' can't be declared with optional parameters.""", + withArgumentsOld: _withArgumentsOldCantHaveOptionalParameters, + withArguments: _withArgumentsCantHaveOptionalParameters, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsCantHaveOptionalParameters({required String name}) { @@ -801,17 +864,20 @@ const MessageCode codeCantInferPackagesFromPackageUri = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeCantInferReturnTypeDueToNoCombinedSignature = - const Template( - "CantInferReturnTypeDueToNoCombinedSignature", - problemMessageTemplate: - r"""Can't infer a return type for '#name' as the overridden members don't have a combined signature.""", - correctionMessageTemplate: r"""Try adding an explicit type.""", - withArgumentsOld: - _withArgumentsOldCantInferReturnTypeDueToNoCombinedSignature, - analyzerCodes: ["COMPILE_TIME_ERROR.NO_COMBINED_SUPER_SIGNATURE"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeCantInferReturnTypeDueToNoCombinedSignature = const Template( + "CantInferReturnTypeDueToNoCombinedSignature", + problemMessageTemplate: + r"""Can't infer a return type for '#name' as the overridden members don't have a combined signature.""", + correctionMessageTemplate: r"""Try adding an explicit type.""", + withArgumentsOld: + _withArgumentsOldCantInferReturnTypeDueToNoCombinedSignature, + withArguments: _withArgumentsCantInferReturnTypeDueToNoCombinedSignature, + analyzerCodes: ["COMPILE_TIME_ERROR.NO_COMBINED_SUPER_SIGNATURE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsCantInferReturnTypeDueToNoCombinedSignature({ @@ -833,13 +899,17 @@ Message _withArgumentsOldCantInferReturnTypeDueToNoCombinedSignature( ) => _withArgumentsCantInferReturnTypeDueToNoCombinedSignature(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeCantInferTypeDueToCircularity = const Template( +const Template< + Message Function(String string), + Message Function({required String string}) +> +codeCantInferTypeDueToCircularity = const Template( "CantInferTypeDueToCircularity", problemMessageTemplate: r"""Can't infer the type of '#string': circularity found during type inference.""", correctionMessageTemplate: r"""Specify the type explicitly.""", withArgumentsOld: _withArgumentsOldCantInferTypeDueToCircularity, + withArguments: _withArgumentsCantInferTypeDueToCircularity, analyzerCodes: ["RECURSIVE_COMPILE_TIME_CONSTANT"], ); @@ -860,16 +930,19 @@ Message _withArgumentsOldCantInferTypeDueToCircularity(String string) => _withArgumentsCantInferTypeDueToCircularity(string: string); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeCantInferTypeDueToNoCombinedSignature = - const Template( - "CantInferTypeDueToNoCombinedSignature", - problemMessageTemplate: - r"""Can't infer a type for '#name' as the overridden members don't have a combined signature.""", - correctionMessageTemplate: r"""Try adding an explicit type.""", - withArgumentsOld: _withArgumentsOldCantInferTypeDueToNoCombinedSignature, - analyzerCodes: ["COMPILE_TIME_ERROR.NO_COMBINED_SUPER_SIGNATURE"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeCantInferTypeDueToNoCombinedSignature = const Template( + "CantInferTypeDueToNoCombinedSignature", + problemMessageTemplate: + r"""Can't infer a type for '#name' as the overridden members don't have a combined signature.""", + correctionMessageTemplate: r"""Try adding an explicit type.""", + withArgumentsOld: _withArgumentsOldCantInferTypeDueToNoCombinedSignature, + withArguments: _withArgumentsCantInferTypeDueToNoCombinedSignature, + analyzerCodes: ["COMPILE_TIME_ERROR.NO_COMBINED_SUPER_SIGNATURE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsCantInferTypeDueToNoCombinedSignature({ @@ -890,16 +963,19 @@ Message _withArgumentsOldCantInferTypeDueToNoCombinedSignature(String name) => _withArgumentsCantInferTypeDueToNoCombinedSignature(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeCantInferTypesDueToNoCombinedSignature = - const Template( - "CantInferTypesDueToNoCombinedSignature", - problemMessageTemplate: - r"""Can't infer types for '#name' as the overridden members don't have a combined signature.""", - correctionMessageTemplate: r"""Try adding explicit types.""", - withArgumentsOld: _withArgumentsOldCantInferTypesDueToNoCombinedSignature, - analyzerCodes: ["COMPILE_TIME_ERROR.NO_COMBINED_SUPER_SIGNATURE"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeCantInferTypesDueToNoCombinedSignature = const Template( + "CantInferTypesDueToNoCombinedSignature", + problemMessageTemplate: + r"""Can't infer types for '#name' as the overridden members don't have a combined signature.""", + correctionMessageTemplate: r"""Try adding explicit types.""", + withArgumentsOld: _withArgumentsOldCantInferTypesDueToNoCombinedSignature, + withArguments: _withArgumentsCantInferTypesDueToNoCombinedSignature, + analyzerCodes: ["COMPILE_TIME_ERROR.NO_COMBINED_SUPER_SIGNATURE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsCantInferTypesDueToNoCombinedSignature({ @@ -920,13 +996,17 @@ Message _withArgumentsOldCantInferTypesDueToNoCombinedSignature(String name) => _withArgumentsCantInferTypesDueToNoCombinedSignature(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeCantReadFile = - const Template( - "CantReadFile", - problemMessageTemplate: r"""Error when reading '#uri': #string""", - withArgumentsOld: _withArgumentsOldCantReadFile, - analyzerCodes: ["URI_DOES_NOT_EXIST"], - ); +const Template< + Message Function(Uri uri, String string), + Message Function({required Uri uri, required String string}) +> +codeCantReadFile = const Template( + "CantReadFile", + problemMessageTemplate: r"""Error when reading '#uri': #string""", + withArgumentsOld: _withArgumentsOldCantReadFile, + withArguments: _withArgumentsCantReadFile, + analyzerCodes: ["URI_DOES_NOT_EXIST"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsCantReadFile({required Uri uri, required String string}) { @@ -944,12 +1024,16 @@ Message _withArgumentsOldCantReadFile(Uri uri, String string) => _withArgumentsCantReadFile(uri: uri, string: string); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeCantUseClassAsMixin = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeCantUseClassAsMixin = const Template( "CantUseClassAsMixin", problemMessageTemplate: r"""The class '#name' can't be used as a mixin because it isn't a mixin class nor a mixin.""", withArgumentsOld: _withArgumentsOldCantUseClassAsMixin, + withArguments: _withArgumentsCantUseClassAsMixin, analyzerCodes: ["CLASS_USED_AS_MIXIN"], ); @@ -969,15 +1053,18 @@ Message _withArgumentsOldCantUseClassAsMixin(String name) => _withArgumentsCantUseClassAsMixin(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeCantUseControlFlowOrSpreadAsConstant = - const Template( - "CantUseControlFlowOrSpreadAsConstant", - problemMessageTemplate: - r"""'#lexeme' is not supported in constant expressions.""", - withArgumentsOld: _withArgumentsOldCantUseControlFlowOrSpreadAsConstant, - analyzerCodes: ["NOT_CONSTANT_EXPRESSION"], - ); +const Template< + Message Function(Token lexeme), + Message Function({required Token lexeme}) +> +codeCantUseControlFlowOrSpreadAsConstant = const Template( + "CantUseControlFlowOrSpreadAsConstant", + problemMessageTemplate: + r"""'#lexeme' is not supported in constant expressions.""", + withArgumentsOld: _withArgumentsOldCantUseControlFlowOrSpreadAsConstant, + withArguments: _withArgumentsCantUseControlFlowOrSpreadAsConstant, + analyzerCodes: ["NOT_CONSTANT_EXPRESSION"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsCantUseControlFlowOrSpreadAsConstant({ @@ -997,14 +1084,18 @@ Message _withArgumentsOldCantUseControlFlowOrSpreadAsConstant(Token lexeme) => _withArgumentsCantUseControlFlowOrSpreadAsConstant(lexeme: lexeme); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeCantUseDeferredPrefixAsConstant = const Template( +const Template< + Message Function(Token lexeme), + Message Function({required Token lexeme}) +> +codeCantUseDeferredPrefixAsConstant = const Template( "CantUseDeferredPrefixAsConstant", problemMessageTemplate: r"""'#lexeme' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded.""", correctionMessageTemplate: r"""Try moving the constant from the deferred library, or removing 'deferred' from the import.""", withArgumentsOld: _withArgumentsOldCantUseDeferredPrefixAsConstant, + withArguments: _withArgumentsCantUseDeferredPrefixAsConstant, analyzerCodes: ["CONST_DEFERRED_CLASS"], ); @@ -1078,17 +1169,19 @@ const MessageCode codeClassInClass = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeClassShouldBeListedAsCallableInDynamicInterface = - const Template( - "ClassShouldBeListedAsCallableInDynamicInterface", - problemMessageTemplate: - r"""Cannot use class '#name' in a dynamic module.""", - correctionMessageTemplate: - r"""Try removing the reference to class '#name' or update the dynamic interface to list class '#name' as callable.""", - withArgumentsOld: - _withArgumentsOldClassShouldBeListedAsCallableInDynamicInterface, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeClassShouldBeListedAsCallableInDynamicInterface = const Template( + "ClassShouldBeListedAsCallableInDynamicInterface", + problemMessageTemplate: r"""Cannot use class '#name' in a dynamic module.""", + correctionMessageTemplate: + r"""Try removing the reference to class '#name' or update the dynamic interface to list class '#name' as callable.""", + withArgumentsOld: + _withArgumentsOldClassShouldBeListedAsCallableInDynamicInterface, + withArguments: _withArgumentsClassShouldBeListedAsCallableInDynamicInterface, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsClassShouldBeListedAsCallableInDynamicInterface({ @@ -1110,17 +1203,21 @@ Message _withArgumentsOldClassShouldBeListedAsCallableInDynamicInterface( ) => _withArgumentsClassShouldBeListedAsCallableInDynamicInterface(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeClassShouldBeListedAsExtendableInDynamicInterface = - const Template( - "ClassShouldBeListedAsExtendableInDynamicInterface", - problemMessageTemplate: - r"""Cannot extend, implement or mix-in class '#name' in a dynamic module.""", - correctionMessageTemplate: - r"""Try removing the reference to class '#name' or update the dynamic interface to list class '#name' as extendable.""", - withArgumentsOld: - _withArgumentsOldClassShouldBeListedAsExtendableInDynamicInterface, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeClassShouldBeListedAsExtendableInDynamicInterface = const Template( + "ClassShouldBeListedAsExtendableInDynamicInterface", + problemMessageTemplate: + r"""Cannot extend, implement or mix-in class '#name' in a dynamic module.""", + correctionMessageTemplate: + r"""Try removing the reference to class '#name' or update the dynamic interface to list class '#name' as extendable.""", + withArgumentsOld: + _withArgumentsOldClassShouldBeListedAsExtendableInDynamicInterface, + withArguments: + _withArgumentsClassShouldBeListedAsExtendableInDynamicInterface, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsClassShouldBeListedAsExtendableInDynamicInterface({ @@ -1152,17 +1249,20 @@ const MessageCode codeColonInPlaceOfIn = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeCombinedMemberSignatureFailed = - const Template( - "CombinedMemberSignatureFailed", - problemMessageTemplate: - r"""Class '#name' inherits multiple members named '#name2' with incompatible signatures.""", - correctionMessageTemplate: - r"""Try adding a declaration of '#name2' to '#name'.""", - withArgumentsOld: _withArgumentsOldCombinedMemberSignatureFailed, - analyzerCodes: ["INCONSISTENT_INHERITANCE"], - ); +const Template< + Message Function(String name, String name2), + Message Function({required String name, required String name2}) +> +codeCombinedMemberSignatureFailed = const Template( + "CombinedMemberSignatureFailed", + problemMessageTemplate: + r"""Class '#name' inherits multiple members named '#name2' with incompatible signatures.""", + correctionMessageTemplate: + r"""Try adding a declaration of '#name2' to '#name'.""", + withArgumentsOld: _withArgumentsOldCombinedMemberSignatureFailed, + withArguments: _withArgumentsCombinedMemberSignatureFailed, + analyzerCodes: ["INCONSISTENT_INHERITANCE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsCombinedMemberSignatureFailed({ @@ -1188,16 +1288,19 @@ Message _withArgumentsOldCombinedMemberSignatureFailed( ) => _withArgumentsCombinedMemberSignatureFailed(name: name, name2: name2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConflictingModifiers = - const Template( - "ConflictingModifiers", - problemMessageTemplate: - r"""Members can't be declared to be both '#string' and '#string2'.""", - correctionMessageTemplate: r"""Try removing one of the keywords.""", - withArgumentsOld: _withArgumentsOldConflictingModifiers, - index: 59, - ); +const Template< + Message Function(String string, String string2), + Message Function({required String string, required String string2}) +> +codeConflictingModifiers = const Template( + "ConflictingModifiers", + problemMessageTemplate: + r"""Members can't be declared to be both '#string' and '#string2'.""", + correctionMessageTemplate: r"""Try removing one of the keywords.""", + withArgumentsOld: _withArgumentsOldConflictingModifiers, + withArguments: _withArgumentsConflictingModifiers, + index: 59, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConflictingModifiers({ @@ -1220,14 +1323,18 @@ Message _withArgumentsOldConflictingModifiers(String string, String string2) => _withArgumentsConflictingModifiers(string: string, string2: string2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeConflictsWithImplicitSetter = - const Template( - "ConflictsWithImplicitSetter", - problemMessageTemplate: - r"""Conflicts with the implicit setter of the field '#name'.""", - withArgumentsOld: _withArgumentsOldConflictsWithImplicitSetter, - analyzerCodes: ["CONFLICTS_WITH_MEMBER"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeConflictsWithImplicitSetter = const Template( + "ConflictsWithImplicitSetter", + problemMessageTemplate: + r"""Conflicts with the implicit setter of the field '#name'.""", + withArgumentsOld: _withArgumentsOldConflictsWithImplicitSetter, + withArguments: _withArgumentsConflictsWithImplicitSetter, + analyzerCodes: ["CONFLICTS_WITH_MEMBER"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConflictsWithImplicitSetter({required String name}) { @@ -1245,14 +1352,17 @@ Message _withArgumentsOldConflictsWithImplicitSetter(String name) => _withArgumentsConflictsWithImplicitSetter(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConflictsWithImplicitSetterCause = - const Template( - "ConflictsWithImplicitSetterCause", - problemMessageTemplate: r"""Field '#name' with the implicit setter.""", - withArgumentsOld: _withArgumentsOldConflictsWithImplicitSetterCause, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeConflictsWithImplicitSetterCause = const Template( + "ConflictsWithImplicitSetterCause", + problemMessageTemplate: r"""Field '#name' with the implicit setter.""", + withArgumentsOld: _withArgumentsOldConflictsWithImplicitSetterCause, + withArguments: _withArgumentsConflictsWithImplicitSetterCause, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConflictsWithImplicitSetterCause({required String name}) { @@ -1269,13 +1379,17 @@ Message _withArgumentsOldConflictsWithImplicitSetterCause(String name) => _withArgumentsConflictsWithImplicitSetterCause(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeConflictsWithTypeParameter = - const Template( - "ConflictsWithTypeParameter", - problemMessageTemplate: r"""Conflicts with type variable '#name'.""", - withArgumentsOld: _withArgumentsOldConflictsWithTypeParameter, - analyzerCodes: ["CONFLICTING_TYPE_VARIABLE_AND_MEMBER"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeConflictsWithTypeParameter = const Template( + "ConflictsWithTypeParameter", + problemMessageTemplate: r"""Conflicts with type variable '#name'.""", + withArgumentsOld: _withArgumentsOldConflictsWithTypeParameter, + withArguments: _withArgumentsConflictsWithTypeParameter, + analyzerCodes: ["CONFLICTING_TYPE_VARIABLE_AND_MEMBER"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConflictsWithTypeParameter({required String name}) { @@ -1384,14 +1498,18 @@ const MessageCode codeConstEvalContext = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstEvalDeferredLibrary = const Template( +const Template< + Message Function(String nameOKEmpty), + Message Function({required String nameOKEmpty}) +> +codeConstEvalDeferredLibrary = const Template( "ConstEvalDeferredLibrary", problemMessageTemplate: r"""'#nameOKEmpty' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded.""", correctionMessageTemplate: r"""Try moving the constant from the deferred library, or removing 'deferred' from the import.""", withArgumentsOld: _withArgumentsOldConstEvalDeferredLibrary, + withArguments: _withArgumentsConstEvalDeferredLibrary, analyzerCodes: [ "INVALID_ANNOTATION_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY", ], @@ -1415,13 +1533,16 @@ Message _withArgumentsOldConstEvalDeferredLibrary(String nameOKEmpty) => _withArgumentsConstEvalDeferredLibrary(nameOKEmpty: nameOKEmpty); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeConstEvalError = - const Template( - "ConstEvalError", - problemMessageTemplate: - r"""Error evaluating constant expression: #string""", - withArgumentsOld: _withArgumentsOldConstEvalError, - ); +const Template< + Message Function(String string), + Message Function({required String string}) +> +codeConstEvalError = const Template( + "ConstEvalError", + problemMessageTemplate: r"""Error evaluating constant expression: #string""", + withArgumentsOld: _withArgumentsOldConstEvalError, + withArguments: _withArgumentsConstEvalError, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstEvalError({required String string}) { @@ -1467,15 +1588,18 @@ const MessageCode codeConstEvalFailedAssertion = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstEvalFailedAssertionWithMessage = - const Template( - "ConstEvalFailedAssertionWithMessage", - problemMessageTemplate: - r"""This assertion failed with message: #stringOKEmpty""", - withArgumentsOld: _withArgumentsOldConstEvalFailedAssertionWithMessage, - analyzerCodes: ["CONST_EVAL_THROWS_EXCEPTION"], - ); +const Template< + Message Function(String stringOKEmpty), + Message Function({required String stringOKEmpty}) +> +codeConstEvalFailedAssertionWithMessage = const Template( + "ConstEvalFailedAssertionWithMessage", + problemMessageTemplate: + r"""This assertion failed with message: #stringOKEmpty""", + withArgumentsOld: _withArgumentsOldConstEvalFailedAssertionWithMessage, + withArguments: _withArgumentsConstEvalFailedAssertionWithMessage, + analyzerCodes: ["CONST_EVAL_THROWS_EXCEPTION"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstEvalFailedAssertionWithMessage({ @@ -1506,13 +1630,16 @@ const MessageCode codeConstEvalFailedAssertionWithNonStringMessage = ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstEvalGetterNotFound = - const Template( - "ConstEvalGetterNotFound", - problemMessageTemplate: r"""Variable get not found: '#nameOKEmpty'""", - withArgumentsOld: _withArgumentsOldConstEvalGetterNotFound, - ); +const Template< + Message Function(String nameOKEmpty), + Message Function({required String nameOKEmpty}) +> +codeConstEvalGetterNotFound = const Template( + "ConstEvalGetterNotFound", + problemMessageTemplate: r"""Variable get not found: '#nameOKEmpty'""", + withArgumentsOld: _withArgumentsOldConstEvalGetterNotFound, + withArguments: _withArgumentsConstEvalGetterNotFound, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstEvalGetterNotFound({required String nameOKEmpty}) { @@ -1529,15 +1656,18 @@ Message _withArgumentsOldConstEvalGetterNotFound(String nameOKEmpty) => _withArgumentsConstEvalGetterNotFound(nameOKEmpty: nameOKEmpty); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstEvalInvalidStaticInvocation = - const Template( - "ConstEvalInvalidStaticInvocation", - problemMessageTemplate: - r"""The invocation of '#nameOKEmpty' is not allowed in a constant expression.""", - withArgumentsOld: _withArgumentsOldConstEvalInvalidStaticInvocation, - analyzerCodes: ["CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE"], - ); +const Template< + Message Function(String nameOKEmpty), + Message Function({required String nameOKEmpty}) +> +codeConstEvalInvalidStaticInvocation = const Template( + "ConstEvalInvalidStaticInvocation", + problemMessageTemplate: + r"""The invocation of '#nameOKEmpty' is not allowed in a constant expression.""", + withArgumentsOld: _withArgumentsOldConstEvalInvalidStaticInvocation, + withArguments: _withArgumentsConstEvalInvalidStaticInvocation, + analyzerCodes: ["CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstEvalInvalidStaticInvocation({ @@ -1557,16 +1687,21 @@ Message _withArgumentsOldConstEvalInvalidStaticInvocation(String nameOKEmpty) => _withArgumentsConstEvalInvalidStaticInvocation(nameOKEmpty: nameOKEmpty); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstEvalNegativeShift = - const Template< - Message Function(String string, String string2, String string3) - >( - "ConstEvalNegativeShift", - problemMessageTemplate: - r"""Binary operator '#string' on '#string2' requires non-negative operand, but was '#string3'.""", - withArgumentsOld: _withArgumentsOldConstEvalNegativeShift, - ); +const Template< + Message Function(String string, String string2, String string3), + Message Function({ + required String string, + required String string2, + required String string3, + }) +> +codeConstEvalNegativeShift = const Template( + "ConstEvalNegativeShift", + problemMessageTemplate: + r"""Binary operator '#string' on '#string2' requires non-negative operand, but was '#string3'.""", + withArgumentsOld: _withArgumentsOldConstEvalNegativeShift, + withArguments: _withArgumentsConstEvalNegativeShift, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstEvalNegativeShift({ @@ -1597,15 +1732,18 @@ Message _withArgumentsOldConstEvalNegativeShift( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstEvalNonConstantVariableGet = - const Template( - "ConstEvalNonConstantVariableGet", - problemMessageTemplate: - r"""The variable '#nameOKEmpty' is not a constant, only constant expressions are allowed.""", - withArgumentsOld: _withArgumentsOldConstEvalNonConstantVariableGet, - analyzerCodes: ["NON_CONSTANT_VALUE_IN_INITIALIZER"], - ); +const Template< + Message Function(String nameOKEmpty), + Message Function({required String nameOKEmpty}) +> +codeConstEvalNonConstantVariableGet = const Template( + "ConstEvalNonConstantVariableGet", + problemMessageTemplate: + r"""The variable '#nameOKEmpty' is not a constant, only constant expressions are allowed.""", + withArgumentsOld: _withArgumentsOldConstEvalNonConstantVariableGet, + withArguments: _withArgumentsConstEvalNonConstantVariableGet, + analyzerCodes: ["NON_CONSTANT_VALUE_IN_INITIALIZER"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstEvalNonConstantVariableGet({ @@ -1659,14 +1797,17 @@ const MessageCode codeConstEvalStartingPoint = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstEvalTruncateError = - const Template( - "ConstEvalTruncateError", - problemMessageTemplate: - r"""Binary operator '#string ~/ #string2' results is Infinity or NaN.""", - withArgumentsOld: _withArgumentsOldConstEvalTruncateError, - ); +const Template< + Message Function(String string, String string2), + Message Function({required String string, required String string2}) +> +codeConstEvalTruncateError = const Template( + "ConstEvalTruncateError", + problemMessageTemplate: + r"""Binary operator '#string ~/ #string2' results is Infinity or NaN.""", + withArgumentsOld: _withArgumentsOldConstEvalTruncateError, + withArguments: _withArgumentsConstEvalTruncateError, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstEvalTruncateError({ @@ -1696,13 +1837,16 @@ const MessageCode codeConstEvalUnevaluated = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstEvalUnhandledCoreException = - const Template( - "ConstEvalUnhandledCoreException", - problemMessageTemplate: r"""Unhandled core exception: #stringOKEmpty""", - withArgumentsOld: _withArgumentsOldConstEvalUnhandledCoreException, - ); +const Template< + Message Function(String stringOKEmpty), + Message Function({required String stringOKEmpty}) +> +codeConstEvalUnhandledCoreException = const Template( + "ConstEvalUnhandledCoreException", + problemMessageTemplate: r"""Unhandled core exception: #stringOKEmpty""", + withArgumentsOld: _withArgumentsOldConstEvalUnhandledCoreException, + withArguments: _withArgumentsConstEvalUnhandledCoreException, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstEvalUnhandledCoreException({ @@ -1723,15 +1867,18 @@ Message _withArgumentsOldConstEvalUnhandledCoreException( _withArgumentsConstEvalUnhandledCoreException(stringOKEmpty: stringOKEmpty); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstEvalZeroDivisor = - const Template( - "ConstEvalZeroDivisor", - problemMessageTemplate: - r"""Binary operator '#string' on '#string2' requires non-zero divisor, but divisor was '0'.""", - withArgumentsOld: _withArgumentsOldConstEvalZeroDivisor, - analyzerCodes: ["CONST_EVAL_THROWS_IDBZE"], - ); +const Template< + Message Function(String string, String string2), + Message Function({required String string, required String string2}) +> +codeConstEvalZeroDivisor = const Template( + "ConstEvalZeroDivisor", + problemMessageTemplate: + r"""Binary operator '#string' on '#string2' requires non-zero divisor, but divisor was '0'.""", + withArgumentsOld: _withArgumentsOldConstEvalZeroDivisor, + withArguments: _withArgumentsConstEvalZeroDivisor, + analyzerCodes: ["CONST_EVAL_THROWS_IDBZE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstEvalZeroDivisor({ @@ -1773,16 +1920,20 @@ const MessageCode codeConstFactoryRedirectionToNonConst = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeConstFieldWithoutInitializer = - const Template( - "ConstFieldWithoutInitializer", - problemMessageTemplate: - r"""The const variable '#name' must be initialized.""", - correctionMessageTemplate: - r"""Try adding an initializer ('= expression') to the declaration.""", - withArgumentsOld: _withArgumentsOldConstFieldWithoutInitializer, - analyzerCodes: ["CONST_NOT_INITIALIZED"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeConstFieldWithoutInitializer = const Template( + "ConstFieldWithoutInitializer", + problemMessageTemplate: + r"""The const variable '#name' must be initialized.""", + correctionMessageTemplate: + r"""Try adding an initializer ('= expression') to the declaration.""", + withArgumentsOld: _withArgumentsOldConstFieldWithoutInitializer, + withArguments: _withArgumentsConstFieldWithoutInitializer, + analyzerCodes: ["CONST_NOT_INITIALIZED"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstFieldWithoutInitializer({required String name}) { @@ -1819,15 +1970,17 @@ const MessageCode codeConstMethod = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstructorConflictsWithMember = - const Template( - "ConstructorConflictsWithMember", - problemMessageTemplate: - r"""The constructor conflicts with member '#name'.""", - withArgumentsOld: _withArgumentsOldConstructorConflictsWithMember, - analyzerCodes: ["CONFLICTS_WITH_MEMBER"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeConstructorConflictsWithMember = const Template( + "ConstructorConflictsWithMember", + problemMessageTemplate: r"""The constructor conflicts with member '#name'.""", + withArgumentsOld: _withArgumentsOldConstructorConflictsWithMember, + withArguments: _withArgumentsConstructorConflictsWithMember, + analyzerCodes: ["CONFLICTS_WITH_MEMBER"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstructorConflictsWithMember({required String name}) { @@ -1844,14 +1997,17 @@ Message _withArgumentsOldConstructorConflictsWithMember(String name) => _withArgumentsConstructorConflictsWithMember(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstructorConflictsWithMemberCause = - const Template( - "ConstructorConflictsWithMemberCause", - problemMessageTemplate: r"""Conflicting member '#name'.""", - withArgumentsOld: _withArgumentsOldConstructorConflictsWithMemberCause, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeConstructorConflictsWithMemberCause = const Template( + "ConstructorConflictsWithMemberCause", + problemMessageTemplate: r"""Conflicting member '#name'.""", + withArgumentsOld: _withArgumentsOldConstructorConflictsWithMemberCause, + withArguments: _withArgumentsConstructorConflictsWithMemberCause, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstructorConflictsWithMemberCause({ @@ -1879,16 +2035,20 @@ const MessageCode codeConstructorCyclic = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstructorInitializeSameInstanceVariableSeveralTimes = - const Template( - "ConstructorInitializeSameInstanceVariableSeveralTimes", - problemMessageTemplate: - r"""'#name' was already initialized by this constructor.""", - withArgumentsOld: - _withArgumentsOldConstructorInitializeSameInstanceVariableSeveralTimes, - analyzerCodes: ["FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeConstructorInitializeSameInstanceVariableSeveralTimes = const Template( + "ConstructorInitializeSameInstanceVariableSeveralTimes", + problemMessageTemplate: + r"""'#name' was already initialized by this constructor.""", + withArgumentsOld: + _withArgumentsOldConstructorInitializeSameInstanceVariableSeveralTimes, + withArguments: + _withArgumentsConstructorInitializeSameInstanceVariableSeveralTimes, + analyzerCodes: ["FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstructorInitializeSameInstanceVariableSeveralTimes({ @@ -1911,13 +2071,17 @@ Message _withArgumentsOldConstructorInitializeSameInstanceVariableSeveralTimes( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeConstructorNotFound = - const Template( - "ConstructorNotFound", - problemMessageTemplate: r"""Couldn't find constructor '#name'.""", - withArgumentsOld: _withArgumentsOldConstructorNotFound, - analyzerCodes: ["CONSTRUCTOR_NOT_FOUND"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeConstructorNotFound = const Template( + "ConstructorNotFound", + problemMessageTemplate: r"""Couldn't find constructor '#name'.""", + withArgumentsOld: _withArgumentsOldConstructorNotFound, + withArguments: _withArgumentsConstructorNotFound, + analyzerCodes: ["CONSTRUCTOR_NOT_FOUND"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstructorNotFound({required String name}) { @@ -1942,17 +2106,21 @@ const MessageCode codeConstructorNotSync = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstructorShouldBeListedAsCallableInDynamicInterface = - const Template( - "ConstructorShouldBeListedAsCallableInDynamicInterface", - problemMessageTemplate: - r"""Cannot invoke constructor '#name' from a dynamic module.""", - correctionMessageTemplate: - r"""Try removing the call or update the dynamic interface to list constructor '#name' as callable.""", - withArgumentsOld: - _withArgumentsOldConstructorShouldBeListedAsCallableInDynamicInterface, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeConstructorShouldBeListedAsCallableInDynamicInterface = const Template( + "ConstructorShouldBeListedAsCallableInDynamicInterface", + problemMessageTemplate: + r"""Cannot invoke constructor '#name' from a dynamic module.""", + correctionMessageTemplate: + r"""Try removing the call or update the dynamic interface to list constructor '#name' as callable.""", + withArgumentsOld: + _withArgumentsOldConstructorShouldBeListedAsCallableInDynamicInterface, + withArguments: + _withArgumentsConstructorShouldBeListedAsCallableInDynamicInterface, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstructorShouldBeListedAsCallableInDynamicInterface({ @@ -2020,15 +2188,17 @@ const MessageCode codeConstructorWithWrongName = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstructorWithWrongNameContext = - const Template( - "ConstructorWithWrongNameContext", - problemMessageTemplate: - r"""The name of the enclosing class is '#name'.""", - withArgumentsOld: _withArgumentsOldConstructorWithWrongNameContext, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeConstructorWithWrongNameContext = const Template( + "ConstructorWithWrongNameContext", + problemMessageTemplate: r"""The name of the enclosing class is '#name'.""", + withArgumentsOld: _withArgumentsOldConstructorWithWrongNameContext, + withArguments: _withArgumentsConstructorWithWrongNameContext, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstructorWithWrongNameContext({required String name}) { @@ -2062,15 +2232,18 @@ const MessageCode codeContinueOutsideOfLoop = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeContinueTargetOutsideFunction = - const Template( - "ContinueTargetOutsideFunction", - problemMessageTemplate: - r"""Can't continue at '#name' in a different function.""", - withArgumentsOld: _withArgumentsOldContinueTargetOutsideFunction, - analyzerCodes: ["LABEL_IN_OUTER_SCOPE"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeContinueTargetOutsideFunction = const Template( + "ContinueTargetOutsideFunction", + problemMessageTemplate: + r"""Can't continue at '#name' in a different function.""", + withArgumentsOld: _withArgumentsOldContinueTargetOutsideFunction, + withArguments: _withArgumentsContinueTargetOutsideFunction, + analyzerCodes: ["LABEL_IN_OUTER_SCOPE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsContinueTargetOutsideFunction({required String name}) { @@ -2098,14 +2271,17 @@ const MessageCode codeContinueWithoutLabelInCase = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeCouldNotParseUri = - const Template( - "CouldNotParseUri", - problemMessageTemplate: r"""Couldn't parse URI '#string': +const Template< + Message Function(String string, String string2), + Message Function({required String string, required String string2}) +> +codeCouldNotParseUri = const Template( + "CouldNotParseUri", + problemMessageTemplate: r"""Couldn't parse URI '#string': #string2.""", - withArgumentsOld: _withArgumentsOldCouldNotParseUri, - ); + withArgumentsOld: _withArgumentsOldCouldNotParseUri, + withArguments: _withArgumentsCouldNotParseUri, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsCouldNotParseUri({ @@ -2146,17 +2322,20 @@ const MessageCode codeCovariantMember = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeCycleInTypeParameters = - const Template( - "CycleInTypeParameters", - problemMessageTemplate: - r"""Type '#name' is a bound of itself via '#string'.""", - correctionMessageTemplate: - r"""Try breaking the cycle by removing at least one of the 'extends' clauses in the cycle.""", - withArgumentsOld: _withArgumentsOldCycleInTypeParameters, - analyzerCodes: ["TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND"], - ); +const Template< + Message Function(String name, String string), + Message Function({required String name, required String string}) +> +codeCycleInTypeParameters = const Template( + "CycleInTypeParameters", + problemMessageTemplate: + r"""Type '#name' is a bound of itself via '#string'.""", + correctionMessageTemplate: + r"""Try breaking the cycle by removing at least one of the 'extends' clauses in the cycle.""", + withArgumentsOld: _withArgumentsOldCycleInTypeParameters, + withArguments: _withArgumentsCycleInTypeParameters, + analyzerCodes: ["TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsCycleInTypeParameters({ @@ -2180,13 +2359,17 @@ Message _withArgumentsOldCycleInTypeParameters(String name, String string) => _withArgumentsCycleInTypeParameters(name: name, string: string); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeCyclicClassHierarchy = - const Template( - "CyclicClassHierarchy", - problemMessageTemplate: r"""'#name' is a supertype of itself.""", - withArgumentsOld: _withArgumentsOldCyclicClassHierarchy, - analyzerCodes: ["RECURSIVE_INTERFACE_INHERITANCE"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeCyclicClassHierarchy = const Template( + "CyclicClassHierarchy", + problemMessageTemplate: r"""'#name' is a supertype of itself.""", + withArgumentsOld: _withArgumentsOldCyclicClassHierarchy, + withArguments: _withArgumentsCyclicClassHierarchy, + analyzerCodes: ["RECURSIVE_INTERFACE_INHERITANCE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsCyclicClassHierarchy({required String name}) { @@ -2203,14 +2386,17 @@ Message _withArgumentsOldCyclicClassHierarchy(String name) => _withArgumentsCyclicClassHierarchy(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeCyclicRedirectingFactoryConstructors = - const Template( - "CyclicRedirectingFactoryConstructors", - problemMessageTemplate: r"""Cyclic definition of factory '#name'.""", - withArgumentsOld: _withArgumentsOldCyclicRedirectingFactoryConstructors, - analyzerCodes: ["RECURSIVE_FACTORY_REDIRECT"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeCyclicRedirectingFactoryConstructors = const Template( + "CyclicRedirectingFactoryConstructors", + problemMessageTemplate: r"""Cyclic definition of factory '#name'.""", + withArgumentsOld: _withArgumentsOldCyclicRedirectingFactoryConstructors, + withArguments: _withArgumentsCyclicRedirectingFactoryConstructors, + analyzerCodes: ["RECURSIVE_FACTORY_REDIRECT"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsCyclicRedirectingFactoryConstructors({ @@ -2236,14 +2422,17 @@ const MessageCode codeCyclicRepresentationDependency = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeCyclicTypedef = - const Template( - "CyclicTypedef", - problemMessageTemplate: - r"""The typedef '#name' has a reference to itself.""", - withArgumentsOld: _withArgumentsOldCyclicTypedef, - analyzerCodes: ["TYPE_ALIAS_CANNOT_REFERENCE_ITSELF"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeCyclicTypedef = const Template( + "CyclicTypedef", + problemMessageTemplate: r"""The typedef '#name' has a reference to itself.""", + withArgumentsOld: _withArgumentsOldCyclicTypedef, + withArguments: _withArgumentsCyclicTypedef, + analyzerCodes: ["TYPE_ALIAS_CANNOT_REFERENCE_ITSELF"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsCyclicTypedef({required String name}) { @@ -2266,14 +2455,18 @@ const MessageCode codeDartFfiLibraryInDart2Wasm = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeDebugTrace = - const Template( - "DebugTrace", - problemMessageTemplate: r"""Fatal '#name' at: +const Template< + Message Function(String name, String string), + Message Function({required String name, required String string}) +> +codeDebugTrace = const Template( + "DebugTrace", + problemMessageTemplate: r"""Fatal '#name' at: #string""", - withArgumentsOld: _withArgumentsOldDebugTrace, - severity: CfeSeverity.ignored, - ); + withArgumentsOld: _withArgumentsOldDebugTrace, + withArguments: _withArgumentsDebugTrace, + severity: CfeSeverity.ignored, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDebugTrace({ @@ -2295,15 +2488,17 @@ Message _withArgumentsOldDebugTrace(String name, String string) => _withArgumentsDebugTrace(name: name, string: string); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeDeclarationConflictsWithSetter = - const Template( - "DeclarationConflictsWithSetter", - problemMessageTemplate: - r"""The declaration conflicts with setter '#name'.""", - withArgumentsOld: _withArgumentsOldDeclarationConflictsWithSetter, - analyzerCodes: ["CONFLICTS_WITH_MEMBER"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeDeclarationConflictsWithSetter = const Template( + "DeclarationConflictsWithSetter", + problemMessageTemplate: r"""The declaration conflicts with setter '#name'.""", + withArgumentsOld: _withArgumentsOldDeclarationConflictsWithSetter, + withArguments: _withArgumentsDeclarationConflictsWithSetter, + analyzerCodes: ["CONFLICTS_WITH_MEMBER"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDeclarationConflictsWithSetter({required String name}) { @@ -2320,14 +2515,17 @@ Message _withArgumentsOldDeclarationConflictsWithSetter(String name) => _withArgumentsDeclarationConflictsWithSetter(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeDeclarationConflictsWithSetterCause = - const Template( - "DeclarationConflictsWithSetterCause", - problemMessageTemplate: r"""Conflicting setter '#name'.""", - withArgumentsOld: _withArgumentsOldDeclarationConflictsWithSetterCause, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeDeclarationConflictsWithSetterCause = const Template( + "DeclarationConflictsWithSetterCause", + problemMessageTemplate: r"""Conflicting setter '#name'.""", + withArgumentsOld: _withArgumentsOldDeclarationConflictsWithSetterCause, + withArguments: _withArgumentsDeclarationConflictsWithSetterCause, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDeclarationConflictsWithSetterCause({ @@ -2387,19 +2585,20 @@ const MessageCode codeDefaultInSwitchExpression = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeDefaultValueInRedirectingFactoryConstructor = - const Template( - "DefaultValueInRedirectingFactoryConstructor", - problemMessageTemplate: - r"""Can't have a default value here because any default values of '#name' would be used instead.""", - correctionMessageTemplate: r"""Try removing the default value.""", - withArgumentsOld: - _withArgumentsOldDefaultValueInRedirectingFactoryConstructor, - analyzerCodes: [ - "DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR", - ], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeDefaultValueInRedirectingFactoryConstructor = const Template( + "DefaultValueInRedirectingFactoryConstructor", + problemMessageTemplate: + r"""Can't have a default value here because any default values of '#name' would be used instead.""", + correctionMessageTemplate: r"""Try removing the default value.""", + withArgumentsOld: + _withArgumentsOldDefaultValueInRedirectingFactoryConstructor, + withArguments: _withArgumentsDefaultValueInRedirectingFactoryConstructor, + analyzerCodes: ["DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDefaultValueInRedirectingFactoryConstructor({ @@ -2430,13 +2629,17 @@ const MessageCode codeDeferredAfterPrefix = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeDeferredExtensionImport = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeDeferredExtensionImport = const Template( "DeferredExtensionImport", problemMessageTemplate: r"""Extension '#name' cannot be imported through a deferred import.""", correctionMessageTemplate: r"""Try adding the `hide #name` to the import.""", withArgumentsOld: _withArgumentsOldDeferredExtensionImport, + withArguments: _withArgumentsDeferredExtensionImport, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -2456,12 +2659,16 @@ Message _withArgumentsOldDeferredExtensionImport(String name) => _withArgumentsDeferredExtensionImport(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeDeferredPrefixDuplicated = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeDeferredPrefixDuplicated = const Template( "DeferredPrefixDuplicated", problemMessageTemplate: r"""Can't use the name '#name' for a deferred library, as the name is used elsewhere.""", withArgumentsOld: _withArgumentsOldDeferredPrefixDuplicated, + withArguments: _withArgumentsDeferredPrefixDuplicated, analyzerCodes: ["SHARED_DEFERRED_PREFIX"], ); @@ -2481,14 +2688,17 @@ Message _withArgumentsOldDeferredPrefixDuplicated(String name) => _withArgumentsDeferredPrefixDuplicated(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeDeferredPrefixDuplicatedCause = - const Template( - "DeferredPrefixDuplicatedCause", - problemMessageTemplate: r"""'#name' is used here.""", - withArgumentsOld: _withArgumentsOldDeferredPrefixDuplicatedCause, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeDeferredPrefixDuplicatedCause = const Template( + "DeferredPrefixDuplicatedCause", + problemMessageTemplate: r"""'#name' is used here.""", + withArgumentsOld: _withArgumentsOldDeferredPrefixDuplicatedCause, + withArguments: _withArgumentsDeferredPrefixDuplicatedCause, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDeferredPrefixDuplicatedCause({required String name}) { @@ -2506,19 +2716,24 @@ Message _withArgumentsOldDeferredPrefixDuplicatedCause(String name) => // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(int count, int count2, num num1, num num2, num num3) + Message Function(int count, int count2, num num1, num num2, num num3), + Message Function({ + required int count, + required int count2, + required num num1, + required num num2, + required num num3, + }) > -codeDillOutlineSummary = - const Template< - Message Function(int count, int count2, num num1, num num2, num num3) - >( - "DillOutlineSummary", - problemMessageTemplate: - r"""Indexed #count libraries (#count2 bytes) in #num1%.3ms, that is, +codeDillOutlineSummary = const Template( + "DillOutlineSummary", + problemMessageTemplate: + r"""Indexed #count libraries (#count2 bytes) in #num1%.3ms, that is, #num2%12.3 bytes/ms, and #num3%12.3 ms/libraries.""", - withArgumentsOld: _withArgumentsOldDillOutlineSummary, - ); + withArgumentsOld: _withArgumentsOldDillOutlineSummary, + withArguments: _withArgumentsDillOutlineSummary, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDillOutlineSummary({ @@ -2578,13 +2793,17 @@ Message _withArgumentsOldDillOutlineSummary( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeDirectCycleInTypeParameters = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeDirectCycleInTypeParameters = const Template( "DirectCycleInTypeParameters", problemMessageTemplate: r"""Type '#name' can't use itself as a bound.""", correctionMessageTemplate: r"""Try breaking the cycle by removing at least one of the 'extends' clauses in the cycle.""", withArgumentsOld: _withArgumentsOldDirectCycleInTypeParameters, + withArguments: _withArgumentsDirectCycleInTypeParameters, analyzerCodes: ["TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND"], ); @@ -2623,13 +2842,17 @@ codeDotShorthandsConstructorInvocationWithTypeArguments = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeDotShorthandsInvalidContext = - const Template( - "DotShorthandsInvalidContext", - problemMessageTemplate: - r"""No type was provided to find the dot shorthand '#name'.""", - withArgumentsOld: _withArgumentsOldDotShorthandsInvalidContext, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeDotShorthandsInvalidContext = const Template( + "DotShorthandsInvalidContext", + problemMessageTemplate: + r"""No type was provided to find the dot shorthand '#name'.""", + withArgumentsOld: _withArgumentsOldDotShorthandsInvalidContext, + withArguments: _withArgumentsDotShorthandsInvalidContext, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDotShorthandsInvalidContext({required String name}) { @@ -2656,17 +2879,20 @@ const MessageCode codeDuplicateDeferred = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeDuplicateLabelInSwitchStatement = - const Template( - "DuplicateLabelInSwitchStatement", - problemMessageTemplate: - r"""The label '#name' was already used in this switch statement.""", - correctionMessageTemplate: - r"""Try choosing a different name for this label.""", - withArgumentsOld: _withArgumentsOldDuplicateLabelInSwitchStatement, - index: 72, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeDuplicateLabelInSwitchStatement = const Template( + "DuplicateLabelInSwitchStatement", + problemMessageTemplate: + r"""The label '#name' was already used in this switch statement.""", + correctionMessageTemplate: + r"""Try choosing a different name for this label.""", + withArgumentsOld: _withArgumentsOldDuplicateLabelInSwitchStatement, + withArguments: _withArgumentsDuplicateLabelInSwitchStatement, + index: 72, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDuplicateLabelInSwitchStatement({required String name}) { @@ -2685,16 +2911,19 @@ Message _withArgumentsOldDuplicateLabelInSwitchStatement(String name) => _withArgumentsDuplicateLabelInSwitchStatement(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeDuplicatePatternAssignmentVariable = - const Template( - "DuplicatePatternAssignmentVariable", - problemMessageTemplate: - r"""The variable '#name' is already assigned in this pattern.""", - correctionMessageTemplate: r"""Try renaming the variable.""", - withArgumentsOld: _withArgumentsOldDuplicatePatternAssignmentVariable, - analyzerCodes: ["DUPLICATE_PATTERN_ASSIGNMENT_VARIABLE"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeDuplicatePatternAssignmentVariable = const Template( + "DuplicatePatternAssignmentVariable", + problemMessageTemplate: + r"""The variable '#name' is already assigned in this pattern.""", + correctionMessageTemplate: r"""Try renaming the variable.""", + withArgumentsOld: _withArgumentsOldDuplicatePatternAssignmentVariable, + withArguments: _withArgumentsDuplicatePatternAssignmentVariable, + analyzerCodes: ["DUPLICATE_PATTERN_ASSIGNMENT_VARIABLE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDuplicatePatternAssignmentVariable({ @@ -2732,15 +2961,19 @@ const MessageCode codeDuplicatePrefix = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeDuplicateRecordPatternField = - const Template( - "DuplicateRecordPatternField", - problemMessageTemplate: - r"""The field '#name' is already matched in this pattern.""", - correctionMessageTemplate: r"""Try removing the duplicate field.""", - withArgumentsOld: _withArgumentsOldDuplicateRecordPatternField, - analyzerCodes: ["DUPLICATE_RECORD_PATTERN_FIELD"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeDuplicateRecordPatternField = const Template( + "DuplicateRecordPatternField", + problemMessageTemplate: + r"""The field '#name' is already matched in this pattern.""", + correctionMessageTemplate: r"""Try removing the duplicate field.""", + withArgumentsOld: _withArgumentsOldDuplicateRecordPatternField, + withArguments: _withArgumentsDuplicateRecordPatternField, + analyzerCodes: ["DUPLICATE_RECORD_PATTERN_FIELD"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDuplicateRecordPatternField({required String name}) { @@ -2782,13 +3015,17 @@ const MessageCode codeDuplicateRestElementInPatternContext = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeDuplicatedDeclaration = - const Template( - "DuplicatedDeclaration", - problemMessageTemplate: r"""'#name' is already declared in this scope.""", - withArgumentsOld: _withArgumentsOldDuplicatedDeclaration, - analyzerCodes: ["DUPLICATE_DEFINITION"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeDuplicatedDeclaration = const Template( + "DuplicatedDeclaration", + problemMessageTemplate: r"""'#name' is already declared in this scope.""", + withArgumentsOld: _withArgumentsOldDuplicatedDeclaration, + withArguments: _withArgumentsDuplicatedDeclaration, + analyzerCodes: ["DUPLICATE_DEFINITION"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDuplicatedDeclaration({required String name}) { @@ -2805,13 +3042,17 @@ Message _withArgumentsOldDuplicatedDeclaration(String name) => _withArgumentsDuplicatedDeclaration(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeDuplicatedDeclarationCause = - const Template( - "DuplicatedDeclarationCause", - problemMessageTemplate: r"""Previous declaration of '#name'.""", - withArgumentsOld: _withArgumentsOldDuplicatedDeclarationCause, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeDuplicatedDeclarationCause = const Template( + "DuplicatedDeclarationCause", + problemMessageTemplate: r"""Previous declaration of '#name'.""", + withArgumentsOld: _withArgumentsOldDuplicatedDeclarationCause, + withArguments: _withArgumentsDuplicatedDeclarationCause, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDuplicatedDeclarationCause({required String name}) { @@ -2828,15 +3069,18 @@ Message _withArgumentsOldDuplicatedDeclarationCause(String name) => _withArgumentsDuplicatedDeclarationCause(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeDuplicatedDeclarationSyntheticCause = - const Template( - "DuplicatedDeclarationSyntheticCause", - problemMessageTemplate: - r"""Previous declaration of '#name' is implied by this definition.""", - withArgumentsOld: _withArgumentsOldDuplicatedDeclarationSyntheticCause, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeDuplicatedDeclarationSyntheticCause = const Template( + "DuplicatedDeclarationSyntheticCause", + problemMessageTemplate: + r"""Previous declaration of '#name' is implied by this definition.""", + withArgumentsOld: _withArgumentsOldDuplicatedDeclarationSyntheticCause, + withArguments: _withArgumentsDuplicatedDeclarationSyntheticCause, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDuplicatedDeclarationSyntheticCause({ @@ -2856,13 +3100,17 @@ Message _withArgumentsOldDuplicatedDeclarationSyntheticCause(String name) => _withArgumentsDuplicatedDeclarationSyntheticCause(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeDuplicatedDeclarationUse = - const Template( - "DuplicatedDeclarationUse", - problemMessageTemplate: - r"""Can't use '#name' because it is declared more than once.""", - withArgumentsOld: _withArgumentsOldDuplicatedDeclarationUse, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeDuplicatedDeclarationUse = const Template( + "DuplicatedDeclarationUse", + problemMessageTemplate: + r"""Can't use '#name' because it is declared more than once.""", + withArgumentsOld: _withArgumentsOldDuplicatedDeclarationUse, + withArguments: _withArgumentsDuplicatedDeclarationUse, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDuplicatedDeclarationUse({required String name}) { @@ -2880,15 +3128,18 @@ Message _withArgumentsOldDuplicatedDeclarationUse(String name) => _withArgumentsDuplicatedDeclarationUse(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeDuplicatedExport = - const Template( - "DuplicatedExport", - problemMessageTemplate: - r"""'#name' is exported from both '#uri' and '#uri2'.""", - withArgumentsOld: _withArgumentsOldDuplicatedExport, - analyzerCodes: ["AMBIGUOUS_EXPORT"], - ); +const Template< + Message Function(String name, Uri uri, Uri uri2), + Message Function({required String name, required Uri uri, required Uri uri2}) +> +codeDuplicatedExport = const Template( + "DuplicatedExport", + problemMessageTemplate: + r"""'#name' is exported from both '#uri' and '#uri2'.""", + withArgumentsOld: _withArgumentsOldDuplicatedExport, + withArguments: _withArgumentsDuplicatedExport, + analyzerCodes: ["AMBIGUOUS_EXPORT"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDuplicatedExport({ @@ -2912,15 +3163,18 @@ Message _withArgumentsOldDuplicatedExport(String name, Uri uri, Uri uri2) => _withArgumentsDuplicatedExport(name: name, uri: uri, uri2: uri2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeDuplicatedImport = - const Template( - "DuplicatedImport", - problemMessageTemplate: - r"""'#name' is imported from both '#uri' and '#uri2'.""", - withArgumentsOld: _withArgumentsOldDuplicatedImport, - analyzerCodes: ["AMBIGUOUS_IMPORT"], - ); +const Template< + Message Function(String name, Uri uri, Uri uri2), + Message Function({required String name, required Uri uri, required Uri uri2}) +> +codeDuplicatedImport = const Template( + "DuplicatedImport", + problemMessageTemplate: + r"""'#name' is imported from both '#uri' and '#uri2'.""", + withArgumentsOld: _withArgumentsOldDuplicatedImport, + withArguments: _withArgumentsDuplicatedImport, + analyzerCodes: ["AMBIGUOUS_IMPORT"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDuplicatedImport({ @@ -2944,16 +3198,19 @@ Message _withArgumentsOldDuplicatedImport(String name, Uri uri, Uri uri2) => _withArgumentsDuplicatedImport(name: name, uri: uri, uri2: uri2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeDuplicatedModifier = - const Template( - "DuplicatedModifier", - problemMessageTemplate: - r"""The modifier '#lexeme' was already specified.""", - correctionMessageTemplate: - r"""Try removing all but one occurrence of the modifier.""", - withArgumentsOld: _withArgumentsOldDuplicatedModifier, - index: 70, - ); +const Template< + Message Function(Token lexeme), + Message Function({required Token lexeme}) +> +codeDuplicatedModifier = const Template( + "DuplicatedModifier", + problemMessageTemplate: r"""The modifier '#lexeme' was already specified.""", + correctionMessageTemplate: + r"""Try removing all but one occurrence of the modifier.""", + withArgumentsOld: _withArgumentsOldDuplicatedModifier, + withArguments: _withArgumentsDuplicatedModifier, + index: 70, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDuplicatedModifier({required Token lexeme}) { @@ -2972,13 +3229,17 @@ Message _withArgumentsOldDuplicatedModifier(Token lexeme) => _withArgumentsDuplicatedModifier(lexeme: lexeme); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeDuplicatedNamedArgument = - const Template( - "DuplicatedNamedArgument", - problemMessageTemplate: r"""Duplicated named argument '#name'.""", - withArgumentsOld: _withArgumentsOldDuplicatedNamedArgument, - analyzerCodes: ["DUPLICATE_NAMED_ARGUMENT"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeDuplicatedNamedArgument = const Template( + "DuplicatedNamedArgument", + problemMessageTemplate: r"""Duplicated named argument '#name'.""", + withArgumentsOld: _withArgumentsOldDuplicatedNamedArgument, + withArguments: _withArgumentsDuplicatedNamedArgument, + analyzerCodes: ["DUPLICATE_NAMED_ARGUMENT"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDuplicatedNamedArgument({required String name}) { @@ -2995,13 +3256,17 @@ Message _withArgumentsOldDuplicatedNamedArgument(String name) => _withArgumentsDuplicatedNamedArgument(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeDuplicatedParameterName = - const Template( - "DuplicatedParameterName", - problemMessageTemplate: r"""Duplicated parameter name '#name'.""", - withArgumentsOld: _withArgumentsOldDuplicatedParameterName, - analyzerCodes: ["DUPLICATE_DEFINITION"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeDuplicatedParameterName = const Template( + "DuplicatedParameterName", + problemMessageTemplate: r"""Duplicated parameter name '#name'.""", + withArgumentsOld: _withArgumentsOldDuplicatedParameterName, + withArguments: _withArgumentsDuplicatedParameterName, + analyzerCodes: ["DUPLICATE_DEFINITION"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDuplicatedParameterName({required String name}) { @@ -3018,13 +3283,17 @@ Message _withArgumentsOldDuplicatedParameterName(String name) => _withArgumentsDuplicatedParameterName(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeDuplicatedParameterNameCause = - const Template( - "DuplicatedParameterNameCause", - problemMessageTemplate: r"""Other parameter named '#name'.""", - withArgumentsOld: _withArgumentsOldDuplicatedParameterNameCause, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeDuplicatedParameterNameCause = const Template( + "DuplicatedParameterNameCause", + problemMessageTemplate: r"""Other parameter named '#name'.""", + withArgumentsOld: _withArgumentsOldDuplicatedParameterNameCause, + withArguments: _withArgumentsDuplicatedParameterNameCause, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDuplicatedParameterNameCause({required String name}) { @@ -3041,16 +3310,18 @@ Message _withArgumentsOldDuplicatedParameterNameCause(String name) => _withArgumentsDuplicatedParameterNameCause(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeDuplicatedRecordLiteralFieldName = - const Template( - "DuplicatedRecordLiteralFieldName", - problemMessageTemplate: - r"""Duplicated record literal field name '#name'.""", - correctionMessageTemplate: - r"""Try renaming or removing one of the named record literal fields.""", - withArgumentsOld: _withArgumentsOldDuplicatedRecordLiteralFieldName, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeDuplicatedRecordLiteralFieldName = const Template( + "DuplicatedRecordLiteralFieldName", + problemMessageTemplate: r"""Duplicated record literal field name '#name'.""", + correctionMessageTemplate: + r"""Try renaming or removing one of the named record literal fields.""", + withArgumentsOld: _withArgumentsOldDuplicatedRecordLiteralFieldName, + withArguments: _withArgumentsDuplicatedRecordLiteralFieldName, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDuplicatedRecordLiteralFieldName({required String name}) { @@ -3069,16 +3340,18 @@ Message _withArgumentsOldDuplicatedRecordLiteralFieldName(String name) => _withArgumentsDuplicatedRecordLiteralFieldName(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeDuplicatedRecordLiteralFieldNameContext = - const Template( - "DuplicatedRecordLiteralFieldNameContext", - problemMessageTemplate: - r"""This is the existing record literal field named '#name'.""", - withArgumentsOld: - _withArgumentsOldDuplicatedRecordLiteralFieldNameContext, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeDuplicatedRecordLiteralFieldNameContext = const Template( + "DuplicatedRecordLiteralFieldNameContext", + problemMessageTemplate: + r"""This is the existing record literal field named '#name'.""", + withArgumentsOld: _withArgumentsOldDuplicatedRecordLiteralFieldNameContext, + withArguments: _withArgumentsDuplicatedRecordLiteralFieldNameContext, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDuplicatedRecordLiteralFieldNameContext({ @@ -3098,15 +3371,18 @@ Message _withArgumentsOldDuplicatedRecordLiteralFieldNameContext(String name) => _withArgumentsDuplicatedRecordLiteralFieldNameContext(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeDuplicatedRecordTypeFieldName = - const Template( - "DuplicatedRecordTypeFieldName", - problemMessageTemplate: r"""Duplicated record type field name '#name'.""", - correctionMessageTemplate: - r"""Try renaming or removing one of the named record type fields.""", - withArgumentsOld: _withArgumentsOldDuplicatedRecordTypeFieldName, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeDuplicatedRecordTypeFieldName = const Template( + "DuplicatedRecordTypeFieldName", + problemMessageTemplate: r"""Duplicated record type field name '#name'.""", + correctionMessageTemplate: + r"""Try renaming or removing one of the named record type fields.""", + withArgumentsOld: _withArgumentsOldDuplicatedRecordTypeFieldName, + withArguments: _withArgumentsDuplicatedRecordTypeFieldName, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDuplicatedRecordTypeFieldName({required String name}) { @@ -3125,15 +3401,18 @@ Message _withArgumentsOldDuplicatedRecordTypeFieldName(String name) => _withArgumentsDuplicatedRecordTypeFieldName(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeDuplicatedRecordTypeFieldNameContext = - const Template( - "DuplicatedRecordTypeFieldNameContext", - problemMessageTemplate: - r"""This is the existing record type field named '#name'.""", - withArgumentsOld: _withArgumentsOldDuplicatedRecordTypeFieldNameContext, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeDuplicatedRecordTypeFieldNameContext = const Template( + "DuplicatedRecordTypeFieldNameContext", + problemMessageTemplate: + r"""This is the existing record type field named '#name'.""", + withArgumentsOld: _withArgumentsOldDuplicatedRecordTypeFieldNameContext, + withArguments: _withArgumentsDuplicatedRecordTypeFieldNameContext, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDuplicatedRecordTypeFieldNameContext({ @@ -3217,15 +3496,17 @@ const MessageCode codeEnumConstructorTearoff = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeEnumContainsRestrictedInstanceDeclaration = - const Template( - "EnumContainsRestrictedInstanceDeclaration", - problemMessageTemplate: - r"""An enum can't declare a non-abstract member named '#name'.""", - withArgumentsOld: - _withArgumentsOldEnumContainsRestrictedInstanceDeclaration, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeEnumContainsRestrictedInstanceDeclaration = const Template( + "EnumContainsRestrictedInstanceDeclaration", + problemMessageTemplate: + r"""An enum can't declare a non-abstract member named '#name'.""", + withArgumentsOld: _withArgumentsOldEnumContainsRestrictedInstanceDeclaration, + withArguments: _withArgumentsEnumContainsRestrictedInstanceDeclaration, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsEnumContainsRestrictedInstanceDeclaration({ @@ -3266,15 +3547,19 @@ const MessageCode codeEnumFactoryRedirectsToConstructor = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeEnumImplementerContainsRestrictedInstanceDeclaration = - const Template( - "EnumImplementerContainsRestrictedInstanceDeclaration", - problemMessageTemplate: - r"""'#name' has 'Enum' as a superinterface and can't contain non-static members with name '#name2'.""", - withArgumentsOld: - _withArgumentsOldEnumImplementerContainsRestrictedInstanceDeclaration, - ); +const Template< + Message Function(String name, String name2), + Message Function({required String name, required String name2}) +> +codeEnumImplementerContainsRestrictedInstanceDeclaration = const Template( + "EnumImplementerContainsRestrictedInstanceDeclaration", + problemMessageTemplate: + r"""'#name' has 'Enum' as a superinterface and can't contain non-static members with name '#name2'.""", + withArgumentsOld: + _withArgumentsOldEnumImplementerContainsRestrictedInstanceDeclaration, + withArguments: + _withArgumentsEnumImplementerContainsRestrictedInstanceDeclaration, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsEnumImplementerContainsRestrictedInstanceDeclaration({ @@ -3301,15 +3586,17 @@ Message _withArgumentsOldEnumImplementerContainsRestrictedInstanceDeclaration( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeEnumImplementerContainsValuesDeclaration = - const Template( - "EnumImplementerContainsValuesDeclaration", - problemMessageTemplate: - r"""'#name' has 'Enum' as a superinterface and can't contain non-static member with name 'values'.""", - withArgumentsOld: - _withArgumentsOldEnumImplementerContainsValuesDeclaration, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeEnumImplementerContainsValuesDeclaration = const Template( + "EnumImplementerContainsValuesDeclaration", + problemMessageTemplate: + r"""'#name' has 'Enum' as a superinterface and can't contain non-static member with name 'values'.""", + withArgumentsOld: _withArgumentsOldEnumImplementerContainsValuesDeclaration, + withArguments: _withArgumentsEnumImplementerContainsValuesDeclaration, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsEnumImplementerContainsValuesDeclaration({ @@ -3338,13 +3625,16 @@ const MessageCode codeEnumInClass = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeEnumInheritsRestricted = - const Template( - "EnumInheritsRestricted", - problemMessageTemplate: - r"""An enum can't inherit a member named '#name'.""", - withArgumentsOld: _withArgumentsOldEnumInheritsRestricted, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeEnumInheritsRestricted = const Template( + "EnumInheritsRestricted", + problemMessageTemplate: r"""An enum can't inherit a member named '#name'.""", + withArgumentsOld: _withArgumentsOldEnumInheritsRestricted, + withArguments: _withArgumentsEnumInheritsRestricted, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsEnumInheritsRestricted({required String name}) { @@ -3382,14 +3672,17 @@ const MessageCode codeEnumNonConstConstructor = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeEnumSupertypeOfNonAbstractClass = - const Template( - "EnumSupertypeOfNonAbstractClass", - problemMessageTemplate: - r"""Non-abstract class '#name' has 'Enum' as a superinterface.""", - withArgumentsOld: _withArgumentsOldEnumSupertypeOfNonAbstractClass, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeEnumSupertypeOfNonAbstractClass = const Template( + "EnumSupertypeOfNonAbstractClass", + problemMessageTemplate: + r"""Non-abstract class '#name' has 'Enum' as a superinterface.""", + withArgumentsOld: _withArgumentsOldEnumSupertypeOfNonAbstractClass, + withArguments: _withArgumentsEnumSupertypeOfNonAbstractClass, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsEnumSupertypeOfNonAbstractClass({required String name}) { @@ -3440,13 +3733,16 @@ const MessageCode codeEqualityCannotBeEqualityOperand = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeExceptionReadingFile = - const Template( - "ExceptionReadingFile", - problemMessageTemplate: r"""Exception when reading '#uri': #string""", - withArgumentsOld: _withArgumentsOldExceptionReadingFile, - ); +const Template< + Message Function(Uri uri, String string), + Message Function({required Uri uri, required String string}) +> +codeExceptionReadingFile = const Template( + "ExceptionReadingFile", + problemMessageTemplate: r"""Exception when reading '#uri': #string""", + withArgumentsOld: _withArgumentsOldExceptionReadingFile, + withArguments: _withArgumentsExceptionReadingFile, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExceptionReadingFile({ @@ -3467,13 +3763,17 @@ Message _withArgumentsOldExceptionReadingFile(Uri uri, String string) => _withArgumentsExceptionReadingFile(uri: uri, string: string); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeExpectedAfterButGot = - const Template( - "ExpectedAfterButGot", - problemMessageTemplate: r"""Expected '#string' after this.""", - withArgumentsOld: _withArgumentsOldExpectedAfterButGot, - analyzerCodes: ["EXPECTED_TOKEN"], - ); +const Template< + Message Function(String string), + Message Function({required String string}) +> +codeExpectedAfterButGot = const Template( + "ExpectedAfterButGot", + problemMessageTemplate: r"""Expected '#string' after this.""", + withArgumentsOld: _withArgumentsOldExpectedAfterButGot, + withArguments: _withArgumentsExpectedAfterButGot, + analyzerCodes: ["EXPECTED_TOKEN"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExpectedAfterButGot({required String string}) { @@ -3513,13 +3813,17 @@ const MessageCode codeExpectedBody = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeExpectedButGot = - const Template( - "ExpectedButGot", - problemMessageTemplate: r"""Expected '#string' before this.""", - withArgumentsOld: _withArgumentsOldExpectedButGot, - analyzerCodes: ["EXPECTED_TOKEN"], - ); +const Template< + Message Function(String string), + Message Function({required String string}) +> +codeExpectedButGot = const Template( + "ExpectedButGot", + problemMessageTemplate: r"""Expected '#string' before this.""", + withArgumentsOld: _withArgumentsOldExpectedButGot, + withArguments: _withArgumentsExpectedButGot, + analyzerCodes: ["EXPECTED_TOKEN"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExpectedButGot({required String string}) { @@ -3553,14 +3857,17 @@ const MessageCode codeExpectedClassBody = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeExpectedClassMember = - const Template( - "ExpectedClassMember", - problemMessageTemplate: - r"""Expected a class member, but got '#lexeme'.""", - withArgumentsOld: _withArgumentsOldExpectedClassMember, - analyzerCodes: ["EXPECTED_CLASS_MEMBER"], - ); +const Template< + Message Function(Token lexeme), + Message Function({required Token lexeme}) +> +codeExpectedClassMember = const Template( + "ExpectedClassMember", + problemMessageTemplate: r"""Expected a class member, but got '#lexeme'.""", + withArgumentsOld: _withArgumentsOldExpectedClassMember, + withArguments: _withArgumentsExpectedClassMember, + analyzerCodes: ["EXPECTED_CLASS_MEMBER"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExpectedClassMember({required Token lexeme}) { @@ -3577,13 +3884,17 @@ Message _withArgumentsOldExpectedClassMember(Token lexeme) => _withArgumentsExpectedClassMember(lexeme: lexeme); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeExpectedDeclaration = - const Template( - "ExpectedDeclaration", - problemMessageTemplate: r"""Expected a declaration, but got '#lexeme'.""", - withArgumentsOld: _withArgumentsOldExpectedDeclaration, - analyzerCodes: ["EXPECTED_EXECUTABLE"], - ); +const Template< + Message Function(Token lexeme), + Message Function({required Token lexeme}) +> +codeExpectedDeclaration = const Template( + "ExpectedDeclaration", + problemMessageTemplate: r"""Expected a declaration, but got '#lexeme'.""", + withArgumentsOld: _withArgumentsOldExpectedDeclaration, + withArguments: _withArgumentsExpectedDeclaration, + analyzerCodes: ["EXPECTED_EXECUTABLE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExpectedDeclaration({required Token lexeme}) { @@ -3607,13 +3918,17 @@ const MessageCode codeExpectedElseOrComma = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeExpectedEnumBody = const Template( +const Template< + Message Function(Token lexeme), + Message Function({required Token lexeme}) +> +codeExpectedEnumBody = const Template( "ExpectedEnumBody", problemMessageTemplate: r"""Expected a enum body, but got '#lexeme'.""", correctionMessageTemplate: r"""An enum definition must have a body with at least one constant name.""", withArgumentsOld: _withArgumentsOldExpectedEnumBody, + withArguments: _withArgumentsExpectedEnumBody, analyzerCodes: ["MISSING_ENUM_BODY"], ); @@ -3661,14 +3976,17 @@ const MessageCode codeExpectedFinallyClauseBody = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeExpectedFunctionBody = - const Template( - "ExpectedFunctionBody", - problemMessageTemplate: - r"""Expected a function body, but got '#lexeme'.""", - withArgumentsOld: _withArgumentsOldExpectedFunctionBody, - analyzerCodes: ["MISSING_FUNCTION_BODY"], - ); +const Template< + Message Function(Token lexeme), + Message Function({required Token lexeme}) +> +codeExpectedFunctionBody = const Template( + "ExpectedFunctionBody", + problemMessageTemplate: r"""Expected a function body, but got '#lexeme'.""", + withArgumentsOld: _withArgumentsOldExpectedFunctionBody, + withArguments: _withArgumentsExpectedFunctionBody, + analyzerCodes: ["MISSING_FUNCTION_BODY"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExpectedFunctionBody({required Token lexeme}) { @@ -3692,15 +4010,19 @@ const MessageCode codeExpectedHexDigit = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeExpectedIdentifier = - const Template( - "ExpectedIdentifier", - problemMessageTemplate: r"""Expected an identifier, but got '#lexeme'.""", - correctionMessageTemplate: - r"""Try inserting an identifier before '#lexeme'.""", - withArgumentsOld: _withArgumentsOldExpectedIdentifier, - analyzerCodes: ["MISSING_IDENTIFIER"], - ); +const Template< + Message Function(Token lexeme), + Message Function({required Token lexeme}) +> +codeExpectedIdentifier = const Template( + "ExpectedIdentifier", + problemMessageTemplate: r"""Expected an identifier, but got '#lexeme'.""", + correctionMessageTemplate: + r"""Try inserting an identifier before '#lexeme'.""", + withArgumentsOld: _withArgumentsOldExpectedIdentifier, + withArguments: _withArgumentsExpectedIdentifier, + analyzerCodes: ["MISSING_IDENTIFIER"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExpectedIdentifier({required Token lexeme}) { @@ -3718,17 +4040,20 @@ Message _withArgumentsOldExpectedIdentifier(Token lexeme) => _withArgumentsExpectedIdentifier(lexeme: lexeme); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeExpectedIdentifierButGotKeyword = - const Template( - "ExpectedIdentifierButGotKeyword", - problemMessageTemplate: - r"""'#lexeme' can't be used as an identifier because it's a keyword.""", - correctionMessageTemplate: - r"""Try renaming this to be an identifier that isn't a keyword.""", - withArgumentsOld: _withArgumentsOldExpectedIdentifierButGotKeyword, - index: 113, - ); +const Template< + Message Function(Token lexeme), + Message Function({required Token lexeme}) +> +codeExpectedIdentifierButGotKeyword = const Template( + "ExpectedIdentifierButGotKeyword", + problemMessageTemplate: + r"""'#lexeme' can't be used as an identifier because it's a keyword.""", + correctionMessageTemplate: + r"""Try renaming this to be an identifier that isn't a keyword.""", + withArgumentsOld: _withArgumentsOldExpectedIdentifierButGotKeyword, + withArguments: _withArgumentsExpectedIdentifierButGotKeyword, + index: 113, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExpectedIdentifierButGotKeyword({required Token lexeme}) { @@ -3748,13 +4073,17 @@ Message _withArgumentsOldExpectedIdentifierButGotKeyword(Token lexeme) => _withArgumentsExpectedIdentifierButGotKeyword(lexeme: lexeme); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeExpectedInstead = - const Template( - "ExpectedInstead", - problemMessageTemplate: r"""Expected '#string' instead of this.""", - withArgumentsOld: _withArgumentsOldExpectedInstead, - index: 41, - ); +const Template< + Message Function(String string), + Message Function({required String string}) +> +codeExpectedInstead = const Template( + "ExpectedInstead", + problemMessageTemplate: r"""Expected '#string' instead of this.""", + withArgumentsOld: _withArgumentsOldExpectedInstead, + withArguments: _withArgumentsExpectedInstead, + index: 41, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExpectedInstead({required String string}) { @@ -3814,13 +4143,17 @@ const MessageCode codeExpectedStatement = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeExpectedString = - const Template( - "ExpectedString", - problemMessageTemplate: r"""Expected a String, but got '#lexeme'.""", - withArgumentsOld: _withArgumentsOldExpectedString, - analyzerCodes: ["EXPECTED_STRING_LITERAL"], - ); +const Template< + Message Function(Token lexeme), + Message Function({required Token lexeme}) +> +codeExpectedString = const Template( + "ExpectedString", + problemMessageTemplate: r"""Expected a String, but got '#lexeme'.""", + withArgumentsOld: _withArgumentsOldExpectedString, + withArguments: _withArgumentsExpectedString, + analyzerCodes: ["EXPECTED_STRING_LITERAL"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExpectedString({required Token lexeme}) { @@ -3855,13 +4188,17 @@ const MessageCode codeExpectedSwitchStatementBody = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeExpectedToken = - const Template( - "ExpectedToken", - problemMessageTemplate: r"""Expected to find '#string'.""", - withArgumentsOld: _withArgumentsOldExpectedToken, - analyzerCodes: ["EXPECTED_TOKEN"], - ); +const Template< + Message Function(String string), + Message Function({required String string}) +> +codeExpectedToken = const Template( + "ExpectedToken", + problemMessageTemplate: r"""Expected to find '#string'.""", + withArgumentsOld: _withArgumentsOldExpectedToken, + withArguments: _withArgumentsExpectedToken, + analyzerCodes: ["EXPECTED_TOKEN"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExpectedToken({required String string}) { @@ -3886,13 +4223,17 @@ const MessageCode codeExpectedTryStatementBody = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeExpectedType = - const Template( - "ExpectedType", - problemMessageTemplate: r"""Expected a type, but got '#lexeme'.""", - withArgumentsOld: _withArgumentsOldExpectedType, - analyzerCodes: ["EXPECTED_TYPE_NAME"], - ); +const Template< + Message Function(Token lexeme), + Message Function({required Token lexeme}) +> +codeExpectedType = const Template( + "ExpectedType", + problemMessageTemplate: r"""Expected a type, but got '#lexeme'.""", + withArgumentsOld: _withArgumentsOldExpectedType, + withArguments: _withArgumentsExpectedType, + analyzerCodes: ["EXPECTED_TYPE_NAME"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExpectedType({required Token lexeme}) { @@ -3915,14 +4256,18 @@ const MessageCode codeExpectedUri = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeExperimentDisabled = const Template( +const Template< + Message Function(String string), + Message Function({required String string}) +> +codeExperimentDisabled = const Template( "ExperimentDisabled", problemMessageTemplate: r"""This requires the '#string' language feature to be enabled.""", correctionMessageTemplate: r"""The feature is on by default but is currently disabled, maybe because the '--enable-experiment=no-#string' command line option is passed.""", withArgumentsOld: _withArgumentsOldExperimentDisabled, + withArguments: _withArgumentsExperimentDisabled, analyzerCodes: ["ParserErrorCode.EXPERIMENT_NOT_ENABLED"], ); @@ -3944,16 +4289,18 @@ Message _withArgumentsOldExperimentDisabled(String string) => _withArgumentsExperimentDisabled(string: string); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeExperimentDisabledInvalidLanguageVersion = - const Template( - "ExperimentDisabledInvalidLanguageVersion", - problemMessageTemplate: - r"""This requires the '#string' language feature, which requires language version of #string2 or higher.""", - withArgumentsOld: - _withArgumentsOldExperimentDisabledInvalidLanguageVersion, - analyzerCodes: ["ParserErrorCode.EXPERIMENT_NOT_ENABLED"], - ); +const Template< + Message Function(String string, String string2), + Message Function({required String string, required String string2}) +> +codeExperimentDisabledInvalidLanguageVersion = const Template( + "ExperimentDisabledInvalidLanguageVersion", + problemMessageTemplate: + r"""This requires the '#string' language feature, which requires language version of #string2 or higher.""", + withArgumentsOld: _withArgumentsOldExperimentDisabledInvalidLanguageVersion, + withArguments: _withArgumentsExperimentDisabledInvalidLanguageVersion, + analyzerCodes: ["ParserErrorCode.EXPERIMENT_NOT_ENABLED"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExperimentDisabledInvalidLanguageVersion({ @@ -3980,13 +4327,17 @@ Message _withArgumentsOldExperimentDisabledInvalidLanguageVersion( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeExperimentExpiredDisabled = - const Template( - "ExperimentExpiredDisabled", - problemMessageTemplate: - r"""The experiment '#name' has expired and can't be disabled.""", - withArgumentsOld: _withArgumentsOldExperimentExpiredDisabled, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeExperimentExpiredDisabled = const Template( + "ExperimentExpiredDisabled", + problemMessageTemplate: + r"""The experiment '#name' has expired and can't be disabled.""", + withArgumentsOld: _withArgumentsOldExperimentExpiredDisabled, + withArguments: _withArgumentsExperimentExpiredDisabled, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExperimentExpiredDisabled({required String name}) { @@ -4004,13 +4355,17 @@ Message _withArgumentsOldExperimentExpiredDisabled(String name) => _withArgumentsExperimentExpiredDisabled(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeExperimentExpiredEnabled = - const Template( - "ExperimentExpiredEnabled", - problemMessageTemplate: - r"""The experiment '#name' has expired and can't be enabled.""", - withArgumentsOld: _withArgumentsOldExperimentExpiredEnabled, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeExperimentExpiredEnabled = const Template( + "ExperimentExpiredEnabled", + problemMessageTemplate: + r"""The experiment '#name' has expired and can't be enabled.""", + withArgumentsOld: _withArgumentsOldExperimentExpiredEnabled, + withArguments: _withArgumentsExperimentExpiredEnabled, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExperimentExpiredEnabled({required String name}) { @@ -4028,17 +4383,20 @@ Message _withArgumentsOldExperimentExpiredEnabled(String name) => _withArgumentsExperimentExpiredEnabled(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeExperimentNotEnabled = - const Template( - "ExperimentNotEnabled", - problemMessageTemplate: - r"""This requires the '#string' language feature to be enabled.""", - correctionMessageTemplate: - r"""Try updating your pubspec.yaml to set the minimum SDK constraint to #string2 or higher, and running 'pub get'.""", - withArgumentsOld: _withArgumentsOldExperimentNotEnabled, - index: 48, - ); +const Template< + Message Function(String string, String string2), + Message Function({required String string, required String string2}) +> +codeExperimentNotEnabled = const Template( + "ExperimentNotEnabled", + problemMessageTemplate: + r"""This requires the '#string' language feature to be enabled.""", + correctionMessageTemplate: + r"""Try updating your pubspec.yaml to set the minimum SDK constraint to #string2 or higher, and running 'pub get'.""", + withArgumentsOld: _withArgumentsOldExperimentNotEnabled, + withArguments: _withArgumentsExperimentNotEnabled, + index: 48, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExperimentNotEnabled({ @@ -4062,14 +4420,18 @@ Message _withArgumentsOldExperimentNotEnabled(String string, String string2) => _withArgumentsExperimentNotEnabled(string: string, string2: string2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeExperimentNotEnabledOffByDefault = const Template( +const Template< + Message Function(String string), + Message Function({required String string}) +> +codeExperimentNotEnabledOffByDefault = const Template( "ExperimentNotEnabledOffByDefault", problemMessageTemplate: r"""This requires the experimental '#string' language feature to be enabled.""", correctionMessageTemplate: r"""Try passing the '--enable-experiment=#string' command line option.""", withArgumentsOld: _withArgumentsOldExperimentNotEnabledOffByDefault, + withArguments: _withArgumentsExperimentNotEnabledOffByDefault, index: 133, ); @@ -4093,12 +4455,16 @@ Message _withArgumentsOldExperimentNotEnabledOffByDefault(String string) => _withArgumentsExperimentNotEnabledOffByDefault(string: string); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeExperimentOptOutComment = const Template( +const Template< + Message Function(String string), + Message Function({required String string}) +> +codeExperimentOptOutComment = const Template( "ExperimentOptOutComment", problemMessageTemplate: r"""This is the annotation that opts out this library from the '#string' language feature.""", withArgumentsOld: _withArgumentsOldExperimentOptOutComment, + withArguments: _withArgumentsExperimentOptOutComment, severity: CfeSeverity.context, ); @@ -4118,16 +4484,19 @@ Message _withArgumentsOldExperimentOptOutComment(String string) => _withArgumentsExperimentOptOutComment(string: string); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeExperimentOptOutExplicit = - const Template( - "ExperimentOptOutExplicit", - problemMessageTemplate: - r"""The '#string' language feature is disabled for this library.""", - correctionMessageTemplate: - r"""Try removing the `@dart=` annotation or setting the language version to #string2 or higher.""", - withArgumentsOld: _withArgumentsOldExperimentOptOutExplicit, - ); +const Template< + Message Function(String string, String string2), + Message Function({required String string, required String string2}) +> +codeExperimentOptOutExplicit = const Template( + "ExperimentOptOutExplicit", + problemMessageTemplate: + r"""The '#string' language feature is disabled for this library.""", + correctionMessageTemplate: + r"""Try removing the `@dart=` annotation or setting the language version to #string2 or higher.""", + withArgumentsOld: _withArgumentsOldExperimentOptOutExplicit, + withArguments: _withArgumentsExperimentOptOutExplicit, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExperimentOptOutExplicit({ @@ -4153,16 +4522,19 @@ Message _withArgumentsOldExperimentOptOutExplicit( ) => _withArgumentsExperimentOptOutExplicit(string: string, string2: string2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeExperimentOptOutImplicit = - const Template( - "ExperimentOptOutImplicit", - problemMessageTemplate: - r"""The '#string' language feature is disabled for this library.""", - correctionMessageTemplate: - r"""Try removing the package language version or setting the language version to #string2 or higher.""", - withArgumentsOld: _withArgumentsOldExperimentOptOutImplicit, - ); +const Template< + Message Function(String string, String string2), + Message Function({required String string, required String string2}) +> +codeExperimentOptOutImplicit = const Template( + "ExperimentOptOutImplicit", + problemMessageTemplate: + r"""The '#string' language feature is disabled for this library.""", + correctionMessageTemplate: + r"""Try removing the package language version or setting the language version to #string2 or higher.""", + withArgumentsOld: _withArgumentsOldExperimentOptOutImplicit, + withArguments: _withArgumentsExperimentOptOutImplicit, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExperimentOptOutImplicit({ @@ -4209,14 +4581,17 @@ const MessageCode codeExplicitExtensionAsLvalue = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeExplicitExtensionTypeArgumentMismatch = - const Template( - "ExplicitExtensionTypeArgumentMismatch", - problemMessageTemplate: - r"""Explicit extension application of extension '#name' takes '#count' type argument(s).""", - withArgumentsOld: _withArgumentsOldExplicitExtensionTypeArgumentMismatch, - ); +const Template< + Message Function(String name, int count), + Message Function({required String name, required int count}) +> +codeExplicitExtensionTypeArgumentMismatch = const Template( + "ExplicitExtensionTypeArgumentMismatch", + problemMessageTemplate: + r"""Explicit extension application of extension '#name' takes '#count' type argument(s).""", + withArgumentsOld: _withArgumentsOldExplicitExtensionTypeArgumentMismatch, + withArguments: _withArgumentsExplicitExtensionTypeArgumentMismatch, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExplicitExtensionTypeArgumentMismatch({ @@ -4258,15 +4633,18 @@ const MessageCode codeExportedMain = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeExpressionEvaluationKnownVariableUnavailable = - const Template( - "ExpressionEvaluationKnownVariableUnavailable", - problemMessageTemplate: - r"""The variable '#name' is unavailable in this expression evaluation.""", - withArgumentsOld: - _withArgumentsOldExpressionEvaluationKnownVariableUnavailable, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeExpressionEvaluationKnownVariableUnavailable = const Template( + "ExpressionEvaluationKnownVariableUnavailable", + problemMessageTemplate: + r"""The variable '#name' is unavailable in this expression evaluation.""", + withArgumentsOld: + _withArgumentsOldExpressionEvaluationKnownVariableUnavailable, + withArguments: _withArgumentsExpressionEvaluationKnownVariableUnavailable, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExpressionEvaluationKnownVariableUnavailable({ @@ -4294,14 +4672,18 @@ const MessageCode codeExpressionNotMetadata = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeExtendingEnum = - const Template( - "ExtendingEnum", - problemMessageTemplate: - r"""'#name' is an enum and can't be extended or implemented.""", - withArgumentsOld: _withArgumentsOldExtendingEnum, - analyzerCodes: ["EXTENDS_ENUM"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeExtendingEnum = const Template( + "ExtendingEnum", + problemMessageTemplate: + r"""'#name' is an enum and can't be extended or implemented.""", + withArgumentsOld: _withArgumentsOldExtendingEnum, + withArguments: _withArgumentsExtendingEnum, + analyzerCodes: ["EXTENDS_ENUM"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExtendingEnum({required String name}) { @@ -4319,14 +4701,18 @@ Message _withArgumentsOldExtendingEnum(String name) => _withArgumentsExtendingEnum(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeExtendingRestricted = - const Template( - "ExtendingRestricted", - problemMessageTemplate: - r"""'#name' is restricted and can't be extended or implemented.""", - withArgumentsOld: _withArgumentsOldExtendingRestricted, - analyzerCodes: ["EXTENDS_DISALLOWED_CLASS"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeExtendingRestricted = const Template( + "ExtendingRestricted", + problemMessageTemplate: + r"""'#name' is restricted and can't be extended or implemented.""", + withArgumentsOld: _withArgumentsOldExtendingRestricted, + withArguments: _withArgumentsExtendingRestricted, + analyzerCodes: ["EXTENDS_DISALLOWED_CLASS"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExtendingRestricted({required String name}) { @@ -4392,15 +4778,17 @@ const MessageCode codeExtensionDeclaresInstanceField = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeExtensionMemberConflictsWithObjectMember = - const Template( - "ExtensionMemberConflictsWithObjectMember", - problemMessageTemplate: - r"""This extension member conflicts with Object member '#name'.""", - withArgumentsOld: - _withArgumentsOldExtensionMemberConflictsWithObjectMember, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeExtensionMemberConflictsWithObjectMember = const Template( + "ExtensionMemberConflictsWithObjectMember", + problemMessageTemplate: + r"""This extension member conflicts with Object member '#name'.""", + withArgumentsOld: _withArgumentsOldExtensionMemberConflictsWithObjectMember, + withArguments: _withArgumentsExtensionMemberConflictsWithObjectMember, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExtensionMemberConflictsWithObjectMember({ @@ -4421,18 +4809,20 @@ Message _withArgumentsOldExtensionMemberConflictsWithObjectMember( ) => _withArgumentsExtensionMemberConflictsWithObjectMember(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeExtensionTypeCombinedMemberSignatureFailed = - const Template( - "ExtensionTypeCombinedMemberSignatureFailed", - problemMessageTemplate: - r"""Extension type '#name' inherits multiple members named '#name2' with incompatible signatures.""", - correctionMessageTemplate: - r"""Try adding a declaration of '#name2' to '#name'.""", - withArgumentsOld: - _withArgumentsOldExtensionTypeCombinedMemberSignatureFailed, - analyzerCodes: ["INCONSISTENT_INHERITANCE"], - ); +const Template< + Message Function(String name, String name2), + Message Function({required String name, required String name2}) +> +codeExtensionTypeCombinedMemberSignatureFailed = const Template( + "ExtensionTypeCombinedMemberSignatureFailed", + problemMessageTemplate: + r"""Extension type '#name' inherits multiple members named '#name2' with incompatible signatures.""", + correctionMessageTemplate: + r"""Try adding a declaration of '#name2' to '#name'.""", + withArgumentsOld: _withArgumentsOldExtensionTypeCombinedMemberSignatureFailed, + withArguments: _withArgumentsExtensionTypeCombinedMemberSignatureFailed, + analyzerCodes: ["INCONSISTENT_INHERITANCE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExtensionTypeCombinedMemberSignatureFailed({ @@ -4555,17 +4945,21 @@ const MessageCode codeExtensionTypeRepresentationTypeBottom = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeExtensionTypeShouldBeListedAsCallableInDynamicInterface = - const Template( - "ExtensionTypeShouldBeListedAsCallableInDynamicInterface", - problemMessageTemplate: - r"""Cannot use extension type '#name' in a dynamic module.""", - correctionMessageTemplate: - r"""Try removing the reference to extension type '#name' or update the dynamic interface to list extension type '#name' as callable.""", - withArgumentsOld: - _withArgumentsOldExtensionTypeShouldBeListedAsCallableInDynamicInterface, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeExtensionTypeShouldBeListedAsCallableInDynamicInterface = const Template( + "ExtensionTypeShouldBeListedAsCallableInDynamicInterface", + problemMessageTemplate: + r"""Cannot use extension type '#name' in a dynamic module.""", + correctionMessageTemplate: + r"""Try removing the reference to extension type '#name' or update the dynamic interface to list extension type '#name' as callable.""", + withArgumentsOld: + _withArgumentsOldExtensionTypeShouldBeListedAsCallableInDynamicInterface, + withArguments: + _withArgumentsExtensionTypeShouldBeListedAsCallableInDynamicInterface, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExtensionTypeShouldBeListedAsCallableInDynamicInterface({ @@ -4690,14 +5084,18 @@ const MessageCode codeExternalTypedef = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeExtraneousModifier = - const Template( - "ExtraneousModifier", - problemMessageTemplate: r"""Can't have modifier '#lexeme' here.""", - correctionMessageTemplate: r"""Try removing '#lexeme'.""", - withArgumentsOld: _withArgumentsOldExtraneousModifier, - index: 77, - ); +const Template< + Message Function(Token lexeme), + Message Function({required Token lexeme}) +> +codeExtraneousModifier = const Template( + "ExtraneousModifier", + problemMessageTemplate: r"""Can't have modifier '#lexeme' here.""", + correctionMessageTemplate: r"""Try removing '#lexeme'.""", + withArgumentsOld: _withArgumentsOldExtraneousModifier, + withArguments: _withArgumentsExtraneousModifier, + index: 77, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExtraneousModifier({required Token lexeme}) { @@ -4715,16 +5113,18 @@ Message _withArgumentsOldExtraneousModifier(Token lexeme) => _withArgumentsExtraneousModifier(lexeme: lexeme); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeExtraneousModifierInExtension = - const Template( - "ExtraneousModifierInExtension", - problemMessageTemplate: - r"""Can't have modifier '#lexeme' in an extension.""", - correctionMessageTemplate: r"""Try removing '#lexeme'.""", - withArgumentsOld: _withArgumentsOldExtraneousModifierInExtension, - index: 98, - ); +const Template< + Message Function(Token lexeme), + Message Function({required Token lexeme}) +> +codeExtraneousModifierInExtension = const Template( + "ExtraneousModifierInExtension", + problemMessageTemplate: r"""Can't have modifier '#lexeme' in an extension.""", + correctionMessageTemplate: r"""Try removing '#lexeme'.""", + withArgumentsOld: _withArgumentsOldExtraneousModifierInExtension, + withArguments: _withArgumentsExtraneousModifierInExtension, + index: 98, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExtraneousModifierInExtension({required Token lexeme}) { @@ -4742,16 +5142,19 @@ Message _withArgumentsOldExtraneousModifierInExtension(Token lexeme) => _withArgumentsExtraneousModifierInExtension(lexeme: lexeme); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeExtraneousModifierInExtensionType = - const Template( - "ExtraneousModifierInExtensionType", - problemMessageTemplate: - r"""Can't have modifier '#lexeme' in an extension type.""", - correctionMessageTemplate: r"""Try removing '#lexeme'.""", - withArgumentsOld: _withArgumentsOldExtraneousModifierInExtensionType, - index: 174, - ); +const Template< + Message Function(Token lexeme), + Message Function({required Token lexeme}) +> +codeExtraneousModifierInExtensionType = const Template( + "ExtraneousModifierInExtensionType", + problemMessageTemplate: + r"""Can't have modifier '#lexeme' in an extension type.""", + correctionMessageTemplate: r"""Try removing '#lexeme'.""", + withArgumentsOld: _withArgumentsOldExtraneousModifierInExtensionType, + withArguments: _withArgumentsExtraneousModifierInExtensionType, + index: 174, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExtraneousModifierInExtensionType({ @@ -4772,16 +5175,19 @@ Message _withArgumentsOldExtraneousModifierInExtensionType(Token lexeme) => _withArgumentsExtraneousModifierInExtensionType(lexeme: lexeme); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeExtraneousModifierInPrimaryConstructor = - const Template( - "ExtraneousModifierInPrimaryConstructor", - problemMessageTemplate: - r"""Can't have modifier '#lexeme' in a primary constructor.""", - correctionMessageTemplate: r"""Try removing '#lexeme'.""", - withArgumentsOld: _withArgumentsOldExtraneousModifierInPrimaryConstructor, - index: 175, - ); +const Template< + Message Function(Token lexeme), + Message Function({required Token lexeme}) +> +codeExtraneousModifierInPrimaryConstructor = const Template( + "ExtraneousModifierInPrimaryConstructor", + problemMessageTemplate: + r"""Can't have modifier '#lexeme' in a primary constructor.""", + correctionMessageTemplate: r"""Try removing '#lexeme'.""", + withArgumentsOld: _withArgumentsOldExtraneousModifierInPrimaryConstructor, + withArguments: _withArgumentsExtraneousModifierInPrimaryConstructor, + index: 175, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExtraneousModifierInPrimaryConstructor({ @@ -4802,13 +5208,17 @@ Message _withArgumentsOldExtraneousModifierInPrimaryConstructor(Token lexeme) => _withArgumentsExtraneousModifierInPrimaryConstructor(lexeme: lexeme); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeFactoryConflictsWithMember = - const Template( - "FactoryConflictsWithMember", - problemMessageTemplate: r"""The factory conflicts with member '#name'.""", - withArgumentsOld: _withArgumentsOldFactoryConflictsWithMember, - analyzerCodes: ["CONFLICTS_WITH_MEMBER"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeFactoryConflictsWithMember = const Template( + "FactoryConflictsWithMember", + problemMessageTemplate: r"""The factory conflicts with member '#name'.""", + withArgumentsOld: _withArgumentsOldFactoryConflictsWithMember, + withArguments: _withArgumentsFactoryConflictsWithMember, + analyzerCodes: ["CONFLICTS_WITH_MEMBER"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFactoryConflictsWithMember({required String name}) { @@ -4825,14 +5235,17 @@ Message _withArgumentsOldFactoryConflictsWithMember(String name) => _withArgumentsFactoryConflictsWithMember(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFactoryConflictsWithMemberCause = - const Template( - "FactoryConflictsWithMemberCause", - problemMessageTemplate: r"""Conflicting member '#name'.""", - withArgumentsOld: _withArgumentsOldFactoryConflictsWithMemberCause, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeFactoryConflictsWithMemberCause = const Template( + "FactoryConflictsWithMemberCause", + problemMessageTemplate: r"""Conflicting member '#name'.""", + withArgumentsOld: _withArgumentsOldFactoryConflictsWithMemberCause, + withArguments: _withArgumentsFactoryConflictsWithMemberCause, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFactoryConflictsWithMemberCause({required String name}) { @@ -4866,12 +5279,16 @@ const MessageCode codeFactoryTopLevelDeclaration = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeFastaCLIArgumentRequired = - const Template( - "FastaCLIArgumentRequired", - problemMessageTemplate: r"""Expected value after '#name'.""", - withArgumentsOld: _withArgumentsOldFastaCLIArgumentRequired, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeFastaCLIArgumentRequired = const Template( + "FastaCLIArgumentRequired", + problemMessageTemplate: r"""Expected value after '#name'.""", + withArgumentsOld: _withArgumentsOldFastaCLIArgumentRequired, + withArguments: _withArgumentsFastaCLIArgumentRequired, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFastaCLIArgumentRequired({required String name}) { @@ -5025,16 +5442,18 @@ const MessageCode codeFfiAddressReceiver = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFfiCompoundImplementsFinalizable = - const Template( - "FfiCompoundImplementsFinalizable", - problemMessageTemplate: - r"""#string '#name' can't implement Finalizable.""", - correctionMessageTemplate: - r"""Try removing the implements clause from '#name'.""", - withArgumentsOld: _withArgumentsOldFfiCompoundImplementsFinalizable, - ); +const Template< + Message Function(String string, String name), + Message Function({required String string, required String name}) +> +codeFfiCompoundImplementsFinalizable = const Template( + "FfiCompoundImplementsFinalizable", + problemMessageTemplate: r"""#string '#name' can't implement Finalizable.""", + correctionMessageTemplate: + r"""Try removing the implements clause from '#name'.""", + withArgumentsOld: _withArgumentsOldFfiCompoundImplementsFinalizable, + withArguments: _withArgumentsFfiCompoundImplementsFinalizable, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFfiCompoundImplementsFinalizable({ @@ -5121,12 +5540,16 @@ const MessageCode codeFfiDefaultAssetDuplicate = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFfiEmptyStruct = const Template( +const Template< + Message Function(String string, String name), + Message Function({required String string, required String name}) +> +codeFfiEmptyStruct = const Template( "FfiEmptyStruct", problemMessageTemplate: r"""#string '#name' is empty. Empty structs and unions are undefined behavior.""", withArgumentsOld: _withArgumentsOldFfiEmptyStruct, + withArguments: _withArgumentsFfiEmptyStruct, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5161,12 +5584,16 @@ const MessageCode codeFfiExpectedConstant = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeFfiExpectedConstantArg = - const Template( - "FfiExpectedConstantArg", - problemMessageTemplate: r"""Argument '#name' must be a constant.""", - withArgumentsOld: _withArgumentsOldFfiExpectedConstantArg, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeFfiExpectedConstantArg = const Template( + "FfiExpectedConstantArg", + problemMessageTemplate: r"""Argument '#name' must be a constant.""", + withArgumentsOld: _withArgumentsOldFfiExpectedConstantArg, + withArguments: _withArgumentsFfiExpectedConstantArg, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFfiExpectedConstantArg({required String name}) { @@ -5183,14 +5610,17 @@ Message _withArgumentsOldFfiExpectedConstantArg(String name) => _withArgumentsFfiExpectedConstantArg(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFfiExtendsOrImplementsSealedClass = - const Template( - "FfiExtendsOrImplementsSealedClass", - problemMessageTemplate: - r"""Class '#name' cannot be extended or implemented.""", - withArgumentsOld: _withArgumentsOldFfiExtendsOrImplementsSealedClass, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeFfiExtendsOrImplementsSealedClass = const Template( + "FfiExtendsOrImplementsSealedClass", + problemMessageTemplate: + r"""Class '#name' cannot be extended or implemented.""", + withArgumentsOld: _withArgumentsOldFfiExtendsOrImplementsSealedClass, + withArguments: _withArgumentsFfiExtendsOrImplementsSealedClass, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFfiExtendsOrImplementsSealedClass({ @@ -5209,12 +5639,16 @@ Message _withArgumentsOldFfiExtendsOrImplementsSealedClass(String name) => _withArgumentsFfiExtendsOrImplementsSealedClass(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFfiFieldAnnotation = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeFfiFieldAnnotation = const Template( "FfiFieldAnnotation", problemMessageTemplate: r"""Field '#name' requires exactly one annotation to declare its native type, which cannot be Void. dart:ffi Structs and Unions cannot have regular Dart fields.""", withArgumentsOld: _withArgumentsOldFfiFieldAnnotation, + withArguments: _withArgumentsFfiFieldAnnotation, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5233,17 +5667,21 @@ Message _withArgumentsOldFfiFieldAnnotation(String name) => _withArgumentsFfiFieldAnnotation(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template names)> -codeFfiFieldCyclic = - const Template< - Message Function(String string, String name, List names) - >( - "FfiFieldCyclic", - problemMessageTemplate: - r"""#string '#name' contains itself. Cycle elements: +const Template< + Message Function(String string, String name, List names), + Message Function({ + required String string, + required String name, + required List names, + }) +> +codeFfiFieldCyclic = const Template( + "FfiFieldCyclic", + problemMessageTemplate: r"""#string '#name' contains itself. Cycle elements: #names""", - withArgumentsOld: _withArgumentsOldFfiFieldCyclic, - ); + withArgumentsOld: _withArgumentsOldFfiFieldCyclic, + withArguments: _withArgumentsFfiFieldCyclic, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFfiFieldCyclic({ @@ -5270,14 +5708,18 @@ Message _withArgumentsOldFfiFieldCyclic( ) => _withArgumentsFfiFieldCyclic(string: string, name: name, names: names); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFfiFieldInitializer = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeFfiFieldInitializer = const Template( "FfiFieldInitializer", problemMessageTemplate: r"""Field '#name' is a dart:ffi Pointer to a struct field and therefore cannot be initialized before constructor execution.""", correctionMessageTemplate: r"""Mark the field as external to avoid having to initialize it.""", withArgumentsOld: _withArgumentsOldFfiFieldInitializer, + withArguments: _withArgumentsFfiFieldInitializer, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5298,12 +5740,16 @@ Message _withArgumentsOldFfiFieldInitializer(String name) => _withArgumentsFfiFieldInitializer(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFfiFieldNoAnnotation = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeFfiFieldNoAnnotation = const Template( "FfiFieldNoAnnotation", problemMessageTemplate: r"""Field '#name' requires no annotation to declare its native type, it is a Pointer which is represented by the same type in Dart and native code.""", withArgumentsOld: _withArgumentsOldFfiFieldNoAnnotation, + withArguments: _withArgumentsFfiFieldNoAnnotation, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5322,12 +5768,16 @@ Message _withArgumentsOldFfiFieldNoAnnotation(String name) => _withArgumentsFfiFieldNoAnnotation(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFfiFieldNull = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeFfiFieldNull = const Template( "FfiFieldNull", problemMessageTemplate: r"""Field '#name' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.""", withArgumentsOld: _withArgumentsOldFfiFieldNull, + withArguments: _withArgumentsFfiFieldNull, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5411,14 +5861,17 @@ codeFfiNativeOnlyNativeFieldWrapperClassCanBePointer = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFfiNativeUnexpectedNumberOfParameters = - const Template( - "FfiNativeUnexpectedNumberOfParameters", - problemMessageTemplate: - r"""Unexpected number of Native annotation parameters. Expected #count but has #count2.""", - withArgumentsOld: _withArgumentsOldFfiNativeUnexpectedNumberOfParameters, - ); +const Template< + Message Function(int count, int count2), + Message Function({required int count, required int count2}) +> +codeFfiNativeUnexpectedNumberOfParameters = const Template( + "FfiNativeUnexpectedNumberOfParameters", + problemMessageTemplate: + r"""Unexpected number of Native annotation parameters. Expected #count but has #count2.""", + withArgumentsOld: _withArgumentsOldFfiNativeUnexpectedNumberOfParameters, + withArguments: _withArgumentsFfiNativeUnexpectedNumberOfParameters, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFfiNativeUnexpectedNumberOfParameters({ @@ -5443,15 +5896,19 @@ Message _withArgumentsOldFfiNativeUnexpectedNumberOfParameters( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFfiNativeUnexpectedNumberOfParametersWithReceiver = - const Template( - "FfiNativeUnexpectedNumberOfParametersWithReceiver", - problemMessageTemplate: - r"""Unexpected number of Native annotation parameters. Expected #count but has #count2. Native instance method annotation must have receiver as first argument.""", - withArgumentsOld: - _withArgumentsOldFfiNativeUnexpectedNumberOfParametersWithReceiver, - ); +const Template< + Message Function(int count, int count2), + Message Function({required int count, required int count2}) +> +codeFfiNativeUnexpectedNumberOfParametersWithReceiver = const Template( + "FfiNativeUnexpectedNumberOfParametersWithReceiver", + problemMessageTemplate: + r"""Unexpected number of Native annotation parameters. Expected #count but has #count2. Native instance method annotation must have receiver as first argument.""", + withArgumentsOld: + _withArgumentsOldFfiNativeUnexpectedNumberOfParametersWithReceiver, + withArguments: + _withArgumentsFfiNativeUnexpectedNumberOfParametersWithReceiver, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFfiNativeUnexpectedNumberOfParametersWithReceiver({ @@ -5476,12 +5933,16 @@ Message _withArgumentsOldFfiNativeUnexpectedNumberOfParametersWithReceiver( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFfiNotStatic = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeFfiNotStatic = const Template( "FfiNotStatic", problemMessageTemplate: r"""#name expects a static function as parameter. dart:ffi only supports calling static Dart functions from native code. Closures and tear-offs are not supported because they can capture context.""", withArgumentsOld: _withArgumentsOldFfiNotStatic, + withArguments: _withArgumentsFfiNotStatic, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5500,13 +5961,17 @@ Message _withArgumentsOldFfiNotStatic(String name) => _withArgumentsFfiNotStatic(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeFfiPackedAnnotation = - const Template( - "FfiPackedAnnotation", - problemMessageTemplate: - r"""Struct '#name' must have at most one 'Packed' annotation.""", - withArgumentsOld: _withArgumentsOldFfiPackedAnnotation, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeFfiPackedAnnotation = const Template( + "FfiPackedAnnotation", + problemMessageTemplate: + r"""Struct '#name' must have at most one 'Packed' annotation.""", + withArgumentsOld: _withArgumentsOldFfiPackedAnnotation, + withArguments: _withArgumentsFfiPackedAnnotation, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFfiPackedAnnotation({required String name}) { @@ -5530,13 +5995,17 @@ const MessageCode codeFfiPackedAnnotationAlignment = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeFfiSizeAnnotation = - const Template( - "FfiSizeAnnotation", - problemMessageTemplate: - r"""Field '#name' must have exactly one 'Array' annotation.""", - withArgumentsOld: _withArgumentsOldFfiSizeAnnotation, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeFfiSizeAnnotation = const Template( + "FfiSizeAnnotation", + problemMessageTemplate: + r"""Field '#name' must have exactly one 'Array' annotation.""", + withArgumentsOld: _withArgumentsOldFfiSizeAnnotation, + withArguments: _withArgumentsFfiSizeAnnotation, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFfiSizeAnnotation({required String name}) { @@ -5554,12 +6023,16 @@ Message _withArgumentsOldFfiSizeAnnotation(String name) => _withArgumentsFfiSizeAnnotation(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFfiSizeAnnotationDimensions = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeFfiSizeAnnotationDimensions = const Template( "FfiSizeAnnotationDimensions", problemMessageTemplate: r"""Field '#name' must have an 'Array' annotation that matches the dimensions.""", withArgumentsOld: _withArgumentsOldFfiSizeAnnotationDimensions, + withArguments: _withArgumentsFfiSizeAnnotationDimensions, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5578,13 +6051,16 @@ Message _withArgumentsOldFfiSizeAnnotationDimensions(String name) => _withArgumentsFfiSizeAnnotationDimensions(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFfiStructGeneric = - const Template( - "FfiStructGeneric", - problemMessageTemplate: r"""#string '#name' should not be generic.""", - withArgumentsOld: _withArgumentsOldFfiStructGeneric, - ); +const Template< + Message Function(String string, String name), + Message Function({required String string, required String name}) +> +codeFfiStructGeneric = const Template( + "FfiStructGeneric", + problemMessageTemplate: r"""#string '#name' should not be generic.""", + withArgumentsOld: _withArgumentsOldFfiStructGeneric, + withArguments: _withArgumentsFfiStructGeneric, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFfiStructGeneric({ @@ -5614,17 +6090,18 @@ const MessageCode codeFfiVariableLengthArrayNotLast = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFieldAlreadyInitializedAtDeclaration = - const Template( - "FieldAlreadyInitializedAtDeclaration", - problemMessageTemplate: - r"""'#name' is a final instance variable that was initialized at the declaration.""", - withArgumentsOld: _withArgumentsOldFieldAlreadyInitializedAtDeclaration, - analyzerCodes: [ - "FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION", - ], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeFieldAlreadyInitializedAtDeclaration = const Template( + "FieldAlreadyInitializedAtDeclaration", + problemMessageTemplate: + r"""'#name' is a final instance variable that was initialized at the declaration.""", + withArgumentsOld: _withArgumentsOldFieldAlreadyInitializedAtDeclaration, + withArguments: _withArgumentsFieldAlreadyInitializedAtDeclaration, + analyzerCodes: ["FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFieldAlreadyInitializedAtDeclaration({ @@ -5644,15 +6121,17 @@ Message _withArgumentsOldFieldAlreadyInitializedAtDeclaration(String name) => _withArgumentsFieldAlreadyInitializedAtDeclaration(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFieldAlreadyInitializedAtDeclarationCause = - const Template( - "FieldAlreadyInitializedAtDeclarationCause", - problemMessageTemplate: r"""'#name' was initialized here.""", - withArgumentsOld: - _withArgumentsOldFieldAlreadyInitializedAtDeclarationCause, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeFieldAlreadyInitializedAtDeclarationCause = const Template( + "FieldAlreadyInitializedAtDeclarationCause", + problemMessageTemplate: r"""'#name' was initialized here.""", + withArgumentsOld: _withArgumentsOldFieldAlreadyInitializedAtDeclarationCause, + withArguments: _withArgumentsFieldAlreadyInitializedAtDeclarationCause, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFieldAlreadyInitializedAtDeclarationCause({ @@ -5690,16 +6169,22 @@ const MessageCode codeFieldInitializerOutsideConstructor = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFieldNotPromotedBecauseConflictingField = - const Template( - "FieldNotPromotedBecauseConflictingField", - problemMessageTemplate: - r"""'#name' couldn't be promoted because there is a conflicting non-promotable field in class '#name2'.""", - correctionMessageTemplate: r"""See #string""", - withArgumentsOld: - _withArgumentsOldFieldNotPromotedBecauseConflictingField, - ); +const Template< + Message Function(String name, String name2, String string), + Message Function({ + required String name, + required String name2, + required String string, + }) +> +codeFieldNotPromotedBecauseConflictingField = const Template( + "FieldNotPromotedBecauseConflictingField", + problemMessageTemplate: + r"""'#name' couldn't be promoted because there is a conflicting non-promotable field in class '#name2'.""", + correctionMessageTemplate: r"""See #string""", + withArgumentsOld: _withArgumentsOldFieldNotPromotedBecauseConflictingField, + withArguments: _withArgumentsFieldNotPromotedBecauseConflictingField, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFieldNotPromotedBecauseConflictingField({ @@ -5731,16 +6216,22 @@ Message _withArgumentsOldFieldNotPromotedBecauseConflictingField( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFieldNotPromotedBecauseConflictingGetter = - const Template( - "FieldNotPromotedBecauseConflictingGetter", - problemMessageTemplate: - r"""'#name' couldn't be promoted because there is a conflicting getter in class '#name2'.""", - correctionMessageTemplate: r"""See #string""", - withArgumentsOld: - _withArgumentsOldFieldNotPromotedBecauseConflictingGetter, - ); +const Template< + Message Function(String name, String name2, String string), + Message Function({ + required String name, + required String name2, + required String string, + }) +> +codeFieldNotPromotedBecauseConflictingGetter = const Template( + "FieldNotPromotedBecauseConflictingGetter", + problemMessageTemplate: + r"""'#name' couldn't be promoted because there is a conflicting getter in class '#name2'.""", + correctionMessageTemplate: r"""See #string""", + withArgumentsOld: _withArgumentsOldFieldNotPromotedBecauseConflictingGetter, + withArguments: _withArgumentsFieldNotPromotedBecauseConflictingGetter, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFieldNotPromotedBecauseConflictingGetter({ @@ -5772,16 +6263,23 @@ Message _withArgumentsOldFieldNotPromotedBecauseConflictingGetter( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFieldNotPromotedBecauseConflictingNsmForwarder = - const Template( - "FieldNotPromotedBecauseConflictingNsmForwarder", - problemMessageTemplate: - r"""'#name' couldn't be promoted because there is a conflicting noSuchMethod forwarder in class '#name2'.""", - correctionMessageTemplate: r"""See #string""", - withArgumentsOld: - _withArgumentsOldFieldNotPromotedBecauseConflictingNsmForwarder, - ); +const Template< + Message Function(String name, String name2, String string), + Message Function({ + required String name, + required String name2, + required String string, + }) +> +codeFieldNotPromotedBecauseConflictingNsmForwarder = const Template( + "FieldNotPromotedBecauseConflictingNsmForwarder", + problemMessageTemplate: + r"""'#name' couldn't be promoted because there is a conflicting noSuchMethod forwarder in class '#name2'.""", + correctionMessageTemplate: r"""See #string""", + withArgumentsOld: + _withArgumentsOldFieldNotPromotedBecauseConflictingNsmForwarder, + withArguments: _withArgumentsFieldNotPromotedBecauseConflictingNsmForwarder, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFieldNotPromotedBecauseConflictingNsmForwarder({ @@ -5813,15 +6311,18 @@ Message _withArgumentsOldFieldNotPromotedBecauseConflictingNsmForwarder( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFieldNotPromotedBecauseExternal = - const Template( - "FieldNotPromotedBecauseExternal", - problemMessageTemplate: - r"""'#name' refers to an external field so it couldn't be promoted.""", - correctionMessageTemplate: r"""See #string""", - withArgumentsOld: _withArgumentsOldFieldNotPromotedBecauseExternal, - ); +const Template< + Message Function(String name, String string), + Message Function({required String name, required String string}) +> +codeFieldNotPromotedBecauseExternal = const Template( + "FieldNotPromotedBecauseExternal", + problemMessageTemplate: + r"""'#name' refers to an external field so it couldn't be promoted.""", + correctionMessageTemplate: r"""See #string""", + withArgumentsOld: _withArgumentsOldFieldNotPromotedBecauseExternal, + withArguments: _withArgumentsFieldNotPromotedBecauseExternal, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFieldNotPromotedBecauseExternal({ @@ -5846,15 +6347,18 @@ Message _withArgumentsOldFieldNotPromotedBecauseExternal( ) => _withArgumentsFieldNotPromotedBecauseExternal(name: name, string: string); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFieldNotPromotedBecauseNotEnabled = - const Template( - "FieldNotPromotedBecauseNotEnabled", - problemMessageTemplate: - r"""'#name' couldn't be promoted because field promotion is only available in Dart 3.2 and above.""", - correctionMessageTemplate: r"""See #string""", - withArgumentsOld: _withArgumentsOldFieldNotPromotedBecauseNotEnabled, - ); +const Template< + Message Function(String name, String string), + Message Function({required String name, required String string}) +> +codeFieldNotPromotedBecauseNotEnabled = const Template( + "FieldNotPromotedBecauseNotEnabled", + problemMessageTemplate: + r"""'#name' couldn't be promoted because field promotion is only available in Dart 3.2 and above.""", + correctionMessageTemplate: r"""See #string""", + withArgumentsOld: _withArgumentsOldFieldNotPromotedBecauseNotEnabled, + withArguments: _withArgumentsFieldNotPromotedBecauseNotEnabled, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFieldNotPromotedBecauseNotEnabled({ @@ -5880,15 +6384,18 @@ Message _withArgumentsOldFieldNotPromotedBecauseNotEnabled( _withArgumentsFieldNotPromotedBecauseNotEnabled(name: name, string: string); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFieldNotPromotedBecauseNotField = - const Template( - "FieldNotPromotedBecauseNotField", - problemMessageTemplate: - r"""'#name' refers to a getter so it couldn't be promoted.""", - correctionMessageTemplate: r"""See #string""", - withArgumentsOld: _withArgumentsOldFieldNotPromotedBecauseNotField, - ); +const Template< + Message Function(String name, String string), + Message Function({required String name, required String string}) +> +codeFieldNotPromotedBecauseNotField = const Template( + "FieldNotPromotedBecauseNotField", + problemMessageTemplate: + r"""'#name' refers to a getter so it couldn't be promoted.""", + correctionMessageTemplate: r"""See #string""", + withArgumentsOld: _withArgumentsOldFieldNotPromotedBecauseNotField, + withArguments: _withArgumentsFieldNotPromotedBecauseNotField, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFieldNotPromotedBecauseNotField({ @@ -5913,15 +6420,18 @@ Message _withArgumentsOldFieldNotPromotedBecauseNotField( ) => _withArgumentsFieldNotPromotedBecauseNotField(name: name, string: string); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFieldNotPromotedBecauseNotFinal = - const Template( - "FieldNotPromotedBecauseNotFinal", - problemMessageTemplate: - r"""'#name' refers to a non-final field so it couldn't be promoted.""", - correctionMessageTemplate: r"""See #string""", - withArgumentsOld: _withArgumentsOldFieldNotPromotedBecauseNotFinal, - ); +const Template< + Message Function(String name, String string), + Message Function({required String name, required String string}) +> +codeFieldNotPromotedBecauseNotFinal = const Template( + "FieldNotPromotedBecauseNotFinal", + problemMessageTemplate: + r"""'#name' refers to a non-final field so it couldn't be promoted.""", + correctionMessageTemplate: r"""See #string""", + withArgumentsOld: _withArgumentsOldFieldNotPromotedBecauseNotFinal, + withArguments: _withArgumentsFieldNotPromotedBecauseNotFinal, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFieldNotPromotedBecauseNotFinal({ @@ -5946,15 +6456,18 @@ Message _withArgumentsOldFieldNotPromotedBecauseNotFinal( ) => _withArgumentsFieldNotPromotedBecauseNotFinal(name: name, string: string); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFieldNotPromotedBecauseNotPrivate = - const Template( - "FieldNotPromotedBecauseNotPrivate", - problemMessageTemplate: - r"""'#name' refers to a public property so it couldn't be promoted.""", - correctionMessageTemplate: r"""See #string""", - withArgumentsOld: _withArgumentsOldFieldNotPromotedBecauseNotPrivate, - ); +const Template< + Message Function(String name, String string), + Message Function({required String name, required String string}) +> +codeFieldNotPromotedBecauseNotPrivate = const Template( + "FieldNotPromotedBecauseNotPrivate", + problemMessageTemplate: + r"""'#name' refers to a public property so it couldn't be promoted.""", + correctionMessageTemplate: r"""See #string""", + withArgumentsOld: _withArgumentsOldFieldNotPromotedBecauseNotPrivate, + withArguments: _withArgumentsFieldNotPromotedBecauseNotPrivate, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFieldNotPromotedBecauseNotPrivate({ @@ -6009,15 +6522,18 @@ const MessageCode codeFinalAndVar = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFinalClassExtendedOutsideOfLibrary = - const Template( - "FinalClassExtendedOutsideOfLibrary", - problemMessageTemplate: - r"""The class '#name' can't be extended outside of its library because it's a final class.""", - withArgumentsOld: _withArgumentsOldFinalClassExtendedOutsideOfLibrary, - analyzerCodes: ["FINAL_CLASS_EXTENDED_OUTSIDE_OF_LIBRARY"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeFinalClassExtendedOutsideOfLibrary = const Template( + "FinalClassExtendedOutsideOfLibrary", + problemMessageTemplate: + r"""The class '#name' can't be extended outside of its library because it's a final class.""", + withArgumentsOld: _withArgumentsOldFinalClassExtendedOutsideOfLibrary, + withArguments: _withArgumentsFinalClassExtendedOutsideOfLibrary, + analyzerCodes: ["FINAL_CLASS_EXTENDED_OUTSIDE_OF_LIBRARY"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFinalClassExtendedOutsideOfLibrary({ @@ -6037,15 +6553,18 @@ Message _withArgumentsOldFinalClassExtendedOutsideOfLibrary(String name) => _withArgumentsFinalClassExtendedOutsideOfLibrary(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFinalClassImplementedOutsideOfLibrary = - const Template( - "FinalClassImplementedOutsideOfLibrary", - problemMessageTemplate: - r"""The class '#name' can't be implemented outside of its library because it's a final class.""", - withArgumentsOld: _withArgumentsOldFinalClassImplementedOutsideOfLibrary, - analyzerCodes: ["FINAL_CLASS_IMPLEMENTED_OUTSIDE_OF_LIBRARY"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeFinalClassImplementedOutsideOfLibrary = const Template( + "FinalClassImplementedOutsideOfLibrary", + problemMessageTemplate: + r"""The class '#name' can't be implemented outside of its library because it's a final class.""", + withArgumentsOld: _withArgumentsOldFinalClassImplementedOutsideOfLibrary, + withArguments: _withArgumentsFinalClassImplementedOutsideOfLibrary, + analyzerCodes: ["FINAL_CLASS_IMPLEMENTED_OUTSIDE_OF_LIBRARY"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFinalClassImplementedOutsideOfLibrary({ @@ -6065,18 +6584,21 @@ Message _withArgumentsOldFinalClassImplementedOutsideOfLibrary(String name) => _withArgumentsFinalClassImplementedOutsideOfLibrary(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFinalClassUsedAsMixinConstraintOutsideOfLibrary = - const Template( - "FinalClassUsedAsMixinConstraintOutsideOfLibrary", - problemMessageTemplate: - r"""The class '#name' can't be used as a mixin superclass constraint outside of its library because it's a final class.""", - withArgumentsOld: - _withArgumentsOldFinalClassUsedAsMixinConstraintOutsideOfLibrary, - analyzerCodes: [ - "FINAL_CLASS_USED_AS_MIXIN_CONSTRAINT_OUTSIDE_OF_LIBRARY", - ], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeFinalClassUsedAsMixinConstraintOutsideOfLibrary = const Template( + "FinalClassUsedAsMixinConstraintOutsideOfLibrary", + problemMessageTemplate: + r"""The class '#name' can't be used as a mixin superclass constraint outside of its library because it's a final class.""", + withArgumentsOld: + _withArgumentsOldFinalClassUsedAsMixinConstraintOutsideOfLibrary, + withArguments: _withArgumentsFinalClassUsedAsMixinConstraintOutsideOfLibrary, + analyzerCodes: [ + "FINAL_CLASS_USED_AS_MIXIN_CONSTRAINT_OUTSIDE_OF_LIBRARY", + ], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFinalClassUsedAsMixinConstraintOutsideOfLibrary({ @@ -6105,13 +6627,17 @@ const MessageCode codeFinalEnum = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFinalFieldNotInitialized = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeFinalFieldNotInitialized = const Template( "FinalFieldNotInitialized", problemMessageTemplate: r"""Final field '#name' is not initialized.""", correctionMessageTemplate: r"""Try to initialize the field in the declaration or in every constructor.""", withArgumentsOld: _withArgumentsOldFinalFieldNotInitialized, + withArguments: _withArgumentsFinalFieldNotInitialized, analyzerCodes: ["FINAL_NOT_INITIALIZED"], ); @@ -6132,17 +6658,20 @@ Message _withArgumentsOldFinalFieldNotInitialized(String name) => _withArgumentsFinalFieldNotInitialized(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFinalFieldNotInitializedByConstructor = - const Template( - "FinalFieldNotInitializedByConstructor", - problemMessageTemplate: - r"""Final field '#name' is not initialized by this constructor.""", - correctionMessageTemplate: - r"""Try to initialize the field using an initializing formal or a field initializer.""", - withArgumentsOld: _withArgumentsOldFinalFieldNotInitializedByConstructor, - analyzerCodes: ["FINAL_NOT_INITIALIZED_CONSTRUCTOR_1"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeFinalFieldNotInitializedByConstructor = const Template( + "FinalFieldNotInitializedByConstructor", + problemMessageTemplate: + r"""Final field '#name' is not initialized by this constructor.""", + correctionMessageTemplate: + r"""Try to initialize the field using an initializing formal or a field initializer.""", + withArgumentsOld: _withArgumentsOldFinalFieldNotInitializedByConstructor, + withArguments: _withArgumentsFinalFieldNotInitializedByConstructor, + analyzerCodes: ["FINAL_NOT_INITIALIZED_CONSTRUCTOR_1"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFinalFieldNotInitializedByConstructor({ @@ -6164,16 +6693,20 @@ Message _withArgumentsOldFinalFieldNotInitializedByConstructor(String name) => _withArgumentsFinalFieldNotInitializedByConstructor(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeFinalFieldWithoutInitializer = - const Template( - "FinalFieldWithoutInitializer", - problemMessageTemplate: - r"""The final variable '#name' must be initialized.""", - correctionMessageTemplate: - r"""Try adding an initializer ('= expression') to the declaration.""", - withArgumentsOld: _withArgumentsOldFinalFieldWithoutInitializer, - analyzerCodes: ["FINAL_NOT_INITIALIZED"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeFinalFieldWithoutInitializer = const Template( + "FinalFieldWithoutInitializer", + problemMessageTemplate: + r"""The final variable '#name' must be initialized.""", + correctionMessageTemplate: + r"""Try adding an initializer ('= expression') to the declaration.""", + withArgumentsOld: _withArgumentsOldFinalFieldWithoutInitializer, + withArguments: _withArgumentsFinalFieldWithoutInitializer, + analyzerCodes: ["FINAL_NOT_INITIALIZED"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFinalFieldWithoutInitializer({required String name}) { @@ -6208,14 +6741,18 @@ const MessageCode codeFinalMixinClass = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeFinalNotAssignedError = - const Template( - "FinalNotAssignedError", - problemMessageTemplate: - r"""Final variable '#name' must be assigned before it can be used.""", - withArgumentsOld: _withArgumentsOldFinalNotAssignedError, - analyzerCodes: ["READ_POTENTIALLY_UNASSIGNED_FINAL"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeFinalNotAssignedError = const Template( + "FinalNotAssignedError", + problemMessageTemplate: + r"""Final variable '#name' must be assigned before it can be used.""", + withArgumentsOld: _withArgumentsOldFinalNotAssignedError, + withArguments: _withArgumentsFinalNotAssignedError, + analyzerCodes: ["READ_POTENTIALLY_UNASSIGNED_FINAL"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFinalNotAssignedError({required String name}) { @@ -6233,12 +6770,16 @@ Message _withArgumentsOldFinalNotAssignedError(String name) => _withArgumentsFinalNotAssignedError(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFinalPossiblyAssignedError = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeFinalPossiblyAssignedError = const Template( "FinalPossiblyAssignedError", problemMessageTemplate: r"""Final variable '#name' might already be assigned at this point.""", withArgumentsOld: _withArgumentsOldFinalPossiblyAssignedError, + withArguments: _withArgumentsFinalPossiblyAssignedError, analyzerCodes: ["ASSIGNMENT_TO_FINAL_LOCAL"], ); @@ -6328,13 +6869,17 @@ const MessageCode codeGetterConstructor = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeGetterNotFound = - const Template( - "GetterNotFound", - problemMessageTemplate: r"""Getter not found: '#name'.""", - withArgumentsOld: _withArgumentsOldGetterNotFound, - analyzerCodes: ["UNDEFINED_GETTER"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeGetterNotFound = const Template( + "GetterNotFound", + problemMessageTemplate: r"""Getter not found: '#name'.""", + withArgumentsOld: _withArgumentsOldGetterNotFound, + withArguments: _withArgumentsGetterNotFound, + analyzerCodes: ["UNDEFINED_GETTER"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsGetterNotFound({required String name}) { @@ -6389,13 +6934,17 @@ const MessageCode codeIllegalAsyncReturnType = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeIllegalMixin = - const Template( - "IllegalMixin", - problemMessageTemplate: r"""The type '#name' can't be mixed in.""", - withArgumentsOld: _withArgumentsOldIllegalMixin, - analyzerCodes: ["ILLEGAL_MIXIN"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeIllegalMixin = const Template( + "IllegalMixin", + problemMessageTemplate: r"""The type '#name' can't be mixed in.""", + withArgumentsOld: _withArgumentsOldIllegalMixin, + withArguments: _withArgumentsIllegalMixin, + analyzerCodes: ["ILLEGAL_MIXIN"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsIllegalMixin({required String name}) { @@ -6412,15 +6961,18 @@ Message _withArgumentsOldIllegalMixin(String name) => _withArgumentsIllegalMixin(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeIllegalMixinDueToConstructors = - const Template( - "IllegalMixinDueToConstructors", - problemMessageTemplate: - r"""Can't use '#name' as a mixin because it has constructors.""", - withArgumentsOld: _withArgumentsOldIllegalMixinDueToConstructors, - analyzerCodes: ["MIXIN_DECLARES_CONSTRUCTOR"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeIllegalMixinDueToConstructors = const Template( + "IllegalMixinDueToConstructors", + problemMessageTemplate: + r"""Can't use '#name' as a mixin because it has constructors.""", + withArgumentsOld: _withArgumentsOldIllegalMixinDueToConstructors, + withArguments: _withArgumentsIllegalMixinDueToConstructors, + analyzerCodes: ["MIXIN_DECLARES_CONSTRUCTOR"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsIllegalMixinDueToConstructors({required String name}) { @@ -6438,15 +6990,18 @@ Message _withArgumentsOldIllegalMixinDueToConstructors(String name) => _withArgumentsIllegalMixinDueToConstructors(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeIllegalMixinDueToConstructorsCause = - const Template( - "IllegalMixinDueToConstructorsCause", - problemMessageTemplate: - r"""This constructor prevents using '#name' as a mixin.""", - withArgumentsOld: _withArgumentsOldIllegalMixinDueToConstructorsCause, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeIllegalMixinDueToConstructorsCause = const Template( + "IllegalMixinDueToConstructorsCause", + problemMessageTemplate: + r"""This constructor prevents using '#name' as a mixin.""", + withArgumentsOld: _withArgumentsOldIllegalMixinDueToConstructorsCause, + withArguments: _withArgumentsIllegalMixinDueToConstructorsCause, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsIllegalMixinDueToConstructorsCause({ @@ -6466,16 +7021,19 @@ Message _withArgumentsOldIllegalMixinDueToConstructorsCause(String name) => _withArgumentsIllegalMixinDueToConstructorsCause(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeIllegalPatternAssignmentVariableName = - const Template( - "IllegalPatternAssignmentVariableName", - problemMessageTemplate: - r"""A variable assigned by a pattern assignment can't be named '#lexeme'.""", - correctionMessageTemplate: r"""Choose a different name.""", - withArgumentsOld: _withArgumentsOldIllegalPatternAssignmentVariableName, - index: 160, - ); +const Template< + Message Function(Token lexeme), + Message Function({required Token lexeme}) +> +codeIllegalPatternAssignmentVariableName = const Template( + "IllegalPatternAssignmentVariableName", + problemMessageTemplate: + r"""A variable assigned by a pattern assignment can't be named '#lexeme'.""", + correctionMessageTemplate: r"""Choose a different name.""", + withArgumentsOld: _withArgumentsOldIllegalPatternAssignmentVariableName, + withArguments: _withArgumentsIllegalPatternAssignmentVariableName, + index: 160, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsIllegalPatternAssignmentVariableName({ @@ -6496,16 +7054,19 @@ Message _withArgumentsOldIllegalPatternAssignmentVariableName(Token lexeme) => _withArgumentsIllegalPatternAssignmentVariableName(lexeme: lexeme); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeIllegalPatternIdentifierName = - const Template( - "IllegalPatternIdentifierName", - problemMessageTemplate: - r"""A pattern can't refer to an identifier named '#lexeme'.""", - correctionMessageTemplate: r"""Match the identifier using '==""", - withArgumentsOld: _withArgumentsOldIllegalPatternIdentifierName, - index: 161, - ); +const Template< + Message Function(Token lexeme), + Message Function({required Token lexeme}) +> +codeIllegalPatternIdentifierName = const Template( + "IllegalPatternIdentifierName", + problemMessageTemplate: + r"""A pattern can't refer to an identifier named '#lexeme'.""", + correctionMessageTemplate: r"""Match the identifier using '==""", + withArgumentsOld: _withArgumentsOldIllegalPatternIdentifierName, + withArguments: _withArgumentsIllegalPatternIdentifierName, + index: 161, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsIllegalPatternIdentifierName({required Token lexeme}) { @@ -6524,13 +7085,17 @@ Message _withArgumentsOldIllegalPatternIdentifierName(Token lexeme) => _withArgumentsIllegalPatternIdentifierName(lexeme: lexeme); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeIllegalPatternVariableName = const Template( +const Template< + Message Function(Token lexeme), + Message Function({required Token lexeme}) +> +codeIllegalPatternVariableName = const Template( "IllegalPatternVariableName", problemMessageTemplate: r"""The variable declared by a variable pattern can't be named '#lexeme'.""", correctionMessageTemplate: r"""Choose a different name.""", withArgumentsOld: _withArgumentsOldIllegalPatternVariableName, + withArguments: _withArgumentsIllegalPatternVariableName, index: 159, ); @@ -6566,16 +7131,19 @@ const MessageCode codeIllegalSyncGeneratorVoidReturnType = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeImplementMultipleExtensionTypeMembers = - const Template( - "ImplementMultipleExtensionTypeMembers", - problemMessageTemplate: - r"""The extension type '#name' can't inherit the member '#name2' from more than one extension type.""", - correctionMessageTemplate: - r"""Try declaring a member '#name2' in '#name' to resolve the conflict.""", - withArgumentsOld: _withArgumentsOldImplementMultipleExtensionTypeMembers, - ); +const Template< + Message Function(String name, String name2), + Message Function({required String name, required String name2}) +> +codeImplementMultipleExtensionTypeMembers = const Template( + "ImplementMultipleExtensionTypeMembers", + problemMessageTemplate: + r"""The extension type '#name' can't inherit the member '#name2' from more than one extension type.""", + correctionMessageTemplate: + r"""Try declaring a member '#name2' in '#name' to resolve the conflict.""", + withArgumentsOld: _withArgumentsOldImplementMultipleExtensionTypeMembers, + withArguments: _withArgumentsImplementMultipleExtensionTypeMembers, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsImplementMultipleExtensionTypeMembers({ @@ -6604,17 +7172,20 @@ Message _withArgumentsOldImplementMultipleExtensionTypeMembers( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeImplementNonExtensionTypeAndExtensionTypeMember = - const Template( - "ImplementNonExtensionTypeAndExtensionTypeMember", - problemMessageTemplate: - r"""The extension type '#name' can't inherit the member '#name2' as both an extension type member and a non-extension type member.""", - correctionMessageTemplate: - r"""Try declaring a member '#name2' in '#name' to resolve the conflict.""", - withArgumentsOld: - _withArgumentsOldImplementNonExtensionTypeAndExtensionTypeMember, - ); +const Template< + Message Function(String name, String name2), + Message Function({required String name, required String name2}) +> +codeImplementNonExtensionTypeAndExtensionTypeMember = const Template( + "ImplementNonExtensionTypeAndExtensionTypeMember", + problemMessageTemplate: + r"""The extension type '#name' can't inherit the member '#name2' as both an extension type member and a non-extension type member.""", + correctionMessageTemplate: + r"""Try declaring a member '#name2' in '#name' to resolve the conflict.""", + withArgumentsOld: + _withArgumentsOldImplementNonExtensionTypeAndExtensionTypeMember, + withArguments: _withArgumentsImplementNonExtensionTypeAndExtensionTypeMember, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsImplementNonExtensionTypeAndExtensionTypeMember({ @@ -6685,15 +7256,18 @@ const MessageCode codeImplementsNever = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeImplementsRepeated = - const Template( - "ImplementsRepeated", - problemMessageTemplate: r"""'#name' can only be implemented once.""", - correctionMessageTemplate: r"""Try removing #count of the occurrences.""", - withArgumentsOld: _withArgumentsOldImplementsRepeated, - analyzerCodes: ["IMPLEMENTS_REPEATED"], - ); +const Template< + Message Function(String name, int count), + Message Function({required String name, required int count}) +> +codeImplementsRepeated = const Template( + "ImplementsRepeated", + problemMessageTemplate: r"""'#name' can only be implemented once.""", + correctionMessageTemplate: r"""Try removing #count of the occurrences.""", + withArgumentsOld: _withArgumentsOldImplementsRepeated, + withArguments: _withArgumentsImplementsRepeated, + analyzerCodes: ["IMPLEMENTS_REPEATED"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsImplementsRepeated({ @@ -6714,13 +7288,17 @@ Message _withArgumentsOldImplementsRepeated(String name, int count) => _withArgumentsImplementsRepeated(name: name, count: count); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeImplementsSuperClass = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeImplementsSuperClass = const Template( "ImplementsSuperClass", problemMessageTemplate: r"""'#name' can't be used in both 'extends' and 'implements' clauses.""", correctionMessageTemplate: r"""Try removing one of the occurrences.""", withArgumentsOld: _withArgumentsOldImplementsSuperClass, + withArguments: _withArgumentsImplementsSuperClass, analyzerCodes: ["IMPLEMENTS_SUPER_CLASS"], ); @@ -6741,14 +7319,21 @@ Message _withArgumentsOldImplementsSuperClass(String name) => _withArgumentsImplementsSuperClass(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeImplicitMixinOverride = - const Template( - "ImplicitMixinOverride", - problemMessageTemplate: - r"""Applying the mixin '#name' to '#name2' introduces an erroneous override of '#name3'.""", - withArgumentsOld: _withArgumentsOldImplicitMixinOverride, - ); +const Template< + Message Function(String name, String name2, String name3), + Message Function({ + required String name, + required String name2, + required String name3, + }) +> +codeImplicitMixinOverride = const Template( + "ImplicitMixinOverride", + problemMessageTemplate: + r"""Applying the mixin '#name' to '#name2' introduces an erroneous override of '#name3'.""", + withArgumentsOld: _withArgumentsOldImplicitMixinOverride, + withArguments: _withArgumentsImplicitMixinOverride, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsImplicitMixinOverride({ @@ -6786,18 +7371,20 @@ const MessageCode codeImplicitSuperCallOfNonMethod = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeImplicitSuperInitializerMissingArguments = - const Template( - "ImplicitSuperInitializerMissingArguments", - problemMessageTemplate: - r"""The implicitly called unnamed constructor from '#name' has required parameters.""", - correctionMessageTemplate: - r"""Try adding an explicit super initializer with the required arguments.""", - withArgumentsOld: - _withArgumentsOldImplicitSuperInitializerMissingArguments, - analyzerCodes: ["IMPLICIT_SUPER_INITIALIZER_MISSING_ARGUMENTS"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeImplicitSuperInitializerMissingArguments = const Template( + "ImplicitSuperInitializerMissingArguments", + problemMessageTemplate: + r"""The implicitly called unnamed constructor from '#name' has required parameters.""", + correctionMessageTemplate: + r"""Try adding an explicit super initializer with the required arguments.""", + withArgumentsOld: _withArgumentsOldImplicitSuperInitializerMissingArguments, + withArguments: _withArgumentsImplicitSuperInitializerMissingArguments, + analyzerCodes: ["IMPLICIT_SUPER_INITIALIZER_MISSING_ARGUMENTS"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsImplicitSuperInitializerMissingArguments({ @@ -6829,20 +7416,27 @@ const MessageCode codeImportAfterPart = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeImportChainContext = - const Template( - "ImportChainContext", - problemMessageTemplate: - r"""The unavailable library '#uri' is imported through these packages: +const Template< + Message Function(Uri uri, String string, String string2), + Message Function({ + required Uri uri, + required String string, + required String string2, + }) +> +codeImportChainContext = const Template( + "ImportChainContext", + problemMessageTemplate: + r"""The unavailable library '#uri' is imported through these packages: #string Detailed import paths for (some of) the these imports: #string2""", - withArgumentsOld: _withArgumentsOldImportChainContext, - severity: CfeSeverity.context, - ); + withArgumentsOld: _withArgumentsOldImportChainContext, + withArguments: _withArgumentsImportChainContext, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsImportChainContext({ @@ -6878,17 +7472,20 @@ Message _withArgumentsOldImportChainContext( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeImportChainContextSimple = - const Template( - "ImportChainContextSimple", - problemMessageTemplate: - r"""The unavailable library '#uri' is imported through these paths: +const Template< + Message Function(Uri uri, String string), + Message Function({required Uri uri, required String string}) +> +codeImportChainContextSimple = const Template( + "ImportChainContextSimple", + problemMessageTemplate: + r"""The unavailable library '#uri' is imported through these paths: #string""", - withArgumentsOld: _withArgumentsOldImportChainContextSimple, - severity: CfeSeverity.context, - ); + withArgumentsOld: _withArgumentsOldImportChainContextSimple, + withArguments: _withArgumentsImportChainContextSimple, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsImportChainContextSimple({ @@ -6920,14 +7517,17 @@ const MessageCode codeIncorrectTypeArgumentVariable = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeIncrementalCompilerIllegalParameter = - const Template( - "IncrementalCompilerIllegalParameter", - problemMessageTemplate: - r"""Illegal parameter name '#string' found during expression compilation.""", - withArgumentsOld: _withArgumentsOldIncrementalCompilerIllegalParameter, - ); +const Template< + Message Function(String string), + Message Function({required String string}) +> +codeIncrementalCompilerIllegalParameter = const Template( + "IncrementalCompilerIllegalParameter", + problemMessageTemplate: + r"""Illegal parameter name '#string' found during expression compilation.""", + withArgumentsOld: _withArgumentsOldIncrementalCompilerIllegalParameter, + withArguments: _withArgumentsIncrementalCompilerIllegalParameter, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsIncrementalCompilerIllegalParameter({ @@ -6947,15 +7547,17 @@ Message _withArgumentsOldIncrementalCompilerIllegalParameter(String string) => _withArgumentsIncrementalCompilerIllegalParameter(string: string); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeIncrementalCompilerIllegalTypeParameter = - const Template( - "IncrementalCompilerIllegalTypeParameter", - problemMessageTemplate: - r"""Illegal type parameter name '#string' found during expression compilation.""", - withArgumentsOld: - _withArgumentsOldIncrementalCompilerIllegalTypeParameter, - ); +const Template< + Message Function(String string), + Message Function({required String string}) +> +codeIncrementalCompilerIllegalTypeParameter = const Template( + "IncrementalCompilerIllegalTypeParameter", + problemMessageTemplate: + r"""Illegal type parameter name '#string' found during expression compilation.""", + withArgumentsOld: _withArgumentsOldIncrementalCompilerIllegalTypeParameter, + withArguments: _withArgumentsIncrementalCompilerIllegalTypeParameter, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsIncrementalCompilerIllegalTypeParameter({ @@ -6997,16 +7599,18 @@ const MessageCode codeInheritedMembersConflictCause2 = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInheritedRestrictedMemberOfEnumImplementer = - const Template( - "InheritedRestrictedMemberOfEnumImplementer", - problemMessageTemplate: - r"""A concrete instance member named '#name' can't be inherited from '#name2' in a class that implements 'Enum'.""", - withArgumentsOld: - _withArgumentsOldInheritedRestrictedMemberOfEnumImplementer, - analyzerCodes: ["ILLEGAL_CONCRETE_ENUM_MEMBER"], - ); +const Template< + Message Function(String name, String name2), + Message Function({required String name, required String name2}) +> +codeInheritedRestrictedMemberOfEnumImplementer = const Template( + "InheritedRestrictedMemberOfEnumImplementer", + problemMessageTemplate: + r"""A concrete instance member named '#name' can't be inherited from '#name2' in a class that implements 'Enum'.""", + withArgumentsOld: _withArgumentsOldInheritedRestrictedMemberOfEnumImplementer, + withArguments: _withArgumentsInheritedRestrictedMemberOfEnumImplementer, + analyzerCodes: ["ILLEGAL_CONCRETE_ENUM_MEMBER"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInheritedRestrictedMemberOfEnumImplementer({ @@ -7033,19 +7637,22 @@ Message _withArgumentsOldInheritedRestrictedMemberOfEnumImplementer( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInitializeFromDillNotSelfContained = - const Template( - "InitializeFromDillNotSelfContained", - problemMessageTemplate: - r"""Tried to initialize from a previous compilation (#string), but the file was not self-contained. This might be a bug. +const Template< + Message Function(String string, Uri uri), + Message Function({required String string, required Uri uri}) +> +codeInitializeFromDillNotSelfContained = const Template( + "InitializeFromDillNotSelfContained", + problemMessageTemplate: + r"""Tried to initialize from a previous compilation (#string), but the file was not self-contained. This might be a bug. The Dart team would greatly appreciate it if you would take a moment to report this problem at http://dartbug.com/new. If you are comfortable with it, it would improve the chances of fixing any bug if you included the file #uri in your error report, but be aware that this file includes your source code. Either way, you should probably delete the file so it doesn't use unnecessary disk space.""", - withArgumentsOld: _withArgumentsOldInitializeFromDillNotSelfContained, - severity: CfeSeverity.warning, - ); + withArgumentsOld: _withArgumentsOldInitializeFromDillNotSelfContained, + withArguments: _withArgumentsInitializeFromDillNotSelfContained, + severity: CfeSeverity.warning, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInitializeFromDillNotSelfContained({ @@ -7073,18 +7680,20 @@ Message _withArgumentsOldInitializeFromDillNotSelfContained( ) => _withArgumentsInitializeFromDillNotSelfContained(string: string, uri: uri); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInitializeFromDillNotSelfContainedNoDump = - const Template( - "InitializeFromDillNotSelfContainedNoDump", - problemMessageTemplate: - r"""Tried to initialize from a previous compilation (#string), but the file was not self-contained. This might be a bug. +const Template< + Message Function(String string), + Message Function({required String string}) +> +codeInitializeFromDillNotSelfContainedNoDump = const Template( + "InitializeFromDillNotSelfContainedNoDump", + problemMessageTemplate: + r"""Tried to initialize from a previous compilation (#string), but the file was not self-contained. This might be a bug. The Dart team would greatly appreciate it if you would take a moment to report this problem at http://dartbug.com/new.""", - withArgumentsOld: - _withArgumentsOldInitializeFromDillNotSelfContainedNoDump, - severity: CfeSeverity.warning, - ); + withArgumentsOld: _withArgumentsOldInitializeFromDillNotSelfContainedNoDump, + withArguments: _withArgumentsInitializeFromDillNotSelfContainedNoDump, + severity: CfeSeverity.warning, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInitializeFromDillNotSelfContainedNoDump({ @@ -7108,15 +7717,18 @@ Message _withArgumentsOldInitializeFromDillNotSelfContainedNoDump( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(String string, String string2, String string3, Uri uri) + Message Function(String string, String string2, String string3, Uri uri), + Message Function({ + required String string, + required String string2, + required String string3, + required Uri uri, + }) > -codeInitializeFromDillUnknownProblem = - const Template< - Message Function(String string, String string2, String string3, Uri uri) - >( - "InitializeFromDillUnknownProblem", - problemMessageTemplate: - r"""Tried to initialize from a previous compilation (#string), but couldn't. +codeInitializeFromDillUnknownProblem = const Template( + "InitializeFromDillUnknownProblem", + problemMessageTemplate: + r"""Tried to initialize from a previous compilation (#string), but couldn't. Error message was '#string2'. Stacktrace included '#string3'. This might be a bug. @@ -7124,9 +7736,10 @@ This might be a bug. The Dart team would greatly appreciate it if you would take a moment to report this problem at http://dartbug.com/new. If you are comfortable with it, it would improve the chances of fixing any bug if you included the file #uri in your error report, but be aware that this file includes your source code. Either way, you should probably delete the file so it doesn't use unnecessary disk space.""", - withArgumentsOld: _withArgumentsOldInitializeFromDillUnknownProblem, - severity: CfeSeverity.warning, - ); + withArgumentsOld: _withArgumentsOldInitializeFromDillUnknownProblem, + withArguments: _withArgumentsInitializeFromDillUnknownProblem, + severity: CfeSeverity.warning, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInitializeFromDillUnknownProblem({ @@ -7173,22 +7786,27 @@ Message _withArgumentsOldInitializeFromDillUnknownProblem( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInitializeFromDillUnknownProblemNoDump = - const Template< - Message Function(String string, String string2, String string3) - >( - "InitializeFromDillUnknownProblemNoDump", - problemMessageTemplate: - r"""Tried to initialize from a previous compilation (#string), but couldn't. +const Template< + Message Function(String string, String string2, String string3), + Message Function({ + required String string, + required String string2, + required String string3, + }) +> +codeInitializeFromDillUnknownProblemNoDump = const Template( + "InitializeFromDillUnknownProblemNoDump", + problemMessageTemplate: + r"""Tried to initialize from a previous compilation (#string), but couldn't. Error message was '#string2'. Stacktrace included '#string3'. This might be a bug. The Dart team would greatly appreciate it if you would take a moment to report this problem at http://dartbug.com/new.""", - withArgumentsOld: _withArgumentsOldInitializeFromDillUnknownProblemNoDump, - severity: CfeSeverity.warning, - ); + withArgumentsOld: _withArgumentsOldInitializeFromDillUnknownProblemNoDump, + withArguments: _withArgumentsInitializeFromDillUnknownProblemNoDump, + severity: CfeSeverity.warning, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInitializeFromDillUnknownProblemNoDump({ @@ -7234,14 +7852,17 @@ const MessageCode codeInitializedVariableInForEach = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeInitializerForStaticField = - const Template( - "InitializerForStaticField", - problemMessageTemplate: - r"""'#name' isn't an instance field of this class.""", - withArgumentsOld: _withArgumentsOldInitializerForStaticField, - analyzerCodes: ["INITIALIZER_FOR_STATIC_FIELD"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeInitializerForStaticField = const Template( + "InitializerForStaticField", + problemMessageTemplate: r"""'#name' isn't an instance field of this class.""", + withArgumentsOld: _withArgumentsOldInitializerForStaticField, + withArguments: _withArgumentsInitializerForStaticField, + analyzerCodes: ["INITIALIZER_FOR_STATIC_FIELD"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInitializerForStaticField({required String name}) { @@ -7265,12 +7886,13 @@ const MessageCode codeInitializingFormalTypeMismatchField = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeInputFileNotFound = - const Template( - "InputFileNotFound", - problemMessageTemplate: r"""Input file not found: #uri.""", - withArgumentsOld: _withArgumentsOldInputFileNotFound, - ); +const Template +codeInputFileNotFound = const Template( + "InputFileNotFound", + problemMessageTemplate: r"""Input file not found: #uri.""", + withArgumentsOld: _withArgumentsOldInputFileNotFound, + withArguments: _withArgumentsInputFileNotFound, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInputFileNotFound({required Uri uri}) { @@ -7287,15 +7909,18 @@ Message _withArgumentsOldInputFileNotFound(Uri uri) => _withArgumentsInputFileNotFound(uri: uri); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInstanceAndSynthesizedStaticConflict = - const Template( - "InstanceAndSynthesizedStaticConflict", - problemMessageTemplate: - r"""This instance member conflicts with the synthesized static member called '#name'.""", - withArgumentsOld: _withArgumentsOldInstanceAndSynthesizedStaticConflict, - analyzerCodes: ["CONFLICTING_STATIC_AND_INSTANCE"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeInstanceAndSynthesizedStaticConflict = const Template( + "InstanceAndSynthesizedStaticConflict", + problemMessageTemplate: + r"""This instance member conflicts with the synthesized static member called '#name'.""", + withArgumentsOld: _withArgumentsOldInstanceAndSynthesizedStaticConflict, + withArguments: _withArgumentsInstanceAndSynthesizedStaticConflict, + analyzerCodes: ["CONFLICTING_STATIC_AND_INSTANCE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInstanceAndSynthesizedStaticConflict({ @@ -7315,12 +7940,16 @@ Message _withArgumentsOldInstanceAndSynthesizedStaticConflict(String name) => _withArgumentsInstanceAndSynthesizedStaticConflict(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInstanceConflictsWithStatic = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeInstanceConflictsWithStatic = const Template( "InstanceConflictsWithStatic", problemMessageTemplate: r"""Instance property '#name' conflicts with static property of the same name.""", withArgumentsOld: _withArgumentsOldInstanceConflictsWithStatic, + withArguments: _withArgumentsInstanceConflictsWithStatic, analyzerCodes: ["CONFLICTS_WITH_MEMBER"], ); @@ -7340,14 +7969,17 @@ Message _withArgumentsOldInstanceConflictsWithStatic(String name) => _withArgumentsInstanceConflictsWithStatic(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInstanceConflictsWithStaticCause = - const Template( - "InstanceConflictsWithStaticCause", - problemMessageTemplate: r"""Conflicting static property '#name'.""", - withArgumentsOld: _withArgumentsOldInstanceConflictsWithStaticCause, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeInstanceConflictsWithStaticCause = const Template( + "InstanceConflictsWithStaticCause", + problemMessageTemplate: r"""Conflicting static property '#name'.""", + withArgumentsOld: _withArgumentsOldInstanceConflictsWithStaticCause, + withArguments: _withArgumentsInstanceConflictsWithStaticCause, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInstanceConflictsWithStaticCause({required String name}) { @@ -7364,15 +7996,18 @@ Message _withArgumentsOldInstanceConflictsWithStaticCause(String name) => _withArgumentsInstanceConflictsWithStaticCause(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInstantiationTooFewArguments = - const Template( - "InstantiationTooFewArguments", - problemMessageTemplate: - r"""Too few type arguments: #count required, #count2 given.""", - correctionMessageTemplate: r"""Try adding the missing type arguments.""", - withArgumentsOld: _withArgumentsOldInstantiationTooFewArguments, - ); +const Template< + Message Function(int count, int count2), + Message Function({required int count, required int count2}) +> +codeInstantiationTooFewArguments = const Template( + "InstantiationTooFewArguments", + problemMessageTemplate: + r"""Too few type arguments: #count required, #count2 given.""", + correctionMessageTemplate: r"""Try adding the missing type arguments.""", + withArgumentsOld: _withArgumentsOldInstantiationTooFewArguments, + withArguments: _withArgumentsInstantiationTooFewArguments, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInstantiationTooFewArguments({ @@ -7393,15 +8028,18 @@ Message _withArgumentsOldInstantiationTooFewArguments(int count, int count2) => _withArgumentsInstantiationTooFewArguments(count: count, count2: count2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInstantiationTooManyArguments = - const Template( - "InstantiationTooManyArguments", - problemMessageTemplate: - r"""Too many type arguments: #count allowed, but #count2 found.""", - correctionMessageTemplate: r"""Try removing the extra type arguments.""", - withArgumentsOld: _withArgumentsOldInstantiationTooManyArguments, - ); +const Template< + Message Function(int count, int count2), + Message Function({required int count, required int count2}) +> +codeInstantiationTooManyArguments = const Template( + "InstantiationTooManyArguments", + problemMessageTemplate: + r"""Too many type arguments: #count allowed, but #count2 found.""", + correctionMessageTemplate: r"""Try removing the extra type arguments.""", + withArgumentsOld: _withArgumentsOldInstantiationTooManyArguments, + withArguments: _withArgumentsInstantiationTooManyArguments, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInstantiationTooManyArguments({ @@ -7422,14 +8060,18 @@ Message _withArgumentsOldInstantiationTooManyArguments(int count, int count2) => _withArgumentsInstantiationTooManyArguments(count: count, count2: count2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeIntegerLiteralIsOutOfRange = const Template( +const Template< + Message Function(String string), + Message Function({required String string}) +> +codeIntegerLiteralIsOutOfRange = const Template( "IntegerLiteralIsOutOfRange", problemMessageTemplate: r"""The integer literal #string can't be represented in 64 bits.""", correctionMessageTemplate: r"""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.""", withArgumentsOld: _withArgumentsOldIntegerLiteralIsOutOfRange, + withArguments: _withArgumentsIntegerLiteralIsOutOfRange, analyzerCodes: ["INTEGER_LITERAL_OUT_OF_RANGE"], ); @@ -7451,12 +8093,16 @@ Message _withArgumentsOldIntegerLiteralIsOutOfRange(String string) => _withArgumentsIntegerLiteralIsOutOfRange(string: string); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInterfaceCheck = const Template( +const Template< + Message Function(String name, String name2), + Message Function({required String name, required String name2}) +> +codeInterfaceCheck = const Template( "InterfaceCheck", problemMessageTemplate: r"""The implementation of '#name' in the non-abstract class '#name2' does not conform to its interface.""", withArgumentsOld: _withArgumentsOldInterfaceCheck, + withArguments: _withArgumentsInterfaceCheck, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -7479,15 +8125,18 @@ Message _withArgumentsOldInterfaceCheck(String name, String name2) => _withArgumentsInterfaceCheck(name: name, name2: name2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInterfaceClassExtendedOutsideOfLibrary = - const Template( - "InterfaceClassExtendedOutsideOfLibrary", - problemMessageTemplate: - r"""The class '#name' can't be extended outside of its library because it's an interface class.""", - withArgumentsOld: _withArgumentsOldInterfaceClassExtendedOutsideOfLibrary, - analyzerCodes: ["INTERFACE_CLASS_EXTENDED_OUTSIDE_OF_LIBRARY"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeInterfaceClassExtendedOutsideOfLibrary = const Template( + "InterfaceClassExtendedOutsideOfLibrary", + problemMessageTemplate: + r"""The class '#name' can't be extended outside of its library because it's an interface class.""", + withArgumentsOld: _withArgumentsOldInterfaceClassExtendedOutsideOfLibrary, + withArguments: _withArgumentsInterfaceClassExtendedOutsideOfLibrary, + analyzerCodes: ["INTERFACE_CLASS_EXTENDED_OUTSIDE_OF_LIBRARY"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInterfaceClassExtendedOutsideOfLibrary({ @@ -7546,14 +8195,17 @@ const MessageCode codeInternalProblemBodyOnAbstractMethod = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInternalProblemConstructorNotFound = - const Template( - "InternalProblemConstructorNotFound", - problemMessageTemplate: r"""No constructor named '#name' in '#uri'.""", - withArgumentsOld: _withArgumentsOldInternalProblemConstructorNotFound, - severity: CfeSeverity.internalProblem, - ); +const Template< + Message Function(String name, Uri uri), + Message Function({required String name, required Uri uri}) +> +codeInternalProblemConstructorNotFound = const Template( + "InternalProblemConstructorNotFound", + problemMessageTemplate: r"""No constructor named '#name' in '#uri'.""", + withArgumentsOld: _withArgumentsOldInternalProblemConstructorNotFound, + withArguments: _withArgumentsInternalProblemConstructorNotFound, + severity: CfeSeverity.internalProblem, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInternalProblemConstructorNotFound({ @@ -7576,15 +8228,18 @@ Message _withArgumentsOldInternalProblemConstructorNotFound( ) => _withArgumentsInternalProblemConstructorNotFound(name: name, uri: uri); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInternalProblemContextSeverity = - const Template( - "InternalProblemContextSeverity", - problemMessageTemplate: - r"""Non-context message has context severity: #string""", - withArgumentsOld: _withArgumentsOldInternalProblemContextSeverity, - severity: CfeSeverity.internalProblem, - ); +const Template< + Message Function(String string), + Message Function({required String string}) +> +codeInternalProblemContextSeverity = const Template( + "InternalProblemContextSeverity", + problemMessageTemplate: + r"""Non-context message has context severity: #string""", + withArgumentsOld: _withArgumentsOldInternalProblemContextSeverity, + withArguments: _withArgumentsInternalProblemContextSeverity, + severity: CfeSeverity.internalProblem, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInternalProblemContextSeverity({required String string}) { @@ -7601,15 +8256,18 @@ Message _withArgumentsOldInternalProblemContextSeverity(String string) => _withArgumentsInternalProblemContextSeverity(string: string); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInternalProblemDebugAbort = - const Template( - "InternalProblemDebugAbort", - problemMessageTemplate: r"""Compilation aborted due to fatal '#name' at: +const Template< + Message Function(String name, String string), + Message Function({required String name, required String string}) +> +codeInternalProblemDebugAbort = const Template( + "InternalProblemDebugAbort", + problemMessageTemplate: r"""Compilation aborted due to fatal '#name' at: #string""", - withArgumentsOld: _withArgumentsOldInternalProblemDebugAbort, - severity: CfeSeverity.internalProblem, - ); + withArgumentsOld: _withArgumentsOldInternalProblemDebugAbort, + withArguments: _withArgumentsInternalProblemDebugAbort, + severity: CfeSeverity.internalProblem, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInternalProblemDebugAbort({ @@ -7659,13 +8317,17 @@ const MessageCode codeInternalProblemMissingContext = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeInternalProblemNotFound = - const Template( - "InternalProblemNotFound", - problemMessageTemplate: r"""Couldn't find '#name'.""", - withArgumentsOld: _withArgumentsOldInternalProblemNotFound, - severity: CfeSeverity.internalProblem, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeInternalProblemNotFound = const Template( + "InternalProblemNotFound", + problemMessageTemplate: r"""Couldn't find '#name'.""", + withArgumentsOld: _withArgumentsOldInternalProblemNotFound, + withArguments: _withArgumentsInternalProblemNotFound, + severity: CfeSeverity.internalProblem, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInternalProblemNotFound({required String name}) { @@ -7682,14 +8344,17 @@ Message _withArgumentsOldInternalProblemNotFound(String name) => _withArgumentsInternalProblemNotFound(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInternalProblemNotFoundIn = - const Template( - "InternalProblemNotFoundIn", - problemMessageTemplate: r"""Couldn't find '#name' in '#name2'.""", - withArgumentsOld: _withArgumentsOldInternalProblemNotFoundIn, - severity: CfeSeverity.internalProblem, - ); +const Template< + Message Function(String name, String name2), + Message Function({required String name, required String name2}) +> +codeInternalProblemNotFoundIn = const Template( + "InternalProblemNotFoundIn", + problemMessageTemplate: r"""Couldn't find '#name' in '#name2'.""", + withArgumentsOld: _withArgumentsOldInternalProblemNotFoundIn, + withArguments: _withArgumentsInternalProblemNotFoundIn, + severity: CfeSeverity.internalProblem, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInternalProblemNotFoundIn({ @@ -7726,15 +8391,17 @@ const MessageCode codeInternalProblemPreviousTokenNotFound = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInternalProblemPrivateConstructorAccess = - const Template( - "InternalProblemPrivateConstructorAccess", - problemMessageTemplate: r"""Can't access private constructor '#name'.""", - withArgumentsOld: - _withArgumentsOldInternalProblemPrivateConstructorAccess, - severity: CfeSeverity.internalProblem, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeInternalProblemPrivateConstructorAccess = const Template( + "InternalProblemPrivateConstructorAccess", + problemMessageTemplate: r"""Can't access private constructor '#name'.""", + withArgumentsOld: _withArgumentsOldInternalProblemPrivateConstructorAccess, + withArguments: _withArgumentsInternalProblemPrivateConstructorAccess, + severity: CfeSeverity.internalProblem, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInternalProblemPrivateConstructorAccess({ @@ -7762,15 +8429,18 @@ const MessageCode codeInternalProblemProvidedBothCompileSdkAndSdkSummary = ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInternalProblemStackNotEmpty = - const Template( - "InternalProblemStackNotEmpty", - problemMessageTemplate: r"""#name.stack isn't empty: +const Template< + Message Function(String name, String string), + Message Function({required String name, required String string}) +> +codeInternalProblemStackNotEmpty = const Template( + "InternalProblemStackNotEmpty", + problemMessageTemplate: r"""#name.stack isn't empty: #string""", - withArgumentsOld: _withArgumentsOldInternalProblemStackNotEmpty, - severity: CfeSeverity.internalProblem, - ); + withArgumentsOld: _withArgumentsOldInternalProblemStackNotEmpty, + withArguments: _withArgumentsInternalProblemStackNotEmpty, + severity: CfeSeverity.internalProblem, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInternalProblemStackNotEmpty({ @@ -7794,14 +8464,17 @@ Message _withArgumentsOldInternalProblemStackNotEmpty( ) => _withArgumentsInternalProblemStackNotEmpty(name: name, string: string); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInternalProblemUnexpected = - const Template( - "InternalProblemUnexpected", - problemMessageTemplate: r"""Expected '#string', but got '#string2'.""", - withArgumentsOld: _withArgumentsOldInternalProblemUnexpected, - severity: CfeSeverity.internalProblem, - ); +const Template< + Message Function(String string, String string2), + Message Function({required String string, required String string2}) +> +codeInternalProblemUnexpected = const Template( + "InternalProblemUnexpected", + problemMessageTemplate: r"""Expected '#string', but got '#string2'.""", + withArgumentsOld: _withArgumentsOldInternalProblemUnexpected, + withArguments: _withArgumentsInternalProblemUnexpected, + severity: CfeSeverity.internalProblem, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInternalProblemUnexpected({ @@ -7824,14 +8497,17 @@ Message _withArgumentsOldInternalProblemUnexpected( ) => _withArgumentsInternalProblemUnexpected(string: string, string2: string2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInternalProblemUnhandled = - const Template( - "InternalProblemUnhandled", - problemMessageTemplate: r"""Unhandled #string in #string2.""", - withArgumentsOld: _withArgumentsOldInternalProblemUnhandled, - severity: CfeSeverity.internalProblem, - ); +const Template< + Message Function(String string, String string2), + Message Function({required String string, required String string2}) +> +codeInternalProblemUnhandled = const Template( + "InternalProblemUnhandled", + problemMessageTemplate: r"""Unhandled #string in #string2.""", + withArgumentsOld: _withArgumentsOldInternalProblemUnhandled, + withArguments: _withArgumentsInternalProblemUnhandled, + severity: CfeSeverity.internalProblem, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInternalProblemUnhandled({ @@ -7854,14 +8530,17 @@ Message _withArgumentsOldInternalProblemUnhandled( ) => _withArgumentsInternalProblemUnhandled(string: string, string2: string2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInternalProblemUnimplemented = - const Template( - "InternalProblemUnimplemented", - problemMessageTemplate: r"""Unimplemented #string.""", - withArgumentsOld: _withArgumentsOldInternalProblemUnimplemented, - severity: CfeSeverity.internalProblem, - ); +const Template< + Message Function(String string), + Message Function({required String string}) +> +codeInternalProblemUnimplemented = const Template( + "InternalProblemUnimplemented", + problemMessageTemplate: r"""Unimplemented #string.""", + withArgumentsOld: _withArgumentsOldInternalProblemUnimplemented, + withArguments: _withArgumentsInternalProblemUnimplemented, + severity: CfeSeverity.internalProblem, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInternalProblemUnimplemented({required String string}) { @@ -7878,13 +8557,17 @@ Message _withArgumentsOldInternalProblemUnimplemented(String string) => _withArgumentsInternalProblemUnimplemented(string: string); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeInternalProblemUnsupported = - const Template( - "InternalProblemUnsupported", - problemMessageTemplate: r"""Unsupported operation: '#name'.""", - withArgumentsOld: _withArgumentsOldInternalProblemUnsupported, - severity: CfeSeverity.internalProblem, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeInternalProblemUnsupported = const Template( + "InternalProblemUnsupported", + problemMessageTemplate: r"""Unsupported operation: '#name'.""", + withArgumentsOld: _withArgumentsOldInternalProblemUnsupported, + withArguments: _withArgumentsInternalProblemUnsupported, + severity: CfeSeverity.internalProblem, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInternalProblemUnsupported({required String name}) { @@ -7901,13 +8584,14 @@ Message _withArgumentsOldInternalProblemUnsupported(String name) => _withArgumentsInternalProblemUnsupported(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeInternalProblemUriMissingScheme = - const Template( - "InternalProblemUriMissingScheme", - problemMessageTemplate: r"""The URI '#uri' has no scheme.""", - withArgumentsOld: _withArgumentsOldInternalProblemUriMissingScheme, - severity: CfeSeverity.internalProblem, - ); +const Template +codeInternalProblemUriMissingScheme = const Template( + "InternalProblemUriMissingScheme", + problemMessageTemplate: r"""The URI '#uri' has no scheme.""", + withArgumentsOld: _withArgumentsOldInternalProblemUriMissingScheme, + withArguments: _withArgumentsInternalProblemUriMissingScheme, + severity: CfeSeverity.internalProblem, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInternalProblemUriMissingScheme({required Uri uri}) { @@ -7924,15 +8608,18 @@ Message _withArgumentsOldInternalProblemUriMissingScheme(Uri uri) => _withArgumentsInternalProblemUriMissingScheme(uri: uri); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInternalProblemVerificationError = - const Template( - "InternalProblemVerificationError", - problemMessageTemplate: r"""Verification of the generated program failed: +const Template< + Message Function(String string), + Message Function({required String string}) +> +codeInternalProblemVerificationError = const Template( + "InternalProblemVerificationError", + problemMessageTemplate: r"""Verification of the generated program failed: #string""", - withArgumentsOld: _withArgumentsOldInternalProblemVerificationError, - severity: CfeSeverity.internalProblem, - ); + withArgumentsOld: _withArgumentsOldInternalProblemVerificationError, + withArguments: _withArgumentsInternalProblemVerificationError, + severity: CfeSeverity.internalProblem, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInternalProblemVerificationError({ @@ -7976,12 +8663,16 @@ const MessageCode codeInvalidAwaitFor = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeInvalidBreakTarget = - const Template( - "InvalidBreakTarget", - problemMessageTemplate: r"""Can't break to '#name'.""", - withArgumentsOld: _withArgumentsOldInvalidBreakTarget, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeInvalidBreakTarget = const Template( + "InvalidBreakTarget", + problemMessageTemplate: r"""Can't break to '#name'.""", + withArgumentsOld: _withArgumentsOldInvalidBreakTarget, + withArguments: _withArgumentsInvalidBreakTarget, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidBreakTarget({required String name}) { @@ -8006,14 +8697,18 @@ const MessageCode codeInvalidCodePoint = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInvalidConstantPatternBinary = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeInvalidConstantPatternBinary = const Template( "InvalidConstantPatternBinary", problemMessageTemplate: r"""The binary operator #name is not supported as a constant pattern.""", correctionMessageTemplate: r"""Try wrapping the expression in 'const ( ... )'.""", withArgumentsOld: _withArgumentsOldInvalidConstantPatternBinary, + withArguments: _withArgumentsInvalidConstantPatternBinary, index: 141, ); @@ -8079,14 +8774,18 @@ const MessageCode codeInvalidConstantPatternNegation = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInvalidConstantPatternUnary = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeInvalidConstantPatternUnary = const Template( "InvalidConstantPatternUnary", problemMessageTemplate: r"""The unary operator #name is not supported as a constant pattern.""", correctionMessageTemplate: r"""Try wrapping the expression in 'const ( ... )'.""", withArgumentsOld: _withArgumentsOldInvalidConstantPatternUnary, + withArguments: _withArgumentsInvalidConstantPatternUnary, index: 136, ); @@ -8107,12 +8806,16 @@ Message _withArgumentsOldInvalidConstantPatternUnary(String name) => _withArgumentsInvalidConstantPatternUnary(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeInvalidContinueTarget = - const Template( - "InvalidContinueTarget", - problemMessageTemplate: r"""Can't continue at '#name'.""", - withArgumentsOld: _withArgumentsOldInvalidContinueTarget, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeInvalidContinueTarget = const Template( + "InvalidContinueTarget", + problemMessageTemplate: r"""Can't continue at '#name'.""", + withArgumentsOld: _withArgumentsOldInvalidContinueTarget, + withArguments: _withArgumentsInvalidContinueTarget, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidContinueTarget({required String name}) { @@ -8137,15 +8840,17 @@ const MessageCode codeInvalidEscapeStarted = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInvalidGetterSetterTypeFieldContext = - const Template( - "InvalidGetterSetterTypeFieldContext", - problemMessageTemplate: - r"""This is the declaration of the field '#name'.""", - withArgumentsOld: _withArgumentsOldInvalidGetterSetterTypeFieldContext, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeInvalidGetterSetterTypeFieldContext = const Template( + "InvalidGetterSetterTypeFieldContext", + problemMessageTemplate: r"""This is the declaration of the field '#name'.""", + withArgumentsOld: _withArgumentsOldInvalidGetterSetterTypeFieldContext, + withArguments: _withArgumentsInvalidGetterSetterTypeFieldContext, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidGetterSetterTypeFieldContext({ @@ -8164,15 +8869,17 @@ Message _withArgumentsOldInvalidGetterSetterTypeFieldContext(String name) => _withArgumentsInvalidGetterSetterTypeFieldContext(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInvalidGetterSetterTypeGetterContext = - const Template( - "InvalidGetterSetterTypeGetterContext", - problemMessageTemplate: - r"""This is the declaration of the getter '#name'.""", - withArgumentsOld: _withArgumentsOldInvalidGetterSetterTypeGetterContext, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeInvalidGetterSetterTypeGetterContext = const Template( + "InvalidGetterSetterTypeGetterContext", + problemMessageTemplate: r"""This is the declaration of the getter '#name'.""", + withArgumentsOld: _withArgumentsOldInvalidGetterSetterTypeGetterContext, + withArguments: _withArgumentsInvalidGetterSetterTypeGetterContext, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidGetterSetterTypeGetterContext({ @@ -8191,15 +8898,17 @@ Message _withArgumentsOldInvalidGetterSetterTypeGetterContext(String name) => _withArgumentsInvalidGetterSetterTypeGetterContext(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInvalidGetterSetterTypeSetterContext = - const Template( - "InvalidGetterSetterTypeSetterContext", - problemMessageTemplate: - r"""This is the declaration of the setter '#name'.""", - withArgumentsOld: _withArgumentsOldInvalidGetterSetterTypeSetterContext, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeInvalidGetterSetterTypeSetterContext = const Template( + "InvalidGetterSetterTypeSetterContext", + problemMessageTemplate: r"""This is the declaration of the setter '#name'.""", + withArgumentsOld: _withArgumentsOldInvalidGetterSetterTypeSetterContext, + withArguments: _withArgumentsInvalidGetterSetterTypeSetterContext, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidGetterSetterTypeSetterContext({ @@ -8255,14 +8964,18 @@ const MessageCode codeInvalidInsideUnaryPattern = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeInvalidOperator = - const Template( - "InvalidOperator", - problemMessageTemplate: - r"""The string '#lexeme' isn't a user-definable operator.""", - withArgumentsOld: _withArgumentsOldInvalidOperator, - index: 39, - ); +const Template< + Message Function(Token lexeme), + Message Function({required Token lexeme}) +> +codeInvalidOperator = const Template( + "InvalidOperator", + problemMessageTemplate: + r"""The string '#lexeme' isn't a user-definable operator.""", + withArgumentsOld: _withArgumentsOldInvalidOperator, + withArguments: _withArgumentsInvalidOperator, + index: 39, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidOperator({required Token lexeme}) { @@ -8280,13 +8993,17 @@ Message _withArgumentsOldInvalidOperator(Token lexeme) => _withArgumentsInvalidOperator(lexeme: lexeme); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeInvalidPackageUri = - const Template( - "InvalidPackageUri", - problemMessageTemplate: r"""Invalid package URI '#uri': +const Template< + Message Function(Uri uri, String string), + Message Function({required Uri uri, required String string}) +> +codeInvalidPackageUri = const Template( + "InvalidPackageUri", + problemMessageTemplate: r"""Invalid package URI '#uri': #string.""", - withArgumentsOld: _withArgumentsOldInvalidPackageUri, - ); + withArgumentsOld: _withArgumentsOldInvalidPackageUri, + withArguments: _withArgumentsInvalidPackageUri, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidPackageUri({ @@ -8332,14 +9049,21 @@ const MessageCode codeInvalidThisInInitializer = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInvalidTypeParameterInSupertype = - const Template( - "InvalidTypeParameterInSupertype", - problemMessageTemplate: - r"""Can't use implicitly 'out' variable '#name' in an '#string2' position in supertype '#name2'.""", - withArgumentsOld: _withArgumentsOldInvalidTypeParameterInSupertype, - ); +const Template< + Message Function(String name, String string2, String name2), + Message Function({ + required String name, + required String string2, + required String name2, + }) +> +codeInvalidTypeParameterInSupertype = const Template( + "InvalidTypeParameterInSupertype", + problemMessageTemplate: + r"""Can't use implicitly 'out' variable '#name' in an '#string2' position in supertype '#name2'.""", + withArgumentsOld: _withArgumentsOldInvalidTypeParameterInSupertype, + withArguments: _withArgumentsInvalidTypeParameterInSupertype, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidTypeParameterInSupertype({ @@ -8371,18 +9095,22 @@ Message _withArgumentsOldInvalidTypeParameterInSupertype( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(String string, String name, String string2, String name2) + Message Function(String string, String name, String string2, String name2), + Message Function({ + required String string, + required String name, + required String string2, + required String name2, + }) > -codeInvalidTypeParameterInSupertypeWithVariance = - const Template< - Message Function(String string, String name, String string2, String name2) - >( - "InvalidTypeParameterInSupertypeWithVariance", - problemMessageTemplate: - r"""Can't use '#string' type variable '#name' in an '#string2' position in supertype '#name2'.""", - withArgumentsOld: - _withArgumentsOldInvalidTypeParameterInSupertypeWithVariance, - ); +codeInvalidTypeParameterInSupertypeWithVariance = const Template( + "InvalidTypeParameterInSupertypeWithVariance", + problemMessageTemplate: + r"""Can't use '#string' type variable '#name' in an '#string2' position in supertype '#name2'.""", + withArgumentsOld: + _withArgumentsOldInvalidTypeParameterInSupertypeWithVariance, + withArguments: _withArgumentsInvalidTypeParameterInSupertypeWithVariance, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidTypeParameterInSupertypeWithVariance({ @@ -8422,16 +9150,21 @@ Message _withArgumentsOldInvalidTypeParameterInSupertypeWithVariance( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInvalidTypeParameterVariancePosition = - const Template< - Message Function(String string, String name, String string2) - >( - "InvalidTypeParameterVariancePosition", - problemMessageTemplate: - r"""Can't use '#string' type variable '#name' in an '#string2' position.""", - withArgumentsOld: _withArgumentsOldInvalidTypeParameterVariancePosition, - ); +const Template< + Message Function(String string, String name, String string2), + Message Function({ + required String string, + required String name, + required String string2, + }) +> +codeInvalidTypeParameterVariancePosition = const Template( + "InvalidTypeParameterVariancePosition", + problemMessageTemplate: + r"""Can't use '#string' type variable '#name' in an '#string2' position.""", + withArgumentsOld: _withArgumentsOldInvalidTypeParameterVariancePosition, + withArguments: _withArgumentsInvalidTypeParameterVariancePosition, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidTypeParameterVariancePosition({ @@ -8462,17 +9195,22 @@ Message _withArgumentsOldInvalidTypeParameterVariancePosition( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInvalidTypeParameterVariancePositionInReturnType = - const Template< - Message Function(String string, String name, String string2) - >( - "InvalidTypeParameterVariancePositionInReturnType", - problemMessageTemplate: - r"""Can't use '#string' type variable '#name' in an '#string2' position in the return type.""", - withArgumentsOld: - _withArgumentsOldInvalidTypeParameterVariancePositionInReturnType, - ); +const Template< + Message Function(String string, String name, String string2), + Message Function({ + required String string, + required String name, + required String string2, + }) +> +codeInvalidTypeParameterVariancePositionInReturnType = const Template( + "InvalidTypeParameterVariancePositionInReturnType", + problemMessageTemplate: + r"""Can't use '#string' type variable '#name' in an '#string2' position in the return type.""", + withArgumentsOld: + _withArgumentsOldInvalidTypeParameterVariancePositionInReturnType, + withArguments: _withArgumentsInvalidTypeParameterVariancePositionInReturnType, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidTypeParameterVariancePositionInReturnType({ @@ -8544,14 +9282,18 @@ const MessageCode codeInvalidVoid = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeInvokeNonFunction = - const Template( - "InvokeNonFunction", - problemMessageTemplate: - r"""'#name' isn't a function or method and can't be invoked.""", - withArgumentsOld: _withArgumentsOldInvokeNonFunction, - analyzerCodes: ["INVOCATION_OF_NON_FUNCTION"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeInvokeNonFunction = const Template( + "InvokeNonFunction", + problemMessageTemplate: + r"""'#name' isn't a function or method and can't be invoked.""", + withArgumentsOld: _withArgumentsOldInvokeNonFunction, + withArguments: _withArgumentsInvokeNonFunction, + analyzerCodes: ["INVOCATION_OF_NON_FUNCTION"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvokeNonFunction({required String name}) { @@ -8569,12 +9311,16 @@ Message _withArgumentsOldInvokeNonFunction(String name) => _withArgumentsInvokeNonFunction(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJointPatternVariableNotInAll = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeJointPatternVariableNotInAll = const Template( "JointPatternVariableNotInAll", problemMessageTemplate: r"""The variable '#name' is available in some, but not all cases that share this body.""", withArgumentsOld: _withArgumentsOldJointPatternVariableNotInAll, + withArguments: _withArgumentsJointPatternVariableNotInAll, analyzerCodes: ["INVALID_PATTERN_VARIABLE_IN_SHARED_CASE_SCOPE"], ); @@ -8594,15 +9340,18 @@ Message _withArgumentsOldJointPatternVariableNotInAll(String name) => _withArgumentsJointPatternVariableNotInAll(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJointPatternVariableWithLabelDefault = - const Template( - "JointPatternVariableWithLabelDefault", - problemMessageTemplate: - r"""The variable '#name' is not available because there is a label or 'default' case.""", - withArgumentsOld: _withArgumentsOldJointPatternVariableWithLabelDefault, - analyzerCodes: ["INVALID_PATTERN_VARIABLE_IN_SHARED_CASE_SCOPE"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeJointPatternVariableWithLabelDefault = const Template( + "JointPatternVariableWithLabelDefault", + problemMessageTemplate: + r"""The variable '#name' is not available because there is a label or 'default' case.""", + withArgumentsOld: _withArgumentsOldJointPatternVariableWithLabelDefault, + withArguments: _withArgumentsJointPatternVariableWithLabelDefault, + analyzerCodes: ["INVALID_PATTERN_VARIABLE_IN_SHARED_CASE_SCOPE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJointPatternVariableWithLabelDefault({ @@ -8622,12 +9371,16 @@ Message _withArgumentsOldJointPatternVariableWithLabelDefault(String name) => _withArgumentsJointPatternVariableWithLabelDefault(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJointPatternVariablesMismatch = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeJointPatternVariablesMismatch = const Template( "JointPatternVariablesMismatch", problemMessageTemplate: r"""Variable pattern '#name' doesn't have the same type or finality in all cases.""", withArgumentsOld: _withArgumentsOldJointPatternVariablesMismatch, + withArguments: _withArgumentsJointPatternVariablesMismatch, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -8646,16 +9399,19 @@ Message _withArgumentsOldJointPatternVariablesMismatch(String name) => _withArgumentsJointPatternVariablesMismatch(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropDartClassExtendsJSClass = - const Template( - "JsInteropDartClassExtendsJSClass", - problemMessageTemplate: - r"""Dart class '#name' cannot extend JS interop class '#name2'.""", - correctionMessageTemplate: - r"""Try adding the JS interop annotation or removing it from the parent class.""", - withArgumentsOld: _withArgumentsOldJsInteropDartClassExtendsJSClass, - ); +const Template< + Message Function(String name, String name2), + Message Function({required String name, required String name2}) +> +codeJsInteropDartClassExtendsJSClass = const Template( + "JsInteropDartClassExtendsJSClass", + problemMessageTemplate: + r"""Dart class '#name' cannot extend JS interop class '#name2'.""", + correctionMessageTemplate: + r"""Try adding the JS interop annotation or removing it from the parent class.""", + withArgumentsOld: _withArgumentsOldJsInteropDartClassExtendsJSClass, + withArguments: _withArgumentsJsInteropDartClassExtendsJSClass, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJsInteropDartClassExtendsJSClass({ @@ -8691,17 +9447,20 @@ codeJsInteropDartJsInteropAnnotationForStaticInteropOnly = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropDisallowedInteropLibraryInDart2Wasm = - const Template( - "JsInteropDisallowedInteropLibraryInDart2Wasm", - problemMessageTemplate: - r"""JS interop library '#name' can't be imported when compiling to Wasm.""", - correctionMessageTemplate: - r"""Try using 'dart:js_interop' or 'dart:js_interop_unsafe' instead.""", - withArgumentsOld: - _withArgumentsOldJsInteropDisallowedInteropLibraryInDart2Wasm, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeJsInteropDisallowedInteropLibraryInDart2Wasm = const Template( + "JsInteropDisallowedInteropLibraryInDart2Wasm", + problemMessageTemplate: + r"""JS interop library '#name' can't be imported when compiling to Wasm.""", + correctionMessageTemplate: + r"""Try using 'dart:js_interop' or 'dart:js_interop_unsafe' instead.""", + withArgumentsOld: + _withArgumentsOldJsInteropDisallowedInteropLibraryInDart2Wasm, + withArguments: _withArgumentsJsInteropDisallowedInteropLibraryInDart2Wasm, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJsInteropDisallowedInteropLibraryInDart2Wasm({ @@ -8740,17 +9499,19 @@ const MessageCode codeJsInteropEnclosingClassJSAnnotationContext = ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropExportClassNotMarkedExportable = - const Template( - "JsInteropExportClassNotMarkedExportable", - problemMessageTemplate: - r"""Class '#name' does not have a `@JSExport` on it or any of its members.""", - correctionMessageTemplate: - r"""Use the `@JSExport` annotation on this class.""", - withArgumentsOld: - _withArgumentsOldJsInteropExportClassNotMarkedExportable, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeJsInteropExportClassNotMarkedExportable = const Template( + "JsInteropExportClassNotMarkedExportable", + problemMessageTemplate: + r"""Class '#name' does not have a `@JSExport` on it or any of its members.""", + correctionMessageTemplate: + r"""Use the `@JSExport` annotation on this class.""", + withArgumentsOld: _withArgumentsOldJsInteropExportClassNotMarkedExportable, + withArguments: _withArgumentsJsInteropExportClassNotMarkedExportable, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJsInteropExportClassNotMarkedExportable({ @@ -8771,17 +9532,21 @@ Message _withArgumentsOldJsInteropExportClassNotMarkedExportable(String name) => _withArgumentsJsInteropExportClassNotMarkedExportable(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropExportDartInterfaceHasNonEmptyJSExportValue = - const Template( - "JsInteropExportDartInterfaceHasNonEmptyJSExportValue", - problemMessageTemplate: - r"""The value in the `@JSExport` annotation on the class or mixin '#name' will be ignored.""", - correctionMessageTemplate: r"""Remove the value in the annotation.""", - withArgumentsOld: - _withArgumentsOldJsInteropExportDartInterfaceHasNonEmptyJSExportValue, - severity: CfeSeverity.warning, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeJsInteropExportDartInterfaceHasNonEmptyJSExportValue = const Template( + "JsInteropExportDartInterfaceHasNonEmptyJSExportValue", + problemMessageTemplate: + r"""The value in the `@JSExport` annotation on the class or mixin '#name' will be ignored.""", + correctionMessageTemplate: r"""Remove the value in the annotation.""", + withArgumentsOld: + _withArgumentsOldJsInteropExportDartInterfaceHasNonEmptyJSExportValue, + withArguments: + _withArgumentsJsInteropExportDartInterfaceHasNonEmptyJSExportValue, + severity: CfeSeverity.warning, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJsInteropExportDartInterfaceHasNonEmptyJSExportValue({ @@ -8805,14 +9570,18 @@ Message _withArgumentsOldJsInteropExportDartInterfaceHasNonEmptyJSExportValue( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropExportDisallowedMember = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeJsInteropExportDisallowedMember = const Template( "JsInteropExportDisallowedMember", problemMessageTemplate: r"""Member '#name' is not a concrete instance member or declares type parameters, and therefore can't be exported.""", correctionMessageTemplate: r"""Remove the `@JSExport` annotation from the member, and use an instance member to call this member instead.""", withArgumentsOld: _withArgumentsOldJsInteropExportDisallowedMember, + withArguments: _withArgumentsJsInteropExportDisallowedMember, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -8833,16 +9602,19 @@ Message _withArgumentsOldJsInteropExportDisallowedMember(String name) => _withArgumentsJsInteropExportDisallowedMember(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropExportMemberCollision = - const Template( - "JsInteropExportMemberCollision", - problemMessageTemplate: - r"""The following class members collide with the same export '#name': #string.""", - correctionMessageTemplate: - r"""Either remove the conflicting members or use a different export name.""", - withArgumentsOld: _withArgumentsOldJsInteropExportMemberCollision, - ); +const Template< + Message Function(String name, String string), + Message Function({required String name, required String string}) +> +codeJsInteropExportMemberCollision = const Template( + "JsInteropExportMemberCollision", + problemMessageTemplate: + r"""The following class members collide with the same export '#name': #string.""", + correctionMessageTemplate: + r"""Either remove the conflicting members or use a different export name.""", + withArgumentsOld: _withArgumentsOldJsInteropExportMemberCollision, + withArguments: _withArgumentsJsInteropExportMemberCollision, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJsInteropExportMemberCollision({ @@ -8868,14 +9640,18 @@ Message _withArgumentsOldJsInteropExportMemberCollision( ) => _withArgumentsJsInteropExportMemberCollision(name: name, string: string); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropExportNoExportableMembers = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeJsInteropExportNoExportableMembers = const Template( "JsInteropExportNoExportableMembers", problemMessageTemplate: r"""Class '#name' has no exportable members in the class or the inheritance chain.""", correctionMessageTemplate: r"""Using `@JSExport`, annotate at least one instance member with a body or annotate a class that has such a member in the inheritance chain.""", withArgumentsOld: _withArgumentsOldJsInteropExportNoExportableMembers, + withArguments: _withArgumentsJsInteropExportNoExportableMembers, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -8978,16 +9754,19 @@ const MessageCode codeJsInteropIsATearoff = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropJSClassExtendsDartClass = - const Template( - "JsInteropJSClassExtendsDartClass", - problemMessageTemplate: - r"""JS interop class '#name' cannot extend Dart class '#name2'.""", - correctionMessageTemplate: - r"""Try removing the JS interop annotation or adding it to the parent class.""", - withArgumentsOld: _withArgumentsOldJsInteropJSClassExtendsDartClass, - ); +const Template< + Message Function(String name, String name2), + Message Function({required String name, required String name2}) +> +codeJsInteropJSClassExtendsDartClass = const Template( + "JsInteropJSClassExtendsDartClass", + problemMessageTemplate: + r"""JS interop class '#name' cannot extend Dart class '#name2'.""", + correctionMessageTemplate: + r"""Try removing the JS interop annotation or adding it to the parent class.""", + withArgumentsOld: _withArgumentsOldJsInteropJSClassExtendsDartClass, + withArguments: _withArgumentsJsInteropJSClassExtendsDartClass, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJsInteropJSClassExtendsDartClass({ @@ -9022,16 +9801,23 @@ const MessageCode codeJsInteropNamedParameters = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropNativeClassInAnnotation = - const Template( - "JsInteropNativeClassInAnnotation", - problemMessageTemplate: - r"""Non-static JS interop class '#name' conflicts with natively supported class '#name2' in '#string3'.""", - correctionMessageTemplate: - r"""Try replacing it with a static JS interop class using `@staticInterop` with extension methods, or use js_util to interact with the native object of type '#name2'.""", - withArgumentsOld: _withArgumentsOldJsInteropNativeClassInAnnotation, - ); +const Template< + Message Function(String name, String name2, String string3), + Message Function({ + required String name, + required String name2, + required String string3, + }) +> +codeJsInteropNativeClassInAnnotation = const Template( + "JsInteropNativeClassInAnnotation", + problemMessageTemplate: + r"""Non-static JS interop class '#name' conflicts with natively supported class '#name2' in '#string3'.""", + correctionMessageTemplate: + r"""Try replacing it with a static JS interop class using `@staticInterop` with extension methods, or use js_util to interact with the native object of type '#name2'.""", + withArgumentsOld: _withArgumentsOldJsInteropNativeClassInAnnotation, + withArguments: _withArgumentsJsInteropNativeClassInAnnotation, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJsInteropNativeClassInAnnotation({ @@ -9080,17 +9866,20 @@ const MessageCode codeJsInteropNonExternalMember = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropNonStaticWithStaticInteropSupertype = - const Template( - "JsInteropNonStaticWithStaticInteropSupertype", - problemMessageTemplate: - r"""Class '#name' does not have an `@staticInterop` annotation, but has supertype '#name2', which does.""", - correctionMessageTemplate: - r"""Try marking '#name' as a `@staticInterop` class, or don't inherit '#name2'.""", - withArgumentsOld: - _withArgumentsOldJsInteropNonStaticWithStaticInteropSupertype, - ); +const Template< + Message Function(String name, String name2), + Message Function({required String name, required String name2}) +> +codeJsInteropNonStaticWithStaticInteropSupertype = const Template( + "JsInteropNonStaticWithStaticInteropSupertype", + problemMessageTemplate: + r"""Class '#name' does not have an `@staticInterop` annotation, but has supertype '#name2', which does.""", + correctionMessageTemplate: + r"""Try marking '#name' as a `@staticInterop` class, or don't inherit '#name2'.""", + withArgumentsOld: + _withArgumentsOldJsInteropNonStaticWithStaticInteropSupertype, + withArguments: _withArgumentsJsInteropNonStaticWithStaticInteropSupertype, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJsInteropNonStaticWithStaticInteropSupertype({ @@ -9119,17 +9908,21 @@ Message _withArgumentsOldJsInteropNonStaticWithStaticInteropSupertype( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropObjectLiteralConstructorPositionalParameters = - const Template( - "JsInteropObjectLiteralConstructorPositionalParameters", - problemMessageTemplate: - r"""#string should not contain any positional parameters.""", - correctionMessageTemplate: - r"""Try replacing them with named parameters instead.""", - withArgumentsOld: - _withArgumentsOldJsInteropObjectLiteralConstructorPositionalParameters, - ); +const Template< + Message Function(String string), + Message Function({required String string}) +> +codeJsInteropObjectLiteralConstructorPositionalParameters = const Template( + "JsInteropObjectLiteralConstructorPositionalParameters", + problemMessageTemplate: + r"""#string should not contain any positional parameters.""", + correctionMessageTemplate: + r"""Try replacing them with named parameters instead.""", + withArgumentsOld: + _withArgumentsOldJsInteropObjectLiteralConstructorPositionalParameters, + withArguments: + _withArgumentsJsInteropObjectLiteralConstructorPositionalParameters, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJsInteropObjectLiteralConstructorPositionalParameters({ @@ -9171,17 +9964,21 @@ const MessageCode codeJsInteropOperatorsNotSupported = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropStaticInteropExternalFunctionTypeViolation = - const Template( - "JsInteropStaticInteropExternalFunctionTypeViolation", - problemMessageTemplate: - r"""External JS interop member contains invalid types in its function signature: '#string2'.""", - correctionMessageTemplate: - r"""Use one of these valid types instead: JS types from 'dart:js_interop', ExternalDartReference, void, bool, num, double, int, String, extension types that erase to one of these types, '@staticInterop' types, 'dart:html' types when compiling to JS, or a type parameter that is a subtype of a valid non-primitive type.""", - withArgumentsOld: - _withArgumentsOldJsInteropStaticInteropExternalFunctionTypeViolation, - ); +const Template< + Message Function(String string2), + Message Function({required String string2}) +> +codeJsInteropStaticInteropExternalFunctionTypeViolation = const Template( + "JsInteropStaticInteropExternalFunctionTypeViolation", + problemMessageTemplate: + r"""External JS interop member contains invalid types in its function signature: '#string2'.""", + correctionMessageTemplate: + r"""Use one of these valid types instead: JS types from 'dart:js_interop', ExternalDartReference, void, bool, num, double, int, String, extension types that erase to one of these types, '@staticInterop' types, 'dart:html' types when compiling to JS, or a type parameter that is a subtype of a valid non-primitive type.""", + withArgumentsOld: + _withArgumentsOldJsInteropStaticInteropExternalFunctionTypeViolation, + withArguments: + _withArgumentsJsInteropStaticInteropExternalFunctionTypeViolation, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJsInteropStaticInteropExternalFunctionTypeViolation({ @@ -9222,26 +10019,25 @@ const Template< String string2, String name2, String string3, - ) + ), + Message Function({ + required String name, + required String string, + required String string2, + required String name2, + required String string3, + }) > -codeJsInteropStaticInteropMockMissingGetterOrSetter = - const Template< - Message Function( - String name, - String string, - String string2, - String name2, - String string3, - ) - >( - "JsInteropStaticInteropMockMissingGetterOrSetter", - problemMessageTemplate: - r"""Dart class '#name' has a #string, but does not have a #string2 to implement any of the following extension member(s) with export name '#name2': #string3.""", - correctionMessageTemplate: - r"""Declare an exportable #string2 that implements one of these extension members.""", - withArgumentsOld: - _withArgumentsOldJsInteropStaticInteropMockMissingGetterOrSetter, - ); +codeJsInteropStaticInteropMockMissingGetterOrSetter = const Template( + "JsInteropStaticInteropMockMissingGetterOrSetter", + problemMessageTemplate: + r"""Dart class '#name' has a #string, but does not have a #string2 to implement any of the following extension member(s) with export name '#name2': #string3.""", + correctionMessageTemplate: + r"""Declare an exportable #string2 that implements one of these extension members.""", + withArgumentsOld: + _withArgumentsOldJsInteropStaticInteropMockMissingGetterOrSetter, + withArguments: _withArgumentsJsInteropStaticInteropMockMissingGetterOrSetter, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJsInteropStaticInteropMockMissingGetterOrSetter({ @@ -9288,17 +10084,24 @@ Message _withArgumentsOldJsInteropStaticInteropMockMissingGetterOrSetter( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropStaticInteropMockMissingImplements = - const Template( - "JsInteropStaticInteropMockMissingImplements", - problemMessageTemplate: - r"""Dart class '#name' does not have any members that implement any of the following extension member(s) with export name '#name2': #string.""", - correctionMessageTemplate: - r"""Declare an exportable member that implements one of these extension members.""", - withArgumentsOld: - _withArgumentsOldJsInteropStaticInteropMockMissingImplements, - ); +const Template< + Message Function(String name, String name2, String string), + Message Function({ + required String name, + required String name2, + required String string, + }) +> +codeJsInteropStaticInteropMockMissingImplements = const Template( + "JsInteropStaticInteropMockMissingImplements", + problemMessageTemplate: + r"""Dart class '#name' does not have any members that implement any of the following extension member(s) with export name '#name2': #string.""", + correctionMessageTemplate: + r"""Declare an exportable member that implements one of these extension members.""", + withArgumentsOld: + _withArgumentsOldJsInteropStaticInteropMockMissingImplements, + withArguments: _withArgumentsJsInteropStaticInteropMockMissingImplements, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJsInteropStaticInteropMockMissingImplements({ @@ -9331,15 +10134,18 @@ Message _withArgumentsOldJsInteropStaticInteropMockMissingImplements( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropStaticInteropNoJSAnnotation = - const Template( - "JsInteropStaticInteropNoJSAnnotation", - problemMessageTemplate: - r"""`@staticInterop` classes should also have the `@JS` annotation.""", - correctionMessageTemplate: r"""Add `@JS` to class '#name'.""", - withArgumentsOld: _withArgumentsOldJsInteropStaticInteropNoJSAnnotation, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeJsInteropStaticInteropNoJSAnnotation = const Template( + "JsInteropStaticInteropNoJSAnnotation", + problemMessageTemplate: + r"""`@staticInterop` classes should also have the `@JS` annotation.""", + correctionMessageTemplate: r"""Add `@JS` to class '#name'.""", + withArgumentsOld: _withArgumentsOldJsInteropStaticInteropNoJSAnnotation, + withArguments: _withArgumentsJsInteropStaticInteropNoJSAnnotation, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJsInteropStaticInteropNoJSAnnotation({ @@ -9381,17 +10187,19 @@ codeJsInteropStaticInteropSyntheticConstructor = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropStaticInteropTearOffsDisallowed = - const Template( - "JsInteropStaticInteropTearOffsDisallowed", - problemMessageTemplate: - r"""Tear-offs of external #string '#name' are disallowed.""", - correctionMessageTemplate: - r"""Declare a closure that calls this member instead.""", - withArgumentsOld: - _withArgumentsOldJsInteropStaticInteropTearOffsDisallowed, - ); +const Template< + Message Function(String string, String name), + Message Function({required String string, required String name}) +> +codeJsInteropStaticInteropTearOffsDisallowed = const Template( + "JsInteropStaticInteropTearOffsDisallowed", + problemMessageTemplate: + r"""Tear-offs of external #string '#name' are disallowed.""", + correctionMessageTemplate: + r"""Declare a closure that calls this member instead.""", + withArgumentsOld: _withArgumentsOldJsInteropStaticInteropTearOffsDisallowed, + withArguments: _withArgumentsJsInteropStaticInteropTearOffsDisallowed, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJsInteropStaticInteropTearOffsDisallowed({ @@ -9419,17 +10227,20 @@ Message _withArgumentsOldJsInteropStaticInteropTearOffsDisallowed( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropStaticInteropToJSFunctionTypeViolation = - const Template( - "JsInteropStaticInteropToJSFunctionTypeViolation", - problemMessageTemplate: - r"""Function converted via 'toJS' contains invalid types in its function signature: '#string2'.""", - correctionMessageTemplate: - r"""Use one of these valid types instead: JS types from 'dart:js_interop', ExternalDartReference, void, bool, num, double, int, String, extension types that erase to one of these types, '@staticInterop' types, 'dart:html' types when compiling to JS, or a type parameter that is a subtype of a valid non-primitive type.""", - withArgumentsOld: - _withArgumentsOldJsInteropStaticInteropToJSFunctionTypeViolation, - ); +const Template< + Message Function(String string2), + Message Function({required String string2}) +> +codeJsInteropStaticInteropToJSFunctionTypeViolation = const Template( + "JsInteropStaticInteropToJSFunctionTypeViolation", + problemMessageTemplate: + r"""Function converted via 'toJS' contains invalid types in its function signature: '#string2'.""", + correctionMessageTemplate: + r"""Use one of these valid types instead: JS types from 'dart:js_interop', ExternalDartReference, void, bool, num, double, int, String, extension types that erase to one of these types, '@staticInterop' types, 'dart:html' types when compiling to JS, or a type parameter that is a subtype of a valid non-primitive type.""", + withArgumentsOld: + _withArgumentsOldJsInteropStaticInteropToJSFunctionTypeViolation, + withArguments: _withArgumentsJsInteropStaticInteropToJSFunctionTypeViolation, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJsInteropStaticInteropToJSFunctionTypeViolation({ @@ -9454,17 +10265,19 @@ Message _withArgumentsOldJsInteropStaticInteropToJSFunctionTypeViolation( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropStaticInteropTrustTypesUsageNotAllowed = - const Template( - "JsInteropStaticInteropTrustTypesUsageNotAllowed", - problemMessageTemplate: - r"""JS interop class '#name' has an `@trustTypes` annotation, but `@trustTypes` is only supported within the sdk.""", - correctionMessageTemplate: - r"""Try removing the `@trustTypes` annotation.""", - withArgumentsOld: - _withArgumentsOldJsInteropStaticInteropTrustTypesUsageNotAllowed, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeJsInteropStaticInteropTrustTypesUsageNotAllowed = const Template( + "JsInteropStaticInteropTrustTypesUsageNotAllowed", + problemMessageTemplate: + r"""JS interop class '#name' has an `@trustTypes` annotation, but `@trustTypes` is only supported within the sdk.""", + correctionMessageTemplate: r"""Try removing the `@trustTypes` annotation.""", + withArgumentsOld: + _withArgumentsOldJsInteropStaticInteropTrustTypesUsageNotAllowed, + withArguments: _withArgumentsJsInteropStaticInteropTrustTypesUsageNotAllowed, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJsInteropStaticInteropTrustTypesUsageNotAllowed({ @@ -9486,17 +10299,21 @@ Message _withArgumentsOldJsInteropStaticInteropTrustTypesUsageNotAllowed( ) => _withArgumentsJsInteropStaticInteropTrustTypesUsageNotAllowed(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropStaticInteropTrustTypesUsedWithoutStaticInterop = - const Template( - "JsInteropStaticInteropTrustTypesUsedWithoutStaticInterop", - problemMessageTemplate: - r"""JS interop class '#name' has an `@trustTypes` annotation, but no `@staticInterop` annotation.""", - correctionMessageTemplate: - r"""Try marking the class using `@staticInterop`.""", - withArgumentsOld: - _withArgumentsOldJsInteropStaticInteropTrustTypesUsedWithoutStaticInterop, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeJsInteropStaticInteropTrustTypesUsedWithoutStaticInterop = const Template( + "JsInteropStaticInteropTrustTypesUsedWithoutStaticInterop", + problemMessageTemplate: + r"""JS interop class '#name' has an `@trustTypes` annotation, but no `@staticInterop` annotation.""", + correctionMessageTemplate: + r"""Try marking the class using `@staticInterop`.""", + withArgumentsOld: + _withArgumentsOldJsInteropStaticInteropTrustTypesUsedWithoutStaticInterop, + withArguments: + _withArgumentsJsInteropStaticInteropTrustTypesUsedWithoutStaticInterop, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJsInteropStaticInteropTrustTypesUsedWithoutStaticInterop({ @@ -9521,17 +10338,19 @@ _withArgumentsOldJsInteropStaticInteropTrustTypesUsedWithoutStaticInterop( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropStaticInteropWithInstanceMembers = - const Template( - "JsInteropStaticInteropWithInstanceMembers", - problemMessageTemplate: - r"""JS interop class '#name' with `@staticInterop` annotation cannot declare instance members.""", - correctionMessageTemplate: - r"""Try moving the instance member to a static extension.""", - withArgumentsOld: - _withArgumentsOldJsInteropStaticInteropWithInstanceMembers, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeJsInteropStaticInteropWithInstanceMembers = const Template( + "JsInteropStaticInteropWithInstanceMembers", + problemMessageTemplate: + r"""JS interop class '#name' with `@staticInterop` annotation cannot declare instance members.""", + correctionMessageTemplate: + r"""Try moving the instance member to a static extension.""", + withArgumentsOld: _withArgumentsOldJsInteropStaticInteropWithInstanceMembers, + withArguments: _withArgumentsJsInteropStaticInteropWithInstanceMembers, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJsInteropStaticInteropWithInstanceMembers({ @@ -9554,17 +10373,20 @@ Message _withArgumentsOldJsInteropStaticInteropWithInstanceMembers( ) => _withArgumentsJsInteropStaticInteropWithInstanceMembers(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropStaticInteropWithNonStaticSupertype = - const Template( - "JsInteropStaticInteropWithNonStaticSupertype", - problemMessageTemplate: - r"""JS interop class '#name' has an `@staticInterop` annotation, but has supertype '#name2', which does not.""", - correctionMessageTemplate: - r"""Try marking the supertype as a static interop class using `@staticInterop`.""", - withArgumentsOld: - _withArgumentsOldJsInteropStaticInteropWithNonStaticSupertype, - ); +const Template< + Message Function(String name, String name2), + Message Function({required String name, required String name2}) +> +codeJsInteropStaticInteropWithNonStaticSupertype = const Template( + "JsInteropStaticInteropWithNonStaticSupertype", + problemMessageTemplate: + r"""JS interop class '#name' has an `@staticInterop` annotation, but has supertype '#name2', which does not.""", + correctionMessageTemplate: + r"""Try marking the supertype as a static interop class using `@staticInterop`.""", + withArgumentsOld: + _withArgumentsOldJsInteropStaticInteropWithNonStaticSupertype, + withArguments: _withArgumentsJsInteropStaticInteropWithNonStaticSupertype, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJsInteropStaticInteropWithNonStaticSupertype({ @@ -9593,13 +10415,17 @@ Message _withArgumentsOldJsInteropStaticInteropWithNonStaticSupertype( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeLabelNotFound = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeLabelNotFound = const Template( "LabelNotFound", problemMessageTemplate: r"""Can't find label '#name'.""", correctionMessageTemplate: r"""Try defining the label, or correcting the name to match an existing label.""", withArgumentsOld: _withArgumentsOldLabelNotFound, + withArguments: _withArgumentsLabelNotFound, analyzerCodes: ["LABEL_UNDEFINED"], ); @@ -9662,16 +10488,22 @@ const MessageCode codeLanguageVersionPatchContext = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeLanguageVersionTooHighExplicit = - const Template< - Message Function(int count, int count2, int count3, int count4) - >( - "LanguageVersionTooHighExplicit", - problemMessageTemplate: - r"""The specified language version #count.#count2 is too high. The highest supported language version is #count3.#count4.""", - withArgumentsOld: _withArgumentsOldLanguageVersionTooHighExplicit, - ); +const Template< + Message Function(int count, int count2, int count3, int count4), + Message Function({ + required int count, + required int count2, + required int count3, + required int count4, + }) +> +codeLanguageVersionTooHighExplicit = const Template( + "LanguageVersionTooHighExplicit", + problemMessageTemplate: + r"""The specified language version #count.#count2 is too high. The highest supported language version is #count3.#count4.""", + withArgumentsOld: _withArgumentsOldLanguageVersionTooHighExplicit, + withArguments: _withArgumentsLanguageVersionTooHighExplicit, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsLanguageVersionTooHighExplicit({ @@ -9708,23 +10540,22 @@ Message _withArgumentsOldLanguageVersionTooHighExplicit( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(int count, int count2, String name, int count3, int count4) + Message Function(int count, int count2, String name, int count3, int count4), + Message Function({ + required int count, + required int count2, + required String name, + required int count3, + required int count4, + }) > -codeLanguageVersionTooHighPackage = - const Template< - Message Function( - int count, - int count2, - String name, - int count3, - int count4, - ) - >( - "LanguageVersionTooHighPackage", - problemMessageTemplate: - r"""The language version #count.#count2 specified for the package '#name' is too high. The highest supported language version is #count3.#count4.""", - withArgumentsOld: _withArgumentsOldLanguageVersionTooHighPackage, - ); +codeLanguageVersionTooHighPackage = const Template( + "LanguageVersionTooHighPackage", + problemMessageTemplate: + r"""The language version #count.#count2 specified for the package '#name' is too high. The highest supported language version is #count3.#count4.""", + withArgumentsOld: _withArgumentsOldLanguageVersionTooHighPackage, + withArguments: _withArgumentsLanguageVersionTooHighPackage, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsLanguageVersionTooHighPackage({ @@ -9765,16 +10596,22 @@ Message _withArgumentsOldLanguageVersionTooHighPackage( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeLanguageVersionTooLowExplicit = - const Template< - Message Function(int count, int count2, int count3, int count4) - >( - "LanguageVersionTooLowExplicit", - problemMessageTemplate: - r"""The specified language version #count.#count2 is too low. The lowest supported language version is #count3.#count4.""", - withArgumentsOld: _withArgumentsOldLanguageVersionTooLowExplicit, - ); +const Template< + Message Function(int count, int count2, int count3, int count4), + Message Function({ + required int count, + required int count2, + required int count3, + required int count4, + }) +> +codeLanguageVersionTooLowExplicit = const Template( + "LanguageVersionTooLowExplicit", + problemMessageTemplate: + r"""The specified language version #count.#count2 is too low. The lowest supported language version is #count3.#count4.""", + withArgumentsOld: _withArgumentsOldLanguageVersionTooLowExplicit, + withArguments: _withArgumentsLanguageVersionTooLowExplicit, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsLanguageVersionTooLowExplicit({ @@ -9811,23 +10648,22 @@ Message _withArgumentsOldLanguageVersionTooLowExplicit( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(int count, int count2, String name, int count3, int count4) + Message Function(int count, int count2, String name, int count3, int count4), + Message Function({ + required int count, + required int count2, + required String name, + required int count3, + required int count4, + }) > -codeLanguageVersionTooLowPackage = - const Template< - Message Function( - int count, - int count2, - String name, - int count3, - int count4, - ) - >( - "LanguageVersionTooLowPackage", - problemMessageTemplate: - r"""The language version #count.#count2 specified for the package '#name' is too low. The lowest supported language version is #count3.#count4.""", - withArgumentsOld: _withArgumentsOldLanguageVersionTooLowPackage, - ); +codeLanguageVersionTooLowPackage = const Template( + "LanguageVersionTooLowPackage", + problemMessageTemplate: + r"""The language version #count.#count2 specified for the package '#name' is too low. The lowest supported language version is #count3.#count4.""", + withArgumentsOld: _withArgumentsOldLanguageVersionTooLowPackage, + withArguments: _withArgumentsLanguageVersionTooLowPackage, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsLanguageVersionTooLowPackage({ @@ -9868,13 +10704,17 @@ Message _withArgumentsOldLanguageVersionTooLowPackage( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeLateDefinitelyAssignedError = - const Template( - "LateDefinitelyAssignedError", - problemMessageTemplate: - r"""Late final variable '#name' definitely assigned.""", - withArgumentsOld: _withArgumentsOldLateDefinitelyAssignedError, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeLateDefinitelyAssignedError = const Template( + "LateDefinitelyAssignedError", + problemMessageTemplate: + r"""Late final variable '#name' definitely assigned.""", + withArgumentsOld: _withArgumentsOldLateDefinitelyAssignedError, + withArguments: _withArgumentsLateDefinitelyAssignedError, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsLateDefinitelyAssignedError({required String name}) { @@ -9891,12 +10731,16 @@ Message _withArgumentsOldLateDefinitelyAssignedError(String name) => _withArgumentsLateDefinitelyAssignedError(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeLateDefinitelyUnassignedError = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeLateDefinitelyUnassignedError = const Template( "LateDefinitelyUnassignedError", problemMessageTemplate: r"""Late variable '#name' without initializer is definitely unassigned.""", withArgumentsOld: _withArgumentsOldLateDefinitelyUnassignedError, + withArguments: _withArgumentsLateDefinitelyUnassignedError, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9948,16 +10792,19 @@ const MessageCode codeListPatternTooManyTypeArguments = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeLiteralWithClass = - const Template( - "LiteralWithClass", - problemMessageTemplate: - r"""A #string literal can't be prefixed by '#lexeme'.""", - correctionMessageTemplate: r"""Try removing '#lexeme'""", - withArgumentsOld: _withArgumentsOldLiteralWithClass, - index: 116, - ); +const Template< + Message Function(String string, Token lexeme), + Message Function({required String string, required Token lexeme}) +> +codeLiteralWithClass = const Template( + "LiteralWithClass", + problemMessageTemplate: + r"""A #string literal can't be prefixed by '#lexeme'.""", + correctionMessageTemplate: r"""Try removing '#lexeme'""", + withArgumentsOld: _withArgumentsOldLiteralWithClass, + withArguments: _withArgumentsLiteralWithClass, + index: 116, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsLiteralWithClass({ @@ -9980,16 +10827,19 @@ Message _withArgumentsOldLiteralWithClass(String string, Token lexeme) => _withArgumentsLiteralWithClass(string: string, lexeme: lexeme); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeLiteralWithClassAndNew = - const Template( - "LiteralWithClassAndNew", - problemMessageTemplate: - r"""A #string literal can't be prefixed by 'new #lexeme'.""", - correctionMessageTemplate: r"""Try removing 'new' and '#lexeme'""", - withArgumentsOld: _withArgumentsOldLiteralWithClassAndNew, - index: 115, - ); +const Template< + Message Function(String string, Token lexeme), + Message Function({required String string, required Token lexeme}) +> +codeLiteralWithClassAndNew = const Template( + "LiteralWithClassAndNew", + problemMessageTemplate: + r"""A #string literal can't be prefixed by 'new #lexeme'.""", + correctionMessageTemplate: r"""Try removing 'new' and '#lexeme'""", + withArgumentsOld: _withArgumentsOldLiteralWithClassAndNew, + withArguments: _withArgumentsLiteralWithClassAndNew, + index: 115, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsLiteralWithClassAndNew({ @@ -10027,15 +10877,18 @@ const MessageCode codeLoadLibraryTakesNoArguments = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeLocalVariableUsedBeforeDeclared = - const Template( - "LocalVariableUsedBeforeDeclared", - problemMessageTemplate: - r"""Local variable '#name' can't be referenced before it is declared.""", - withArgumentsOld: _withArgumentsOldLocalVariableUsedBeforeDeclared, - analyzerCodes: ["REFERENCED_BEFORE_DECLARATION"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeLocalVariableUsedBeforeDeclared = const Template( + "LocalVariableUsedBeforeDeclared", + problemMessageTemplate: + r"""Local variable '#name' can't be referenced before it is declared.""", + withArgumentsOld: _withArgumentsOldLocalVariableUsedBeforeDeclared, + withArguments: _withArgumentsLocalVariableUsedBeforeDeclared, + analyzerCodes: ["REFERENCED_BEFORE_DECLARATION"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsLocalVariableUsedBeforeDeclared({required String name}) { @@ -10053,15 +10906,18 @@ Message _withArgumentsOldLocalVariableUsedBeforeDeclared(String name) => _withArgumentsLocalVariableUsedBeforeDeclared(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeLocalVariableUsedBeforeDeclaredContext = - const Template( - "LocalVariableUsedBeforeDeclaredContext", - problemMessageTemplate: - r"""This is the declaration of the variable '#name'.""", - withArgumentsOld: _withArgumentsOldLocalVariableUsedBeforeDeclaredContext, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeLocalVariableUsedBeforeDeclaredContext = const Template( + "LocalVariableUsedBeforeDeclaredContext", + problemMessageTemplate: + r"""This is the declaration of the variable '#name'.""", + withArgumentsOld: _withArgumentsOldLocalVariableUsedBeforeDeclaredContext, + withArguments: _withArgumentsLocalVariableUsedBeforeDeclaredContext, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsLocalVariableUsedBeforeDeclaredContext({ @@ -10128,15 +10984,17 @@ const MessageCode codeMapPatternTypeArgumentMismatch = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeMemberConflictsWithConstructor = - const Template( - "MemberConflictsWithConstructor", - problemMessageTemplate: - r"""The member conflicts with constructor '#name'.""", - withArgumentsOld: _withArgumentsOldMemberConflictsWithConstructor, - analyzerCodes: ["CONFLICTS_WITH_MEMBER"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeMemberConflictsWithConstructor = const Template( + "MemberConflictsWithConstructor", + problemMessageTemplate: r"""The member conflicts with constructor '#name'.""", + withArgumentsOld: _withArgumentsOldMemberConflictsWithConstructor, + withArguments: _withArgumentsMemberConflictsWithConstructor, + analyzerCodes: ["CONFLICTS_WITH_MEMBER"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsMemberConflictsWithConstructor({required String name}) { @@ -10153,14 +11011,17 @@ Message _withArgumentsOldMemberConflictsWithConstructor(String name) => _withArgumentsMemberConflictsWithConstructor(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeMemberConflictsWithConstructorCause = - const Template( - "MemberConflictsWithConstructorCause", - problemMessageTemplate: r"""Conflicting constructor '#name'.""", - withArgumentsOld: _withArgumentsOldMemberConflictsWithConstructorCause, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeMemberConflictsWithConstructorCause = const Template( + "MemberConflictsWithConstructorCause", + problemMessageTemplate: r"""Conflicting constructor '#name'.""", + withArgumentsOld: _withArgumentsOldMemberConflictsWithConstructorCause, + withArguments: _withArgumentsMemberConflictsWithConstructorCause, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsMemberConflictsWithConstructorCause({ @@ -10179,13 +11040,17 @@ Message _withArgumentsOldMemberConflictsWithConstructorCause(String name) => _withArgumentsMemberConflictsWithConstructorCause(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeMemberConflictsWithFactory = - const Template( - "MemberConflictsWithFactory", - problemMessageTemplate: r"""The member conflicts with factory '#name'.""", - withArgumentsOld: _withArgumentsOldMemberConflictsWithFactory, - analyzerCodes: ["CONFLICTS_WITH_MEMBER"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeMemberConflictsWithFactory = const Template( + "MemberConflictsWithFactory", + problemMessageTemplate: r"""The member conflicts with factory '#name'.""", + withArgumentsOld: _withArgumentsOldMemberConflictsWithFactory, + withArguments: _withArgumentsMemberConflictsWithFactory, + analyzerCodes: ["CONFLICTS_WITH_MEMBER"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsMemberConflictsWithFactory({required String name}) { @@ -10202,14 +11067,17 @@ Message _withArgumentsOldMemberConflictsWithFactory(String name) => _withArgumentsMemberConflictsWithFactory(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeMemberConflictsWithFactoryCause = - const Template( - "MemberConflictsWithFactoryCause", - problemMessageTemplate: r"""Conflicting factory '#name'.""", - withArgumentsOld: _withArgumentsOldMemberConflictsWithFactoryCause, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeMemberConflictsWithFactoryCause = const Template( + "MemberConflictsWithFactoryCause", + problemMessageTemplate: r"""Conflicting factory '#name'.""", + withArgumentsOld: _withArgumentsOldMemberConflictsWithFactoryCause, + withArguments: _withArgumentsMemberConflictsWithFactoryCause, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsMemberConflictsWithFactoryCause({required String name}) { @@ -10226,13 +11094,17 @@ Message _withArgumentsOldMemberConflictsWithFactoryCause(String name) => _withArgumentsMemberConflictsWithFactoryCause(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeMemberNotFound = - const Template( - "MemberNotFound", - problemMessageTemplate: r"""Member not found: '#name'.""", - withArgumentsOld: _withArgumentsOldMemberNotFound, - analyzerCodes: ["UNDEFINED_GETTER"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeMemberNotFound = const Template( + "MemberNotFound", + problemMessageTemplate: r"""Member not found: '#name'.""", + withArgumentsOld: _withArgumentsOldMemberNotFound, + withArguments: _withArgumentsMemberNotFound, + analyzerCodes: ["UNDEFINED_GETTER"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsMemberNotFound({required String name}) { @@ -10249,17 +11121,20 @@ Message _withArgumentsOldMemberNotFound(String name) => _withArgumentsMemberNotFound(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeMemberShouldBeListedAsCallableInDynamicInterface = - const Template( - "MemberShouldBeListedAsCallableInDynamicInterface", - problemMessageTemplate: - r"""Cannot invoke member '#name' from a dynamic module.""", - correctionMessageTemplate: - r"""Try removing the call or update the dynamic interface to list member '#name' as callable.""", - withArgumentsOld: - _withArgumentsOldMemberShouldBeListedAsCallableInDynamicInterface, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeMemberShouldBeListedAsCallableInDynamicInterface = const Template( + "MemberShouldBeListedAsCallableInDynamicInterface", + problemMessageTemplate: + r"""Cannot invoke member '#name' from a dynamic module.""", + correctionMessageTemplate: + r"""Try removing the call or update the dynamic interface to list member '#name' as callable.""", + withArgumentsOld: + _withArgumentsOldMemberShouldBeListedAsCallableInDynamicInterface, + withArguments: _withArgumentsMemberShouldBeListedAsCallableInDynamicInterface, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsMemberShouldBeListedAsCallableInDynamicInterface({ @@ -10282,17 +11157,21 @@ Message _withArgumentsOldMemberShouldBeListedAsCallableInDynamicInterface( ) => _withArgumentsMemberShouldBeListedAsCallableInDynamicInterface(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeMemberShouldBeListedAsCanBeOverriddenInDynamicInterface = - const Template( - "MemberShouldBeListedAsCanBeOverriddenInDynamicInterface", - problemMessageTemplate: - r"""Cannot override member '#name.#name2' in a dynamic module.""", - correctionMessageTemplate: - r"""Try removing the override or update the dynamic interface to list member '#name.#name2' as can-be-overridden.""", - withArgumentsOld: - _withArgumentsOldMemberShouldBeListedAsCanBeOverriddenInDynamicInterface, - ); +const Template< + Message Function(String name, String name2), + Message Function({required String name, required String name2}) +> +codeMemberShouldBeListedAsCanBeOverriddenInDynamicInterface = const Template( + "MemberShouldBeListedAsCanBeOverriddenInDynamicInterface", + problemMessageTemplate: + r"""Cannot override member '#name.#name2' in a dynamic module.""", + correctionMessageTemplate: + r"""Try removing the override or update the dynamic interface to list member '#name.#name2' as can-be-overridden.""", + withArgumentsOld: + _withArgumentsOldMemberShouldBeListedAsCanBeOverriddenInDynamicInterface, + withArguments: + _withArgumentsMemberShouldBeListedAsCanBeOverriddenInDynamicInterface, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsMemberShouldBeListedAsCanBeOverriddenInDynamicInterface({ @@ -10356,13 +11235,17 @@ const MessageCode codeMetadataTypeArgumentsUninstantiated = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeMethodNotFound = - const Template( - "MethodNotFound", - problemMessageTemplate: r"""Method not found: '#name'.""", - withArgumentsOld: _withArgumentsOldMethodNotFound, - analyzerCodes: ["UNDEFINED_METHOD"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeMethodNotFound = const Template( + "MethodNotFound", + problemMessageTemplate: r"""Method not found: '#name'.""", + withArgumentsOld: _withArgumentsOldMethodNotFound, + withArguments: _withArgumentsMethodNotFound, + analyzerCodes: ["UNDEFINED_METHOD"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsMethodNotFound({required String name}) { @@ -10443,13 +11326,17 @@ const MessageCode codeMissingFunctionParameters = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeMissingImplementationCause = - const Template( - "MissingImplementationCause", - problemMessageTemplate: r"""'#name' is defined here.""", - withArgumentsOld: _withArgumentsOldMissingImplementationCause, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeMissingImplementationCause = const Template( + "MissingImplementationCause", + problemMessageTemplate: r"""'#name' is defined here.""", + withArgumentsOld: _withArgumentsOldMissingImplementationCause, + withArguments: _withArgumentsMissingImplementationCause, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsMissingImplementationCause({required String name}) { @@ -10466,21 +11353,24 @@ Message _withArgumentsOldMissingImplementationCause(String name) => _withArgumentsMissingImplementationCause(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template names)> -codeMissingImplementationNotAbstract = - const Template names)>( - "MissingImplementationNotAbstract", - problemMessageTemplate: - r"""The non-abstract class '#name' is missing implementations for these members: +const Template< + Message Function(String name, List names), + Message Function({required String name, required List names}) +> +codeMissingImplementationNotAbstract = const Template( + "MissingImplementationNotAbstract", + problemMessageTemplate: + r"""The non-abstract class '#name' is missing implementations for these members: #names""", - correctionMessageTemplate: r"""Try to either + correctionMessageTemplate: r"""Try to either - provide an implementation, - inherit an implementation from a superclass or mixin, - mark the class as abstract, or - provide a 'noSuchMethod' implementation.""", - withArgumentsOld: _withArgumentsOldMissingImplementationNotAbstract, - analyzerCodes: ["CONCRETE_CLASS_WITH_ABSTRACT_MEMBER"], - ); + withArgumentsOld: _withArgumentsOldMissingImplementationNotAbstract, + withArguments: _withArgumentsMissingImplementationNotAbstract, + analyzerCodes: ["CONCRETE_CLASS_WITH_ABSTRACT_MEMBER"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsMissingImplementationNotAbstract({ @@ -10550,12 +11440,13 @@ const MessageCode codeMissingOperatorKeyword = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeMissingPartOf = const Template( +const Template +codeMissingPartOf = const Template( "MissingPartOf", problemMessageTemplate: r"""Can't use '#uri' as a part, because it has no 'part of' declaration.""", withArgumentsOld: _withArgumentsOldMissingPartOf, + withArguments: _withArgumentsMissingPartOf, analyzerCodes: ["PART_OF_NON_PART"], ); @@ -10623,14 +11514,18 @@ const MessageCode codeMissingTypedefParameters = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeMissingVariablePattern = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeMissingVariablePattern = const Template( "MissingVariablePattern", problemMessageTemplate: r"""Variable pattern '#name' is missing in this branch of the logical-or pattern.""", correctionMessageTemplate: r"""Try declaring this variable pattern in the branch.""", withArgumentsOld: _withArgumentsOldMissingVariablePattern, + withArguments: _withArgumentsMissingVariablePattern, analyzerCodes: ["MISSING_VARIABLE_PATTERN"], ); @@ -10651,17 +11546,18 @@ Message _withArgumentsOldMissingVariablePattern(String name) => _withArgumentsMissingVariablePattern(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeMixinApplicationNoConcreteGetter = - const Template( - "MixinApplicationNoConcreteGetter", - problemMessageTemplate: - r"""The class doesn't have a concrete implementation of the super-accessed member '#name'.""", - withArgumentsOld: _withArgumentsOldMixinApplicationNoConcreteGetter, - analyzerCodes: [ - "MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_MEMBER", - ], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeMixinApplicationNoConcreteGetter = const Template( + "MixinApplicationNoConcreteGetter", + problemMessageTemplate: + r"""The class doesn't have a concrete implementation of the super-accessed member '#name'.""", + withArgumentsOld: _withArgumentsOldMixinApplicationNoConcreteGetter, + withArguments: _withArgumentsMixinApplicationNoConcreteGetter, + analyzerCodes: ["MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_MEMBER"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsMixinApplicationNoConcreteGetter({required String name}) { @@ -10688,17 +11584,18 @@ const MessageCode codeMixinApplicationNoConcreteMemberContext = ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeMixinApplicationNoConcreteMethod = - const Template( - "MixinApplicationNoConcreteMethod", - problemMessageTemplate: - r"""The class doesn't have a concrete implementation of the super-invoked member '#name'.""", - withArgumentsOld: _withArgumentsOldMixinApplicationNoConcreteMethod, - analyzerCodes: [ - "MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_MEMBER", - ], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeMixinApplicationNoConcreteMethod = const Template( + "MixinApplicationNoConcreteMethod", + problemMessageTemplate: + r"""The class doesn't have a concrete implementation of the super-invoked member '#name'.""", + withArgumentsOld: _withArgumentsOldMixinApplicationNoConcreteMethod, + withArguments: _withArgumentsMixinApplicationNoConcreteMethod, + analyzerCodes: ["MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_MEMBER"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsMixinApplicationNoConcreteMethod({required String name}) { @@ -10716,17 +11613,18 @@ Message _withArgumentsOldMixinApplicationNoConcreteMethod(String name) => _withArgumentsMixinApplicationNoConcreteMethod(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeMixinApplicationNoConcreteSetter = - const Template( - "MixinApplicationNoConcreteSetter", - problemMessageTemplate: - r"""The class doesn't have a concrete implementation of the super-accessed setter '#name'.""", - withArgumentsOld: _withArgumentsOldMixinApplicationNoConcreteSetter, - analyzerCodes: [ - "MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_MEMBER", - ], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeMixinApplicationNoConcreteSetter = const Template( + "MixinApplicationNoConcreteSetter", + problemMessageTemplate: + r"""The class doesn't have a concrete implementation of the super-accessed setter '#name'.""", + withArgumentsOld: _withArgumentsOldMixinApplicationNoConcreteSetter, + withArguments: _withArgumentsMixinApplicationNoConcreteSetter, + analyzerCodes: ["MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_MEMBER"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsMixinApplicationNoConcreteSetter({required String name}) { @@ -10759,12 +11657,16 @@ const MessageCode codeMixinDeferredMixin = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeMixinInheritsFromNotObject = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeMixinInheritsFromNotObject = const Template( "MixinInheritsFromNotObject", problemMessageTemplate: r"""The class '#name' can't be used as a mixin because it extends a class other than 'Object'.""", withArgumentsOld: _withArgumentsOldMixinInheritsFromNotObject, + withArguments: _withArgumentsMixinInheritsFromNotObject, analyzerCodes: ["MIXIN_INHERITS_FROM_NOT_OBJECT"], ); @@ -10784,16 +11686,19 @@ Message _withArgumentsOldMixinInheritsFromNotObject(String name) => _withArgumentsMixinInheritsFromNotObject(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeMixinSubtypeOfBaseIsNotBase = - const Template( - "MixinSubtypeOfBaseIsNotBase", - problemMessageTemplate: - r"""The mixin '#name' must be 'base' because the supertype '#name2' is 'base'.""", - correctionMessageTemplate: r"""Try adding 'base' to the mixin.""", - withArgumentsOld: _withArgumentsOldMixinSubtypeOfBaseIsNotBase, - analyzerCodes: ["MIXIN_SUBTYPE_OF_BASE_IS_NOT_BASE"], - ); +const Template< + Message Function(String name, String name2), + Message Function({required String name, required String name2}) +> +codeMixinSubtypeOfBaseIsNotBase = const Template( + "MixinSubtypeOfBaseIsNotBase", + problemMessageTemplate: + r"""The mixin '#name' must be 'base' because the supertype '#name2' is 'base'.""", + correctionMessageTemplate: r"""Try adding 'base' to the mixin.""", + withArgumentsOld: _withArgumentsOldMixinSubtypeOfBaseIsNotBase, + withArguments: _withArgumentsMixinSubtypeOfBaseIsNotBase, + analyzerCodes: ["MIXIN_SUBTYPE_OF_BASE_IS_NOT_BASE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsMixinSubtypeOfBaseIsNotBase({ @@ -10818,16 +11723,19 @@ Message _withArgumentsOldMixinSubtypeOfBaseIsNotBase( ) => _withArgumentsMixinSubtypeOfBaseIsNotBase(name: name, name2: name2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeMixinSubtypeOfFinalIsNotBase = - const Template( - "MixinSubtypeOfFinalIsNotBase", - problemMessageTemplate: - r"""The mixin '#name' must be 'base' because the supertype '#name2' is 'final'.""", - correctionMessageTemplate: r"""Try adding 'base' to the mixin.""", - withArgumentsOld: _withArgumentsOldMixinSubtypeOfFinalIsNotBase, - analyzerCodes: ["MIXIN_SUBTYPE_OF_FINAL_IS_NOT_BASE"], - ); +const Template< + Message Function(String name, String name2), + Message Function({required String name, required String name2}) +> +codeMixinSubtypeOfFinalIsNotBase = const Template( + "MixinSubtypeOfFinalIsNotBase", + problemMessageTemplate: + r"""The mixin '#name' must be 'base' because the supertype '#name2' is 'final'.""", + correctionMessageTemplate: r"""Try adding 'base' to the mixin.""", + withArgumentsOld: _withArgumentsOldMixinSubtypeOfFinalIsNotBase, + withArguments: _withArgumentsMixinSubtypeOfFinalIsNotBase, + analyzerCodes: ["MIXIN_SUBTYPE_OF_FINAL_IS_NOT_BASE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsMixinSubtypeOfFinalIsNotBase({ @@ -10869,16 +11777,19 @@ const MessageCode codeMixinWithClause = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeModifierOutOfOrder = - const Template( - "ModifierOutOfOrder", - problemMessageTemplate: - r"""The modifier '#string' should be before the modifier '#string2'.""", - correctionMessageTemplate: r"""Try re-ordering the modifiers.""", - withArgumentsOld: _withArgumentsOldModifierOutOfOrder, - index: 56, - ); +const Template< + Message Function(String string, String string2), + Message Function({required String string, required String string2}) +> +codeModifierOutOfOrder = const Template( + "ModifierOutOfOrder", + problemMessageTemplate: + r"""The modifier '#string' should be before the modifier '#string2'.""", + correctionMessageTemplate: r"""Try re-ordering the modifiers.""", + withArgumentsOld: _withArgumentsOldModifierOutOfOrder, + withArguments: _withArgumentsModifierOutOfOrder, + index: 56, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsModifierOutOfOrder({ @@ -10908,14 +11819,18 @@ const MessageCode codeMoreThanOneSuperInitializer = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeMultipleClauses = const Template( +const Template< + Message Function(String string, String string2), + Message Function({required String string, required String string2}) +> +codeMultipleClauses = const Template( "MultipleClauses", problemMessageTemplate: r"""Each '#string' definition can have at most one '#string2' clause.""", correctionMessageTemplate: r"""Try combining all of the '#string2' clauses into a single clause.""", withArgumentsOld: _withArgumentsOldMultipleClauses, + withArguments: _withArgumentsMultipleClauses, index: 121, ); @@ -11006,13 +11921,17 @@ const MessageCode codeMultipleWith = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeNameNotFound = - const Template( - "NameNotFound", - problemMessageTemplate: r"""Undefined name '#name'.""", - withArgumentsOld: _withArgumentsOldNameNotFound, - analyzerCodes: ["UNDEFINED_NAME"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeNameNotFound = const Template( + "NameNotFound", + problemMessageTemplate: r"""Undefined name '#name'.""", + withArgumentsOld: _withArgumentsOldNameNotFound, + withArguments: _withArgumentsNameNotFound, + analyzerCodes: ["UNDEFINED_NAME"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsNameNotFound({required String name}) { @@ -11045,14 +11964,17 @@ const MessageCode codeNamedFunctionExpression = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeNamedMixinOverride = - const Template( - "NamedMixinOverride", - problemMessageTemplate: - r"""The mixin application class '#name' introduces an erroneous override of '#name2'.""", - withArgumentsOld: _withArgumentsOldNamedMixinOverride, - ); +const Template< + Message Function(String name, String name2), + Message Function({required String name, required String name2}) +> +codeNamedMixinOverride = const Template( + "NamedMixinOverride", + problemMessageTemplate: + r"""The mixin application class '#name' introduces an erroneous override of '#name2'.""", + withArgumentsOld: _withArgumentsOldNamedMixinOverride, + withArguments: _withArgumentsNamedMixinOverride, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsNamedMixinOverride({ @@ -11150,13 +12072,17 @@ const MessageCode codeNoAugmentSuperWriteTarget = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeNoSuchNamedParameter = - const Template( - "NoSuchNamedParameter", - problemMessageTemplate: r"""No named parameter with the name '#name'.""", - withArgumentsOld: _withArgumentsOldNoSuchNamedParameter, - analyzerCodes: ["UNDEFINED_NAMED_PARAMETER"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeNoSuchNamedParameter = const Template( + "NoSuchNamedParameter", + problemMessageTemplate: r"""No named parameter with the name '#name'.""", + withArgumentsOld: _withArgumentsOldNoSuchNamedParameter, + withArguments: _withArgumentsNoSuchNamedParameter, + analyzerCodes: ["UNDEFINED_NAMED_PARAMETER"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsNoSuchNamedParameter({required String name}) { @@ -11179,17 +12105,20 @@ const MessageCode codeNoUnnamedConstructorInObject = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeNonAsciiIdentifier = - const Template( - "NonAsciiIdentifier", - problemMessageTemplate: - r"""The non-ASCII character '#character' (#unicode) can't be used in identifiers, only in strings and comments.""", - correctionMessageTemplate: - r"""Try using an US-ASCII letter, a digit, '_' (an underscore), or '$' (a dollar sign).""", - withArgumentsOld: _withArgumentsOldNonAsciiIdentifier, - analyzerCodes: ["ILLEGAL_CHARACTER"], - ); +const Template< + Message Function(String character, int unicode), + Message Function({required String character, required int unicode}) +> +codeNonAsciiIdentifier = const Template( + "NonAsciiIdentifier", + problemMessageTemplate: + r"""The non-ASCII character '#character' (#unicode) can't be used in identifiers, only in strings and comments.""", + correctionMessageTemplate: + r"""Try using an US-ASCII letter, a digit, '_' (an underscore), or '$' (a dollar sign).""", + withArgumentsOld: _withArgumentsOldNonAsciiIdentifier, + withArguments: _withArgumentsNonAsciiIdentifier, + analyzerCodes: ["ILLEGAL_CHARACTER"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsNonAsciiIdentifier({ @@ -11213,12 +12142,16 @@ Message _withArgumentsOldNonAsciiIdentifier(String character, int unicode) => _withArgumentsNonAsciiIdentifier(character: character, unicode: unicode); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeNonAsciiWhitespace = const Template( +const Template< + Message Function(int unicode), + Message Function({required int unicode}) +> +codeNonAsciiWhitespace = const Template( "NonAsciiWhitespace", problemMessageTemplate: r"""The non-ASCII space character #unicode can only be used in strings and comments.""", withArgumentsOld: _withArgumentsOldNonAsciiWhitespace, + withArguments: _withArgumentsNonAsciiWhitespace, analyzerCodes: ["ILLEGAL_CHARACTER"], ); @@ -11304,12 +12237,16 @@ const MessageCode codeNonExtensionTypeMemberOneOfContext = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeNonNullableNotAssignedError = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeNonNullableNotAssignedError = const Template( "NonNullableNotAssignedError", problemMessageTemplate: r"""Non-nullable variable '#name' must be assigned before it can be used.""", withArgumentsOld: _withArgumentsOldNonNullableNotAssignedError, + withArguments: _withArgumentsNonNullableNotAssignedError, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -11344,14 +12281,18 @@ const MessageCode codeNonPositiveArrayDimensions = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeNonSimpleBoundViaReference = - const Template( - "NonSimpleBoundViaReference", - problemMessageTemplate: - r"""Bound of this variable references raw type '#name'.""", - withArgumentsOld: _withArgumentsOldNonSimpleBoundViaReference, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeNonSimpleBoundViaReference = const Template( + "NonSimpleBoundViaReference", + problemMessageTemplate: + r"""Bound of this variable references raw type '#name'.""", + withArgumentsOld: _withArgumentsOldNonSimpleBoundViaReference, + withArguments: _withArgumentsNonSimpleBoundViaReference, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsNonSimpleBoundViaReference({required String name}) { @@ -11369,12 +12310,16 @@ Message _withArgumentsOldNonSimpleBoundViaReference(String name) => _withArgumentsNonSimpleBoundViaReference(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeNonSimpleBoundViaVariable = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeNonSimpleBoundViaVariable = const Template( "NonSimpleBoundViaVariable", problemMessageTemplate: r"""Bound of this variable references variable '#name' from the same declaration.""", withArgumentsOld: _withArgumentsOldNonSimpleBoundViaVariable, + withArguments: _withArgumentsNonSimpleBoundViaVariable, severity: CfeSeverity.context, ); @@ -11419,15 +12364,18 @@ const MessageCode codeNotAConstantExpression = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeNotAPrefixInTypeAnnotation = - const Template( - "NotAPrefixInTypeAnnotation", - problemMessageTemplate: - r"""'#name.#name2' can't be used as a type because '#name' doesn't refer to an import prefix.""", - withArgumentsOld: _withArgumentsOldNotAPrefixInTypeAnnotation, - analyzerCodes: ["NOT_A_TYPE"], - ); +const Template< + Message Function(String name, String name2), + Message Function({required String name, required String name2}) +> +codeNotAPrefixInTypeAnnotation = const Template( + "NotAPrefixInTypeAnnotation", + problemMessageTemplate: + r"""'#name.#name2' can't be used as a type because '#name' doesn't refer to an import prefix.""", + withArgumentsOld: _withArgumentsOldNotAPrefixInTypeAnnotation, + withArguments: _withArgumentsNotAPrefixInTypeAnnotation, + analyzerCodes: ["NOT_A_TYPE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsNotAPrefixInTypeAnnotation({ @@ -11451,13 +12399,17 @@ Message _withArgumentsOldNotAPrefixInTypeAnnotation( ) => _withArgumentsNotAPrefixInTypeAnnotation(name: name, name2: name2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeNotAType = - const Template( - "NotAType", - problemMessageTemplate: r"""'#name' isn't a type.""", - withArgumentsOld: _withArgumentsOldNotAType, - analyzerCodes: ["NOT_A_TYPE"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeNotAType = const Template( + "NotAType", + problemMessageTemplate: r"""'#name' isn't a type.""", + withArgumentsOld: _withArgumentsOldNotAType, + withArguments: _withArgumentsNotAType, + analyzerCodes: ["NOT_A_TYPE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsNotAType({required String name}) { @@ -11488,12 +12440,16 @@ const MessageCode codeNotAnLvalue = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeNotBinaryOperator = - const Template( - "NotBinaryOperator", - problemMessageTemplate: r"""'#lexeme' isn't a binary operator.""", - withArgumentsOld: _withArgumentsOldNotBinaryOperator, - ); +const Template< + Message Function(Token lexeme), + Message Function({required Token lexeme}) +> +codeNotBinaryOperator = const Template( + "NotBinaryOperator", + problemMessageTemplate: r"""'#lexeme' isn't a binary operator.""", + withArgumentsOld: _withArgumentsOldNotBinaryOperator, + withArguments: _withArgumentsNotBinaryOperator, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsNotBinaryOperator({required Token lexeme}) { @@ -11510,13 +12466,17 @@ Message _withArgumentsOldNotBinaryOperator(Token lexeme) => _withArgumentsNotBinaryOperator(lexeme: lexeme); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeNotConstantExpression = - const Template( - "NotConstantExpression", - problemMessageTemplate: r"""#string is not a constant expression.""", - withArgumentsOld: _withArgumentsOldNotConstantExpression, - analyzerCodes: ["NOT_CONSTANT_EXPRESSION"], - ); +const Template< + Message Function(String string), + Message Function({required String string}) +> +codeNotConstantExpression = const Template( + "NotConstantExpression", + problemMessageTemplate: r"""#string is not a constant expression.""", + withArgumentsOld: _withArgumentsOldNotConstantExpression, + withArguments: _withArgumentsNotConstantExpression, + analyzerCodes: ["NOT_CONSTANT_EXPRESSION"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsNotConstantExpression({required String string}) { @@ -11543,14 +12503,17 @@ const MessageCode codeNullAwareCascadeOutOfOrder = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeNullableInterfaceError = - const Template( - "NullableInterfaceError", - problemMessageTemplate: - r"""Can't implement '#name' because it's nullable.""", - correctionMessageTemplate: r"""Try removing the question mark.""", - withArgumentsOld: _withArgumentsOldNullableInterfaceError, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeNullableInterfaceError = const Template( + "NullableInterfaceError", + problemMessageTemplate: r"""Can't implement '#name' because it's nullable.""", + correctionMessageTemplate: r"""Try removing the question mark.""", + withArgumentsOld: _withArgumentsOldNullableInterfaceError, + withArguments: _withArgumentsNullableInterfaceError, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsNullableInterfaceError({required String name}) { @@ -11568,14 +12531,17 @@ Message _withArgumentsOldNullableInterfaceError(String name) => _withArgumentsNullableInterfaceError(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeNullableMixinError = - const Template( - "NullableMixinError", - problemMessageTemplate: - r"""Can't mix '#name' in because it's nullable.""", - correctionMessageTemplate: r"""Try removing the question mark.""", - withArgumentsOld: _withArgumentsOldNullableMixinError, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeNullableMixinError = const Template( + "NullableMixinError", + problemMessageTemplate: r"""Can't mix '#name' in because it's nullable.""", + correctionMessageTemplate: r"""Try removing the question mark.""", + withArgumentsOld: _withArgumentsOldNullableMixinError, + withArguments: _withArgumentsNullableMixinError, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsNullableMixinError({required String name}) { @@ -11600,14 +12566,17 @@ const MessageCode codeNullableSpreadError = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeNullableSuperclassError = - const Template( - "NullableSuperclassError", - problemMessageTemplate: - r"""Can't extend '#name' because it's nullable.""", - correctionMessageTemplate: r"""Try removing the question mark.""", - withArgumentsOld: _withArgumentsOldNullableSuperclassError, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeNullableSuperclassError = const Template( + "NullableSuperclassError", + problemMessageTemplate: r"""Can't extend '#name' because it's nullable.""", + correctionMessageTemplate: r"""Try removing the question mark.""", + withArgumentsOld: _withArgumentsOldNullableSuperclassError, + withArguments: _withArgumentsNullableSuperclassError, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsNullableSuperclassError({required String name}) { @@ -11625,13 +12594,17 @@ Message _withArgumentsOldNullableSuperclassError(String name) => _withArgumentsNullableSuperclassError(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeNullableTearoffError = - const Template( - "NullableTearoffError", - problemMessageTemplate: - r"""Can't tear off method '#name' from a potentially null value.""", - withArgumentsOld: _withArgumentsOldNullableTearoffError, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeNullableTearoffError = const Template( + "NullableTearoffError", + problemMessageTemplate: + r"""Can't tear off method '#name' from a potentially null value.""", + withArgumentsOld: _withArgumentsOldNullableTearoffError, + withArguments: _withArgumentsNullableTearoffError, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsNullableTearoffError({required String name}) { @@ -11692,14 +12665,18 @@ const MessageCode codeOnlyTry = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeOperatorMinusParameterMismatch = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeOperatorMinusParameterMismatch = const Template( "OperatorMinusParameterMismatch", problemMessageTemplate: r"""Operator '#name' should have zero or one parameter.""", correctionMessageTemplate: r"""With zero parameters, it has the syntactic form '-a', formally known as 'unary-'. With one parameter, it has the syntactic form 'a - b', formally known as '-'.""", withArgumentsOld: _withArgumentsOldOperatorMinusParameterMismatch, + withArguments: _withArgumentsOperatorMinusParameterMismatch, analyzerCodes: ["WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS"], ); @@ -11721,13 +12698,17 @@ Message _withArgumentsOldOperatorMinusParameterMismatch(String name) => _withArgumentsOperatorMinusParameterMismatch(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeOperatorParameterMismatch0 = - const Template( - "OperatorParameterMismatch0", - problemMessageTemplate: - r"""Operator '#name' shouldn't have any parameters.""", - withArgumentsOld: _withArgumentsOldOperatorParameterMismatch0, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeOperatorParameterMismatch0 = const Template( + "OperatorParameterMismatch0", + problemMessageTemplate: + r"""Operator '#name' shouldn't have any parameters.""", + withArgumentsOld: _withArgumentsOldOperatorParameterMismatch0, + withArguments: _withArgumentsOperatorParameterMismatch0, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsOperatorParameterMismatch0({required String name}) { @@ -11744,14 +12725,18 @@ Message _withArgumentsOldOperatorParameterMismatch0(String name) => _withArgumentsOperatorParameterMismatch0(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeOperatorParameterMismatch1 = - const Template( - "OperatorParameterMismatch1", - problemMessageTemplate: - r"""Operator '#name' should have exactly one parameter.""", - withArgumentsOld: _withArgumentsOldOperatorParameterMismatch1, - analyzerCodes: ["WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeOperatorParameterMismatch1 = const Template( + "OperatorParameterMismatch1", + problemMessageTemplate: + r"""Operator '#name' should have exactly one parameter.""", + withArgumentsOld: _withArgumentsOldOperatorParameterMismatch1, + withArguments: _withArgumentsOperatorParameterMismatch1, + analyzerCodes: ["WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsOperatorParameterMismatch1({required String name}) { @@ -11769,14 +12754,18 @@ Message _withArgumentsOldOperatorParameterMismatch1(String name) => _withArgumentsOperatorParameterMismatch1(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeOperatorParameterMismatch2 = - const Template( - "OperatorParameterMismatch2", - problemMessageTemplate: - r"""Operator '#name' should have exactly two parameters.""", - withArgumentsOld: _withArgumentsOldOperatorParameterMismatch2, - analyzerCodes: ["WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeOperatorParameterMismatch2 = const Template( + "OperatorParameterMismatch2", + problemMessageTemplate: + r"""Operator '#name' should have exactly two parameters.""", + withArgumentsOld: _withArgumentsOldOperatorParameterMismatch2, + withArguments: _withArgumentsOperatorParameterMismatch2, + analyzerCodes: ["WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsOperatorParameterMismatch2({required String name}) { @@ -11817,17 +12806,20 @@ const MessageCode codeOptionalParametersInExtensionTypeDeclaration = ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeOutOfOrderClauses = - const Template( - "OutOfOrderClauses", - problemMessageTemplate: - r"""The '#string' clause must come before the '#string2' clause.""", - correctionMessageTemplate: - r"""Try moving the '#string' clause before the '#string2' clause.""", - withArgumentsOld: _withArgumentsOldOutOfOrderClauses, - index: 122, - ); +const Template< + Message Function(String string, String string2), + Message Function({required String string, required String string2}) +> +codeOutOfOrderClauses = const Template( + "OutOfOrderClauses", + problemMessageTemplate: + r"""The '#string' clause must come before the '#string2' clause.""", + correctionMessageTemplate: + r"""Try moving the '#string' clause before the '#string2' clause.""", + withArgumentsOld: _withArgumentsOldOutOfOrderClauses, + withArguments: _withArgumentsOutOfOrderClauses, + index: 122, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsOutOfOrderClauses({ @@ -11851,13 +12843,17 @@ Message _withArgumentsOldOutOfOrderClauses(String string, String string2) => _withArgumentsOutOfOrderClauses(string: string, string2: string2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeOverriddenMethodCause = - const Template( - "OverriddenMethodCause", - problemMessageTemplate: r"""This is the overridden method ('#name').""", - withArgumentsOld: _withArgumentsOldOverriddenMethodCause, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeOverriddenMethodCause = const Template( + "OverriddenMethodCause", + problemMessageTemplate: r"""This is the overridden method ('#name').""", + withArgumentsOld: _withArgumentsOldOverriddenMethodCause, + withArguments: _withArgumentsOverriddenMethodCause, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsOverriddenMethodCause({required String name}) { @@ -11874,15 +12870,18 @@ Message _withArgumentsOldOverriddenMethodCause(String name) => _withArgumentsOverriddenMethodCause(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeOverrideFewerNamedArguments = - const Template( - "OverrideFewerNamedArguments", - problemMessageTemplate: - r"""The method '#name' has fewer named arguments than those of overridden method '#name2'.""", - withArgumentsOld: _withArgumentsOldOverrideFewerNamedArguments, - analyzerCodes: ["INVALID_OVERRIDE_NAMED"], - ); +const Template< + Message Function(String name, String name2), + Message Function({required String name, required String name2}) +> +codeOverrideFewerNamedArguments = const Template( + "OverrideFewerNamedArguments", + problemMessageTemplate: + r"""The method '#name' has fewer named arguments than those of overridden method '#name2'.""", + withArgumentsOld: _withArgumentsOldOverrideFewerNamedArguments, + withArguments: _withArgumentsOverrideFewerNamedArguments, + analyzerCodes: ["INVALID_OVERRIDE_NAMED"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsOverrideFewerNamedArguments({ @@ -11906,15 +12905,18 @@ Message _withArgumentsOldOverrideFewerNamedArguments( ) => _withArgumentsOverrideFewerNamedArguments(name: name, name2: name2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeOverrideFewerPositionalArguments = - const Template( - "OverrideFewerPositionalArguments", - problemMessageTemplate: - r"""The method '#name' has fewer positional arguments than those of overridden method '#name2'.""", - withArgumentsOld: _withArgumentsOldOverrideFewerPositionalArguments, - analyzerCodes: ["INVALID_OVERRIDE_POSITIONAL"], - ); +const Template< + Message Function(String name, String name2), + Message Function({required String name, required String name2}) +> +codeOverrideFewerPositionalArguments = const Template( + "OverrideFewerPositionalArguments", + problemMessageTemplate: + r"""The method '#name' has fewer positional arguments than those of overridden method '#name2'.""", + withArgumentsOld: _withArgumentsOldOverrideFewerPositionalArguments, + withArguments: _withArgumentsOverrideFewerPositionalArguments, + analyzerCodes: ["INVALID_OVERRIDE_POSITIONAL"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsOverrideFewerPositionalArguments({ @@ -11938,15 +12940,22 @@ Message _withArgumentsOldOverrideFewerPositionalArguments( ) => _withArgumentsOverrideFewerPositionalArguments(name: name, name2: name2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeOverrideMismatchNamedParameter = - const Template( - "OverrideMismatchNamedParameter", - problemMessageTemplate: - r"""The method '#name' doesn't have the named parameter '#name2' of overridden method '#name3'.""", - withArgumentsOld: _withArgumentsOldOverrideMismatchNamedParameter, - analyzerCodes: ["INVALID_OVERRIDE_NAMED"], - ); +const Template< + Message Function(String name, String name2, String name3), + Message Function({ + required String name, + required String name2, + required String name3, + }) +> +codeOverrideMismatchNamedParameter = const Template( + "OverrideMismatchNamedParameter", + problemMessageTemplate: + r"""The method '#name' doesn't have the named parameter '#name2' of overridden method '#name3'.""", + withArgumentsOld: _withArgumentsOldOverrideMismatchNamedParameter, + withArguments: _withArgumentsOverrideMismatchNamedParameter, + analyzerCodes: ["INVALID_OVERRIDE_NAMED"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsOverrideMismatchNamedParameter({ @@ -11977,14 +12986,21 @@ Message _withArgumentsOldOverrideMismatchNamedParameter( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeOverrideMismatchRequiredNamedParameter = - const Template( - "OverrideMismatchRequiredNamedParameter", - problemMessageTemplate: - r"""The required named parameter '#name' in method '#name2' is not required in overridden method '#name3'.""", - withArgumentsOld: _withArgumentsOldOverrideMismatchRequiredNamedParameter, - ); +const Template< + Message Function(String name, String name2, String name3), + Message Function({ + required String name, + required String name2, + required String name3, + }) +> +codeOverrideMismatchRequiredNamedParameter = const Template( + "OverrideMismatchRequiredNamedParameter", + problemMessageTemplate: + r"""The required named parameter '#name' in method '#name2' is not required in overridden method '#name3'.""", + withArgumentsOld: _withArgumentsOldOverrideMismatchRequiredNamedParameter, + withArguments: _withArgumentsOverrideMismatchRequiredNamedParameter, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsOverrideMismatchRequiredNamedParameter({ @@ -12015,15 +13031,18 @@ Message _withArgumentsOldOverrideMismatchRequiredNamedParameter( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeOverrideMoreRequiredArguments = - const Template( - "OverrideMoreRequiredArguments", - problemMessageTemplate: - r"""The method '#name' has more required arguments than those of overridden method '#name2'.""", - withArgumentsOld: _withArgumentsOldOverrideMoreRequiredArguments, - analyzerCodes: ["INVALID_OVERRIDE_REQUIRED"], - ); +const Template< + Message Function(String name, String name2), + Message Function({required String name, required String name2}) +> +codeOverrideMoreRequiredArguments = const Template( + "OverrideMoreRequiredArguments", + problemMessageTemplate: + r"""The method '#name' has more required arguments than those of overridden method '#name2'.""", + withArgumentsOld: _withArgumentsOldOverrideMoreRequiredArguments, + withArguments: _withArgumentsOverrideMoreRequiredArguments, + analyzerCodes: ["INVALID_OVERRIDE_REQUIRED"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsOverrideMoreRequiredArguments({ @@ -12047,15 +13066,18 @@ Message _withArgumentsOldOverrideMoreRequiredArguments( ) => _withArgumentsOverrideMoreRequiredArguments(name: name, name2: name2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeOverrideTypeParametersMismatch = - const Template( - "OverrideTypeParametersMismatch", - problemMessageTemplate: - r"""Declared type variables of '#name' doesn't match those on overridden method '#name2'.""", - withArgumentsOld: _withArgumentsOldOverrideTypeParametersMismatch, - analyzerCodes: ["INVALID_METHOD_OVERRIDE_TYPE_PARAMETERS"], - ); +const Template< + Message Function(String name, String name2), + Message Function({required String name, required String name2}) +> +codeOverrideTypeParametersMismatch = const Template( + "OverrideTypeParametersMismatch", + problemMessageTemplate: + r"""Declared type variables of '#name' doesn't match those on overridden method '#name2'.""", + withArgumentsOld: _withArgumentsOldOverrideTypeParametersMismatch, + withArguments: _withArgumentsOverrideTypeParametersMismatch, + analyzerCodes: ["INVALID_METHOD_OVERRIDE_TYPE_PARAMETERS"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsOverrideTypeParametersMismatch({ @@ -12079,13 +13101,17 @@ Message _withArgumentsOldOverrideTypeParametersMismatch( ) => _withArgumentsOverrideTypeParametersMismatch(name: name, name2: name2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codePackageNotFound = - const Template( - "PackageNotFound", - problemMessageTemplate: - r"""Couldn't resolve the package '#name' in '#uri'.""", - withArgumentsOld: _withArgumentsOldPackageNotFound, - ); +const Template< + Message Function(String name, Uri uri), + Message Function({required String name, required Uri uri}) +> +codePackageNotFound = const Template( + "PackageNotFound", + problemMessageTemplate: + r"""Couldn't resolve the package '#name' in '#uri'.""", + withArgumentsOld: _withArgumentsOldPackageNotFound, + withArguments: _withArgumentsPackageNotFound, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsPackageNotFound({ @@ -12107,13 +13133,17 @@ Message _withArgumentsOldPackageNotFound(String name, Uri uri) => _withArgumentsPackageNotFound(name: name, uri: uri); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codePackagesFileFormat = - const Template( - "PackagesFileFormat", - problemMessageTemplate: - r"""Problem in packages configuration file: #string""", - withArgumentsOld: _withArgumentsOldPackagesFileFormat, - ); +const Template< + Message Function(String string), + Message Function({required String string}) +> +codePackagesFileFormat = const Template( + "PackagesFileFormat", + problemMessageTemplate: + r"""Problem in packages configuration file: #string""", + withArgumentsOld: _withArgumentsOldPackagesFileFormat, + withArguments: _withArgumentsPackagesFileFormat, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsPackagesFileFormat({required String string}) { @@ -12162,14 +13192,15 @@ const MessageCode codePartInPartLibraryContext = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codePartOfInLibrary = const Template( +const Template +codePartOfInLibrary = const Template( "PartOfInLibrary", problemMessageTemplate: r"""Can't import '#uri', because it has a 'part of' declaration.""", correctionMessageTemplate: r"""Try removing the 'part of' declaration, or using '#uri' as a part.""", withArgumentsOld: _withArgumentsOldPartOfInLibrary, + withArguments: _withArgumentsPartOfInLibrary, analyzerCodes: ["IMPORT_OF_NON_LIBRARY"], ); @@ -12191,15 +13222,22 @@ Message _withArgumentsOldPartOfInLibrary(Uri uri) => _withArgumentsPartOfInLibrary(uri: uri); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codePartOfLibraryNameMismatch = - const Template( - "PartOfLibraryNameMismatch", - problemMessageTemplate: - r"""Using '#uri' as part of '#name' but its 'part of' declaration says '#name2'.""", - withArgumentsOld: _withArgumentsOldPartOfLibraryNameMismatch, - analyzerCodes: ["PART_OF_DIFFERENT_LIBRARY"], - ); +const Template< + Message Function(Uri uri, String name, String name2), + Message Function({ + required Uri uri, + required String name, + required String name2, + }) +> +codePartOfLibraryNameMismatch = const Template( + "PartOfLibraryNameMismatch", + problemMessageTemplate: + r"""Using '#uri' as part of '#name' but its 'part of' declaration says '#name2'.""", + withArgumentsOld: _withArgumentsOldPartOfLibraryNameMismatch, + withArguments: _withArgumentsPartOfLibraryNameMismatch, + analyzerCodes: ["PART_OF_DIFFERENT_LIBRARY"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsPartOfLibraryNameMismatch({ @@ -12258,15 +13296,18 @@ const MessageCode codePartOfTwoLibrariesContext = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codePartOfUriMismatch = - const Template( - "PartOfUriMismatch", - problemMessageTemplate: - r"""Using '#uri' as part of '#uri2' but its 'part of' declaration says '#uri3'.""", - withArgumentsOld: _withArgumentsOldPartOfUriMismatch, - analyzerCodes: ["PART_OF_DIFFERENT_LIBRARY"], - ); +const Template< + Message Function(Uri uri, Uri uri2, Uri uri3), + Message Function({required Uri uri, required Uri uri2, required Uri uri3}) +> +codePartOfUriMismatch = const Template( + "PartOfUriMismatch", + problemMessageTemplate: + r"""Using '#uri' as part of '#uri2' but its 'part of' declaration says '#uri3'.""", + withArgumentsOld: _withArgumentsOldPartOfUriMismatch, + withArguments: _withArgumentsPartOfUriMismatch, + analyzerCodes: ["PART_OF_DIFFERENT_LIBRARY"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsPartOfUriMismatch({ @@ -12290,14 +13331,18 @@ Message _withArgumentsOldPartOfUriMismatch(Uri uri, Uri uri2, Uri uri3) => _withArgumentsPartOfUriMismatch(uri: uri, uri2: uri2, uri3: uri3); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codePartOfUseUri = const Template( +const Template< + Message Function(Uri uri, Uri uri2, String name), + Message Function({required Uri uri, required Uri uri2, required String name}) +> +codePartOfUseUri = const Template( "PartOfUseUri", problemMessageTemplate: r"""Using '#uri' as part of '#uri2' but its 'part of' declaration says '#name'.""", correctionMessageTemplate: r"""Try changing the 'part of' declaration to use a relative file name.""", withArgumentsOld: _withArgumentsOldPartOfUseUri, + withArguments: _withArgumentsPartOfUseUri, analyzerCodes: ["PART_OF_UNNAMED_LIBRARY"], ); @@ -12332,13 +13377,14 @@ const MessageCode codePartOrphan = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codePartTwice = - const Template( - "PartTwice", - problemMessageTemplate: r"""Can't use '#uri' as a part more than once.""", - withArgumentsOld: _withArgumentsOldPartTwice, - analyzerCodes: ["DUPLICATE_PART"], - ); +const Template +codePartTwice = const Template( + "PartTwice", + problemMessageTemplate: r"""Can't use '#uri' as a part more than once.""", + withArgumentsOld: _withArgumentsOldPartTwice, + withArguments: _withArgumentsPartTwice, + analyzerCodes: ["DUPLICATE_PART"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsPartTwice({required Uri uri}) { @@ -12390,13 +13436,17 @@ const MessageCode codePatchExtensionTypeParametersMismatch = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codePatchInjectionFailed = const Template( +const Template< + Message Function(String name, Uri uri), + Message Function({required String name, required Uri uri}) +> +codePatchInjectionFailed = const Template( "PatchInjectionFailed", problemMessageTemplate: r"""Can't inject public '#name' into '#uri'.""", correctionMessageTemplate: r"""Make '#name' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").""", withArgumentsOld: _withArgumentsOldPatchInjectionFailed, + withArguments: _withArgumentsPatchInjectionFailed, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -12420,17 +13470,20 @@ Message _withArgumentsOldPatchInjectionFailed(String name, Uri uri) => _withArgumentsPatchInjectionFailed(name: name, uri: uri); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codePatternAssignmentDeclaresVariable = - const Template( - "PatternAssignmentDeclaresVariable", - problemMessageTemplate: - r"""Variable '#name' can't be declared in a pattern assignment.""", - correctionMessageTemplate: - r"""Try using a preexisting variable or changing the assignment to a pattern variable declaration.""", - withArgumentsOld: _withArgumentsOldPatternAssignmentDeclaresVariable, - index: 145, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codePatternAssignmentDeclaresVariable = const Template( + "PatternAssignmentDeclaresVariable", + problemMessageTemplate: + r"""Variable '#name' can't be declared in a pattern assignment.""", + correctionMessageTemplate: + r"""Try using a preexisting variable or changing the assignment to a pattern variable declaration.""", + withArgumentsOld: _withArgumentsOldPatternAssignmentDeclaresVariable, + withArguments: _withArgumentsPatternAssignmentDeclaresVariable, + index: 145, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsPatternAssignmentDeclaresVariable({ @@ -12641,14 +13694,18 @@ const MessageCode codeRedirectionInNonFactory = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeRedirectionTargetNotFound = - const Template( - "RedirectionTargetNotFound", - problemMessageTemplate: - r"""Redirection constructor target not found: '#name'""", - withArgumentsOld: _withArgumentsOldRedirectionTargetNotFound, - analyzerCodes: ["REDIRECT_TO_MISSING_CONSTRUCTOR"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeRedirectionTargetNotFound = const Template( + "RedirectionTargetNotFound", + problemMessageTemplate: + r"""Redirection constructor target not found: '#name'""", + withArgumentsOld: _withArgumentsOldRedirectionTargetNotFound, + withArguments: _withArgumentsRedirectionTargetNotFound, + analyzerCodes: ["REDIRECT_TO_MISSING_CONSTRUCTOR"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsRedirectionTargetNotFound({required String name}) { @@ -12689,15 +13746,17 @@ const MessageCode codeRepresentationFieldTrailingComma = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeRequiredNamedParameterHasDefaultValueError = - const Template( - "RequiredNamedParameterHasDefaultValueError", - problemMessageTemplate: - r"""Named parameter '#name' is required and can't have a default value.""", - withArgumentsOld: - _withArgumentsOldRequiredNamedParameterHasDefaultValueError, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeRequiredNamedParameterHasDefaultValueError = const Template( + "RequiredNamedParameterHasDefaultValueError", + problemMessageTemplate: + r"""Named parameter '#name' is required and can't have a default value.""", + withArgumentsOld: _withArgumentsOldRequiredNamedParameterHasDefaultValueError, + withArguments: _withArgumentsRequiredNamedParameterHasDefaultValueError, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsRequiredNamedParameterHasDefaultValueError({ @@ -12769,12 +13828,13 @@ const MessageCode codeScriptTagInPartFile = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeSdkRootNotFound = - const Template( - "SdkRootNotFound", - problemMessageTemplate: r"""SDK root directory not found: #uri.""", - withArgumentsOld: _withArgumentsOldSdkRootNotFound, - ); +const Template +codeSdkRootNotFound = const Template( + "SdkRootNotFound", + problemMessageTemplate: r"""SDK root directory not found: #uri.""", + withArgumentsOld: _withArgumentsOldSdkRootNotFound, + withArguments: _withArgumentsSdkRootNotFound, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSdkRootNotFound({required Uri uri}) { @@ -12791,13 +13851,14 @@ Message _withArgumentsOldSdkRootNotFound(Uri uri) => _withArgumentsSdkRootNotFound(uri: uri); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeSdkSpecificationNotFound = const Template( +const Template +codeSdkSpecificationNotFound = const Template( "SdkSpecificationNotFound", problemMessageTemplate: r"""SDK libraries specification not found: #uri.""", correctionMessageTemplate: r"""Normally, the specification is a file named 'libraries.json' in the Dart SDK install location.""", withArgumentsOld: _withArgumentsOldSdkSpecificationNotFound, + withArguments: _withArgumentsSdkSpecificationNotFound, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -12817,12 +13878,13 @@ Message _withArgumentsOldSdkSpecificationNotFound(Uri uri) => _withArgumentsSdkSpecificationNotFound(uri: uri); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeSdkSummaryNotFound = - const Template( - "SdkSummaryNotFound", - problemMessageTemplate: r"""SDK summary not found: #uri.""", - withArgumentsOld: _withArgumentsOldSdkSummaryNotFound, - ); +const Template +codeSdkSummaryNotFound = const Template( + "SdkSummaryNotFound", + problemMessageTemplate: r"""SDK summary not found: #uri.""", + withArgumentsOld: _withArgumentsOldSdkSummaryNotFound, + withArguments: _withArgumentsSdkSummaryNotFound, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSdkSummaryNotFound({required Uri uri}) { @@ -12839,15 +13901,18 @@ Message _withArgumentsOldSdkSummaryNotFound(Uri uri) => _withArgumentsSdkSummaryNotFound(uri: uri); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeSealedClassSubtypeOutsideOfLibrary = - const Template( - "SealedClassSubtypeOutsideOfLibrary", - problemMessageTemplate: - r"""The class '#name' can't be extended, implemented, or mixed in outside of its library because it's a sealed class.""", - withArgumentsOld: _withArgumentsOldSealedClassSubtypeOutsideOfLibrary, - analyzerCodes: ["SEALED_CLASS_SUBTYPE_OUTSIDE_OF_LIBRARY"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeSealedClassSubtypeOutsideOfLibrary = const Template( + "SealedClassSubtypeOutsideOfLibrary", + problemMessageTemplate: + r"""The class '#name' can't be extended, implemented, or mixed in outside of its library because it's a sealed class.""", + withArgumentsOld: _withArgumentsOldSealedClassSubtypeOutsideOfLibrary, + withArguments: _withArgumentsSealedClassSubtypeOutsideOfLibrary, + analyzerCodes: ["SEALED_CLASS_SUBTYPE_OUTSIDE_OF_LIBRARY"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSealedClassSubtypeOutsideOfLibrary({ @@ -12898,15 +13963,17 @@ const MessageCode codeSetOrMapLiteralTooManyTypeArguments = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeSetterConflictsWithDeclaration = - const Template( - "SetterConflictsWithDeclaration", - problemMessageTemplate: - r"""The setter conflicts with declaration '#name'.""", - withArgumentsOld: _withArgumentsOldSetterConflictsWithDeclaration, - analyzerCodes: ["CONFLICTS_WITH_MEMBER"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeSetterConflictsWithDeclaration = const Template( + "SetterConflictsWithDeclaration", + problemMessageTemplate: r"""The setter conflicts with declaration '#name'.""", + withArgumentsOld: _withArgumentsOldSetterConflictsWithDeclaration, + withArguments: _withArgumentsSetterConflictsWithDeclaration, + analyzerCodes: ["CONFLICTS_WITH_MEMBER"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSetterConflictsWithDeclaration({required String name}) { @@ -12923,14 +13990,17 @@ Message _withArgumentsOldSetterConflictsWithDeclaration(String name) => _withArgumentsSetterConflictsWithDeclaration(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeSetterConflictsWithDeclarationCause = - const Template( - "SetterConflictsWithDeclarationCause", - problemMessageTemplate: r"""Conflicting declaration '#name'.""", - withArgumentsOld: _withArgumentsOldSetterConflictsWithDeclarationCause, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeSetterConflictsWithDeclarationCause = const Template( + "SetterConflictsWithDeclarationCause", + problemMessageTemplate: r"""Conflicting declaration '#name'.""", + withArgumentsOld: _withArgumentsOldSetterConflictsWithDeclarationCause, + withArguments: _withArgumentsSetterConflictsWithDeclarationCause, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSetterConflictsWithDeclarationCause({ @@ -12957,13 +14027,17 @@ const MessageCode codeSetterConstructor = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeSetterNotFound = - const Template( - "SetterNotFound", - problemMessageTemplate: r"""Setter not found: '#name'.""", - withArgumentsOld: _withArgumentsOldSetterNotFound, - analyzerCodes: ["UNDEFINED_SETTER"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeSetterNotFound = const Template( + "SetterNotFound", + problemMessageTemplate: r"""Setter not found: '#name'.""", + withArgumentsOld: _withArgumentsOldSetterNotFound, + withArguments: _withArgumentsSetterNotFound, + analyzerCodes: ["UNDEFINED_SETTER"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSetterNotFound({required String name}) { @@ -12995,19 +14069,24 @@ const MessageCode codeSetterWithWrongNumberOfFormals = const MessageCode( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(int count, int count2, num num1, num num2, num num3) + Message Function(int count, int count2, num num1, num num2, num num3), + Message Function({ + required int count, + required int count2, + required num num1, + required num num2, + required num num3, + }) > -codeSourceBodySummary = - const Template< - Message Function(int count, int count2, num num1, num num2, num num3) - >( - "SourceBodySummary", - problemMessageTemplate: - r"""Built bodies for #count compilation units (#count2 bytes) in #num1%.3ms, that is, +codeSourceBodySummary = const Template( + "SourceBodySummary", + problemMessageTemplate: + r"""Built bodies for #count compilation units (#count2 bytes) in #num1%.3ms, that is, #num2%12.3 bytes/ms, and #num3%12.3 ms/compilation unit.""", - withArgumentsOld: _withArgumentsOldSourceBodySummary, - ); + withArgumentsOld: _withArgumentsOldSourceBodySummary, + withArguments: _withArgumentsSourceBodySummary, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSourceBodySummary({ @@ -13068,19 +14147,24 @@ Message _withArgumentsOldSourceBodySummary( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(int count, int count2, num num1, num num2, num num3) + Message Function(int count, int count2, num num1, num num2, num num3), + Message Function({ + required int count, + required int count2, + required num num1, + required num num2, + required num num3, + }) > -codeSourceOutlineSummary = - const Template< - Message Function(int count, int count2, num num1, num num2, num num3) - >( - "SourceOutlineSummary", - problemMessageTemplate: - r"""Built outlines for #count compilation units (#count2 bytes) in #num1%.3ms, that is, +codeSourceOutlineSummary = const Template( + "SourceOutlineSummary", + problemMessageTemplate: + r"""Built outlines for #count compilation units (#count2 bytes) in #num1%.3ms, that is, #num2%12.3 bytes/ms, and #num3%12.3 ms/compilation unit.""", - withArgumentsOld: _withArgumentsOldSourceOutlineSummary, - ); + withArgumentsOld: _withArgumentsOldSourceOutlineSummary, + withArguments: _withArgumentsSourceOutlineSummary, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSourceOutlineSummary({ @@ -13163,12 +14247,16 @@ const MessageCode codeStackOverflow = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeStaticConflictsWithInstance = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeStaticConflictsWithInstance = const Template( "StaticConflictsWithInstance", problemMessageTemplate: r"""Static property '#name' conflicts with instance property of the same name.""", withArgumentsOld: _withArgumentsOldStaticConflictsWithInstance, + withArguments: _withArgumentsStaticConflictsWithInstance, analyzerCodes: ["CONFLICTS_WITH_MEMBER"], ); @@ -13188,14 +14276,17 @@ Message _withArgumentsOldStaticConflictsWithInstance(String name) => _withArgumentsStaticConflictsWithInstance(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeStaticConflictsWithInstanceCause = - const Template( - "StaticConflictsWithInstanceCause", - problemMessageTemplate: r"""Conflicting instance property '#name'.""", - withArgumentsOld: _withArgumentsOldStaticConflictsWithInstanceCause, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeStaticConflictsWithInstanceCause = const Template( + "StaticConflictsWithInstanceCause", + problemMessageTemplate: r"""Conflicting instance property '#name'.""", + withArgumentsOld: _withArgumentsOldStaticConflictsWithInstanceCause, + withArguments: _withArgumentsStaticConflictsWithInstanceCause, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsStaticConflictsWithInstanceCause({required String name}) { @@ -13237,17 +14328,20 @@ const MessageCode codeStaticTearOffFromInstantiatedClass = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeSubtypeOfBaseIsNotBaseFinalOrSealed = - const Template( - "SubtypeOfBaseIsNotBaseFinalOrSealed", - problemMessageTemplate: - r"""The type '#name' must be 'base', 'final' or 'sealed' because the supertype '#name2' is 'base'.""", - correctionMessageTemplate: - r"""Try adding 'base', 'final', or 'sealed' to the type.""", - withArgumentsOld: _withArgumentsOldSubtypeOfBaseIsNotBaseFinalOrSealed, - analyzerCodes: ["SUBTYPE_OF_BASE_IS_NOT_BASE_FINAL_OR_SEALED"], - ); +const Template< + Message Function(String name, String name2), + Message Function({required String name, required String name2}) +> +codeSubtypeOfBaseIsNotBaseFinalOrSealed = const Template( + "SubtypeOfBaseIsNotBaseFinalOrSealed", + problemMessageTemplate: + r"""The type '#name' must be 'base', 'final' or 'sealed' because the supertype '#name2' is 'base'.""", + correctionMessageTemplate: + r"""Try adding 'base', 'final', or 'sealed' to the type.""", + withArgumentsOld: _withArgumentsOldSubtypeOfBaseIsNotBaseFinalOrSealed, + withArguments: _withArgumentsSubtypeOfBaseIsNotBaseFinalOrSealed, + analyzerCodes: ["SUBTYPE_OF_BASE_IS_NOT_BASE_FINAL_OR_SEALED"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSubtypeOfBaseIsNotBaseFinalOrSealed({ @@ -13274,17 +14368,20 @@ Message _withArgumentsOldSubtypeOfBaseIsNotBaseFinalOrSealed( _withArgumentsSubtypeOfBaseIsNotBaseFinalOrSealed(name: name, name2: name2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeSubtypeOfFinalIsNotBaseFinalOrSealed = - const Template( - "SubtypeOfFinalIsNotBaseFinalOrSealed", - problemMessageTemplate: - r"""The type '#name' must be 'base', 'final' or 'sealed' because the supertype '#name2' is 'final'.""", - correctionMessageTemplate: - r"""Try adding 'base', 'final', or 'sealed' to the type.""", - withArgumentsOld: _withArgumentsOldSubtypeOfFinalIsNotBaseFinalOrSealed, - analyzerCodes: ["SUBTYPE_OF_FINAL_IS_NOT_BASE_FINAL_OR_SEALED"], - ); +const Template< + Message Function(String name, String name2), + Message Function({required String name, required String name2}) +> +codeSubtypeOfFinalIsNotBaseFinalOrSealed = const Template( + "SubtypeOfFinalIsNotBaseFinalOrSealed", + problemMessageTemplate: + r"""The type '#name' must be 'base', 'final' or 'sealed' because the supertype '#name2' is 'final'.""", + correctionMessageTemplate: + r"""Try adding 'base', 'final', or 'sealed' to the type.""", + withArgumentsOld: _withArgumentsOldSubtypeOfFinalIsNotBaseFinalOrSealed, + withArguments: _withArgumentsSubtypeOfFinalIsNotBaseFinalOrSealed, + analyzerCodes: ["SUBTYPE_OF_FINAL_IS_NOT_BASE_FINAL_OR_SEALED"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSubtypeOfFinalIsNotBaseFinalOrSealed({ @@ -13329,13 +14426,17 @@ const MessageCode codeSuperAsIdentifier = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeSuperExtensionTypeIsIllegal = - const Template( - "SuperExtensionTypeIsIllegal", - problemMessageTemplate: - r"""The type '#name' can't be implemented by an extension type.""", - withArgumentsOld: _withArgumentsOldSuperExtensionTypeIsIllegal, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeSuperExtensionTypeIsIllegal = const Template( + "SuperExtensionTypeIsIllegal", + problemMessageTemplate: + r"""The type '#name' can't be implemented by an extension type.""", + withArgumentsOld: _withArgumentsOldSuperExtensionTypeIsIllegal, + withArguments: _withArgumentsSuperExtensionTypeIsIllegal, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSuperExtensionTypeIsIllegal({required String name}) { @@ -13353,14 +14454,17 @@ Message _withArgumentsOldSuperExtensionTypeIsIllegal(String name) => _withArgumentsSuperExtensionTypeIsIllegal(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeSuperExtensionTypeIsTypeParameter = - const Template( - "SuperExtensionTypeIsTypeParameter", - problemMessageTemplate: - r"""The type variable '#name' can't be implemented by an extension type.""", - withArgumentsOld: _withArgumentsOldSuperExtensionTypeIsTypeParameter, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeSuperExtensionTypeIsTypeParameter = const Template( + "SuperExtensionTypeIsTypeParameter", + problemMessageTemplate: + r"""The type variable '#name' can't be implemented by an extension type.""", + withArgumentsOld: _withArgumentsOldSuperExtensionTypeIsTypeParameter, + withArguments: _withArgumentsSuperExtensionTypeIsTypeParameter, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSuperExtensionTypeIsTypeParameter({ @@ -13412,17 +14516,20 @@ codeSuperParameterInitializerOutsideConstructor = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeSuperclassHasNoConstructor = - const Template( - "SuperclassHasNoConstructor", - problemMessageTemplate: - r"""Superclass has no constructor named '#name'.""", - withArgumentsOld: _withArgumentsOldSuperclassHasNoConstructor, - analyzerCodes: [ - "UNDEFINED_CONSTRUCTOR_IN_INITIALIZER", - "UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT", - ], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeSuperclassHasNoConstructor = const Template( + "SuperclassHasNoConstructor", + problemMessageTemplate: r"""Superclass has no constructor named '#name'.""", + withArgumentsOld: _withArgumentsOldSuperclassHasNoConstructor, + withArguments: _withArgumentsSuperclassHasNoConstructor, + analyzerCodes: [ + "UNDEFINED_CONSTRUCTOR_IN_INITIALIZER", + "UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT", + ], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSuperclassHasNoConstructor({required String name}) { @@ -13439,15 +14546,18 @@ Message _withArgumentsOldSuperclassHasNoConstructor(String name) => _withArgumentsSuperclassHasNoConstructor(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeSuperclassHasNoDefaultConstructor = - const Template( - "SuperclassHasNoDefaultConstructor", - problemMessageTemplate: - r"""The superclass, '#name', has no unnamed constructor that takes no arguments.""", - withArgumentsOld: _withArgumentsOldSuperclassHasNoDefaultConstructor, - analyzerCodes: ["NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeSuperclassHasNoDefaultConstructor = const Template( + "SuperclassHasNoDefaultConstructor", + problemMessageTemplate: + r"""The superclass, '#name', has no unnamed constructor that takes no arguments.""", + withArgumentsOld: _withArgumentsOldSuperclassHasNoDefaultConstructor, + withArguments: _withArgumentsSuperclassHasNoDefaultConstructor, + analyzerCodes: ["NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSuperclassHasNoDefaultConstructor({ @@ -13467,13 +14577,17 @@ Message _withArgumentsOldSuperclassHasNoDefaultConstructor(String name) => _withArgumentsSuperclassHasNoDefaultConstructor(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeSuperclassHasNoGetter = - const Template( - "SuperclassHasNoGetter", - problemMessageTemplate: r"""Superclass has no getter named '#name'.""", - withArgumentsOld: _withArgumentsOldSuperclassHasNoGetter, - analyzerCodes: ["UNDEFINED_SUPER_GETTER"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeSuperclassHasNoGetter = const Template( + "SuperclassHasNoGetter", + problemMessageTemplate: r"""Superclass has no getter named '#name'.""", + withArgumentsOld: _withArgumentsOldSuperclassHasNoGetter, + withArguments: _withArgumentsSuperclassHasNoGetter, + analyzerCodes: ["UNDEFINED_SUPER_GETTER"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSuperclassHasNoGetter({required String name}) { @@ -13490,13 +14604,17 @@ Message _withArgumentsOldSuperclassHasNoGetter(String name) => _withArgumentsSuperclassHasNoGetter(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeSuperclassHasNoMember = - const Template( - "SuperclassHasNoMember", - problemMessageTemplate: r"""Superclass has no member named '#name'.""", - withArgumentsOld: _withArgumentsOldSuperclassHasNoMember, - analyzerCodes: ["UNDEFINED_SUPER_GETTER"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeSuperclassHasNoMember = const Template( + "SuperclassHasNoMember", + problemMessageTemplate: r"""Superclass has no member named '#name'.""", + withArgumentsOld: _withArgumentsOldSuperclassHasNoMember, + withArguments: _withArgumentsSuperclassHasNoMember, + analyzerCodes: ["UNDEFINED_SUPER_GETTER"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSuperclassHasNoMember({required String name}) { @@ -13513,13 +14631,17 @@ Message _withArgumentsOldSuperclassHasNoMember(String name) => _withArgumentsSuperclassHasNoMember(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeSuperclassHasNoMethod = - const Template( - "SuperclassHasNoMethod", - problemMessageTemplate: r"""Superclass has no method named '#name'.""", - withArgumentsOld: _withArgumentsOldSuperclassHasNoMethod, - analyzerCodes: ["UNDEFINED_SUPER_METHOD"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeSuperclassHasNoMethod = const Template( + "SuperclassHasNoMethod", + problemMessageTemplate: r"""Superclass has no method named '#name'.""", + withArgumentsOld: _withArgumentsOldSuperclassHasNoMethod, + withArguments: _withArgumentsSuperclassHasNoMethod, + analyzerCodes: ["UNDEFINED_SUPER_METHOD"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSuperclassHasNoMethod({required String name}) { @@ -13536,13 +14658,17 @@ Message _withArgumentsOldSuperclassHasNoMethod(String name) => _withArgumentsSuperclassHasNoMethod(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeSuperclassHasNoSetter = - const Template( - "SuperclassHasNoSetter", - problemMessageTemplate: r"""Superclass has no setter named '#name'.""", - withArgumentsOld: _withArgumentsOldSuperclassHasNoSetter, - analyzerCodes: ["UNDEFINED_SUPER_SETTER"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeSuperclassHasNoSetter = const Template( + "SuperclassHasNoSetter", + problemMessageTemplate: r"""Superclass has no setter named '#name'.""", + withArgumentsOld: _withArgumentsOldSuperclassHasNoSetter, + withArguments: _withArgumentsSuperclassHasNoSetter, + analyzerCodes: ["UNDEFINED_SUPER_SETTER"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSuperclassHasNoSetter({required String name}) { @@ -13565,14 +14691,17 @@ const MessageCode codeSupertypeIsFunction = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeSupertypeIsIllegal = - const Template( - "SupertypeIsIllegal", - problemMessageTemplate: - r"""The type '#name' can't be used as supertype.""", - withArgumentsOld: _withArgumentsOldSupertypeIsIllegal, - analyzerCodes: ["EXTENDS_NON_CLASS"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeSupertypeIsIllegal = const Template( + "SupertypeIsIllegal", + problemMessageTemplate: r"""The type '#name' can't be used as supertype.""", + withArgumentsOld: _withArgumentsOldSupertypeIsIllegal, + withArguments: _withArgumentsSupertypeIsIllegal, + analyzerCodes: ["EXTENDS_NON_CLASS"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSupertypeIsIllegal({required String name}) { @@ -13589,14 +14718,18 @@ Message _withArgumentsOldSupertypeIsIllegal(String name) => _withArgumentsSupertypeIsIllegal(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeSupertypeIsTypeParameter = - const Template( - "SupertypeIsTypeParameter", - problemMessageTemplate: - r"""The type variable '#name' can't be used as supertype.""", - withArgumentsOld: _withArgumentsOldSupertypeIsTypeParameter, - analyzerCodes: ["EXTENDS_NON_CLASS"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeSupertypeIsTypeParameter = const Template( + "SupertypeIsTypeParameter", + problemMessageTemplate: + r"""The type variable '#name' can't be used as supertype.""", + withArgumentsOld: _withArgumentsOldSupertypeIsTypeParameter, + withArguments: _withArgumentsSupertypeIsTypeParameter, + analyzerCodes: ["EXTENDS_NON_CLASS"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSupertypeIsTypeParameter({required String name}) { @@ -13652,13 +14785,17 @@ const MessageCode codeSyntheticToken = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeThisAccessInFieldInitializer = - const Template( - "ThisAccessInFieldInitializer", - problemMessageTemplate: - r"""Can't access 'this' in a field initializer to read '#name'.""", - withArgumentsOld: _withArgumentsOldThisAccessInFieldInitializer, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeThisAccessInFieldInitializer = const Template( + "ThisAccessInFieldInitializer", + problemMessageTemplate: + r"""Can't access 'this' in a field initializer to read '#name'.""", + withArgumentsOld: _withArgumentsOldThisAccessInFieldInitializer, + withArguments: _withArgumentsThisAccessInFieldInitializer, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsThisAccessInFieldInitializer({required String name}) { @@ -13683,13 +14820,17 @@ const MessageCode codeThisAsIdentifier = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeThisNotPromoted = - const Template( - "ThisNotPromoted", - problemMessageTemplate: r"""'this' can't be promoted.""", - correctionMessageTemplate: r"""See #string""", - withArgumentsOld: _withArgumentsOldThisNotPromoted, - ); +const Template< + Message Function(String string), + Message Function({required String string}) +> +codeThisNotPromoted = const Template( + "ThisNotPromoted", + problemMessageTemplate: r"""'this' can't be promoted.""", + correctionMessageTemplate: r"""See #string""", + withArgumentsOld: _withArgumentsOldThisNotPromoted, + withArguments: _withArgumentsThisNotPromoted, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsThisNotPromoted({required String string}) { @@ -13707,15 +14848,17 @@ Message _withArgumentsOldThisNotPromoted(String string) => _withArgumentsThisNotPromoted(string: string); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeThisOrSuperAccessInFieldInitializer = - const Template( - "ThisOrSuperAccessInFieldInitializer", - problemMessageTemplate: - r"""Can't access '#string' in a field initializer.""", - withArgumentsOld: _withArgumentsOldThisOrSuperAccessInFieldInitializer, - analyzerCodes: ["THIS_ACCESS_FROM_INITIALIZER"], - ); +const Template< + Message Function(String string), + Message Function({required String string}) +> +codeThisOrSuperAccessInFieldInitializer = const Template( + "ThisOrSuperAccessInFieldInitializer", + problemMessageTemplate: r"""Can't access '#string' in a field initializer.""", + withArgumentsOld: _withArgumentsOldThisOrSuperAccessInFieldInitializer, + withArguments: _withArgumentsThisOrSuperAccessInFieldInitializer, + analyzerCodes: ["THIS_ACCESS_FROM_INITIALIZER"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsThisOrSuperAccessInFieldInitializer({ @@ -13734,14 +14877,18 @@ Message _withArgumentsOldThisOrSuperAccessInFieldInitializer(String string) => _withArgumentsThisOrSuperAccessInFieldInitializer(string: string); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeTooFewArguments = - const Template( - "TooFewArguments", - problemMessageTemplate: - r"""Too few positional arguments: #count required, #count2 given.""", - withArgumentsOld: _withArgumentsOldTooFewArguments, - analyzerCodes: ["NOT_ENOUGH_REQUIRED_ARGUMENTS"], - ); +const Template< + Message Function(int count, int count2), + Message Function({required int count, required int count2}) +> +codeTooFewArguments = const Template( + "TooFewArguments", + problemMessageTemplate: + r"""Too few positional arguments: #count required, #count2 given.""", + withArgumentsOld: _withArgumentsOldTooFewArguments, + withArguments: _withArgumentsTooFewArguments, + analyzerCodes: ["NOT_ENOUGH_REQUIRED_ARGUMENTS"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsTooFewArguments({ @@ -13761,14 +14908,18 @@ Message _withArgumentsOldTooFewArguments(int count, int count2) => _withArgumentsTooFewArguments(count: count, count2: count2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeTooManyArguments = const Template( +const Template< + Message Function(int count, int count2), + Message Function({required int count, required int count2}) +> +codeTooManyArguments = const Template( "TooManyArguments", problemMessageTemplate: r"""Too many positional arguments: #count allowed, but #count2 found.""", correctionMessageTemplate: r"""Try removing the extra positional arguments.""", withArgumentsOld: _withArgumentsOldTooManyArguments, + withArguments: _withArgumentsTooManyArguments, analyzerCodes: ["EXTRA_POSITIONAL_ARGUMENTS"], ); @@ -13809,13 +14960,17 @@ const MessageCode codeTypeAfterVar = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeTypeArgumentMismatch = - const Template( - "TypeArgumentMismatch", - problemMessageTemplate: r"""Expected #count type arguments.""", - withArgumentsOld: _withArgumentsOldTypeArgumentMismatch, - analyzerCodes: ["WRONG_NUMBER_OF_TYPE_ARGUMENTS"], - ); +const Template< + Message Function(int count), + Message Function({required int count}) +> +codeTypeArgumentMismatch = const Template( + "TypeArgumentMismatch", + problemMessageTemplate: r"""Expected #count type arguments.""", + withArgumentsOld: _withArgumentsOldTypeArgumentMismatch, + withArguments: _withArgumentsTypeArgumentMismatch, + analyzerCodes: ["WRONG_NUMBER_OF_TYPE_ARGUMENTS"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsTypeArgumentMismatch({required int count}) { @@ -13831,15 +14986,19 @@ Message _withArgumentsOldTypeArgumentMismatch(int count) => _withArgumentsTypeArgumentMismatch(count: count); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeTypeArgumentsOnTypeVariable = - const Template( - "TypeArgumentsOnTypeVariable", - problemMessageTemplate: - r"""Can't use type arguments with type variable '#name'.""", - correctionMessageTemplate: r"""Try removing the type arguments.""", - withArgumentsOld: _withArgumentsOldTypeArgumentsOnTypeVariable, - index: 13, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeTypeArgumentsOnTypeVariable = const Template( + "TypeArgumentsOnTypeVariable", + problemMessageTemplate: + r"""Can't use type arguments with type variable '#name'.""", + correctionMessageTemplate: r"""Try removing the type arguments.""", + withArgumentsOld: _withArgumentsOldTypeArgumentsOnTypeVariable, + withArguments: _withArgumentsTypeArgumentsOnTypeVariable, + index: 13, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsTypeArgumentsOnTypeVariable({required String name}) { @@ -13866,13 +15025,17 @@ const MessageCode codeTypeBeforeFactory = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeTypeNotFound = - const Template( - "TypeNotFound", - problemMessageTemplate: r"""Type '#name' not found.""", - withArgumentsOld: _withArgumentsOldTypeNotFound, - analyzerCodes: ["UNDEFINED_CLASS"], - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeTypeNotFound = const Template( + "TypeNotFound", + problemMessageTemplate: r"""Type '#name' not found.""", + withArgumentsOld: _withArgumentsOldTypeNotFound, + withArguments: _withArgumentsTypeNotFound, + analyzerCodes: ["UNDEFINED_CLASS"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsTypeNotFound({required String name}) { @@ -13889,12 +15052,16 @@ Message _withArgumentsOldTypeNotFound(String name) => _withArgumentsTypeNotFound(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeTypeOrigin = - const Template( - "TypeOrigin", - problemMessageTemplate: r"""'#name' is from '#uri'.""", - withArgumentsOld: _withArgumentsOldTypeOrigin, - ); +const Template< + Message Function(String name, Uri uri), + Message Function({required String name, required Uri uri}) +> +codeTypeOrigin = const Template( + "TypeOrigin", + problemMessageTemplate: r"""'#name' is from '#uri'.""", + withArgumentsOld: _withArgumentsOldTypeOrigin, + withArguments: _withArgumentsTypeOrigin, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsTypeOrigin({required String name, required Uri uri}) { @@ -13912,13 +15079,16 @@ Message _withArgumentsOldTypeOrigin(String name, Uri uri) => _withArgumentsTypeOrigin(name: name, uri: uri); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeTypeOriginWithFileUri = - const Template( - "TypeOriginWithFileUri", - problemMessageTemplate: r"""'#name' is from '#uri' ('#uri2').""", - withArgumentsOld: _withArgumentsOldTypeOriginWithFileUri, - ); +const Template< + Message Function(String name, Uri uri, Uri uri2), + Message Function({required String name, required Uri uri, required Uri uri2}) +> +codeTypeOriginWithFileUri = const Template( + "TypeOriginWithFileUri", + problemMessageTemplate: r"""'#name' is from '#uri' ('#uri2').""", + withArgumentsOld: _withArgumentsOldTypeOriginWithFileUri, + withArguments: _withArgumentsTypeOriginWithFileUri, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsTypeOriginWithFileUri({ @@ -13951,14 +15121,17 @@ const MessageCode codeTypeParameterDuplicatedName = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeTypeParameterDuplicatedNameCause = - const Template( - "TypeParameterDuplicatedNameCause", - problemMessageTemplate: r"""The other type variable named '#name'.""", - withArgumentsOld: _withArgumentsOldTypeParameterDuplicatedNameCause, - severity: CfeSeverity.context, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeTypeParameterDuplicatedNameCause = const Template( + "TypeParameterDuplicatedNameCause", + problemMessageTemplate: r"""The other type variable named '#name'.""", + withArgumentsOld: _withArgumentsOldTypeParameterDuplicatedNameCause, + withArguments: _withArgumentsTypeParameterDuplicatedNameCause, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsTypeParameterDuplicatedNameCause({required String name}) { @@ -14054,14 +15227,15 @@ const MessageCode codeTypedefUnaliasedTypeCause = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeUnavailableDartLibrary = - const Template( - "UnavailableDartLibrary", - problemMessageTemplate: - r"""Dart library '#uri' is not available on this platform.""", - withArgumentsOld: _withArgumentsOldUnavailableDartLibrary, - analyzerCodes: ["URI_DOES_NOT_EXIST"], - ); +const Template +codeUnavailableDartLibrary = const Template( + "UnavailableDartLibrary", + problemMessageTemplate: + r"""Dart library '#uri' is not available on this platform.""", + withArgumentsOld: _withArgumentsOldUnavailableDartLibrary, + withArguments: _withArgumentsUnavailableDartLibrary, + analyzerCodes: ["URI_DOES_NOT_EXIST"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsUnavailableDartLibrary({required Uri uri}) { @@ -14106,13 +15280,17 @@ codeUnexpectedSuperParametersInGenerativeConstructors = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeUnexpectedToken = - const Template( - "UnexpectedToken", - problemMessageTemplate: r"""Unexpected token '#lexeme'.""", - withArgumentsOld: _withArgumentsOldUnexpectedToken, - analyzerCodes: ["UNEXPECTED_TOKEN"], - ); +const Template< + Message Function(Token lexeme), + Message Function({required Token lexeme}) +> +codeUnexpectedToken = const Template( + "UnexpectedToken", + problemMessageTemplate: r"""Unexpected token '#lexeme'.""", + withArgumentsOld: _withArgumentsOldUnexpectedToken, + withArguments: _withArgumentsUnexpectedToken, + analyzerCodes: ["UNEXPECTED_TOKEN"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsUnexpectedToken({required Token lexeme}) { @@ -14136,14 +15314,18 @@ const MessageCode codeUnexpectedTokens = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeUnmatchedAugmentationClass = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeUnmatchedAugmentationClass = const Template( "UnmatchedAugmentationClass", problemMessageTemplate: r"""Augmentation class '#name' doesn't match a class in the augmented library.""", correctionMessageTemplate: r"""Try changing the name to an existing class or removing the 'augment' modifier.""", withArgumentsOld: _withArgumentsOldUnmatchedAugmentationClass, + withArguments: _withArgumentsUnmatchedAugmentationClass, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -14164,14 +15346,18 @@ Message _withArgumentsOldUnmatchedAugmentationClass(String name) => _withArgumentsUnmatchedAugmentationClass(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeUnmatchedAugmentationClassMember = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeUnmatchedAugmentationClassMember = const Template( "UnmatchedAugmentationClassMember", problemMessageTemplate: r"""Augmentation member '#name' doesn't match a member in the augmented class.""", correctionMessageTemplate: r"""Try changing the name to an existing member or removing the 'augment' modifier.""", withArgumentsOld: _withArgumentsOldUnmatchedAugmentationClassMember, + withArguments: _withArgumentsUnmatchedAugmentationClassMember, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -14192,14 +15378,18 @@ Message _withArgumentsOldUnmatchedAugmentationClassMember(String name) => _withArgumentsUnmatchedAugmentationClassMember(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeUnmatchedAugmentationConstructor = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeUnmatchedAugmentationConstructor = const Template( "UnmatchedAugmentationConstructor", problemMessageTemplate: r"""Augmentation constructor '#name' doesn't match a constructor in the augmented class.""", correctionMessageTemplate: r"""Try changing the name to an existing constructor or removing the 'augment' modifier.""", withArgumentsOld: _withArgumentsOldUnmatchedAugmentationConstructor, + withArguments: _withArgumentsUnmatchedAugmentationConstructor, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -14220,14 +15410,18 @@ Message _withArgumentsOldUnmatchedAugmentationConstructor(String name) => _withArgumentsUnmatchedAugmentationConstructor(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeUnmatchedAugmentationDeclaration = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeUnmatchedAugmentationDeclaration = const Template( "UnmatchedAugmentationDeclaration", problemMessageTemplate: r"""Augmentation '#name' doesn't match a declaration in the augmented library.""", correctionMessageTemplate: r"""Try changing the name to an existing declaration or removing the 'augment' modifier.""", withArgumentsOld: _withArgumentsOldUnmatchedAugmentationDeclaration, + withArguments: _withArgumentsUnmatchedAugmentationDeclaration, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -14248,14 +15442,18 @@ Message _withArgumentsOldUnmatchedAugmentationDeclaration(String name) => _withArgumentsUnmatchedAugmentationDeclaration(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeUnmatchedAugmentationLibraryMember = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeUnmatchedAugmentationLibraryMember = const Template( "UnmatchedAugmentationLibraryMember", problemMessageTemplate: r"""Augmentation member '#name' doesn't match a member in the augmented library.""", correctionMessageTemplate: r"""Try changing the name to an existing member or removing the 'augment' modifier.""", withArgumentsOld: _withArgumentsOldUnmatchedAugmentationLibraryMember, + withArguments: _withArgumentsUnmatchedAugmentationLibraryMember, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -14278,14 +15476,18 @@ Message _withArgumentsOldUnmatchedAugmentationLibraryMember(String name) => _withArgumentsUnmatchedAugmentationLibraryMember(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeUnmatchedPatchClass = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeUnmatchedPatchClass = const Template( "UnmatchedPatchClass", problemMessageTemplate: r"""Patch class '#name' doesn't match a class in the origin library.""", correctionMessageTemplate: r"""Try changing the name to an existing class or removing the '@patch' annotation.""", withArgumentsOld: _withArgumentsOldUnmatchedPatchClass, + withArguments: _withArgumentsUnmatchedPatchClass, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -14306,14 +15508,18 @@ Message _withArgumentsOldUnmatchedPatchClass(String name) => _withArgumentsUnmatchedPatchClass(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeUnmatchedPatchClassMember = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeUnmatchedPatchClassMember = const Template( "UnmatchedPatchClassMember", problemMessageTemplate: r"""Patch member '#name' doesn't match a member in the origin class.""", correctionMessageTemplate: r"""Try changing the name to an existing member or removing the '@patch' annotation.""", withArgumentsOld: _withArgumentsOldUnmatchedPatchClassMember, + withArguments: _withArgumentsUnmatchedPatchClassMember, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -14334,14 +15540,18 @@ Message _withArgumentsOldUnmatchedPatchClassMember(String name) => _withArgumentsUnmatchedPatchClassMember(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeUnmatchedPatchDeclaration = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeUnmatchedPatchDeclaration = const Template( "UnmatchedPatchDeclaration", problemMessageTemplate: r"""Patch '#name' doesn't match a declaration in the origin library.""", correctionMessageTemplate: r"""Try changing the name to an existing declaration or removing the '@patch' annotation.""", withArgumentsOld: _withArgumentsOldUnmatchedPatchDeclaration, + withArguments: _withArgumentsUnmatchedPatchDeclaration, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -14362,14 +15572,18 @@ Message _withArgumentsOldUnmatchedPatchDeclaration(String name) => _withArgumentsUnmatchedPatchDeclaration(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeUnmatchedPatchLibraryMember = const Template( +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeUnmatchedPatchLibraryMember = const Template( "UnmatchedPatchLibraryMember", problemMessageTemplate: r"""Patch member '#name' doesn't match a member in the origin library.""", correctionMessageTemplate: r"""Try changing the name to an existing member or removing the '@patch' annotation.""", withArgumentsOld: _withArgumentsOldUnmatchedPatchLibraryMember, + withArguments: _withArgumentsUnmatchedPatchLibraryMember, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -14390,14 +15604,17 @@ Message _withArgumentsOldUnmatchedPatchLibraryMember(String name) => _withArgumentsUnmatchedPatchLibraryMember(name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeUnmatchedToken = - const Template( - "UnmatchedToken", - problemMessageTemplate: r"""Can't find '#string' to match '#lexeme'.""", - withArgumentsOld: _withArgumentsOldUnmatchedToken, - analyzerCodes: ["EXPECTED_TOKEN"], - ); +const Template< + Message Function(String string, Token lexeme), + Message Function({required String string, required Token lexeme}) +> +codeUnmatchedToken = const Template( + "UnmatchedToken", + problemMessageTemplate: r"""Can't find '#string' to match '#lexeme'.""", + withArgumentsOld: _withArgumentsOldUnmatchedToken, + withArguments: _withArgumentsUnmatchedToken, + analyzerCodes: ["EXPECTED_TOKEN"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsUnmatchedToken({ @@ -14440,12 +15657,16 @@ const MessageCode codeUnsoundSwitchStatementError = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeUnspecified = - const Template( - "Unspecified", - problemMessageTemplate: r"""#string""", - withArgumentsOld: _withArgumentsOldUnspecified, - ); +const Template< + Message Function(String string), + Message Function({required String string}) +> +codeUnspecified = const Template( + "Unspecified", + problemMessageTemplate: r"""#string""", + withArgumentsOld: _withArgumentsOldUnspecified, + withArguments: _withArgumentsUnspecified, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsUnspecified({required String string}) { @@ -14478,13 +15699,17 @@ const MessageCode codeUnsupportedDartExt = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeUnsupportedOperator = - const Template( - "UnsupportedOperator", - problemMessageTemplate: r"""The '#lexeme' operator is not supported.""", - withArgumentsOld: _withArgumentsOldUnsupportedOperator, - analyzerCodes: ["UNSUPPORTED_OPERATOR"], - ); +const Template< + Message Function(Token lexeme), + Message Function({required Token lexeme}) +> +codeUnsupportedOperator = const Template( + "UnsupportedOperator", + problemMessageTemplate: r"""The '#lexeme' operator is not supported.""", + withArgumentsOld: _withArgumentsOldUnsupportedOperator, + withArguments: _withArgumentsUnsupportedOperator, + analyzerCodes: ["UNSUPPORTED_OPERATOR"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsUnsupportedOperator({required Token lexeme}) { @@ -14516,15 +15741,18 @@ const MessageCode codeUnterminatedComment = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeUnterminatedString = - const Template( - "UnterminatedString", - problemMessageTemplate: - r"""String starting with #string must end with #string2.""", - withArgumentsOld: _withArgumentsOldUnterminatedString, - analyzerCodes: ["UNTERMINATED_STRING_LITERAL"], - ); +const Template< + Message Function(String string, String string2), + Message Function({required String string, required String string2}) +> +codeUnterminatedString = const Template( + "UnterminatedString", + problemMessageTemplate: + r"""String starting with #string must end with #string2.""", + withArgumentsOld: _withArgumentsOldUnterminatedString, + withArguments: _withArgumentsUnterminatedString, + analyzerCodes: ["UNTERMINATED_STRING_LITERAL"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsUnterminatedString({ @@ -14552,13 +15780,14 @@ const MessageCode codeUnterminatedToken = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeUntranslatableUri = - const Template( - "UntranslatableUri", - problemMessageTemplate: r"""Not found: '#uri'""", - withArgumentsOld: _withArgumentsOldUntranslatableUri, - analyzerCodes: ["URI_DOES_NOT_EXIST"], - ); +const Template +codeUntranslatableUri = const Template( + "UntranslatableUri", + problemMessageTemplate: r"""Not found: '#uri'""", + withArgumentsOld: _withArgumentsOldUntranslatableUri, + withArguments: _withArgumentsUntranslatableUri, + analyzerCodes: ["URI_DOES_NOT_EXIST"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsUntranslatableUri({required Uri uri}) { @@ -14575,15 +15804,17 @@ Message _withArgumentsOldUntranslatableUri(Uri uri) => _withArgumentsUntranslatableUri(uri: uri); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeValueForRequiredParameterNotProvidedError = - const Template( - "ValueForRequiredParameterNotProvidedError", - problemMessageTemplate: - r"""Required named parameter '#name' must be provided.""", - withArgumentsOld: - _withArgumentsOldValueForRequiredParameterNotProvidedError, - ); +const Template< + Message Function(String name), + Message Function({required String name}) +> +codeValueForRequiredParameterNotProvidedError = const Template( + "ValueForRequiredParameterNotProvidedError", + problemMessageTemplate: + r"""Required named parameter '#name' must be provided.""", + withArgumentsOld: _withArgumentsOldValueForRequiredParameterNotProvidedError, + withArguments: _withArgumentsValueForRequiredParameterNotProvidedError, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsValueForRequiredParameterNotProvidedError({ @@ -14620,16 +15851,19 @@ const MessageCode codeVarReturnType = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeVariableCouldBeNullDueToWrite = - const Template( - "VariableCouldBeNullDueToWrite", - problemMessageTemplate: - r"""Variable '#name' could not be promoted due to an assignment.""", - correctionMessageTemplate: - r"""Try null checking the variable after the assignment. See #string""", - withArgumentsOld: _withArgumentsOldVariableCouldBeNullDueToWrite, - ); +const Template< + Message Function(String name, String string), + Message Function({required String name, required String string}) +> +codeVariableCouldBeNullDueToWrite = const Template( + "VariableCouldBeNullDueToWrite", + problemMessageTemplate: + r"""Variable '#name' could not be promoted due to an assignment.""", + correctionMessageTemplate: + r"""Try null checking the variable after the assignment. See #string""", + withArgumentsOld: _withArgumentsOldVariableCouldBeNullDueToWrite, + withArguments: _withArgumentsVariableCouldBeNullDueToWrite, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsVariableCouldBeNullDueToWrite({ @@ -14737,16 +15971,19 @@ const MessageCode codeWeakReferenceTargetNotStaticTearoff = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeWebLiteralCannotBeRepresentedExactly = - const Template( - "WebLiteralCannotBeRepresentedExactly", - problemMessageTemplate: - r"""The integer literal #string can't be represented exactly in JavaScript.""", - correctionMessageTemplate: - r"""Try changing the literal to something that can be represented in JavaScript. In JavaScript #string2 is the nearest value that can be represented exactly.""", - withArgumentsOld: _withArgumentsOldWebLiteralCannotBeRepresentedExactly, - ); +const Template< + Message Function(String string, String string2), + Message Function({required String string, required String string2}) +> +codeWebLiteralCannotBeRepresentedExactly = const Template( + "WebLiteralCannotBeRepresentedExactly", + problemMessageTemplate: + r"""The integer literal #string can't be represented exactly in JavaScript.""", + correctionMessageTemplate: + r"""Try changing the literal to something that can be represented in JavaScript. In JavaScript #string2 is the nearest value that can be represented exactly.""", + withArgumentsOld: _withArgumentsOldWebLiteralCannotBeRepresentedExactly, + withArguments: _withArgumentsWebLiteralCannotBeRepresentedExactly, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsWebLiteralCannotBeRepresentedExactly({ diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/block_kind.dart b/pkg/_fe_analyzer_shared/lib/src/parser/block_kind.dart index 966bf751788..33d53dea451 100644 --- a/pkg/_fe_analyzer_shared/lib/src/parser/block_kind.dart +++ b/pkg/_fe_analyzer_shared/lib/src/parser/block_kind.dart @@ -10,7 +10,7 @@ class BlockKind { final codes.Message? message; - final codes.Template? template; + final codes.Template? template; const BlockKind._(this.name, {this.template, this.message}); diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/identifier_context.dart b/pkg/_fe_analyzer_shared/lib/src/parser/identifier_context.dart index 97f3425a0f2..a13f83eb049 100644 --- a/pkg/_fe_analyzer_shared/lib/src/parser/identifier_context.dart +++ b/pkg/_fe_analyzer_shared/lib/src/parser/identifier_context.dart @@ -289,7 +289,7 @@ abstract class IdentifierContext { /// expressions are required. final bool allowedInConstantExpression; - final Template<_MessageWithArgument> recoveryTemplate; + final Template<_MessageWithArgument, Function> recoveryTemplate; const IdentifierContext( this._name, { diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart b/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart index 7e602171f1a..9405b133b47 100644 --- a/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart +++ b/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart @@ -4609,7 +4609,7 @@ class Parser { Token ensureBlock(Token token, BlockKind? missingBlockKind) { Token next = token.next!; if (next.isA(TokenType.OPEN_CURLY_BRACKET)) return next; - codes.Template? template = + codes.Template? template = missingBlockKind?.template; if (template == null) { codes.Message? message = missingBlockKind?.message; @@ -10795,7 +10795,7 @@ class Parser { void reportRecoverableErrorWithToken( Token token, - codes.Template<_MessageWithArgument> template, + codes.Template<_MessageWithArgument, Function> template, ) { // Find a non-synthetic token on which to report the error. token = findNonZeroLengthToken(token); diff --git a/pkg/front_end/lib/src/builder/named_type_builder.dart b/pkg/front_end/lib/src/builder/named_type_builder.dart index 43ed2727e24..01519e5a739 100644 --- a/pkg/front_end/lib/src/builder/named_type_builder.dart +++ b/pkg/front_end/lib/src/builder/named_type_builder.dart @@ -303,9 +303,8 @@ abstract class NamedTypeBuilderImpl extends NamedTypeBuilder { if (member is TypeDeclarationBuilder) { bind(problemReporting, member); } else { - Template template = member == null - ? codeTypeNotFound - : codeNotAType; + Template template = + member == null ? codeTypeNotFound : codeNotAType; String nameText = typeName.fullName; int nameOffset = typeName.fullNameOffset; int nameLength = typeName.fullNameLength; @@ -459,7 +458,7 @@ abstract class NamedTypeBuilderImpl extends NamedTypeBuilder { } Supertype? _handleInvalidSupertype(LibraryBuilder library) { - Template template = + Template template = declaration.isTypeParameter ? codeSupertypeIsTypeParameter : codeSupertypeIsIllegal; diff --git a/pkg/front_end/lib/src/codes/cfe_codes_generated.dart b/pkg/front_end/lib/src/codes/cfe_codes_generated.dart index 7caa5ad567a..a8449663510 100644 --- a/pkg/front_end/lib/src/codes/cfe_codes_generated.dart +++ b/pkg/front_end/lib/src/codes/cfe_codes_generated.dart @@ -12,16 +12,19 @@ part of 'cfe_codes.dart'; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeAmbiguousExtensionMethod = - const Template( - "AmbiguousExtensionMethod", - problemMessageTemplate: - r"""The method '#name' is defined in multiple extensions for '#type' and neither is more specific.""", - correctionMessageTemplate: - r"""Try using an explicit extension application of the wanted extension or hiding unwanted extensions from scope.""", - withArgumentsOld: _withArgumentsOldAmbiguousExtensionMethod, - ); +const Template< + Message Function(String name, DartType type), + Message Function({required String name, required DartType type}) +> +codeAmbiguousExtensionMethod = const Template( + "AmbiguousExtensionMethod", + problemMessageTemplate: + r"""The method '#name' is defined in multiple extensions for '#type' and neither is more specific.""", + correctionMessageTemplate: + r"""Try using an explicit extension application of the wanted extension or hiding unwanted extensions from scope.""", + withArgumentsOld: _withArgumentsOldAmbiguousExtensionMethod, + withArguments: _withArgumentsAmbiguousExtensionMethod, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsAmbiguousExtensionMethod({ @@ -47,16 +50,19 @@ Message _withArgumentsOldAmbiguousExtensionMethod(String name, DartType type) => _withArgumentsAmbiguousExtensionMethod(name: name, type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeAmbiguousExtensionOperator = - const Template( - "AmbiguousExtensionOperator", - problemMessageTemplate: - r"""The operator '#name' is defined in multiple extensions for '#type' and neither is more specific.""", - correctionMessageTemplate: - r"""Try using an explicit extension application of the wanted extension or hiding unwanted extensions from scope.""", - withArgumentsOld: _withArgumentsOldAmbiguousExtensionOperator, - ); +const Template< + Message Function(String name, DartType type), + Message Function({required String name, required DartType type}) +> +codeAmbiguousExtensionOperator = const Template( + "AmbiguousExtensionOperator", + problemMessageTemplate: + r"""The operator '#name' is defined in multiple extensions for '#type' and neither is more specific.""", + correctionMessageTemplate: + r"""Try using an explicit extension application of the wanted extension or hiding unwanted extensions from scope.""", + withArgumentsOld: _withArgumentsOldAmbiguousExtensionOperator, + withArguments: _withArgumentsAmbiguousExtensionOperator, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsAmbiguousExtensionOperator({ @@ -84,16 +90,19 @@ Message _withArgumentsOldAmbiguousExtensionOperator( ) => _withArgumentsAmbiguousExtensionOperator(name: name, type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeAmbiguousExtensionProperty = - const Template( - "AmbiguousExtensionProperty", - problemMessageTemplate: - r"""The property '#name' is defined in multiple extensions for '#type' and neither is more specific.""", - correctionMessageTemplate: - r"""Try using an explicit extension application of the wanted extension or hiding unwanted extensions from scope.""", - withArgumentsOld: _withArgumentsOldAmbiguousExtensionProperty, - ); +const Template< + Message Function(String name, DartType type), + Message Function({required String name, required DartType type}) +> +codeAmbiguousExtensionProperty = const Template( + "AmbiguousExtensionProperty", + problemMessageTemplate: + r"""The property '#name' is defined in multiple extensions for '#type' and neither is more specific.""", + correctionMessageTemplate: + r"""Try using an explicit extension application of the wanted extension or hiding unwanted extensions from scope.""", + withArgumentsOld: _withArgumentsOldAmbiguousExtensionProperty, + withArguments: _withArgumentsAmbiguousExtensionProperty, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsAmbiguousExtensionProperty({ @@ -121,17 +130,22 @@ Message _withArgumentsOldAmbiguousExtensionProperty( ) => _withArgumentsAmbiguousExtensionProperty(name: name, type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeAmbiguousSupertypes = - const Template< - Message Function(String name, DartType type, DartType type2) - >( - "AmbiguousSupertypes", - problemMessageTemplate: - r"""'#name' can't implement both '#type' and '#type2'""", - withArgumentsOld: _withArgumentsOldAmbiguousSupertypes, - analyzerCodes: ["AMBIGUOUS_SUPERTYPES"], - ); +const Template< + Message Function(String name, DartType type, DartType type2), + Message Function({ + required String name, + required DartType type, + required DartType type2, + }) +> +codeAmbiguousSupertypes = const Template( + "AmbiguousSupertypes", + problemMessageTemplate: + r"""'#name' can't implement both '#type' and '#type2'""", + withArgumentsOld: _withArgumentsOldAmbiguousSupertypes, + withArguments: _withArgumentsAmbiguousSupertypes, + analyzerCodes: ["AMBIGUOUS_SUPERTYPES"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsAmbiguousSupertypes({ @@ -160,15 +174,18 @@ Message _withArgumentsOldAmbiguousSupertypes( ) => _withArgumentsAmbiguousSupertypes(name: name, type: type, type2: type2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeArgumentTypeNotAssignable = - const Template( - "ArgumentTypeNotAssignable", - problemMessageTemplate: - r"""The argument type '#type' can't be assigned to the parameter type '#type2'.""", - withArgumentsOld: _withArgumentsOldArgumentTypeNotAssignable, - analyzerCodes: ["ARGUMENT_TYPE_NOT_ASSIGNABLE"], - ); +const Template< + Message Function(DartType type, DartType type2), + Message Function({required DartType type, required DartType type2}) +> +codeArgumentTypeNotAssignable = const Template( + "ArgumentTypeNotAssignable", + problemMessageTemplate: + r"""The argument type '#type' can't be assigned to the parameter type '#type2'.""", + withArgumentsOld: _withArgumentsOldArgumentTypeNotAssignable, + withArguments: _withArgumentsArgumentTypeNotAssignable, + analyzerCodes: ["ARGUMENT_TYPE_NOT_ASSIGNABLE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsArgumentTypeNotAssignable({ @@ -194,14 +211,17 @@ Message _withArgumentsOldArgumentTypeNotAssignable( ) => _withArgumentsArgumentTypeNotAssignable(type: type, type2: type2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstEvalCaseImplementsEqual = - const Template( - "ConstEvalCaseImplementsEqual", - problemMessageTemplate: - r"""Case expression '#constant' does not have a primitive operator '=='.""", - withArgumentsOld: _withArgumentsOldConstEvalCaseImplementsEqual, - ); +const Template< + Message Function(Constant constant), + Message Function({required Constant constant}) +> +codeConstEvalCaseImplementsEqual = const Template( + "ConstEvalCaseImplementsEqual", + problemMessageTemplate: + r"""Case expression '#constant' does not have a primitive operator '=='.""", + withArgumentsOld: _withArgumentsOldConstEvalCaseImplementsEqual, + withArguments: _withArgumentsConstEvalCaseImplementsEqual, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstEvalCaseImplementsEqual({ @@ -223,12 +243,16 @@ Message _withArgumentsOldConstEvalCaseImplementsEqual(Constant constant) => _withArgumentsConstEvalCaseImplementsEqual(constant: constant); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstEvalDuplicateElement = const Template( +const Template< + Message Function(Constant constant), + Message Function({required Constant constant}) +> +codeConstEvalDuplicateElement = const Template( "ConstEvalDuplicateElement", problemMessageTemplate: r"""The element '#constant' conflicts with another existing element in the set.""", withArgumentsOld: _withArgumentsOldConstEvalDuplicateElement, + withArguments: _withArgumentsConstEvalDuplicateElement, analyzerCodes: ["EQUAL_ELEMENTS_IN_CONST_SET"], ); @@ -250,12 +274,16 @@ Message _withArgumentsOldConstEvalDuplicateElement(Constant constant) => _withArgumentsConstEvalDuplicateElement(constant: constant); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstEvalDuplicateKey = const Template( +const Template< + Message Function(Constant constant), + Message Function({required Constant constant}) +> +codeConstEvalDuplicateKey = const Template( "ConstEvalDuplicateKey", problemMessageTemplate: r"""The key '#constant' conflicts with another existing key in the map.""", withArgumentsOld: _withArgumentsOldConstEvalDuplicateKey, + withArguments: _withArgumentsConstEvalDuplicateKey, analyzerCodes: ["EQUAL_KEYS_IN_CONST_MAP"], ); @@ -277,15 +305,18 @@ Message _withArgumentsOldConstEvalDuplicateKey(Constant constant) => _withArgumentsConstEvalDuplicateKey(constant: constant); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstEvalElementImplementsEqual = - const Template( - "ConstEvalElementImplementsEqual", - problemMessageTemplate: - r"""The element '#constant' does not have a primitive operator '=='.""", - withArgumentsOld: _withArgumentsOldConstEvalElementImplementsEqual, - analyzerCodes: ["CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS"], - ); +const Template< + Message Function(Constant constant), + Message Function({required Constant constant}) +> +codeConstEvalElementImplementsEqual = const Template( + "ConstEvalElementImplementsEqual", + problemMessageTemplate: + r"""The element '#constant' does not have a primitive operator '=='.""", + withArgumentsOld: _withArgumentsOldConstEvalElementImplementsEqual, + withArguments: _withArgumentsConstEvalElementImplementsEqual, + analyzerCodes: ["CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstEvalElementImplementsEqual({ @@ -307,14 +338,17 @@ Message _withArgumentsOldConstEvalElementImplementsEqual(Constant constant) => _withArgumentsConstEvalElementImplementsEqual(constant: constant); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstEvalElementNotPrimitiveEquality = - const Template( - "ConstEvalElementNotPrimitiveEquality", - problemMessageTemplate: - r"""The element '#constant' does not have a primitive equality.""", - withArgumentsOld: _withArgumentsOldConstEvalElementNotPrimitiveEquality, - ); +const Template< + Message Function(Constant constant), + Message Function({required Constant constant}) +> +codeConstEvalElementNotPrimitiveEquality = const Template( + "ConstEvalElementNotPrimitiveEquality", + problemMessageTemplate: + r"""The element '#constant' does not have a primitive equality.""", + withArgumentsOld: _withArgumentsOldConstEvalElementNotPrimitiveEquality, + withArguments: _withArgumentsConstEvalElementNotPrimitiveEquality, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstEvalElementNotPrimitiveEquality({ @@ -337,15 +371,17 @@ Message _withArgumentsOldConstEvalElementNotPrimitiveEquality( ) => _withArgumentsConstEvalElementNotPrimitiveEquality(constant: constant); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstEvalEqualsOperandNotPrimitiveEquality = - const Template( - "ConstEvalEqualsOperandNotPrimitiveEquality", - problemMessageTemplate: - r"""Binary operator '==' requires receiver constant '#constant' of a type with primitive equality or type 'double', but was of type '#type'.""", - withArgumentsOld: - _withArgumentsOldConstEvalEqualsOperandNotPrimitiveEquality, - ); +const Template< + Message Function(Constant constant, DartType type), + Message Function({required Constant constant, required DartType type}) +> +codeConstEvalEqualsOperandNotPrimitiveEquality = const Template( + "ConstEvalEqualsOperandNotPrimitiveEquality", + problemMessageTemplate: + r"""Binary operator '==' requires receiver constant '#constant' of a type with primitive equality or type 'double', but was of type '#type'.""", + withArgumentsOld: _withArgumentsOldConstEvalEqualsOperandNotPrimitiveEquality, + withArguments: _withArgumentsConstEvalEqualsOperandNotPrimitiveEquality, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstEvalEqualsOperandNotPrimitiveEquality({ @@ -380,22 +416,21 @@ const Template< Constant constant, DartType type, DartType type2, - ) + ), + Message Function({ + required String stringOKEmpty, + required Constant constant, + required DartType type, + required DartType type2, + }) > -codeConstEvalInvalidBinaryOperandType = - const Template< - Message Function( - String stringOKEmpty, - Constant constant, - DartType type, - DartType type2, - ) - >( - "ConstEvalInvalidBinaryOperandType", - problemMessageTemplate: - r"""Binary operator '#stringOKEmpty' on '#constant' requires operand of type '#type', but was of type '#type2'.""", - withArgumentsOld: _withArgumentsOldConstEvalInvalidBinaryOperandType, - ); +codeConstEvalInvalidBinaryOperandType = const Template( + "ConstEvalInvalidBinaryOperandType", + problemMessageTemplate: + r"""Binary operator '#stringOKEmpty' on '#constant' requires operand of type '#type', but was of type '#type2'.""", + withArgumentsOld: _withArgumentsOldConstEvalInvalidBinaryOperandType, + withArguments: _withArgumentsConstEvalInvalidBinaryOperandType, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstEvalInvalidBinaryOperandType({ @@ -437,14 +472,17 @@ Message _withArgumentsOldConstEvalInvalidBinaryOperandType( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstEvalInvalidEqualsOperandType = - const Template( - "ConstEvalInvalidEqualsOperandType", - problemMessageTemplate: - r"""Binary operator '==' requires receiver constant '#constant' of type 'Null', 'bool', 'int', 'double', or 'String', but was of type '#type'.""", - withArgumentsOld: _withArgumentsOldConstEvalInvalidEqualsOperandType, - ); +const Template< + Message Function(Constant constant, DartType type), + Message Function({required Constant constant, required DartType type}) +> +codeConstEvalInvalidEqualsOperandType = const Template( + "ConstEvalInvalidEqualsOperandType", + problemMessageTemplate: + r"""Binary operator '==' requires receiver constant '#constant' of type 'Null', 'bool', 'int', 'double', or 'String', but was of type '#type'.""", + withArgumentsOld: _withArgumentsOldConstEvalInvalidEqualsOperandType, + withArguments: _withArgumentsConstEvalInvalidEqualsOperandType, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstEvalInvalidEqualsOperandType({ @@ -473,15 +511,18 @@ Message _withArgumentsOldConstEvalInvalidEqualsOperandType( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstEvalInvalidMethodInvocation = - const Template( - "ConstEvalInvalidMethodInvocation", - problemMessageTemplate: - r"""The method '#stringOKEmpty' can't be invoked on '#constant' in a constant expression.""", - withArgumentsOld: _withArgumentsOldConstEvalInvalidMethodInvocation, - analyzerCodes: ["UNDEFINED_OPERATOR"], - ); +const Template< + Message Function(String stringOKEmpty, Constant constant), + Message Function({required String stringOKEmpty, required Constant constant}) +> +codeConstEvalInvalidMethodInvocation = const Template( + "ConstEvalInvalidMethodInvocation", + problemMessageTemplate: + r"""The method '#stringOKEmpty' can't be invoked on '#constant' in a constant expression.""", + withArgumentsOld: _withArgumentsOldConstEvalInvalidMethodInvocation, + withArguments: _withArgumentsConstEvalInvalidMethodInvocation, + analyzerCodes: ["UNDEFINED_OPERATOR"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstEvalInvalidMethodInvocation({ @@ -510,15 +551,18 @@ Message _withArgumentsOldConstEvalInvalidMethodInvocation( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstEvalInvalidPropertyGet = - const Template( - "ConstEvalInvalidPropertyGet", - problemMessageTemplate: - r"""The property '#stringOKEmpty' can't be accessed on '#constant' in a constant expression.""", - withArgumentsOld: _withArgumentsOldConstEvalInvalidPropertyGet, - analyzerCodes: ["CONST_EVAL_THROWS_EXCEPTION"], - ); +const Template< + Message Function(String stringOKEmpty, Constant constant), + Message Function({required String stringOKEmpty, required Constant constant}) +> +codeConstEvalInvalidPropertyGet = const Template( + "ConstEvalInvalidPropertyGet", + problemMessageTemplate: + r"""The property '#stringOKEmpty' can't be accessed on '#constant' in a constant expression.""", + withArgumentsOld: _withArgumentsOldConstEvalInvalidPropertyGet, + withArguments: _withArgumentsConstEvalInvalidPropertyGet, + analyzerCodes: ["CONST_EVAL_THROWS_EXCEPTION"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstEvalInvalidPropertyGet({ @@ -547,15 +591,18 @@ Message _withArgumentsOldConstEvalInvalidPropertyGet( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstEvalInvalidRecordIndexGet = - const Template( - "ConstEvalInvalidRecordIndexGet", - problemMessageTemplate: - r"""The property '#stringOKEmpty' can't be accessed on '#constant' in a constant expression.""", - withArgumentsOld: _withArgumentsOldConstEvalInvalidRecordIndexGet, - analyzerCodes: ["CONST_EVAL_THROWS_EXCEPTION"], - ); +const Template< + Message Function(String stringOKEmpty, Constant constant), + Message Function({required String stringOKEmpty, required Constant constant}) +> +codeConstEvalInvalidRecordIndexGet = const Template( + "ConstEvalInvalidRecordIndexGet", + problemMessageTemplate: + r"""The property '#stringOKEmpty' can't be accessed on '#constant' in a constant expression.""", + withArgumentsOld: _withArgumentsOldConstEvalInvalidRecordIndexGet, + withArguments: _withArgumentsConstEvalInvalidRecordIndexGet, + analyzerCodes: ["CONST_EVAL_THROWS_EXCEPTION"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstEvalInvalidRecordIndexGet({ @@ -584,15 +631,18 @@ Message _withArgumentsOldConstEvalInvalidRecordIndexGet( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstEvalInvalidRecordNameGet = - const Template( - "ConstEvalInvalidRecordNameGet", - problemMessageTemplate: - r"""The property '#stringOKEmpty' can't be accessed on '#constant' in a constant expression.""", - withArgumentsOld: _withArgumentsOldConstEvalInvalidRecordNameGet, - analyzerCodes: ["CONST_EVAL_THROWS_EXCEPTION"], - ); +const Template< + Message Function(String stringOKEmpty, Constant constant), + Message Function({required String stringOKEmpty, required Constant constant}) +> +codeConstEvalInvalidRecordNameGet = const Template( + "ConstEvalInvalidRecordNameGet", + problemMessageTemplate: + r"""The property '#stringOKEmpty' can't be accessed on '#constant' in a constant expression.""", + withArgumentsOld: _withArgumentsOldConstEvalInvalidRecordNameGet, + withArguments: _withArgumentsConstEvalInvalidRecordNameGet, + analyzerCodes: ["CONST_EVAL_THROWS_EXCEPTION"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstEvalInvalidRecordNameGet({ @@ -621,17 +671,19 @@ Message _withArgumentsOldConstEvalInvalidRecordNameGet( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstEvalInvalidStringInterpolationOperand = - const Template( - "ConstEvalInvalidStringInterpolationOperand", - problemMessageTemplate: - r"""The constant value '#constant' can't be used as part of a string interpolation in a constant expression. +const Template< + Message Function(Constant constant), + Message Function({required Constant constant}) +> +codeConstEvalInvalidStringInterpolationOperand = const Template( + "ConstEvalInvalidStringInterpolationOperand", + problemMessageTemplate: + r"""The constant value '#constant' can't be used as part of a string interpolation in a constant expression. Only values of type 'null', 'bool', 'int', 'double', or 'String' can be used.""", - withArgumentsOld: - _withArgumentsOldConstEvalInvalidStringInterpolationOperand, - analyzerCodes: ["CONST_EVAL_TYPE_BOOL_NUM_STRING"], - ); + withArgumentsOld: _withArgumentsOldConstEvalInvalidStringInterpolationOperand, + withArguments: _withArgumentsConstEvalInvalidStringInterpolationOperand, + analyzerCodes: ["CONST_EVAL_TYPE_BOOL_NUM_STRING"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstEvalInvalidStringInterpolationOperand({ @@ -657,15 +709,18 @@ Message _withArgumentsOldConstEvalInvalidStringInterpolationOperand( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstEvalInvalidSymbolName = - const Template( - "ConstEvalInvalidSymbolName", - problemMessageTemplate: - r"""The symbol name must be a valid public Dart member name, public constructor name, or library name, optionally qualified, but was '#constant'.""", - withArgumentsOld: _withArgumentsOldConstEvalInvalidSymbolName, - analyzerCodes: ["CONST_EVAL_THROWS_EXCEPTION"], - ); +const Template< + Message Function(Constant constant), + Message Function({required Constant constant}) +> +codeConstEvalInvalidSymbolName = const Template( + "ConstEvalInvalidSymbolName", + problemMessageTemplate: + r"""The symbol name must be a valid public Dart member name, public constructor name, or library name, optionally qualified, but was '#constant'.""", + withArgumentsOld: _withArgumentsOldConstEvalInvalidSymbolName, + withArguments: _withArgumentsConstEvalInvalidSymbolName, + analyzerCodes: ["CONST_EVAL_THROWS_EXCEPTION"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstEvalInvalidSymbolName({required Constant constant}) { @@ -686,17 +741,20 @@ Message _withArgumentsOldConstEvalInvalidSymbolName(Constant constant) => // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(Constant constant, DartType type, DartType type2) + Message Function(Constant constant, DartType type, DartType type2), + Message Function({ + required Constant constant, + required DartType type, + required DartType type2, + }) > -codeConstEvalInvalidType = - const Template< - Message Function(Constant constant, DartType type, DartType type2) - >( - "ConstEvalInvalidType", - problemMessageTemplate: - r"""Expected constant '#constant' to be of type '#type', but was of type '#type2'.""", - withArgumentsOld: _withArgumentsOldConstEvalInvalidType, - ); +codeConstEvalInvalidType = const Template( + "ConstEvalInvalidType", + problemMessageTemplate: + r"""Expected constant '#constant' to be of type '#type', but was of type '#type2'.""", + withArgumentsOld: _withArgumentsOldConstEvalInvalidType, + withArguments: _withArgumentsConstEvalInvalidType, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstEvalInvalidType({ @@ -729,17 +787,18 @@ Message _withArgumentsOldConstEvalInvalidType( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstEvalKeyImplementsEqual = - const Template( - "ConstEvalKeyImplementsEqual", - problemMessageTemplate: - r"""The key '#constant' does not have a primitive operator '=='.""", - withArgumentsOld: _withArgumentsOldConstEvalKeyImplementsEqual, - analyzerCodes: [ - "CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS", - ], - ); +const Template< + Message Function(Constant constant), + Message Function({required Constant constant}) +> +codeConstEvalKeyImplementsEqual = const Template( + "ConstEvalKeyImplementsEqual", + problemMessageTemplate: + r"""The key '#constant' does not have a primitive operator '=='.""", + withArgumentsOld: _withArgumentsOldConstEvalKeyImplementsEqual, + withArguments: _withArgumentsConstEvalKeyImplementsEqual, + analyzerCodes: ["CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstEvalKeyImplementsEqual({ @@ -761,14 +820,17 @@ Message _withArgumentsOldConstEvalKeyImplementsEqual(Constant constant) => _withArgumentsConstEvalKeyImplementsEqual(constant: constant); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstEvalKeyNotPrimitiveEquality = - const Template( - "ConstEvalKeyNotPrimitiveEquality", - problemMessageTemplate: - r"""The key '#constant' does not have a primitive equality.""", - withArgumentsOld: _withArgumentsOldConstEvalKeyNotPrimitiveEquality, - ); +const Template< + Message Function(Constant constant), + Message Function({required Constant constant}) +> +codeConstEvalKeyNotPrimitiveEquality = const Template( + "ConstEvalKeyNotPrimitiveEquality", + problemMessageTemplate: + r"""The key '#constant' does not have a primitive equality.""", + withArgumentsOld: _withArgumentsOldConstEvalKeyNotPrimitiveEquality, + withArguments: _withArgumentsConstEvalKeyNotPrimitiveEquality, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstEvalKeyNotPrimitiveEquality({ @@ -790,13 +852,16 @@ Message _withArgumentsOldConstEvalKeyNotPrimitiveEquality(Constant constant) => _withArgumentsConstEvalKeyNotPrimitiveEquality(constant: constant); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeConstEvalUnhandledException = - const Template( - "ConstEvalUnhandledException", - problemMessageTemplate: r"""Unhandled exception: #constant""", - withArgumentsOld: _withArgumentsOldConstEvalUnhandledException, - ); +const Template< + Message Function(Constant constant), + Message Function({required Constant constant}) +> +codeConstEvalUnhandledException = const Template( + "ConstEvalUnhandledException", + problemMessageTemplate: r"""Unhandled exception: #constant""", + withArgumentsOld: _withArgumentsOldConstEvalUnhandledException, + withArguments: _withArgumentsConstEvalUnhandledException, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsConstEvalUnhandledException({ @@ -817,17 +882,20 @@ Message _withArgumentsOldConstEvalUnhandledException(Constant constant) => _withArgumentsConstEvalUnhandledException(constant: constant); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeDeferredTypeAnnotation = - const Template( - "DeferredTypeAnnotation", - problemMessageTemplate: - r"""The type '#type' is deferred loaded via prefix '#name' and can't be used as a type annotation.""", - correctionMessageTemplate: - r"""Try removing 'deferred' from the import of '#name' or use a supertype of '#type' that isn't deferred.""", - withArgumentsOld: _withArgumentsOldDeferredTypeAnnotation, - analyzerCodes: ["TYPE_ANNOTATION_DEFERRED_CLASS"], - ); +const Template< + Message Function(DartType type, String name), + Message Function({required DartType type, required String name}) +> +codeDeferredTypeAnnotation = const Template( + "DeferredTypeAnnotation", + problemMessageTemplate: + r"""The type '#type' is deferred loaded via prefix '#name' and can't be used as a type annotation.""", + correctionMessageTemplate: + r"""Try removing 'deferred' from the import of '#name' or use a supertype of '#type' that isn't deferred.""", + withArgumentsOld: _withArgumentsOldDeferredTypeAnnotation, + withArguments: _withArgumentsDeferredTypeAnnotation, + analyzerCodes: ["TYPE_ANNOTATION_DEFERRED_CLASS"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDeferredTypeAnnotation({ @@ -853,16 +921,19 @@ Message _withArgumentsOldDeferredTypeAnnotation(DartType type, String name) => _withArgumentsDeferredTypeAnnotation(type: type, name: name); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeDotShorthandsUndefinedGetter = - const Template( - "DotShorthandsUndefinedGetter", - problemMessageTemplate: - r"""The static getter or field '#name' isn't defined for the type '#type'.""", - correctionMessageTemplate: - r"""Try correcting the name to the name of an existing static getter or field, or defining a getter or field named '#name'.""", - withArgumentsOld: _withArgumentsOldDotShorthandsUndefinedGetter, - ); +const Template< + Message Function(String name, DartType type), + Message Function({required String name, required DartType type}) +> +codeDotShorthandsUndefinedGetter = const Template( + "DotShorthandsUndefinedGetter", + problemMessageTemplate: + r"""The static getter or field '#name' isn't defined for the type '#type'.""", + correctionMessageTemplate: + r"""Try correcting the name to the name of an existing static getter or field, or defining a getter or field named '#name'.""", + withArgumentsOld: _withArgumentsOldDotShorthandsUndefinedGetter, + withArguments: _withArgumentsDotShorthandsUndefinedGetter, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDotShorthandsUndefinedGetter({ @@ -890,16 +961,19 @@ Message _withArgumentsOldDotShorthandsUndefinedGetter( ) => _withArgumentsDotShorthandsUndefinedGetter(name: name, type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeDotShorthandsUndefinedInvocation = - const Template( - "DotShorthandsUndefinedInvocation", - problemMessageTemplate: - r"""The static method or constructor '#name' isn't defined for the type '#type'.""", - correctionMessageTemplate: - r"""Try correcting the name to the name of an existing static method or constructor, or defining a static method or constructor named '#name'.""", - withArgumentsOld: _withArgumentsOldDotShorthandsUndefinedInvocation, - ); +const Template< + Message Function(String name, DartType type), + Message Function({required String name, required DartType type}) +> +codeDotShorthandsUndefinedInvocation = const Template( + "DotShorthandsUndefinedInvocation", + problemMessageTemplate: + r"""The static method or constructor '#name' isn't defined for the type '#type'.""", + correctionMessageTemplate: + r"""Try correcting the name to the name of an existing static method or constructor, or defining a static method or constructor named '#name'.""", + withArgumentsOld: _withArgumentsOldDotShorthandsUndefinedInvocation, + withArguments: _withArgumentsDotShorthandsUndefinedInvocation, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDotShorthandsUndefinedInvocation({ @@ -927,14 +1001,16 @@ Message _withArgumentsOldDotShorthandsUndefinedInvocation( ) => _withArgumentsDotShorthandsUndefinedInvocation(name: name, type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFfiDartTypeMismatch = - const Template( - "FfiDartTypeMismatch", - problemMessageTemplate: - r"""Expected '#type' to be a subtype of '#type2'.""", - withArgumentsOld: _withArgumentsOldFfiDartTypeMismatch, - ); +const Template< + Message Function(DartType type, DartType type2), + Message Function({required DartType type, required DartType type2}) +> +codeFfiDartTypeMismatch = const Template( + "FfiDartTypeMismatch", + problemMessageTemplate: r"""Expected '#type' to be a subtype of '#type2'.""", + withArgumentsOld: _withArgumentsOldFfiDartTypeMismatch, + withArguments: _withArgumentsFfiDartTypeMismatch, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFfiDartTypeMismatch({ @@ -958,12 +1034,16 @@ Message _withArgumentsOldFfiDartTypeMismatch(DartType type, DartType type2) => _withArgumentsFfiDartTypeMismatch(type: type, type2: type2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFfiExpectedExceptionalReturn = const Template( +const Template< + Message Function(DartType type), + Message Function({required DartType type}) +> +codeFfiExpectedExceptionalReturn = const Template( "FfiExpectedExceptionalReturn", problemMessageTemplate: r"""Expected an exceptional return value for a native callback returning '#type'.""", withArgumentsOld: _withArgumentsOldFfiExpectedExceptionalReturn, + withArguments: _withArgumentsFfiExpectedExceptionalReturn, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -984,14 +1064,17 @@ Message _withArgumentsOldFfiExpectedExceptionalReturn(DartType type) => _withArgumentsFfiExpectedExceptionalReturn(type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFfiExpectedNoExceptionalReturn = - const Template( - "FfiExpectedNoExceptionalReturn", - problemMessageTemplate: - r"""Exceptional return value cannot be provided for a native callback returning '#type'.""", - withArgumentsOld: _withArgumentsOldFfiExpectedNoExceptionalReturn, - ); +const Template< + Message Function(DartType type), + Message Function({required DartType type}) +> +codeFfiExpectedNoExceptionalReturn = const Template( + "FfiExpectedNoExceptionalReturn", + problemMessageTemplate: + r"""Exceptional return value cannot be provided for a native callback returning '#type'.""", + withArgumentsOld: _withArgumentsOldFfiExpectedNoExceptionalReturn, + withArguments: _withArgumentsFfiExpectedNoExceptionalReturn, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFfiExpectedNoExceptionalReturn({required DartType type}) { @@ -1011,14 +1094,17 @@ Message _withArgumentsOldFfiExpectedNoExceptionalReturn(DartType type) => _withArgumentsFfiExpectedNoExceptionalReturn(type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFfiNativeCallableListenerReturnVoid = - const Template( - "FfiNativeCallableListenerReturnVoid", - problemMessageTemplate: - r"""The return type of the function passed to NativeCallable.listener must be void rather than '#type'.""", - withArgumentsOld: _withArgumentsOldFfiNativeCallableListenerReturnVoid, - ); +const Template< + Message Function(DartType type), + Message Function({required DartType type}) +> +codeFfiNativeCallableListenerReturnVoid = const Template( + "FfiNativeCallableListenerReturnVoid", + problemMessageTemplate: + r"""The return type of the function passed to NativeCallable.listener must be void rather than '#type'.""", + withArgumentsOld: _withArgumentsOldFfiNativeCallableListenerReturnVoid, + withArguments: _withArgumentsFfiNativeCallableListenerReturnVoid, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFfiNativeCallableListenerReturnVoid({ @@ -1040,12 +1126,16 @@ Message _withArgumentsOldFfiNativeCallableListenerReturnVoid(DartType type) => _withArgumentsFfiNativeCallableListenerReturnVoid(type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFfiTypeInvalid = const Template( +const Template< + Message Function(DartType type), + Message Function({required DartType type}) +> +codeFfiTypeInvalid = const Template( "FfiTypeInvalid", problemMessageTemplate: r"""Expected type '#type' to be a valid and instantiated subtype of 'NativeType'.""", withArgumentsOld: _withArgumentsOldFfiTypeInvalid, + withArguments: _withArgumentsFfiTypeInvalid, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1066,16 +1156,21 @@ Message _withArgumentsOldFfiTypeInvalid(DartType type) => _withArgumentsFfiTypeInvalid(type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFfiTypeMismatch = - const Template< - Message Function(DartType type, DartType type2, DartType type3) - >( - "FfiTypeMismatch", - problemMessageTemplate: - r"""Expected type '#type' to be '#type2', which is the Dart type corresponding to '#type3'.""", - withArgumentsOld: _withArgumentsOldFfiTypeMismatch, - ); +const Template< + Message Function(DartType type, DartType type2, DartType type3), + Message Function({ + required DartType type, + required DartType type2, + required DartType type3, + }) +> +codeFfiTypeMismatch = const Template( + "FfiTypeMismatch", + problemMessageTemplate: + r"""Expected type '#type' to be '#type2', which is the Dart type corresponding to '#type3'.""", + withArgumentsOld: _withArgumentsOldFfiTypeMismatch, + withArguments: _withArgumentsFfiTypeMismatch, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFfiTypeMismatch({ @@ -1104,15 +1199,18 @@ Message _withArgumentsOldFfiTypeMismatch( ) => _withArgumentsFfiTypeMismatch(type: type, type2: type2, type3: type3); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFieldNonNullableNotInitializedByConstructorError = - const Template( - "FieldNonNullableNotInitializedByConstructorError", - problemMessageTemplate: - r"""This constructor should initialize field '#name' because its type '#type' doesn't allow null.""", - withArgumentsOld: - _withArgumentsOldFieldNonNullableNotInitializedByConstructorError, - ); +const Template< + Message Function(String name, DartType type), + Message Function({required String name, required DartType type}) +> +codeFieldNonNullableNotInitializedByConstructorError = const Template( + "FieldNonNullableNotInitializedByConstructorError", + problemMessageTemplate: + r"""This constructor should initialize field '#name' because its type '#type' doesn't allow null.""", + withArgumentsOld: + _withArgumentsOldFieldNonNullableNotInitializedByConstructorError, + withArguments: _withArgumentsFieldNonNullableNotInitializedByConstructorError, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFieldNonNullableNotInitializedByConstructorError({ @@ -1141,15 +1239,17 @@ Message _withArgumentsOldFieldNonNullableNotInitializedByConstructorError( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeFieldNonNullableWithoutInitializerError = - const Template( - "FieldNonNullableWithoutInitializerError", - problemMessageTemplate: - r"""Field '#name' should be initialized because its type '#type' doesn't allow null.""", - withArgumentsOld: - _withArgumentsOldFieldNonNullableWithoutInitializerError, - ); +const Template< + Message Function(String name, DartType type), + Message Function({required String name, required DartType type}) +> +codeFieldNonNullableWithoutInitializerError = const Template( + "FieldNonNullableWithoutInitializerError", + problemMessageTemplate: + r"""Field '#name' should be initialized because its type '#type' doesn't allow null.""", + withArgumentsOld: _withArgumentsOldFieldNonNullableWithoutInitializerError, + withArguments: _withArgumentsFieldNonNullableWithoutInitializerError, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsFieldNonNullableWithoutInitializerError({ @@ -1178,16 +1278,19 @@ Message _withArgumentsOldFieldNonNullableWithoutInitializerError( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeForInLoopElementTypeNotAssignable = - const Template( - "ForInLoopElementTypeNotAssignable", - problemMessageTemplate: - r"""A value of type '#type' can't be assigned to a variable of type '#type2'.""", - correctionMessageTemplate: r"""Try changing the type of the variable.""", - withArgumentsOld: _withArgumentsOldForInLoopElementTypeNotAssignable, - analyzerCodes: ["FOR_IN_OF_INVALID_ELEMENT_TYPE"], - ); +const Template< + Message Function(DartType type, DartType type2), + Message Function({required DartType type, required DartType type2}) +> +codeForInLoopElementTypeNotAssignable = const Template( + "ForInLoopElementTypeNotAssignable", + problemMessageTemplate: + r"""A value of type '#type' can't be assigned to a variable of type '#type2'.""", + correctionMessageTemplate: r"""Try changing the type of the variable.""", + withArgumentsOld: _withArgumentsOldForInLoopElementTypeNotAssignable, + withArguments: _withArgumentsForInLoopElementTypeNotAssignable, + analyzerCodes: ["FOR_IN_OF_INVALID_ELEMENT_TYPE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsForInLoopElementTypeNotAssignable({ @@ -1214,15 +1317,18 @@ Message _withArgumentsOldForInLoopElementTypeNotAssignable( ) => _withArgumentsForInLoopElementTypeNotAssignable(type: type, type2: type2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeForInLoopTypeNotIterable = - const Template( - "ForInLoopTypeNotIterable", - problemMessageTemplate: - r"""The type '#type' used in the 'for' loop must implement '#type2'.""", - withArgumentsOld: _withArgumentsOldForInLoopTypeNotIterable, - analyzerCodes: ["FOR_IN_OF_INVALID_TYPE"], - ); +const Template< + Message Function(DartType type, DartType type2), + Message Function({required DartType type, required DartType type2}) +> +codeForInLoopTypeNotIterable = const Template( + "ForInLoopTypeNotIterable", + problemMessageTemplate: + r"""The type '#type' used in the 'for' loop must implement '#type2'.""", + withArgumentsOld: _withArgumentsOldForInLoopTypeNotIterable, + withArguments: _withArgumentsForInLoopTypeNotIterable, + analyzerCodes: ["FOR_IN_OF_INVALID_TYPE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsForInLoopTypeNotIterable({ @@ -1248,18 +1354,21 @@ Message _withArgumentsOldForInLoopTypeNotIterable( ) => _withArgumentsForInLoopTypeNotIterable(type: type, type2: type2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeGenericFunctionTypeAsTypeArgumentThroughTypedef = - const Template( - "GenericFunctionTypeAsTypeArgumentThroughTypedef", - problemMessageTemplate: - r"""Generic function type '#type' used as a type argument through typedef '#type2'.""", - correctionMessageTemplate: - r"""Try providing a non-generic function type explicitly.""", - withArgumentsOld: - _withArgumentsOldGenericFunctionTypeAsTypeArgumentThroughTypedef, - analyzerCodes: ["GENERIC_FUNCTION_CANNOT_BE_TYPE_ARGUMENT"], - ); +const Template< + Message Function(DartType type, DartType type2), + Message Function({required DartType type, required DartType type2}) +> +codeGenericFunctionTypeAsTypeArgumentThroughTypedef = const Template( + "GenericFunctionTypeAsTypeArgumentThroughTypedef", + problemMessageTemplate: + r"""Generic function type '#type' used as a type argument through typedef '#type2'.""", + correctionMessageTemplate: + r"""Try providing a non-generic function type explicitly.""", + withArgumentsOld: + _withArgumentsOldGenericFunctionTypeAsTypeArgumentThroughTypedef, + withArguments: _withArgumentsGenericFunctionTypeAsTypeArgumentThroughTypedef, + analyzerCodes: ["GENERIC_FUNCTION_CANNOT_BE_TYPE_ARGUMENT"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsGenericFunctionTypeAsTypeArgumentThroughTypedef({ @@ -1290,18 +1399,21 @@ Message _withArgumentsOldGenericFunctionTypeAsTypeArgumentThroughTypedef( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeGenericFunctionTypeInferredAsActualTypeArgument = - const Template( - "GenericFunctionTypeInferredAsActualTypeArgument", - problemMessageTemplate: - r"""Generic function type '#type' inferred as a type argument.""", - correctionMessageTemplate: - r"""Try providing a non-generic function type explicitly.""", - withArgumentsOld: - _withArgumentsOldGenericFunctionTypeInferredAsActualTypeArgument, - analyzerCodes: ["GENERIC_FUNCTION_CANNOT_BE_TYPE_ARGUMENT"], - ); +const Template< + Message Function(DartType type), + Message Function({required DartType type}) +> +codeGenericFunctionTypeInferredAsActualTypeArgument = const Template( + "GenericFunctionTypeInferredAsActualTypeArgument", + problemMessageTemplate: + r"""Generic function type '#type' inferred as a type argument.""", + correctionMessageTemplate: + r"""Try providing a non-generic function type explicitly.""", + withArgumentsOld: + _withArgumentsOldGenericFunctionTypeInferredAsActualTypeArgument, + withArguments: _withArgumentsGenericFunctionTypeInferredAsActualTypeArgument, + analyzerCodes: ["GENERIC_FUNCTION_CANNOT_BE_TYPE_ARGUMENT"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsGenericFunctionTypeInferredAsActualTypeArgument({ @@ -1326,14 +1438,18 @@ Message _withArgumentsOldGenericFunctionTypeInferredAsActualTypeArgument( ) => _withArgumentsGenericFunctionTypeInferredAsActualTypeArgument(type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeImplicitCallOfNonMethod = const Template( +const Template< + Message Function(DartType type), + Message Function({required DartType type}) +> +codeImplicitCallOfNonMethod = const Template( "ImplicitCallOfNonMethod", problemMessageTemplate: r"""Cannot invoke an instance of '#type' because it declares 'call' to be something other than a method.""", correctionMessageTemplate: r"""Try changing 'call' to a method or explicitly invoke 'call'.""", withArgumentsOld: _withArgumentsOldImplicitCallOfNonMethod, + withArguments: _withArgumentsImplicitCallOfNonMethod, analyzerCodes: ["IMPLICIT_CALL_OF_NON_METHOD"], ); @@ -1357,12 +1473,16 @@ Message _withArgumentsOldImplicitCallOfNonMethod(DartType type) => _withArgumentsImplicitCallOfNonMethod(type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeImplicitReturnNull = const Template( +const Template< + Message Function(DartType type), + Message Function({required DartType type}) +> +codeImplicitReturnNull = const Template( "ImplicitReturnNull", problemMessageTemplate: r"""A non-null value must be returned since the return type '#type' doesn't allow null.""", withArgumentsOld: _withArgumentsOldImplicitReturnNull, + withArguments: _withArgumentsImplicitReturnNull, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1383,15 +1503,18 @@ Message _withArgumentsOldImplicitReturnNull(DartType type) => _withArgumentsImplicitReturnNull(type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeIncompatibleRedirecteeFunctionType = - const Template( - "IncompatibleRedirecteeFunctionType", - problemMessageTemplate: - r"""The constructor function type '#type' isn't a subtype of '#type2'.""", - withArgumentsOld: _withArgumentsOldIncompatibleRedirecteeFunctionType, - analyzerCodes: ["REDIRECT_TO_INVALID_TYPE"], - ); +const Template< + Message Function(DartType type, DartType type2), + Message Function({required DartType type, required DartType type2}) +> +codeIncompatibleRedirecteeFunctionType = const Template( + "IncompatibleRedirecteeFunctionType", + problemMessageTemplate: + r"""The constructor function type '#type' isn't a subtype of '#type2'.""", + withArgumentsOld: _withArgumentsOldIncompatibleRedirecteeFunctionType, + withArguments: _withArgumentsIncompatibleRedirecteeFunctionType, + analyzerCodes: ["REDIRECT_TO_INVALID_TYPE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsIncompatibleRedirecteeFunctionType({ @@ -1418,20 +1541,24 @@ Message _withArgumentsOldIncompatibleRedirecteeFunctionType( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(DartType type, DartType type2, String name, String name2) + Message Function(DartType type, DartType type2, String name, String name2), + Message Function({ + required DartType type, + required DartType type2, + required String name, + required String name2, + }) > -codeIncorrectTypeArgument = - const Template< - Message Function(DartType type, DartType type2, String name, String name2) - >( - "IncorrectTypeArgument", - problemMessageTemplate: - r"""Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2'.""", - correctionMessageTemplate: - r"""Try changing type arguments so that they conform to the bounds.""", - withArgumentsOld: _withArgumentsOldIncorrectTypeArgument, - analyzerCodes: ["TYPE_ARGUMENT_NOT_MATCHING_BOUNDS"], - ); +codeIncorrectTypeArgument = const Template( + "IncorrectTypeArgument", + problemMessageTemplate: + r"""Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2'.""", + correctionMessageTemplate: + r"""Try changing type arguments so that they conform to the bounds.""", + withArgumentsOld: _withArgumentsOldIncorrectTypeArgument, + withArguments: _withArgumentsIncorrectTypeArgument, + analyzerCodes: ["TYPE_ARGUMENT_NOT_MATCHING_BOUNDS"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsIncorrectTypeArgument({ @@ -1471,20 +1598,24 @@ Message _withArgumentsOldIncorrectTypeArgument( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(DartType type, DartType type2, String name, String name2) + Message Function(DartType type, DartType type2, String name, String name2), + Message Function({ + required DartType type, + required DartType type2, + required String name, + required String name2, + }) > -codeIncorrectTypeArgumentInferred = - const Template< - Message Function(DartType type, DartType type2, String name, String name2) - >( - "IncorrectTypeArgumentInferred", - problemMessageTemplate: - r"""Inferred type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2'.""", - correctionMessageTemplate: - r"""Try specifying type arguments explicitly so that they conform to the bounds.""", - withArgumentsOld: _withArgumentsOldIncorrectTypeArgumentInferred, - analyzerCodes: ["TYPE_ARGUMENT_NOT_MATCHING_BOUNDS"], - ); +codeIncorrectTypeArgumentInferred = const Template( + "IncorrectTypeArgumentInferred", + problemMessageTemplate: + r"""Inferred type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2'.""", + correctionMessageTemplate: + r"""Try specifying type arguments explicitly so that they conform to the bounds.""", + withArgumentsOld: _withArgumentsOldIncorrectTypeArgumentInferred, + withArguments: _withArgumentsIncorrectTypeArgumentInferred, + analyzerCodes: ["TYPE_ARGUMENT_NOT_MATCHING_BOUNDS"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsIncorrectTypeArgumentInferred({ @@ -1524,25 +1655,24 @@ Message _withArgumentsOldIncorrectTypeArgumentInferred( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(DartType type, DartType type2, String name, DartType type3) + Message Function(DartType type, DartType type2, String name, DartType type3), + Message Function({ + required DartType type, + required DartType type2, + required String name, + required DartType type3, + }) > -codeIncorrectTypeArgumentInstantiation = - const Template< - Message Function( - DartType type, - DartType type2, - String name, - DartType type3, - ) - >( - "IncorrectTypeArgumentInstantiation", - problemMessageTemplate: - r"""Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#type3'.""", - correctionMessageTemplate: - r"""Try changing type arguments so that they conform to the bounds.""", - withArgumentsOld: _withArgumentsOldIncorrectTypeArgumentInstantiation, - analyzerCodes: ["TYPE_ARGUMENT_NOT_MATCHING_BOUNDS"], - ); +codeIncorrectTypeArgumentInstantiation = const Template( + "IncorrectTypeArgumentInstantiation", + problemMessageTemplate: + r"""Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#type3'.""", + correctionMessageTemplate: + r"""Try changing type arguments so that they conform to the bounds.""", + withArgumentsOld: _withArgumentsOldIncorrectTypeArgumentInstantiation, + withArguments: _withArgumentsIncorrectTypeArgumentInstantiation, + analyzerCodes: ["TYPE_ARGUMENT_NOT_MATCHING_BOUNDS"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsIncorrectTypeArgumentInstantiation({ @@ -1582,26 +1712,24 @@ Message _withArgumentsOldIncorrectTypeArgumentInstantiation( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(DartType type, DartType type2, String name, DartType type3) + Message Function(DartType type, DartType type2, String name, DartType type3), + Message Function({ + required DartType type, + required DartType type2, + required String name, + required DartType type3, + }) > -codeIncorrectTypeArgumentInstantiationInferred = - const Template< - Message Function( - DartType type, - DartType type2, - String name, - DartType type3, - ) - >( - "IncorrectTypeArgumentInstantiationInferred", - problemMessageTemplate: - r"""Inferred type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#type3'.""", - correctionMessageTemplate: - r"""Try specifying type arguments explicitly so that they conform to the bounds.""", - withArgumentsOld: - _withArgumentsOldIncorrectTypeArgumentInstantiationInferred, - analyzerCodes: ["TYPE_ARGUMENT_NOT_MATCHING_BOUNDS"], - ); +codeIncorrectTypeArgumentInstantiationInferred = const Template( + "IncorrectTypeArgumentInstantiationInferred", + problemMessageTemplate: + r"""Inferred type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#type3'.""", + correctionMessageTemplate: + r"""Try specifying type arguments explicitly so that they conform to the bounds.""", + withArgumentsOld: _withArgumentsOldIncorrectTypeArgumentInstantiationInferred, + withArguments: _withArgumentsIncorrectTypeArgumentInstantiationInferred, + analyzerCodes: ["TYPE_ARGUMENT_NOT_MATCHING_BOUNDS"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsIncorrectTypeArgumentInstantiationInferred({ @@ -1647,26 +1775,25 @@ const Template< String name, DartType type3, String name2, - ) + ), + Message Function({ + required DartType type, + required DartType type2, + required String name, + required DartType type3, + required String name2, + }) > -codeIncorrectTypeArgumentQualified = - const Template< - Message Function( - DartType type, - DartType type2, - String name, - DartType type3, - String name2, - ) - >( - "IncorrectTypeArgumentQualified", - problemMessageTemplate: - r"""Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#type3.#name2'.""", - correctionMessageTemplate: - r"""Try changing type arguments so that they conform to the bounds.""", - withArgumentsOld: _withArgumentsOldIncorrectTypeArgumentQualified, - analyzerCodes: ["TYPE_ARGUMENT_NOT_MATCHING_BOUNDS"], - ); +codeIncorrectTypeArgumentQualified = const Template( + "IncorrectTypeArgumentQualified", + problemMessageTemplate: + r"""Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#type3.#name2'.""", + correctionMessageTemplate: + r"""Try changing type arguments so that they conform to the bounds.""", + withArgumentsOld: _withArgumentsOldIncorrectTypeArgumentQualified, + withArguments: _withArgumentsIncorrectTypeArgumentQualified, + analyzerCodes: ["TYPE_ARGUMENT_NOT_MATCHING_BOUNDS"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsIncorrectTypeArgumentQualified({ @@ -1722,26 +1849,25 @@ const Template< String name, DartType type3, String name2, - ) + ), + Message Function({ + required DartType type, + required DartType type2, + required String name, + required DartType type3, + required String name2, + }) > -codeIncorrectTypeArgumentQualifiedInferred = - const Template< - Message Function( - DartType type, - DartType type2, - String name, - DartType type3, - String name2, - ) - >( - "IncorrectTypeArgumentQualifiedInferred", - problemMessageTemplate: - r"""Inferred type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#type3.#name2'.""", - correctionMessageTemplate: - r"""Try specifying type arguments explicitly so that they conform to the bounds.""", - withArgumentsOld: _withArgumentsOldIncorrectTypeArgumentQualifiedInferred, - analyzerCodes: ["TYPE_ARGUMENT_NOT_MATCHING_BOUNDS"], - ); +codeIncorrectTypeArgumentQualifiedInferred = const Template( + "IncorrectTypeArgumentQualifiedInferred", + problemMessageTemplate: + r"""Inferred type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#type3.#name2'.""", + correctionMessageTemplate: + r"""Try specifying type arguments explicitly so that they conform to the bounds.""", + withArgumentsOld: _withArgumentsOldIncorrectTypeArgumentQualifiedInferred, + withArguments: _withArgumentsIncorrectTypeArgumentQualifiedInferred, + analyzerCodes: ["TYPE_ARGUMENT_NOT_MATCHING_BOUNDS"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsIncorrectTypeArgumentQualifiedInferred({ @@ -1790,14 +1916,21 @@ Message _withArgumentsOldIncorrectTypeArgumentQualifiedInferred( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeIndexOutOfBoundInRecordIndexGet = - const Template( - "IndexOutOfBoundInRecordIndexGet", - problemMessageTemplate: - r"""Index #count is out of range 0..#count2 of positional fields of records #type.""", - withArgumentsOld: _withArgumentsOldIndexOutOfBoundInRecordIndexGet, - ); +const Template< + Message Function(int count, int count2, DartType type), + Message Function({ + required int count, + required int count2, + required DartType type, + }) +> +codeIndexOutOfBoundInRecordIndexGet = const Template( + "IndexOutOfBoundInRecordIndexGet", + problemMessageTemplate: + r"""Index #count is out of range 0..#count2 of positional fields of records #type.""", + withArgumentsOld: _withArgumentsOldIndexOutOfBoundInRecordIndexGet, + withArguments: _withArgumentsIndexOutOfBoundInRecordIndexGet, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsIndexOutOfBoundInRecordIndexGet({ @@ -1828,19 +1961,24 @@ Message _withArgumentsOldIndexOutOfBoundInRecordIndexGet( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInitializingFormalTypeMismatch = - const Template< - Message Function(String name, DartType type, DartType type2) - >( - "InitializingFormalTypeMismatch", - problemMessageTemplate: - r"""The type of parameter '#name', '#type' is not a subtype of the corresponding field's type, '#type2'.""", - correctionMessageTemplate: - r"""Try changing the type of parameter '#name' to a subtype of '#type2'.""", - withArgumentsOld: _withArgumentsOldInitializingFormalTypeMismatch, - analyzerCodes: ["INVALID_PARAMETER_DECLARATION"], - ); +const Template< + Message Function(String name, DartType type, DartType type2), + Message Function({ + required String name, + required DartType type, + required DartType type2, + }) +> +codeInitializingFormalTypeMismatch = const Template( + "InitializingFormalTypeMismatch", + problemMessageTemplate: + r"""The type of parameter '#name', '#type' is not a subtype of the corresponding field's type, '#type2'.""", + correctionMessageTemplate: + r"""Try changing the type of parameter '#name' to a subtype of '#type2'.""", + withArgumentsOld: _withArgumentsOldInitializingFormalTypeMismatch, + withArguments: _withArgumentsInitializingFormalTypeMismatch, + analyzerCodes: ["INVALID_PARAMETER_DECLARATION"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInitializingFormalTypeMismatch({ @@ -1875,16 +2013,19 @@ Message _withArgumentsOldInitializingFormalTypeMismatch( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInstantiationNonGenericFunctionType = - const Template( - "InstantiationNonGenericFunctionType", - problemMessageTemplate: - r"""The static type of the explicit instantiation operand must be a generic function type but is '#type'.""", - correctionMessageTemplate: - r"""Try changing the operand or remove the type arguments.""", - withArgumentsOld: _withArgumentsOldInstantiationNonGenericFunctionType, - ); +const Template< + Message Function(DartType type), + Message Function({required DartType type}) +> +codeInstantiationNonGenericFunctionType = const Template( + "InstantiationNonGenericFunctionType", + problemMessageTemplate: + r"""The static type of the explicit instantiation operand must be a generic function type but is '#type'.""", + correctionMessageTemplate: + r"""Try changing the operand or remove the type arguments.""", + withArgumentsOld: _withArgumentsOldInstantiationNonGenericFunctionType, + withArguments: _withArgumentsInstantiationNonGenericFunctionType, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInstantiationNonGenericFunctionType({ @@ -1908,18 +2049,20 @@ Message _withArgumentsOldInstantiationNonGenericFunctionType(DartType type) => _withArgumentsInstantiationNonGenericFunctionType(type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInstantiationNullableGenericFunctionType = - const Template( - "InstantiationNullableGenericFunctionType", - problemMessageTemplate: - r"""The static type of the explicit instantiation operand must be a non-null generic function type but is '#type'.""", - correctionMessageTemplate: - r"""Try changing the operand or remove the type arguments.""", - withArgumentsOld: - _withArgumentsOldInstantiationNullableGenericFunctionType, - analyzerCodes: ["DISALLOWED_TYPE_INSTANTIATION_EXPRESSION"], - ); +const Template< + Message Function(DartType type), + Message Function({required DartType type}) +> +codeInstantiationNullableGenericFunctionType = const Template( + "InstantiationNullableGenericFunctionType", + problemMessageTemplate: + r"""The static type of the explicit instantiation operand must be a non-null generic function type but is '#type'.""", + correctionMessageTemplate: + r"""Try changing the operand or remove the type arguments.""", + withArgumentsOld: _withArgumentsOldInstantiationNullableGenericFunctionType, + withArguments: _withArgumentsInstantiationNullableGenericFunctionType, + analyzerCodes: ["DISALLOWED_TYPE_INSTANTIATION_EXPRESSION"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInstantiationNullableGenericFunctionType({ @@ -1944,15 +2087,18 @@ Message _withArgumentsOldInstantiationNullableGenericFunctionType( ) => _withArgumentsInstantiationNullableGenericFunctionType(type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInternalProblemUnsupportedNullability = - const Template( - "InternalProblemUnsupportedNullability", - problemMessageTemplate: - r"""Unsupported nullability value '#string' on type '#type'.""", - withArgumentsOld: _withArgumentsOldInternalProblemUnsupportedNullability, - severity: CfeSeverity.internalProblem, - ); +const Template< + Message Function(String string, DartType type), + Message Function({required String string, required DartType type}) +> +codeInternalProblemUnsupportedNullability = const Template( + "InternalProblemUnsupportedNullability", + problemMessageTemplate: + r"""Unsupported nullability value '#string' on type '#type'.""", + withArgumentsOld: _withArgumentsOldInternalProblemUnsupportedNullability, + withArguments: _withArgumentsInternalProblemUnsupportedNullability, + severity: CfeSeverity.internalProblem, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInternalProblemUnsupportedNullability({ @@ -1981,15 +2127,18 @@ Message _withArgumentsOldInternalProblemUnsupportedNullability( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInvalidAssignmentError = - const Template( - "InvalidAssignmentError", - problemMessageTemplate: - r"""A value of type '#type' can't be assigned to a variable of type '#type2'.""", - withArgumentsOld: _withArgumentsOldInvalidAssignmentError, - analyzerCodes: ["INVALID_ASSIGNMENT"], - ); +const Template< + Message Function(DartType type, DartType type2), + Message Function({required DartType type, required DartType type2}) +> +codeInvalidAssignmentError = const Template( + "InvalidAssignmentError", + problemMessageTemplate: + r"""A value of type '#type' can't be assigned to a variable of type '#type2'.""", + withArgumentsOld: _withArgumentsOldInvalidAssignmentError, + withArguments: _withArgumentsInvalidAssignmentError, + analyzerCodes: ["INVALID_ASSIGNMENT"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidAssignmentError({ @@ -2015,17 +2164,20 @@ Message _withArgumentsOldInvalidAssignmentError( ) => _withArgumentsInvalidAssignmentError(type: type, type2: type2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInvalidCastFunctionExpr = - const Template( - "InvalidCastFunctionExpr", - problemMessageTemplate: - r"""The function expression type '#type' isn't of expected type '#type2'.""", - correctionMessageTemplate: - r"""Change the type of the function expression or the context in which it is used.""", - withArgumentsOld: _withArgumentsOldInvalidCastFunctionExpr, - analyzerCodes: ["INVALID_CAST_FUNCTION_EXPR"], - ); +const Template< + Message Function(DartType type, DartType type2), + Message Function({required DartType type, required DartType type2}) +> +codeInvalidCastFunctionExpr = const Template( + "InvalidCastFunctionExpr", + problemMessageTemplate: + r"""The function expression type '#type' isn't of expected type '#type2'.""", + correctionMessageTemplate: + r"""Change the type of the function expression or the context in which it is used.""", + withArgumentsOld: _withArgumentsOldInvalidCastFunctionExpr, + withArguments: _withArgumentsInvalidCastFunctionExpr, + analyzerCodes: ["INVALID_CAST_FUNCTION_EXPR"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidCastFunctionExpr({ @@ -2053,17 +2205,20 @@ Message _withArgumentsOldInvalidCastFunctionExpr( ) => _withArgumentsInvalidCastFunctionExpr(type: type, type2: type2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInvalidCastLiteralList = - const Template( - "InvalidCastLiteralList", - problemMessageTemplate: - r"""The list literal type '#type' isn't of expected type '#type2'.""", - correctionMessageTemplate: - r"""Change the type of the list literal or the context in which it is used.""", - withArgumentsOld: _withArgumentsOldInvalidCastLiteralList, - analyzerCodes: ["INVALID_CAST_LITERAL_LIST"], - ); +const Template< + Message Function(DartType type, DartType type2), + Message Function({required DartType type, required DartType type2}) +> +codeInvalidCastLiteralList = const Template( + "InvalidCastLiteralList", + problemMessageTemplate: + r"""The list literal type '#type' isn't of expected type '#type2'.""", + correctionMessageTemplate: + r"""Change the type of the list literal or the context in which it is used.""", + withArgumentsOld: _withArgumentsOldInvalidCastLiteralList, + withArguments: _withArgumentsInvalidCastLiteralList, + analyzerCodes: ["INVALID_CAST_LITERAL_LIST"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidCastLiteralList({ @@ -2091,17 +2246,20 @@ Message _withArgumentsOldInvalidCastLiteralList( ) => _withArgumentsInvalidCastLiteralList(type: type, type2: type2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInvalidCastLiteralMap = - const Template( - "InvalidCastLiteralMap", - problemMessageTemplate: - r"""The map literal type '#type' isn't of expected type '#type2'.""", - correctionMessageTemplate: - r"""Change the type of the map literal or the context in which it is used.""", - withArgumentsOld: _withArgumentsOldInvalidCastLiteralMap, - analyzerCodes: ["INVALID_CAST_LITERAL_MAP"], - ); +const Template< + Message Function(DartType type, DartType type2), + Message Function({required DartType type, required DartType type2}) +> +codeInvalidCastLiteralMap = const Template( + "InvalidCastLiteralMap", + problemMessageTemplate: + r"""The map literal type '#type' isn't of expected type '#type2'.""", + correctionMessageTemplate: + r"""Change the type of the map literal or the context in which it is used.""", + withArgumentsOld: _withArgumentsOldInvalidCastLiteralMap, + withArguments: _withArgumentsInvalidCastLiteralMap, + analyzerCodes: ["INVALID_CAST_LITERAL_MAP"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidCastLiteralMap({ @@ -2127,17 +2285,20 @@ Message _withArgumentsOldInvalidCastLiteralMap(DartType type, DartType type2) => _withArgumentsInvalidCastLiteralMap(type: type, type2: type2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInvalidCastLiteralSet = - const Template( - "InvalidCastLiteralSet", - problemMessageTemplate: - r"""The set literal type '#type' isn't of expected type '#type2'.""", - correctionMessageTemplate: - r"""Change the type of the set literal or the context in which it is used.""", - withArgumentsOld: _withArgumentsOldInvalidCastLiteralSet, - analyzerCodes: ["INVALID_CAST_LITERAL_SET"], - ); +const Template< + Message Function(DartType type, DartType type2), + Message Function({required DartType type, required DartType type2}) +> +codeInvalidCastLiteralSet = const Template( + "InvalidCastLiteralSet", + problemMessageTemplate: + r"""The set literal type '#type' isn't of expected type '#type2'.""", + correctionMessageTemplate: + r"""Change the type of the set literal or the context in which it is used.""", + withArgumentsOld: _withArgumentsOldInvalidCastLiteralSet, + withArguments: _withArgumentsInvalidCastLiteralSet, + analyzerCodes: ["INVALID_CAST_LITERAL_SET"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidCastLiteralSet({ @@ -2163,17 +2324,20 @@ Message _withArgumentsOldInvalidCastLiteralSet(DartType type, DartType type2) => _withArgumentsInvalidCastLiteralSet(type: type, type2: type2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInvalidCastLocalFunction = - const Template( - "InvalidCastLocalFunction", - problemMessageTemplate: - r"""The local function has type '#type' that isn't of expected type '#type2'.""", - correctionMessageTemplate: - r"""Change the type of the function or the context in which it is used.""", - withArgumentsOld: _withArgumentsOldInvalidCastLocalFunction, - analyzerCodes: ["INVALID_CAST_FUNCTION"], - ); +const Template< + Message Function(DartType type, DartType type2), + Message Function({required DartType type, required DartType type2}) +> +codeInvalidCastLocalFunction = const Template( + "InvalidCastLocalFunction", + problemMessageTemplate: + r"""The local function has type '#type' that isn't of expected type '#type2'.""", + correctionMessageTemplate: + r"""Change the type of the function or the context in which it is used.""", + withArgumentsOld: _withArgumentsOldInvalidCastLocalFunction, + withArguments: _withArgumentsInvalidCastLocalFunction, + analyzerCodes: ["INVALID_CAST_FUNCTION"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidCastLocalFunction({ @@ -2201,17 +2365,20 @@ Message _withArgumentsOldInvalidCastLocalFunction( ) => _withArgumentsInvalidCastLocalFunction(type: type, type2: type2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInvalidCastNewExpr = - const Template( - "InvalidCastNewExpr", - problemMessageTemplate: - r"""The constructor returns type '#type' that isn't of expected type '#type2'.""", - correctionMessageTemplate: - r"""Change the type of the object being constructed or the context in which it is used.""", - withArgumentsOld: _withArgumentsOldInvalidCastNewExpr, - analyzerCodes: ["INVALID_CAST_NEW_EXPR"], - ); +const Template< + Message Function(DartType type, DartType type2), + Message Function({required DartType type, required DartType type2}) +> +codeInvalidCastNewExpr = const Template( + "InvalidCastNewExpr", + problemMessageTemplate: + r"""The constructor returns type '#type' that isn't of expected type '#type2'.""", + correctionMessageTemplate: + r"""Change the type of the object being constructed or the context in which it is used.""", + withArgumentsOld: _withArgumentsOldInvalidCastNewExpr, + withArguments: _withArgumentsInvalidCastNewExpr, + analyzerCodes: ["INVALID_CAST_NEW_EXPR"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidCastNewExpr({ @@ -2237,17 +2404,20 @@ Message _withArgumentsOldInvalidCastNewExpr(DartType type, DartType type2) => _withArgumentsInvalidCastNewExpr(type: type, type2: type2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInvalidCastStaticMethod = - const Template( - "InvalidCastStaticMethod", - problemMessageTemplate: - r"""The static method has type '#type' that isn't of expected type '#type2'.""", - correctionMessageTemplate: - r"""Change the type of the method or the context in which it is used.""", - withArgumentsOld: _withArgumentsOldInvalidCastStaticMethod, - analyzerCodes: ["INVALID_CAST_METHOD"], - ); +const Template< + Message Function(DartType type, DartType type2), + Message Function({required DartType type, required DartType type2}) +> +codeInvalidCastStaticMethod = const Template( + "InvalidCastStaticMethod", + problemMessageTemplate: + r"""The static method has type '#type' that isn't of expected type '#type2'.""", + correctionMessageTemplate: + r"""Change the type of the method or the context in which it is used.""", + withArgumentsOld: _withArgumentsOldInvalidCastStaticMethod, + withArguments: _withArgumentsInvalidCastStaticMethod, + analyzerCodes: ["INVALID_CAST_METHOD"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidCastStaticMethod({ @@ -2275,17 +2445,20 @@ Message _withArgumentsOldInvalidCastStaticMethod( ) => _withArgumentsInvalidCastStaticMethod(type: type, type2: type2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInvalidCastTopLevelFunction = - const Template( - "InvalidCastTopLevelFunction", - problemMessageTemplate: - r"""The top level function has type '#type' that isn't of expected type '#type2'.""", - correctionMessageTemplate: - r"""Change the type of the function or the context in which it is used.""", - withArgumentsOld: _withArgumentsOldInvalidCastTopLevelFunction, - analyzerCodes: ["INVALID_CAST_FUNCTION"], - ); +const Template< + Message Function(DartType type, DartType type2), + Message Function({required DartType type, required DartType type2}) +> +codeInvalidCastTopLevelFunction = const Template( + "InvalidCastTopLevelFunction", + problemMessageTemplate: + r"""The top level function has type '#type' that isn't of expected type '#type2'.""", + correctionMessageTemplate: + r"""Change the type of the function or the context in which it is used.""", + withArgumentsOld: _withArgumentsOldInvalidCastTopLevelFunction, + withArguments: _withArgumentsInvalidCastTopLevelFunction, + analyzerCodes: ["INVALID_CAST_FUNCTION"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidCastTopLevelFunction({ @@ -2314,24 +2487,23 @@ Message _withArgumentsOldInvalidCastTopLevelFunction( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(DartType type, String name, DartType type2, DartType type3) + Message Function(DartType type, String name, DartType type2, DartType type3), + Message Function({ + required DartType type, + required String name, + required DartType type2, + required DartType type3, + }) > -codeInvalidExtensionTypeSuperExtensionType = - const Template< - Message Function( - DartType type, - String name, - DartType type2, - DartType type3, - ) - >( - "InvalidExtensionTypeSuperExtensionType", - problemMessageTemplate: - r"""The representation type '#type' of extension type '#name' must be either a subtype of the representation type '#type2' of the implemented extension type '#type3' or a subtype of '#type3' itself.""", - correctionMessageTemplate: - r"""Try changing the representation type to a subtype of '#type2'.""", - withArgumentsOld: _withArgumentsOldInvalidExtensionTypeSuperExtensionType, - ); +codeInvalidExtensionTypeSuperExtensionType = const Template( + "InvalidExtensionTypeSuperExtensionType", + problemMessageTemplate: + r"""The representation type '#type' of extension type '#name' must be either a subtype of the representation type '#type2' of the implemented extension type '#type3' or a subtype of '#type3' itself.""", + correctionMessageTemplate: + r"""Try changing the representation type to a subtype of '#type2'.""", + withArgumentsOld: _withArgumentsOldInvalidExtensionTypeSuperExtensionType, + withArguments: _withArgumentsInvalidExtensionTypeSuperExtensionType, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidExtensionTypeSuperExtensionType({ @@ -2370,18 +2542,23 @@ Message _withArgumentsOldInvalidExtensionTypeSuperExtensionType( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInvalidExtensionTypeSuperInterface = - const Template< - Message Function(DartType type, DartType type2, String name) - >( - "InvalidExtensionTypeSuperInterface", - problemMessageTemplate: - r"""The implemented interface '#type' must be a supertype of the representation type '#type2' of extension type '#name'.""", - correctionMessageTemplate: - r"""Try changing the interface type to a supertype of '#type2' or the representation type to a subtype of '#type'.""", - withArgumentsOld: _withArgumentsOldInvalidExtensionTypeSuperInterface, - ); +const Template< + Message Function(DartType type, DartType type2, String name), + Message Function({ + required DartType type, + required DartType type2, + required String name, + }) +> +codeInvalidExtensionTypeSuperInterface = const Template( + "InvalidExtensionTypeSuperInterface", + problemMessageTemplate: + r"""The implemented interface '#type' must be a supertype of the representation type '#type2' of extension type '#name'.""", + correctionMessageTemplate: + r"""Try changing the interface type to a supertype of '#type2' or the representation type to a subtype of '#type'.""", + withArgumentsOld: _withArgumentsOldInvalidExtensionTypeSuperInterface, + withArguments: _withArgumentsInvalidExtensionTypeSuperInterface, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidExtensionTypeSuperInterface({ @@ -2417,17 +2594,21 @@ Message _withArgumentsOldInvalidExtensionTypeSuperInterface( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(DartType type, String name, DartType type2, String name2) + Message Function(DartType type, String name, DartType type2, String name2), + Message Function({ + required DartType type, + required String name, + required DartType type2, + required String name2, + }) > -codeInvalidGetterSetterType = - const Template< - Message Function(DartType type, String name, DartType type2, String name2) - >( - "InvalidGetterSetterType", - problemMessageTemplate: - r"""The type '#type' of the getter '#name' is not a subtype of the type '#type2' of the setter '#name2'.""", - withArgumentsOld: _withArgumentsOldInvalidGetterSetterType, - ); +codeInvalidGetterSetterType = const Template( + "InvalidGetterSetterType", + problemMessageTemplate: + r"""The type '#type' of the getter '#name' is not a subtype of the type '#type2' of the setter '#name2'.""", + withArgumentsOld: _withArgumentsOldInvalidGetterSetterType, + withArguments: _withArgumentsInvalidGetterSetterType, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidGetterSetterType({ @@ -2465,18 +2646,21 @@ Message _withArgumentsOldInvalidGetterSetterType( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(DartType type, String name, DartType type2, String name2) + Message Function(DartType type, String name, DartType type2, String name2), + Message Function({ + required DartType type, + required String name, + required DartType type2, + required String name2, + }) > -codeInvalidGetterSetterTypeBothInheritedField = - const Template< - Message Function(DartType type, String name, DartType type2, String name2) - >( - "InvalidGetterSetterTypeBothInheritedField", - problemMessageTemplate: - r"""The type '#type' of the inherited field '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'.""", - withArgumentsOld: - _withArgumentsOldInvalidGetterSetterTypeBothInheritedField, - ); +codeInvalidGetterSetterTypeBothInheritedField = const Template( + "InvalidGetterSetterTypeBothInheritedField", + problemMessageTemplate: + r"""The type '#type' of the inherited field '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'.""", + withArgumentsOld: _withArgumentsOldInvalidGetterSetterTypeBothInheritedField, + withArguments: _withArgumentsInvalidGetterSetterTypeBothInheritedField, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidGetterSetterTypeBothInheritedField({ @@ -2514,18 +2698,21 @@ Message _withArgumentsOldInvalidGetterSetterTypeBothInheritedField( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(DartType type, String name, DartType type2, String name2) + Message Function(DartType type, String name, DartType type2, String name2), + Message Function({ + required DartType type, + required String name, + required DartType type2, + required String name2, + }) > -codeInvalidGetterSetterTypeBothInheritedGetter = - const Template< - Message Function(DartType type, String name, DartType type2, String name2) - >( - "InvalidGetterSetterTypeBothInheritedGetter", - problemMessageTemplate: - r"""The type '#type' of the inherited getter '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'.""", - withArgumentsOld: - _withArgumentsOldInvalidGetterSetterTypeBothInheritedGetter, - ); +codeInvalidGetterSetterTypeBothInheritedGetter = const Template( + "InvalidGetterSetterTypeBothInheritedGetter", + problemMessageTemplate: + r"""The type '#type' of the inherited getter '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'.""", + withArgumentsOld: _withArgumentsOldInvalidGetterSetterTypeBothInheritedGetter, + withArguments: _withArgumentsInvalidGetterSetterTypeBothInheritedGetter, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidGetterSetterTypeBothInheritedGetter({ @@ -2563,17 +2750,21 @@ Message _withArgumentsOldInvalidGetterSetterTypeBothInheritedGetter( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(DartType type, String name, DartType type2, String name2) + Message Function(DartType type, String name, DartType type2, String name2), + Message Function({ + required DartType type, + required String name, + required DartType type2, + required String name2, + }) > -codeInvalidGetterSetterTypeFieldInherited = - const Template< - Message Function(DartType type, String name, DartType type2, String name2) - >( - "InvalidGetterSetterTypeFieldInherited", - problemMessageTemplate: - r"""The type '#type' of the inherited field '#name' is not a subtype of the type '#type2' of the setter '#name2'.""", - withArgumentsOld: _withArgumentsOldInvalidGetterSetterTypeFieldInherited, - ); +codeInvalidGetterSetterTypeFieldInherited = const Template( + "InvalidGetterSetterTypeFieldInherited", + problemMessageTemplate: + r"""The type '#type' of the inherited field '#name' is not a subtype of the type '#type2' of the setter '#name2'.""", + withArgumentsOld: _withArgumentsOldInvalidGetterSetterTypeFieldInherited, + withArguments: _withArgumentsInvalidGetterSetterTypeFieldInherited, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidGetterSetterTypeFieldInherited({ @@ -2611,17 +2802,21 @@ Message _withArgumentsOldInvalidGetterSetterTypeFieldInherited( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(DartType type, String name, DartType type2, String name2) + Message Function(DartType type, String name, DartType type2, String name2), + Message Function({ + required DartType type, + required String name, + required DartType type2, + required String name2, + }) > -codeInvalidGetterSetterTypeGetterInherited = - const Template< - Message Function(DartType type, String name, DartType type2, String name2) - >( - "InvalidGetterSetterTypeGetterInherited", - problemMessageTemplate: - r"""The type '#type' of the inherited getter '#name' is not a subtype of the type '#type2' of the setter '#name2'.""", - withArgumentsOld: _withArgumentsOldInvalidGetterSetterTypeGetterInherited, - ); +codeInvalidGetterSetterTypeGetterInherited = const Template( + "InvalidGetterSetterTypeGetterInherited", + problemMessageTemplate: + r"""The type '#type' of the inherited getter '#name' is not a subtype of the type '#type2' of the setter '#name2'.""", + withArgumentsOld: _withArgumentsOldInvalidGetterSetterTypeGetterInherited, + withArguments: _withArgumentsInvalidGetterSetterTypeGetterInherited, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidGetterSetterTypeGetterInherited({ @@ -2659,18 +2854,22 @@ Message _withArgumentsOldInvalidGetterSetterTypeGetterInherited( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(DartType type, String name, DartType type2, String name2) + Message Function(DartType type, String name, DartType type2, String name2), + Message Function({ + required DartType type, + required String name, + required DartType type2, + required String name2, + }) > -codeInvalidGetterSetterTypeSetterInheritedField = - const Template< - Message Function(DartType type, String name, DartType type2, String name2) - >( - "InvalidGetterSetterTypeSetterInheritedField", - problemMessageTemplate: - r"""The type '#type' of the field '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'.""", - withArgumentsOld: - _withArgumentsOldInvalidGetterSetterTypeSetterInheritedField, - ); +codeInvalidGetterSetterTypeSetterInheritedField = const Template( + "InvalidGetterSetterTypeSetterInheritedField", + problemMessageTemplate: + r"""The type '#type' of the field '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'.""", + withArgumentsOld: + _withArgumentsOldInvalidGetterSetterTypeSetterInheritedField, + withArguments: _withArgumentsInvalidGetterSetterTypeSetterInheritedField, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidGetterSetterTypeSetterInheritedField({ @@ -2708,18 +2907,22 @@ Message _withArgumentsOldInvalidGetterSetterTypeSetterInheritedField( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(DartType type, String name, DartType type2, String name2) + Message Function(DartType type, String name, DartType type2, String name2), + Message Function({ + required DartType type, + required String name, + required DartType type2, + required String name2, + }) > -codeInvalidGetterSetterTypeSetterInheritedGetter = - const Template< - Message Function(DartType type, String name, DartType type2, String name2) - >( - "InvalidGetterSetterTypeSetterInheritedGetter", - problemMessageTemplate: - r"""The type '#type' of the getter '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'.""", - withArgumentsOld: - _withArgumentsOldInvalidGetterSetterTypeSetterInheritedGetter, - ); +codeInvalidGetterSetterTypeSetterInheritedGetter = const Template( + "InvalidGetterSetterTypeSetterInheritedGetter", + problemMessageTemplate: + r"""The type '#type' of the getter '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'.""", + withArgumentsOld: + _withArgumentsOldInvalidGetterSetterTypeSetterInheritedGetter, + withArguments: _withArgumentsInvalidGetterSetterTypeSetterInheritedGetter, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidGetterSetterTypeSetterInheritedGetter({ @@ -2756,12 +2959,16 @@ Message _withArgumentsOldInvalidGetterSetterTypeSetterInheritedGetter( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInvalidReturn = const Template( +const Template< + Message Function(DartType type, DartType type2), + Message Function({required DartType type, required DartType type2}) +> +codeInvalidReturn = const Template( "InvalidReturn", problemMessageTemplate: r"""A value of type '#type' can't be returned from a function with return type '#type2'.""", withArgumentsOld: _withArgumentsOldInvalidReturn, + withArguments: _withArgumentsInvalidReturn, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -2786,14 +2993,17 @@ Message _withArgumentsOldInvalidReturn(DartType type, DartType type2) => _withArgumentsInvalidReturn(type: type, type2: type2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeInvalidReturnAsync = - const Template( - "InvalidReturnAsync", - problemMessageTemplate: - r"""A value of type '#type' can't be returned from an async function with return type '#type2'.""", - withArgumentsOld: _withArgumentsOldInvalidReturnAsync, - ); +const Template< + Message Function(DartType type, DartType type2), + Message Function({required DartType type, required DartType type2}) +> +codeInvalidReturnAsync = const Template( + "InvalidReturnAsync", + problemMessageTemplate: + r"""A value of type '#type' can't be returned from an async function with return type '#type2'.""", + withArgumentsOld: _withArgumentsOldInvalidReturnAsync, + withArguments: _withArgumentsInvalidReturnAsync, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsInvalidReturnAsync({ @@ -2817,17 +3027,19 @@ Message _withArgumentsOldInvalidReturnAsync(DartType type, DartType type2) => _withArgumentsInvalidReturnAsync(type: type, type2: type2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropExportInvalidInteropTypeArgument = - const Template( - "JsInteropExportInvalidInteropTypeArgument", - problemMessageTemplate: - r"""Type argument '#type' needs to be a non-JS interop type.""", - correctionMessageTemplate: - r"""Use a non-JS interop class that uses `@JSExport` instead.""", - withArgumentsOld: - _withArgumentsOldJsInteropExportInvalidInteropTypeArgument, - ); +const Template< + Message Function(DartType type), + Message Function({required DartType type}) +> +codeJsInteropExportInvalidInteropTypeArgument = const Template( + "JsInteropExportInvalidInteropTypeArgument", + problemMessageTemplate: + r"""Type argument '#type' needs to be a non-JS interop type.""", + correctionMessageTemplate: + r"""Use a non-JS interop class that uses `@JSExport` instead.""", + withArgumentsOld: _withArgumentsOldJsInteropExportInvalidInteropTypeArgument, + withArguments: _withArgumentsJsInteropExportInvalidInteropTypeArgument, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJsInteropExportInvalidInteropTypeArgument({ @@ -2852,16 +3064,19 @@ Message _withArgumentsOldJsInteropExportInvalidInteropTypeArgument( ) => _withArgumentsJsInteropExportInvalidInteropTypeArgument(type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropExportInvalidTypeArgument = - const Template( - "JsInteropExportInvalidTypeArgument", - problemMessageTemplate: - r"""Type argument '#type' needs to be an interface type.""", - correctionMessageTemplate: - r"""Use a non-JS interop class that uses `@JSExport` instead.""", - withArgumentsOld: _withArgumentsOldJsInteropExportInvalidTypeArgument, - ); +const Template< + Message Function(DartType type), + Message Function({required DartType type}) +> +codeJsInteropExportInvalidTypeArgument = const Template( + "JsInteropExportInvalidTypeArgument", + problemMessageTemplate: + r"""Type argument '#type' needs to be an interface type.""", + correctionMessageTemplate: + r"""Use a non-JS interop class that uses `@JSExport` instead.""", + withArgumentsOld: _withArgumentsOldJsInteropExportInvalidTypeArgument, + withArguments: _withArgumentsJsInteropExportInvalidTypeArgument, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJsInteropExportInvalidTypeArgument({ @@ -2885,16 +3100,19 @@ Message _withArgumentsOldJsInteropExportInvalidTypeArgument(DartType type) => _withArgumentsJsInteropExportInvalidTypeArgument(type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropExtensionTypeNotInterop = - const Template( - "JsInteropExtensionTypeNotInterop", - problemMessageTemplate: - r"""Extension type '#name' is marked with a '@JS' annotation, but its representation type is not a valid JS interop type: '#type'.""", - correctionMessageTemplate: - r"""Try declaring a valid JS interop representation type, which may include 'dart:js_interop' types, '@staticInterop' types, 'dart:html' types, or other interop extension types.""", - withArgumentsOld: _withArgumentsOldJsInteropExtensionTypeNotInterop, - ); +const Template< + Message Function(String name, DartType type), + Message Function({required String name, required DartType type}) +> +codeJsInteropExtensionTypeNotInterop = const Template( + "JsInteropExtensionTypeNotInterop", + problemMessageTemplate: + r"""Extension type '#name' is marked with a '@JS' annotation, but its representation type is not a valid JS interop type: '#type'.""", + correctionMessageTemplate: + r"""Try declaring a valid JS interop representation type, which may include 'dart:js_interop' types, '@staticInterop' types, 'dart:html' types, or other interop extension types.""", + withArgumentsOld: _withArgumentsOldJsInteropExtensionTypeNotInterop, + withArguments: _withArgumentsJsInteropExtensionTypeNotInterop, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJsInteropExtensionTypeNotInterop({ @@ -2922,17 +3140,19 @@ Message _withArgumentsOldJsInteropExtensionTypeNotInterop( ) => _withArgumentsJsInteropExtensionTypeNotInterop(name: name, type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropFunctionToJSRequiresStaticType = - const Template( - "JsInteropFunctionToJSRequiresStaticType", - problemMessageTemplate: - r"""`Function.toJS` requires a statically known function type, but Type '#type' is not a precise function type, e.g., `void Function()`.""", - correctionMessageTemplate: - r"""Insert an explicit cast to the expected function type.""", - withArgumentsOld: - _withArgumentsOldJsInteropFunctionToJSRequiresStaticType, - ); +const Template< + Message Function(DartType type), + Message Function({required DartType type}) +> +codeJsInteropFunctionToJSRequiresStaticType = const Template( + "JsInteropFunctionToJSRequiresStaticType", + problemMessageTemplate: + r"""`Function.toJS` requires a statically known function type, but Type '#type' is not a precise function type, e.g., `void Function()`.""", + correctionMessageTemplate: + r"""Insert an explicit cast to the expected function type.""", + withArgumentsOld: _withArgumentsOldJsInteropFunctionToJSRequiresStaticType, + withArguments: _withArgumentsJsInteropFunctionToJSRequiresStaticType, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJsInteropFunctionToJSRequiresStaticType({ @@ -2957,14 +3177,18 @@ Message _withArgumentsOldJsInteropFunctionToJSRequiresStaticType( ) => _withArgumentsJsInteropFunctionToJSRequiresStaticType(type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropIsAInvalidTypeVariable = const Template( +const Template< + Message Function(DartType type), + Message Function({required DartType type}) +> +codeJsInteropIsAInvalidTypeVariable = const Template( "JsInteropIsAInvalidTypeVariable", problemMessageTemplate: r"""Type argument '#type' provided to 'isA' cannot be a type variable and must be an interop extension type that can be determined at compile-time.""", correctionMessageTemplate: r"""Use a valid interop extension type that can be determined at compile-time as the type argument instead.""", withArgumentsOld: _withArgumentsOldJsInteropIsAInvalidTypeVariable, + withArguments: _withArgumentsJsInteropIsAInvalidTypeVariable, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -2989,14 +3213,18 @@ Message _withArgumentsOldJsInteropIsAInvalidTypeVariable(DartType type) => _withArgumentsJsInteropIsAInvalidTypeVariable(type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropIsAObjectLiteralType = const Template( +const Template< + Message Function(DartType type), + Message Function({required DartType type}) +> +codeJsInteropIsAObjectLiteralType = const Template( "JsInteropIsAObjectLiteralType", problemMessageTemplate: r"""Type argument '#type' has an object literal constructor. Because 'isA' uses the type's name or '@JS()' rename, this may result in an incorrect type check.""", correctionMessageTemplate: r"""Use 'JSObject' as the type argument instead.""", withArgumentsOld: _withArgumentsOldJsInteropIsAObjectLiteralType, + withArguments: _withArgumentsJsInteropIsAObjectLiteralType, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -3018,16 +3246,19 @@ Message _withArgumentsOldJsInteropIsAObjectLiteralType(DartType type) => _withArgumentsJsInteropIsAObjectLiteralType(type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropIsAPrimitiveExtensionType = - const Template( - "JsInteropIsAPrimitiveExtensionType", - problemMessageTemplate: - r"""Type argument '#type' wraps primitive JS type '#string', which is specially handled using 'typeof'.""", - correctionMessageTemplate: - r"""Use the primitive JS type '#string' as the type argument instead.""", - withArgumentsOld: _withArgumentsOldJsInteropIsAPrimitiveExtensionType, - ); +const Template< + Message Function(DartType type, String string), + Message Function({required DartType type, required String string}) +> +codeJsInteropIsAPrimitiveExtensionType = const Template( + "JsInteropIsAPrimitiveExtensionType", + problemMessageTemplate: + r"""Type argument '#type' wraps primitive JS type '#string', which is specially handled using 'typeof'.""", + correctionMessageTemplate: + r"""Use the primitive JS type '#string' as the type argument instead.""", + withArgumentsOld: _withArgumentsOldJsInteropIsAPrimitiveExtensionType, + withArguments: _withArgumentsJsInteropIsAPrimitiveExtensionType, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJsInteropIsAPrimitiveExtensionType({ @@ -3058,17 +3289,21 @@ Message _withArgumentsOldJsInteropIsAPrimitiveExtensionType( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropStaticInteropExternalAccessorTypeViolation = - const Template( - "JsInteropStaticInteropExternalAccessorTypeViolation", - problemMessageTemplate: - r"""External JS interop member contains an invalid type: '#type'.""", - correctionMessageTemplate: - r"""Use one of these valid types instead: JS types from 'dart:js_interop', ExternalDartReference, void, bool, num, double, int, String, extension types that erase to one of these types, '@staticInterop' types, 'dart:html' types when compiling to JS, or a type parameter that is a subtype of a valid non-primitive type.""", - withArgumentsOld: - _withArgumentsOldJsInteropStaticInteropExternalAccessorTypeViolation, - ); +const Template< + Message Function(DartType type), + Message Function({required DartType type}) +> +codeJsInteropStaticInteropExternalAccessorTypeViolation = const Template( + "JsInteropStaticInteropExternalAccessorTypeViolation", + problemMessageTemplate: + r"""External JS interop member contains an invalid type: '#type'.""", + correctionMessageTemplate: + r"""Use one of these valid types instead: JS types from 'dart:js_interop', ExternalDartReference, void, bool, num, double, int, String, extension types that erase to one of these types, '@staticInterop' types, 'dart:html' types when compiling to JS, or a type parameter that is a subtype of a valid non-primitive type.""", + withArgumentsOld: + _withArgumentsOldJsInteropStaticInteropExternalAccessorTypeViolation, + withArguments: + _withArgumentsJsInteropStaticInteropExternalAccessorTypeViolation, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJsInteropStaticInteropExternalAccessorTypeViolation({ @@ -3095,16 +3330,19 @@ Message _withArgumentsOldJsInteropStaticInteropExternalAccessorTypeViolation( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropStaticInteropMockNotStaticInteropType = - const Template( - "JsInteropStaticInteropMockNotStaticInteropType", - problemMessageTemplate: - r"""Type argument '#type' needs to be a `@staticInterop` type.""", - correctionMessageTemplate: r"""Use a `@staticInterop` class instead.""", - withArgumentsOld: - _withArgumentsOldJsInteropStaticInteropMockNotStaticInteropType, - ); +const Template< + Message Function(DartType type), + Message Function({required DartType type}) +> +codeJsInteropStaticInteropMockNotStaticInteropType = const Template( + "JsInteropStaticInteropMockNotStaticInteropType", + problemMessageTemplate: + r"""Type argument '#type' needs to be a `@staticInterop` type.""", + correctionMessageTemplate: r"""Use a `@staticInterop` class instead.""", + withArgumentsOld: + _withArgumentsOldJsInteropStaticInteropMockNotStaticInteropType, + withArguments: _withArgumentsJsInteropStaticInteropMockNotStaticInteropType, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJsInteropStaticInteropMockNotStaticInteropType({ @@ -3128,17 +3366,21 @@ Message _withArgumentsOldJsInteropStaticInteropMockNotStaticInteropType( ) => _withArgumentsJsInteropStaticInteropMockNotStaticInteropType(type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeJsInteropStaticInteropMockTypeParametersNotAllowed = - const Template( - "JsInteropStaticInteropMockTypeParametersNotAllowed", - problemMessageTemplate: - r"""Type argument '#type' has type parameters that do not match their bound. createStaticInteropMock requires instantiating all type parameters to their bound to ensure mocking conformance.""", - correctionMessageTemplate: - r"""Remove the type parameter in the type argument or replace it with its bound.""", - withArgumentsOld: - _withArgumentsOldJsInteropStaticInteropMockTypeParametersNotAllowed, - ); +const Template< + Message Function(DartType type), + Message Function({required DartType type}) +> +codeJsInteropStaticInteropMockTypeParametersNotAllowed = const Template( + "JsInteropStaticInteropMockTypeParametersNotAllowed", + problemMessageTemplate: + r"""Type argument '#type' has type parameters that do not match their bound. createStaticInteropMock requires instantiating all type parameters to their bound to ensure mocking conformance.""", + correctionMessageTemplate: + r"""Remove the type parameter in the type argument or replace it with its bound.""", + withArgumentsOld: + _withArgumentsOldJsInteropStaticInteropMockTypeParametersNotAllowed, + withArguments: + _withArgumentsJsInteropStaticInteropMockTypeParametersNotAllowed, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsJsInteropStaticInteropMockTypeParametersNotAllowed({ @@ -3165,14 +3407,17 @@ Message _withArgumentsOldJsInteropStaticInteropMockTypeParametersNotAllowed( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeMainWrongParameterType = - const Template( - "MainWrongParameterType", - problemMessageTemplate: - r"""The type '#type' of the first parameter of the 'main' method is not a supertype of '#type2'.""", - withArgumentsOld: _withArgumentsOldMainWrongParameterType, - ); +const Template< + Message Function(DartType type, DartType type2), + Message Function({required DartType type, required DartType type2}) +> +codeMainWrongParameterType = const Template( + "MainWrongParameterType", + problemMessageTemplate: + r"""The type '#type' of the first parameter of the 'main' method is not a supertype of '#type2'.""", + withArgumentsOld: _withArgumentsOldMainWrongParameterType, + withArguments: _withArgumentsMainWrongParameterType, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsMainWrongParameterType({ @@ -3198,14 +3443,17 @@ Message _withArgumentsOldMainWrongParameterType( ) => _withArgumentsMainWrongParameterType(type: type, type2: type2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeMainWrongParameterTypeExported = - const Template( - "MainWrongParameterTypeExported", - problemMessageTemplate: - r"""The type '#type' of the first parameter of the exported 'main' method is not a supertype of '#type2'.""", - withArgumentsOld: _withArgumentsOldMainWrongParameterTypeExported, - ); +const Template< + Message Function(DartType type, DartType type2), + Message Function({required DartType type, required DartType type2}) +> +codeMainWrongParameterTypeExported = const Template( + "MainWrongParameterTypeExported", + problemMessageTemplate: + r"""The type '#type' of the first parameter of the exported 'main' method is not a supertype of '#type2'.""", + withArgumentsOld: _withArgumentsOldMainWrongParameterTypeExported, + withArguments: _withArgumentsMainWrongParameterTypeExported, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsMainWrongParameterTypeExported({ @@ -3231,17 +3479,22 @@ Message _withArgumentsOldMainWrongParameterTypeExported( ) => _withArgumentsMainWrongParameterTypeExported(type: type, type2: type2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeMixinApplicationIncompatibleSupertype = - const Template< - Message Function(DartType type, DartType type2, DartType type3) - >( - "MixinApplicationIncompatibleSupertype", - problemMessageTemplate: - r"""'#type' doesn't implement '#type2' so it can't be used with '#type3'.""", - withArgumentsOld: _withArgumentsOldMixinApplicationIncompatibleSupertype, - analyzerCodes: ["MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE"], - ); +const Template< + Message Function(DartType type, DartType type2, DartType type3), + Message Function({ + required DartType type, + required DartType type2, + required DartType type3, + }) +> +codeMixinApplicationIncompatibleSupertype = const Template( + "MixinApplicationIncompatibleSupertype", + problemMessageTemplate: + r"""'#type' doesn't implement '#type2' so it can't be used with '#type3'.""", + withArgumentsOld: _withArgumentsOldMixinApplicationIncompatibleSupertype, + withArguments: _withArgumentsMixinApplicationIncompatibleSupertype, + analyzerCodes: ["MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsMixinApplicationIncompatibleSupertype({ @@ -3274,15 +3527,22 @@ Message _withArgumentsOldMixinApplicationIncompatibleSupertype( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeMixinInferenceNoMatchingClass = - const Template( - "MixinInferenceNoMatchingClass", - problemMessageTemplate: - r"""Type parameters couldn't be inferred for the mixin '#name' because '#name2' does not implement the mixin's supertype constraint '#type'.""", - withArgumentsOld: _withArgumentsOldMixinInferenceNoMatchingClass, - analyzerCodes: ["MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION"], - ); +const Template< + Message Function(String name, String name2, DartType type), + Message Function({ + required String name, + required String name2, + required DartType type, + }) +> +codeMixinInferenceNoMatchingClass = const Template( + "MixinInferenceNoMatchingClass", + problemMessageTemplate: + r"""Type parameters couldn't be inferred for the mixin '#name' because '#name2' does not implement the mixin's supertype constraint '#type'.""", + withArgumentsOld: _withArgumentsOldMixinInferenceNoMatchingClass, + withArguments: _withArgumentsMixinInferenceNoMatchingClass, + analyzerCodes: ["MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsMixinInferenceNoMatchingClass({ @@ -3315,14 +3575,17 @@ Message _withArgumentsOldMixinInferenceNoMatchingClass( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeNameNotFoundInRecordNameGet = - const Template( - "NameNotFoundInRecordNameGet", - problemMessageTemplate: - r"""Field name #string isn't found in records of type #type.""", - withArgumentsOld: _withArgumentsOldNameNotFoundInRecordNameGet, - ); +const Template< + Message Function(String string, DartType type), + Message Function({required String string, required DartType type}) +> +codeNameNotFoundInRecordNameGet = const Template( + "NameNotFoundInRecordNameGet", + problemMessageTemplate: + r"""Field name #string isn't found in records of type #type.""", + withArgumentsOld: _withArgumentsOldNameNotFoundInRecordNameGet, + withArguments: _withArgumentsNameNotFoundInRecordNameGet, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsNameNotFoundInRecordNameGet({ @@ -3348,19 +3611,24 @@ Message _withArgumentsOldNameNotFoundInRecordNameGet( ) => _withArgumentsNameNotFoundInRecordNameGet(string: string, type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeNonExhaustiveSwitchExpression = - const Template< - Message Function(DartType type, String string, String string2) - >( - "NonExhaustiveSwitchExpression", - problemMessageTemplate: - r"""The type '#type' is not exhaustively matched by the switch cases since it doesn't match '#string'.""", - correctionMessageTemplate: - r"""Try adding a wildcard pattern or cases that match '#string2'.""", - withArgumentsOld: _withArgumentsOldNonExhaustiveSwitchExpression, - analyzerCodes: ["NON_EXHAUSTIVE_SWITCH_EXPRESSION"], - ); +const Template< + Message Function(DartType type, String string, String string2), + Message Function({ + required DartType type, + required String string, + required String string2, + }) +> +codeNonExhaustiveSwitchExpression = const Template( + "NonExhaustiveSwitchExpression", + problemMessageTemplate: + r"""The type '#type' is not exhaustively matched by the switch cases since it doesn't match '#string'.""", + correctionMessageTemplate: + r"""Try adding a wildcard pattern or cases that match '#string2'.""", + withArgumentsOld: _withArgumentsOldNonExhaustiveSwitchExpression, + withArguments: _withArgumentsNonExhaustiveSwitchExpression, + analyzerCodes: ["NON_EXHAUSTIVE_SWITCH_EXPRESSION"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsNonExhaustiveSwitchExpression({ @@ -3395,19 +3663,24 @@ Message _withArgumentsOldNonExhaustiveSwitchExpression( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeNonExhaustiveSwitchStatement = - const Template< - Message Function(DartType type, String string, String string2) - >( - "NonExhaustiveSwitchStatement", - problemMessageTemplate: - r"""The type '#type' is not exhaustively matched by the switch cases since it doesn't match '#string'.""", - correctionMessageTemplate: - r"""Try adding a default case or cases that match '#string2'.""", - withArgumentsOld: _withArgumentsOldNonExhaustiveSwitchStatement, - analyzerCodes: ["NON_EXHAUSTIVE_SWITCH_STATEMENT"], - ); +const Template< + Message Function(DartType type, String string, String string2), + Message Function({ + required DartType type, + required String string, + required String string2, + }) +> +codeNonExhaustiveSwitchStatement = const Template( + "NonExhaustiveSwitchStatement", + problemMessageTemplate: + r"""The type '#type' is not exhaustively matched by the switch cases since it doesn't match '#string'.""", + correctionMessageTemplate: + r"""Try adding a default case or cases that match '#string2'.""", + withArgumentsOld: _withArgumentsOldNonExhaustiveSwitchStatement, + withArguments: _withArgumentsNonExhaustiveSwitchStatement, + analyzerCodes: ["NON_EXHAUSTIVE_SWITCH_STATEMENT"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsNonExhaustiveSwitchStatement({ @@ -3442,13 +3715,16 @@ Message _withArgumentsOldNonExhaustiveSwitchStatement( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template codeNonNullAwareSpreadIsNull = - const Template( - "NonNullAwareSpreadIsNull", - problemMessageTemplate: - r"""Can't spread a value with static type '#type'.""", - withArgumentsOld: _withArgumentsOldNonNullAwareSpreadIsNull, - ); +const Template< + Message Function(DartType type), + Message Function({required DartType type}) +> +codeNonNullAwareSpreadIsNull = const Template( + "NonNullAwareSpreadIsNull", + problemMessageTemplate: r"""Can't spread a value with static type '#type'.""", + withArgumentsOld: _withArgumentsOldNonNullAwareSpreadIsNull, + withArguments: _withArgumentsNonNullAwareSpreadIsNull, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsNonNullAwareSpreadIsNull({required DartType type}) { @@ -3468,13 +3744,17 @@ Message _withArgumentsOldNonNullAwareSpreadIsNull(DartType type) => _withArgumentsNonNullAwareSpreadIsNull(type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeNullableExpressionCallError = const Template( +const Template< + Message Function(DartType type), + Message Function({required DartType type}) +> +codeNullableExpressionCallError = const Template( "NullableExpressionCallError", problemMessageTemplate: r"""Can't use an expression of type '#type' as a function because it's potentially null.""", correctionMessageTemplate: r"""Try calling using ?.call instead.""", withArgumentsOld: _withArgumentsOldNullableExpressionCallError, + withArguments: _withArgumentsNullableExpressionCallError, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -3496,15 +3776,18 @@ Message _withArgumentsOldNullableExpressionCallError(DartType type) => _withArgumentsNullableExpressionCallError(type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeNullableMethodCallError = - const Template( - "NullableMethodCallError", - problemMessageTemplate: - r"""Method '#name' cannot be called on '#type' because it is potentially null.""", - correctionMessageTemplate: r"""Try calling using ?. instead.""", - withArgumentsOld: _withArgumentsOldNullableMethodCallError, - ); +const Template< + Message Function(String name, DartType type), + Message Function({required String name, required DartType type}) +> +codeNullableMethodCallError = const Template( + "NullableMethodCallError", + problemMessageTemplate: + r"""Method '#name' cannot be called on '#type' because it is potentially null.""", + correctionMessageTemplate: r"""Try calling using ?. instead.""", + withArgumentsOld: _withArgumentsOldNullableMethodCallError, + withArguments: _withArgumentsNullableMethodCallError, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsNullableMethodCallError({ @@ -3529,14 +3812,17 @@ Message _withArgumentsOldNullableMethodCallError(String name, DartType type) => _withArgumentsNullableMethodCallError(name: name, type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeNullableOperatorCallError = - const Template( - "NullableOperatorCallError", - problemMessageTemplate: - r"""Operator '#name' cannot be called on '#type' because it is potentially null.""", - withArgumentsOld: _withArgumentsOldNullableOperatorCallError, - ); +const Template< + Message Function(String name, DartType type), + Message Function({required String name, required DartType type}) +> +codeNullableOperatorCallError = const Template( + "NullableOperatorCallError", + problemMessageTemplate: + r"""Operator '#name' cannot be called on '#type' because it is potentially null.""", + withArgumentsOld: _withArgumentsOldNullableOperatorCallError, + withArguments: _withArgumentsNullableOperatorCallError, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsNullableOperatorCallError({ @@ -3562,15 +3848,18 @@ Message _withArgumentsOldNullableOperatorCallError( ) => _withArgumentsNullableOperatorCallError(name: name, type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeNullablePropertyAccessError = - const Template( - "NullablePropertyAccessError", - problemMessageTemplate: - r"""Property '#name' cannot be accessed on '#type' because it is potentially null.""", - correctionMessageTemplate: r"""Try accessing using ?. instead.""", - withArgumentsOld: _withArgumentsOldNullablePropertyAccessError, - ); +const Template< + Message Function(String name, DartType type), + Message Function({required String name, required DartType type}) +> +codeNullablePropertyAccessError = const Template( + "NullablePropertyAccessError", + problemMessageTemplate: + r"""Property '#name' cannot be accessed on '#type' because it is potentially null.""", + correctionMessageTemplate: r"""Try accessing using ?. instead.""", + withArgumentsOld: _withArgumentsOldNullablePropertyAccessError, + withArguments: _withArgumentsNullablePropertyAccessError, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsNullablePropertyAccessError({ @@ -3597,18 +3886,20 @@ Message _withArgumentsOldNullablePropertyAccessError( ) => _withArgumentsNullablePropertyAccessError(name: name, type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeOptionalNonNullableWithoutInitializerError = - const Template( - "OptionalNonNullableWithoutInitializerError", - problemMessageTemplate: - r"""The parameter '#name' can't have a value of 'null' because of its type '#type', but the implicit default value is 'null'.""", - correctionMessageTemplate: - r"""Try adding either an explicit non-'null' default value or the 'required' modifier.""", - withArgumentsOld: - _withArgumentsOldOptionalNonNullableWithoutInitializerError, - analyzerCodes: ["MISSING_DEFAULT_VALUE_FOR_PARAMETER"], - ); +const Template< + Message Function(String name, DartType type), + Message Function({required String name, required DartType type}) +> +codeOptionalNonNullableWithoutInitializerError = const Template( + "OptionalNonNullableWithoutInitializerError", + problemMessageTemplate: + r"""The parameter '#name' can't have a value of 'null' because of its type '#type', but the implicit default value is 'null'.""", + correctionMessageTemplate: + r"""Try adding either an explicit non-'null' default value or the 'required' modifier.""", + withArgumentsOld: _withArgumentsOldOptionalNonNullableWithoutInitializerError, + withArguments: _withArgumentsOptionalNonNullableWithoutInitializerError, + analyzerCodes: ["MISSING_DEFAULT_VALUE_FOR_PARAMETER"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsOptionalNonNullableWithoutInitializerError({ @@ -3639,15 +3930,17 @@ Message _withArgumentsOldOptionalNonNullableWithoutInitializerError( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeOptionalSuperParameterWithoutInitializer = - const Template( - "OptionalSuperParameterWithoutInitializer", - problemMessageTemplate: - r"""Type '#type' of the optional super-initializer parameter '#name' doesn't allow 'null', but the parameter doesn't have a default value, and the default value can't be copied from the corresponding parameter of the super constructor.""", - withArgumentsOld: - _withArgumentsOldOptionalSuperParameterWithoutInitializer, - ); +const Template< + Message Function(DartType type, String name), + Message Function({required DartType type, required String name}) +> +codeOptionalSuperParameterWithoutInitializer = const Template( + "OptionalSuperParameterWithoutInitializer", + problemMessageTemplate: + r"""Type '#type' of the optional super-initializer parameter '#name' doesn't allow 'null', but the parameter doesn't have a default value, and the default value can't be copied from the corresponding parameter of the super constructor.""", + withArgumentsOld: _withArgumentsOldOptionalSuperParameterWithoutInitializer, + withArguments: _withArgumentsOptionalSuperParameterWithoutInitializer, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsOptionalSuperParameterWithoutInitializer({ @@ -3683,26 +3976,25 @@ const Template< DartType type, DartType type2, String name3, - ) + ), + Message Function({ + required String name, + required String name2, + required DartType type, + required DartType type2, + required String name3, + }) > -codeOverrideTypeMismatchParameter = - const Template< - Message Function( - String name, - String name2, - DartType type, - DartType type2, - String name3, - ) - >( - "OverrideTypeMismatchParameter", - problemMessageTemplate: - r"""The parameter '#name' of the method '#name2' has type '#type', which does not match the corresponding type, '#type2', in the overridden method, '#name3'.""", - correctionMessageTemplate: - r"""Change to a supertype of '#type2', or, for a covariant parameter, a subtype.""", - withArgumentsOld: _withArgumentsOldOverrideTypeMismatchParameter, - analyzerCodes: ["INVALID_METHOD_OVERRIDE"], - ); +codeOverrideTypeMismatchParameter = const Template( + "OverrideTypeMismatchParameter", + problemMessageTemplate: + r"""The parameter '#name' of the method '#name2' has type '#type', which does not match the corresponding type, '#type2', in the overridden method, '#name3'.""", + correctionMessageTemplate: + r"""Change to a supertype of '#type2', or, for a covariant parameter, a subtype.""", + withArgumentsOld: _withArgumentsOldOverrideTypeMismatchParameter, + withArguments: _withArgumentsOverrideTypeMismatchParameter, + analyzerCodes: ["INVALID_METHOD_OVERRIDE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsOverrideTypeMismatchParameter({ @@ -3752,19 +4044,23 @@ Message _withArgumentsOldOverrideTypeMismatchParameter( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(String name, DartType type, DartType type2, String name2) + Message Function(String name, DartType type, DartType type2, String name2), + Message Function({ + required String name, + required DartType type, + required DartType type2, + required String name2, + }) > -codeOverrideTypeMismatchReturnType = - const Template< - Message Function(String name, DartType type, DartType type2, String name2) - >( - "OverrideTypeMismatchReturnType", - problemMessageTemplate: - r"""The return type of the method '#name' is '#type', which does not match the return type, '#type2', of the overridden method, '#name2'.""", - correctionMessageTemplate: r"""Change to a subtype of '#type2'.""", - withArgumentsOld: _withArgumentsOldOverrideTypeMismatchReturnType, - analyzerCodes: ["INVALID_METHOD_OVERRIDE"], - ); +codeOverrideTypeMismatchReturnType = const Template( + "OverrideTypeMismatchReturnType", + problemMessageTemplate: + r"""The return type of the method '#name' is '#type', which does not match the return type, '#type2', of the overridden method, '#name2'.""", + correctionMessageTemplate: r"""Change to a subtype of '#type2'.""", + withArgumentsOld: _withArgumentsOldOverrideTypeMismatchReturnType, + withArguments: _withArgumentsOverrideTypeMismatchReturnType, + analyzerCodes: ["INVALID_METHOD_OVERRIDE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsOverrideTypeMismatchReturnType({ @@ -3803,18 +4099,22 @@ Message _withArgumentsOldOverrideTypeMismatchReturnType( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(String name, DartType type, DartType type2, String name2) + Message Function(String name, DartType type, DartType type2, String name2), + Message Function({ + required String name, + required DartType type, + required DartType type2, + required String name2, + }) > -codeOverrideTypeMismatchSetter = - const Template< - Message Function(String name, DartType type, DartType type2, String name2) - >( - "OverrideTypeMismatchSetter", - problemMessageTemplate: - r"""The field '#name' has type '#type', which does not match the corresponding type, '#type2', in the overridden setter, '#name2'.""", - withArgumentsOld: _withArgumentsOldOverrideTypeMismatchSetter, - analyzerCodes: ["INVALID_METHOD_OVERRIDE"], - ); +codeOverrideTypeMismatchSetter = const Template( + "OverrideTypeMismatchSetter", + problemMessageTemplate: + r"""The field '#name' has type '#type', which does not match the corresponding type, '#type2', in the overridden setter, '#name2'.""", + withArgumentsOld: _withArgumentsOldOverrideTypeMismatchSetter, + withArguments: _withArgumentsOverrideTypeMismatchSetter, + analyzerCodes: ["INVALID_METHOD_OVERRIDE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsOverrideTypeMismatchSetter({ @@ -3858,23 +4158,22 @@ const Template< String name2, DartType type2, String name3, - ) + ), + Message Function({ + required DartType type, + required String name, + required String name2, + required DartType type2, + required String name3, + }) > -codeOverrideTypeParametersBoundMismatch = - const Template< - Message Function( - DartType type, - String name, - String name2, - DartType type2, - String name3, - ) - >( - "OverrideTypeParametersBoundMismatch", - problemMessageTemplate: - r"""Declared bound '#type' of type variable '#name' of '#name2' doesn't match the bound '#type2' on overridden method '#name3'.""", - withArgumentsOld: _withArgumentsOldOverrideTypeParametersBoundMismatch, - ); +codeOverrideTypeParametersBoundMismatch = const Template( + "OverrideTypeParametersBoundMismatch", + problemMessageTemplate: + r"""Declared bound '#type' of type variable '#name' of '#name2' doesn't match the bound '#type2' on overridden method '#name3'.""", + withArgumentsOld: _withArgumentsOldOverrideTypeParametersBoundMismatch, + withArguments: _withArgumentsOverrideTypeParametersBoundMismatch, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsOverrideTypeParametersBoundMismatch({ @@ -3921,18 +4220,20 @@ Message _withArgumentsOldOverrideTypeParametersBoundMismatch( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codePatternTypeMismatchInIrrefutableContext = - const Template( - "PatternTypeMismatchInIrrefutableContext", - problemMessageTemplate: - r"""The matched value of type '#type' isn't assignable to the required type '#type2'.""", - correctionMessageTemplate: - r"""Try changing the required type of the pattern, or the matched value type.""", - withArgumentsOld: - _withArgumentsOldPatternTypeMismatchInIrrefutableContext, - analyzerCodes: ["PATTERN_TYPE_MISMATCH_IN_IRREFUTABLE_CONTEXT"], - ); +const Template< + Message Function(DartType type, DartType type2), + Message Function({required DartType type, required DartType type2}) +> +codePatternTypeMismatchInIrrefutableContext = const Template( + "PatternTypeMismatchInIrrefutableContext", + problemMessageTemplate: + r"""The matched value of type '#type' isn't assignable to the required type '#type2'.""", + correctionMessageTemplate: + r"""Try changing the required type of the pattern, or the matched value type.""", + withArgumentsOld: _withArgumentsOldPatternTypeMismatchInIrrefutableContext, + withArguments: _withArgumentsPatternTypeMismatchInIrrefutableContext, + analyzerCodes: ["PATTERN_TYPE_MISMATCH_IN_IRREFUTABLE_CONTEXT"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsPatternTypeMismatchInIrrefutableContext({ @@ -3963,16 +4264,18 @@ Message _withArgumentsOldPatternTypeMismatchInIrrefutableContext( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeRedirectingFactoryIncompatibleTypeArgument = - const Template( - "RedirectingFactoryIncompatibleTypeArgument", - problemMessageTemplate: r"""The type '#type' doesn't extend '#type2'.""", - correctionMessageTemplate: r"""Try using a different type as argument.""", - withArgumentsOld: - _withArgumentsOldRedirectingFactoryIncompatibleTypeArgument, - analyzerCodes: ["TYPE_ARGUMENT_NOT_MATCHING_BOUNDS"], - ); +const Template< + Message Function(DartType type, DartType type2), + Message Function({required DartType type, required DartType type2}) +> +codeRedirectingFactoryIncompatibleTypeArgument = const Template( + "RedirectingFactoryIncompatibleTypeArgument", + problemMessageTemplate: r"""The type '#type' doesn't extend '#type2'.""", + correctionMessageTemplate: r"""Try using a different type as argument.""", + withArgumentsOld: _withArgumentsOldRedirectingFactoryIncompatibleTypeArgument, + withArguments: _withArgumentsRedirectingFactoryIncompatibleTypeArgument, + analyzerCodes: ["TYPE_ARGUMENT_NOT_MATCHING_BOUNDS"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsRedirectingFactoryIncompatibleTypeArgument({ @@ -4002,15 +4305,18 @@ Message _withArgumentsOldRedirectingFactoryIncompatibleTypeArgument( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeSpreadElementTypeMismatch = - const Template( - "SpreadElementTypeMismatch", - problemMessageTemplate: - r"""Can't assign spread elements of type '#type' to collection elements of type '#type2'.""", - withArgumentsOld: _withArgumentsOldSpreadElementTypeMismatch, - analyzerCodes: ["LIST_ELEMENT_TYPE_NOT_ASSIGNABLE"], - ); +const Template< + Message Function(DartType type, DartType type2), + Message Function({required DartType type, required DartType type2}) +> +codeSpreadElementTypeMismatch = const Template( + "SpreadElementTypeMismatch", + problemMessageTemplate: + r"""Can't assign spread elements of type '#type' to collection elements of type '#type2'.""", + withArgumentsOld: _withArgumentsOldSpreadElementTypeMismatch, + withArguments: _withArgumentsSpreadElementTypeMismatch, + analyzerCodes: ["LIST_ELEMENT_TYPE_NOT_ASSIGNABLE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSpreadElementTypeMismatch({ @@ -4036,15 +4342,18 @@ Message _withArgumentsOldSpreadElementTypeMismatch( ) => _withArgumentsSpreadElementTypeMismatch(type: type, type2: type2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeSpreadMapEntryElementKeyTypeMismatch = - const Template( - "SpreadMapEntryElementKeyTypeMismatch", - problemMessageTemplate: - r"""Can't assign spread entry keys of type '#type' to map entry keys of type '#type2'.""", - withArgumentsOld: _withArgumentsOldSpreadMapEntryElementKeyTypeMismatch, - analyzerCodes: ["MAP_KEY_TYPE_NOT_ASSIGNABLE"], - ); +const Template< + Message Function(DartType type, DartType type2), + Message Function({required DartType type, required DartType type2}) +> +codeSpreadMapEntryElementKeyTypeMismatch = const Template( + "SpreadMapEntryElementKeyTypeMismatch", + problemMessageTemplate: + r"""Can't assign spread entry keys of type '#type' to map entry keys of type '#type2'.""", + withArgumentsOld: _withArgumentsOldSpreadMapEntryElementKeyTypeMismatch, + withArguments: _withArgumentsSpreadMapEntryElementKeyTypeMismatch, + analyzerCodes: ["MAP_KEY_TYPE_NOT_ASSIGNABLE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSpreadMapEntryElementKeyTypeMismatch({ @@ -4073,15 +4382,18 @@ Message _withArgumentsOldSpreadMapEntryElementKeyTypeMismatch( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeSpreadMapEntryElementValueTypeMismatch = - const Template( - "SpreadMapEntryElementValueTypeMismatch", - problemMessageTemplate: - r"""Can't assign spread entry values of type '#type' to map entry values of type '#type2'.""", - withArgumentsOld: _withArgumentsOldSpreadMapEntryElementValueTypeMismatch, - analyzerCodes: ["MAP_VALUE_TYPE_NOT_ASSIGNABLE"], - ); +const Template< + Message Function(DartType type, DartType type2), + Message Function({required DartType type, required DartType type2}) +> +codeSpreadMapEntryElementValueTypeMismatch = const Template( + "SpreadMapEntryElementValueTypeMismatch", + problemMessageTemplate: + r"""Can't assign spread entry values of type '#type' to map entry values of type '#type2'.""", + withArgumentsOld: _withArgumentsOldSpreadMapEntryElementValueTypeMismatch, + withArguments: _withArgumentsSpreadMapEntryElementValueTypeMismatch, + analyzerCodes: ["MAP_VALUE_TYPE_NOT_ASSIGNABLE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSpreadMapEntryElementValueTypeMismatch({ @@ -4110,12 +4422,16 @@ Message _withArgumentsOldSpreadMapEntryElementValueTypeMismatch( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeSpreadMapEntryTypeMismatch = const Template( +const Template< + Message Function(DartType type), + Message Function({required DartType type}) +> +codeSpreadMapEntryTypeMismatch = const Template( "SpreadMapEntryTypeMismatch", problemMessageTemplate: r"""Unexpected type '#type' of a map spread entry. Expected 'dynamic' or a Map.""", withArgumentsOld: _withArgumentsOldSpreadMapEntryTypeMismatch, + withArguments: _withArgumentsSpreadMapEntryTypeMismatch, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -4136,12 +4452,16 @@ Message _withArgumentsOldSpreadMapEntryTypeMismatch(DartType type) => _withArgumentsSpreadMapEntryTypeMismatch(type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeSpreadTypeMismatch = const Template( +const Template< + Message Function(DartType type), + Message Function({required DartType type}) +> +codeSpreadTypeMismatch = const Template( "SpreadTypeMismatch", problemMessageTemplate: r"""Unexpected type '#type' of a spread. Expected 'dynamic' or an Iterable.""", withArgumentsOld: _withArgumentsOldSpreadTypeMismatch, + withArguments: _withArgumentsSpreadTypeMismatch, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -4162,15 +4482,18 @@ Message _withArgumentsOldSpreadTypeMismatch(DartType type) => _withArgumentsSpreadTypeMismatch(type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeSuperBoundedHint = - const Template( - "SuperBoundedHint", - problemMessageTemplate: - r"""If you want '#type' to be a super-bounded type, note that the inverted type '#type2' must then satisfy its bounds, which it does not.""", - withArgumentsOld: _withArgumentsOldSuperBoundedHint, - severity: CfeSeverity.context, - ); +const Template< + Message Function(DartType type, DartType type2), + Message Function({required DartType type, required DartType type2}) +> +codeSuperBoundedHint = const Template( + "SuperBoundedHint", + problemMessageTemplate: + r"""If you want '#type' to be a super-bounded type, note that the inverted type '#type2' must then satisfy its bounds, which it does not.""", + withArgumentsOld: _withArgumentsOldSuperBoundedHint, + withArguments: _withArgumentsSuperBoundedHint, + severity: CfeSeverity.context, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSuperBoundedHint({ @@ -4194,14 +4517,17 @@ Message _withArgumentsOldSuperBoundedHint(DartType type, DartType type2) => _withArgumentsSuperBoundedHint(type: type, type2: type2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeSuperExtensionTypeIsIllegalAliased = - const Template( - "SuperExtensionTypeIsIllegalAliased", - problemMessageTemplate: - r"""The type '#name' which is an alias of '#type' can't be implemented by an extension type.""", - withArgumentsOld: _withArgumentsOldSuperExtensionTypeIsIllegalAliased, - ); +const Template< + Message Function(String name, DartType type), + Message Function({required String name, required DartType type}) +> +codeSuperExtensionTypeIsIllegalAliased = const Template( + "SuperExtensionTypeIsIllegalAliased", + problemMessageTemplate: + r"""The type '#name' which is an alias of '#type' can't be implemented by an extension type.""", + withArgumentsOld: _withArgumentsOldSuperExtensionTypeIsIllegalAliased, + withArguments: _withArgumentsSuperExtensionTypeIsIllegalAliased, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSuperExtensionTypeIsIllegalAliased({ @@ -4227,14 +4553,17 @@ Message _withArgumentsOldSuperExtensionTypeIsIllegalAliased( ) => _withArgumentsSuperExtensionTypeIsIllegalAliased(name: name, type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeSuperExtensionTypeIsNullableAliased = - const Template( - "SuperExtensionTypeIsNullableAliased", - problemMessageTemplate: - r"""The type '#name' which is an alias of '#type' can't be implemented by an extension type because it is nullable.""", - withArgumentsOld: _withArgumentsOldSuperExtensionTypeIsNullableAliased, - ); +const Template< + Message Function(String name, DartType type), + Message Function({required String name, required DartType type}) +> +codeSuperExtensionTypeIsNullableAliased = const Template( + "SuperExtensionTypeIsNullableAliased", + problemMessageTemplate: + r"""The type '#name' which is an alias of '#type' can't be implemented by an extension type because it is nullable.""", + withArgumentsOld: _withArgumentsOldSuperExtensionTypeIsNullableAliased, + withArguments: _withArgumentsSuperExtensionTypeIsNullableAliased, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSuperExtensionTypeIsNullableAliased({ @@ -4260,15 +4589,18 @@ Message _withArgumentsOldSuperExtensionTypeIsNullableAliased( ) => _withArgumentsSuperExtensionTypeIsNullableAliased(name: name, type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeSupertypeIsIllegalAliased = - const Template( - "SupertypeIsIllegalAliased", - problemMessageTemplate: - r"""The type '#name' which is an alias of '#type' can't be used as supertype.""", - withArgumentsOld: _withArgumentsOldSupertypeIsIllegalAliased, - analyzerCodes: ["EXTENDS_NON_CLASS"], - ); +const Template< + Message Function(String name, DartType type), + Message Function({required String name, required DartType type}) +> +codeSupertypeIsIllegalAliased = const Template( + "SupertypeIsIllegalAliased", + problemMessageTemplate: + r"""The type '#name' which is an alias of '#type' can't be used as supertype.""", + withArgumentsOld: _withArgumentsOldSupertypeIsIllegalAliased, + withArguments: _withArgumentsSupertypeIsIllegalAliased, + analyzerCodes: ["EXTENDS_NON_CLASS"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSupertypeIsIllegalAliased({ @@ -4294,15 +4626,18 @@ Message _withArgumentsOldSupertypeIsIllegalAliased( ) => _withArgumentsSupertypeIsIllegalAliased(name: name, type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeSupertypeIsNullableAliased = - const Template( - "SupertypeIsNullableAliased", - problemMessageTemplate: - r"""The type '#name' which is an alias of '#type' can't be used as supertype because it is nullable.""", - withArgumentsOld: _withArgumentsOldSupertypeIsNullableAliased, - analyzerCodes: ["EXTENDS_NON_CLASS"], - ); +const Template< + Message Function(String name, DartType type), + Message Function({required String name, required DartType type}) +> +codeSupertypeIsNullableAliased = const Template( + "SupertypeIsNullableAliased", + problemMessageTemplate: + r"""The type '#name' which is an alias of '#type' can't be used as supertype because it is nullable.""", + withArgumentsOld: _withArgumentsOldSupertypeIsNullableAliased, + withArguments: _withArgumentsSupertypeIsNullableAliased, + analyzerCodes: ["EXTENDS_NON_CLASS"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSupertypeIsNullableAliased({ @@ -4328,14 +4663,17 @@ Message _withArgumentsOldSupertypeIsNullableAliased( ) => _withArgumentsSupertypeIsNullableAliased(name: name, type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeSwitchExpressionNotSubtype = - const Template( - "SwitchExpressionNotSubtype", - problemMessageTemplate: - r"""Type '#type' of the case expression is not a subtype of type '#type2' of this switch expression.""", - withArgumentsOld: _withArgumentsOldSwitchExpressionNotSubtype, - ); +const Template< + Message Function(DartType type, DartType type2), + Message Function({required DartType type, required DartType type2}) +> +codeSwitchExpressionNotSubtype = const Template( + "SwitchExpressionNotSubtype", + problemMessageTemplate: + r"""Type '#type' of the case expression is not a subtype of type '#type2' of this switch expression.""", + withArgumentsOld: _withArgumentsOldSwitchExpressionNotSubtype, + withArguments: _withArgumentsSwitchExpressionNotSubtype, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsSwitchExpressionNotSubtype({ @@ -4361,14 +4699,17 @@ Message _withArgumentsOldSwitchExpressionNotSubtype( ) => _withArgumentsSwitchExpressionNotSubtype(type: type, type2: type2); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeThrowingNotAssignableToObjectError = - const Template( - "ThrowingNotAssignableToObjectError", - problemMessageTemplate: - r"""Can't throw a value of '#type' since it is neither dynamic nor non-nullable.""", - withArgumentsOld: _withArgumentsOldThrowingNotAssignableToObjectError, - ); +const Template< + Message Function(DartType type), + Message Function({required DartType type}) +> +codeThrowingNotAssignableToObjectError = const Template( + "ThrowingNotAssignableToObjectError", + problemMessageTemplate: + r"""Can't throw a value of '#type' since it is neither dynamic nor non-nullable.""", + withArgumentsOld: _withArgumentsOldThrowingNotAssignableToObjectError, + withArguments: _withArgumentsThrowingNotAssignableToObjectError, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsThrowingNotAssignableToObjectError({ @@ -4390,14 +4731,18 @@ Message _withArgumentsOldThrowingNotAssignableToObjectError(DartType type) => _withArgumentsThrowingNotAssignableToObjectError(type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeUndefinedGetter = const Template( +const Template< + Message Function(String name, DartType type), + Message Function({required String name, required DartType type}) +> +codeUndefinedGetter = const Template( "UndefinedGetter", problemMessageTemplate: r"""The getter '#name' isn't defined for the type '#type'.""", correctionMessageTemplate: r"""Try correcting the name to the name of an existing getter, or defining a getter or field named '#name'.""", withArgumentsOld: _withArgumentsOldUndefinedGetter, + withArguments: _withArgumentsUndefinedGetter, analyzerCodes: ["UNDEFINED_GETTER"], ); @@ -4425,14 +4770,18 @@ Message _withArgumentsOldUndefinedGetter(String name, DartType type) => _withArgumentsUndefinedGetter(name: name, type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeUndefinedMethod = const Template( +const Template< + Message Function(String name, DartType type), + Message Function({required String name, required DartType type}) +> +codeUndefinedMethod = const Template( "UndefinedMethod", problemMessageTemplate: r"""The method '#name' isn't defined for the type '#type'.""", correctionMessageTemplate: r"""Try correcting the name to the name of an existing method, or defining a method named '#name'.""", withArgumentsOld: _withArgumentsOldUndefinedMethod, + withArguments: _withArgumentsUndefinedMethod, analyzerCodes: ["UNDEFINED_METHOD"], ); @@ -4460,17 +4809,20 @@ Message _withArgumentsOldUndefinedMethod(String name, DartType type) => _withArgumentsUndefinedMethod(name: name, type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeUndefinedOperator = - const Template( - "UndefinedOperator", - problemMessageTemplate: - r"""The operator '#name' isn't defined for the type '#type'.""", - correctionMessageTemplate: - r"""Try correcting the operator to an existing operator, or defining a '#name' operator.""", - withArgumentsOld: _withArgumentsOldUndefinedOperator, - analyzerCodes: ["UNDEFINED_METHOD"], - ); +const Template< + Message Function(String name, DartType type), + Message Function({required String name, required DartType type}) +> +codeUndefinedOperator = const Template( + "UndefinedOperator", + problemMessageTemplate: + r"""The operator '#name' isn't defined for the type '#type'.""", + correctionMessageTemplate: + r"""Try correcting the operator to an existing operator, or defining a '#name' operator.""", + withArgumentsOld: _withArgumentsOldUndefinedOperator, + withArguments: _withArgumentsUndefinedOperator, + analyzerCodes: ["UNDEFINED_METHOD"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsUndefinedOperator({ @@ -4496,14 +4848,18 @@ Message _withArgumentsOldUndefinedOperator(String name, DartType type) => _withArgumentsUndefinedOperator(name: name, type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeUndefinedSetter = const Template( +const Template< + Message Function(String name, DartType type), + Message Function({required String name, required DartType type}) +> +codeUndefinedSetter = const Template( "UndefinedSetter", problemMessageTemplate: r"""The setter '#name' isn't defined for the type '#type'.""", correctionMessageTemplate: r"""Try correcting the name to the name of an existing setter, or defining a setter or field named '#name'.""", withArgumentsOld: _withArgumentsOldUndefinedSetter, + withArguments: _withArgumentsUndefinedSetter, analyzerCodes: ["UNDEFINED_SETTER"], ); @@ -4531,18 +4887,18 @@ Message _withArgumentsOldUndefinedSetter(String name, DartType type) => _withArgumentsUndefinedSetter(name: name, type: type); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template -codeWrongTypeParameterVarianceInSuperinterface = - const Template( - "WrongTypeParameterVarianceInSuperinterface", - problemMessageTemplate: - r"""'#name' can't be used contravariantly or invariantly in '#type'.""", - withArgumentsOld: - _withArgumentsOldWrongTypeParameterVarianceInSuperinterface, - analyzerCodes: [ - "WRONG_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE", - ], - ); +const Template< + Message Function(String name, DartType type), + Message Function({required String name, required DartType type}) +> +codeWrongTypeParameterVarianceInSuperinterface = const Template( + "WrongTypeParameterVarianceInSuperinterface", + problemMessageTemplate: + r"""'#name' can't be used contravariantly or invariantly in '#type'.""", + withArgumentsOld: _withArgumentsOldWrongTypeParameterVarianceInSuperinterface, + withArguments: _withArgumentsWrongTypeParameterVarianceInSuperinterface, + analyzerCodes: ["WRONG_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE"], +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsWrongTypeParameterVarianceInSuperinterface({ diff --git a/pkg/front_end/lib/src/dill/dill_loader.dart b/pkg/front_end/lib/src/dill/dill_loader.dart index dc74eebe26d..86289ee6a94 100644 --- a/pkg/front_end/lib/src/dill/dill_loader.dart +++ b/pkg/front_end/lib/src/dill/dill_loader.dart @@ -180,7 +180,7 @@ class DillLoader extends Loader { _logSummary(outlineSummaryTemplate); } - void _logSummary(Template template) { + void _logSummary(Template template) { ticker.log( // Coverage-ignore(suite): Not run. (Duration elapsed, Duration sinceStart) { @@ -314,7 +314,7 @@ severity: $severity return formattedMessage; } - Template get outlineSummaryTemplate => + Template get outlineSummaryTemplate => codeDillOutlineSummary; /// Append compiled libraries from the given [component]. If the [filter] is diff --git a/pkg/front_end/lib/src/kernel/body_builder.dart b/pkg/front_end/lib/src/kernel/body_builder.dart index af662dab159..654aa48ca0c 100644 --- a/pkg/front_end/lib/src/kernel/body_builder.dart +++ b/pkg/front_end/lib/src/kernel/body_builder.dart @@ -830,7 +830,7 @@ class BodyBuilder extends StackListenerImpl void wrapVariableInitializerInError( VariableDeclaration variable, - Template template, + Template template, List context, ) { String name = variable.name!; @@ -10654,7 +10654,7 @@ class BodyBuilder extends StackListenerImpl Statement problem; bool isBreak = keyword.isA(Keyword.BREAK); if (name != null) { - Template template = isBreak + Template template = isBreak ? cfe.codeBreakTargetOutsideFunction : cfe.codeContinueTargetOutsideFunction; problem = buildProblemStatement( diff --git a/pkg/front_end/lib/src/kernel/hierarchy/delayed.dart b/pkg/front_end/lib/src/kernel/hierarchy/delayed.dart index 5323d03fd15..e1047e148dc 100644 --- a/pkg/front_end/lib/src/kernel/hierarchy/delayed.dart +++ b/pkg/front_end/lib/src/kernel/hierarchy/delayed.dart @@ -143,7 +143,10 @@ abstract class DelayedGetterSetterCheck implements DelayedCheck { ], ); } else if (getterIsDeclared) { - Template + Template< + Message Function(DartType, String, DartType, String), + Function + > template = codeInvalidGetterSetterTypeSetterInheritedGetter; if (getterIsField) { template = codeInvalidGetterSetterTypeSetterInheritedField; @@ -165,9 +168,12 @@ abstract class DelayedGetterSetterCheck implements DelayedCheck { ], ); } else if (setterIsDeclared) { - Template + Template< + Message Function(DartType, String, DartType, String), + Function + > template = codeInvalidGetterSetterTypeGetterInherited; - Template context = + Template context = codeInvalidGetterSetterTypeGetterContext; if (getterIsField) { template = codeInvalidGetterSetterTypeFieldInherited; @@ -190,9 +196,12 @@ abstract class DelayedGetterSetterCheck implements DelayedCheck { ], ); } else { - Template + Template< + Message Function(DartType, String, DartType, String), + Function + > template = codeInvalidGetterSetterTypeBothInheritedGetter; - Template context = + Template context = codeInvalidGetterSetterTypeGetterContext; if (getterIsField) { template = codeInvalidGetterSetterTypeBothInheritedField; diff --git a/pkg/front_end/lib/src/source/outline_builder.dart b/pkg/front_end/lib/src/source/outline_builder.dart index d4920eafc22..61e0b51d9a8 100644 --- a/pkg/front_end/lib/src/source/outline_builder.dart +++ b/pkg/front_end/lib/src/source/outline_builder.dart @@ -2453,7 +2453,7 @@ class OutlineBuilder extends StackListenerImpl { kind = ProcedureKind.Operator; int requiredArgumentCount = operator.requiredArgumentCount; if ((formals?.length ?? 0) != requiredArgumentCount) { - Template template; + Template template; switch (requiredArgumentCount) { case 0: template = codeOperatorParameterMismatch0; diff --git a/pkg/front_end/lib/src/source/source_loader.dart b/pkg/front_end/lib/src/source/source_loader.dart index 06c79631b1c..b5b8aead496 100644 --- a/pkg/front_end/lib/src/source/source_loader.dart +++ b/pkg/front_end/lib/src/source/source_loader.dart @@ -851,7 +851,7 @@ class SourceLoader extends Loader { logSummary(codeSourceBodySummary); } - void logSummary(Template template) { + void logSummary(Template template) { ticker.log( // Coverage-ignore(suite): Not run. (Duration elapsed, Duration sinceStart) { @@ -1052,7 +1052,7 @@ severity: $severity ClassMembersBuilder get membersBuilder => _membersBuilder!; - Template get outlineSummaryTemplate => + Template get outlineSummaryTemplate => codeSourceOutlineSummary; /// The [SourceCompilationUnit]s for the `dart:` libraries that are not @@ -2314,7 +2314,7 @@ severity: $severity return; } } - final Template template = + final Template template = cls.isMixinDeclaration ? codeMixinSubtypeOfFinalIsNotBase : codeSubtypeOfFinalIsNotBaseFinalOrSealed; @@ -2328,7 +2328,7 @@ severity: $severity cls.fileUri, ); } else if (baseOrFinalSuperClass.isBase) { - final Template template = + final Template template = cls.isMixinDeclaration ? codeMixinSubtypeOfBaseIsNotBase : codeSubtypeOfBaseIsNotBaseFinalOrSealed; @@ -2484,7 +2484,7 @@ severity: $severity if (checkedClass.isBase && !cls.cls.isAnonymousMixin) { // Report an error for a class implementing a base class outside // of its library. - final Template template = + final Template template = checkedClass.isMixinDeclaration ? codeBaseMixinImplementedOutsideOfLibrary : codeBaseClassImplementedOutsideOfLibrary; @@ -2502,7 +2502,7 @@ severity: $severity } else if (checkedClass.isFinal) { // Report an error for a class implementing a final class // outside of its library. - final Template template = + final Template template = cls.cls.isAnonymousMixin && checkedClass == interfaceDeclaration ? codeFinalClassUsedAsMixinConstraintOutsideOfLibrary @@ -3577,7 +3577,7 @@ class _CheckSuperAccess extends RecursiveVisitor { void _checkMember( Name name, { - required Template template, + required Template template, required bool isSetter, required int accessFileOffset, }) { diff --git a/pkg/front_end/lib/src/type_inference/inference_visitor_base.dart b/pkg/front_end/lib/src/type_inference/inference_visitor_base.dart index e084910df05..11aad0e4e3a 100644 --- a/pkg/front_end/lib/src/type_inference/inference_visitor_base.dart +++ b/pkg/front_end/lib/src/type_inference/inference_visitor_base.dart @@ -385,7 +385,7 @@ abstract class InferenceVisitorBase implements InferenceVisitor { DartType? runtimeCheckedType, bool isVoidAllowed = false, bool coerceExpression = true, - Template? errorTemplate, + Template? errorTemplate, Map Function()? whyNotPromoted, }) { return ensureAssignableResult( @@ -421,8 +421,10 @@ abstract class InferenceVisitorBase implements InferenceVisitor { DartType initialContextType = runtimeCheckedType ?? contextType; - Template? preciseTypeErrorTemplate = - _getPreciseTypeErrorTemplate(inferenceResult.expression); + Template? + preciseTypeErrorTemplate = _getPreciseTypeErrorTemplate( + inferenceResult.expression, + ); AssignabilityResult assignabilityResult = _computeAssignabilityKind( contextType, inferenceResult.inferredType, @@ -505,7 +507,7 @@ abstract class InferenceVisitorBase implements InferenceVisitor { DartType? runtimeCheckedType, bool isVoidAllowed = false, bool isCoercionAllowed = true, - Template? errorTemplate, + Template? errorTemplate, Map Function()? whyNotPromoted, }) { errorTemplate ??= codeInvalidAssignmentError; @@ -513,8 +515,10 @@ abstract class InferenceVisitorBase implements InferenceVisitor { fileOffset ??= inferenceResult.expression.fileOffset; contextType = computeGreatestClosure(contextType); - Template? preciseTypeErrorTemplate = - _getPreciseTypeErrorTemplate(inferenceResult.expression); + Template? + preciseTypeErrorTemplate = _getPreciseTypeErrorTemplate( + inferenceResult.expression, + ); AssignabilityResult assignabilityResult = _computeAssignabilityKind( contextType, inferenceResult.inferredType, @@ -653,7 +657,7 @@ abstract class InferenceVisitorBase implements InferenceVisitor { DartType? runtimeCheckedType, bool isVoidAllowed = false, bool coerceExpression = true, - Template? errorTemplate, + Template? errorTemplate, Map Function()? whyNotPromoted, }) { if (coerceExpression) { @@ -690,7 +694,7 @@ abstract class InferenceVisitorBase implements InferenceVisitor { Expression _wrapTearoffErrorExpression( Expression expression, DartType contextType, - Template template, + Template template, ) { Expression errorNode = new AsExpression( @@ -1511,7 +1515,7 @@ abstract class InferenceVisitorBase implements InferenceVisitor { DartType receiverType, Name name, int fileOffset, - Template errorTemplate, + Template errorTemplate, ) { assert(isKnown(receiverType)); if (target.isMissing) { @@ -4888,9 +4892,8 @@ abstract class InferenceVisitorBase implements InferenceVisitor { /// /// If it is, an error message template is returned, which can be used by the /// caller to report an invalid cast. Otherwise, `null` is returned. - Template? _getPreciseTypeErrorTemplate( - Expression expression, - ) { + Template? + _getPreciseTypeErrorTemplate(Expression expression) { if (expression is ListLiteral) { return codeInvalidCastLiteralList; } @@ -5019,11 +5022,12 @@ abstract class InferenceVisitorBase implements InferenceVisitor { Name name, Expression? wrappedExpression, List? extensionAccessCandidates, - Template missingTemplate, - Template ambiguousTemplate, + Template missingTemplate, + Template ambiguousTemplate, ) { List? context; - Template template = missingTemplate; + Template template = + missingTemplate; if (extensionAccessCandidates != null) { context = extensionAccessCandidates .map( @@ -5370,7 +5374,7 @@ abstract class InferenceVisitorBase implements InferenceVisitor { Expression? receiver, List? extensionAccessCandidates, }) { - Template codeMissing = + Template codeMissing = codeUndefinedGetter; return _reportMissingOrAmbiguousMember( fileOffset, @@ -5395,7 +5399,7 @@ abstract class InferenceVisitorBase implements InferenceVisitor { required bool forEffect, List? extensionAccessCandidates, }) { - Template codeMissing = + Template codeMissing = codeUndefinedSetter; return _reportMissingOrAmbiguousMember( fileOffset, @@ -5416,7 +5420,7 @@ abstract class InferenceVisitorBase implements InferenceVisitor { Expression index, { List? extensionAccessCandidates, }) { - Template codeMissing = + Template codeMissing = codeUndefinedOperator; return _reportMissingOrAmbiguousMember( @@ -5445,7 +5449,7 @@ abstract class InferenceVisitorBase implements InferenceVisitor { required bool forEffect, List? extensionAccessCandidates, }) { - Template codeMissing = + Template codeMissing = codeUndefinedOperator; return _reportMissingOrAmbiguousMember( fileOffset, @@ -5473,7 +5477,7 @@ abstract class InferenceVisitorBase implements InferenceVisitor { List? extensionAccessCandidates, }) { assert(binaryName != equalsName); - Template codeMissing = + Template codeMissing = codeUndefinedOperator; return _reportMissingOrAmbiguousMember( fileOffset, @@ -5499,7 +5503,7 @@ abstract class InferenceVisitorBase implements InferenceVisitor { Name unaryName, { List? extensionAccessCandidates, }) { - Template codeMissing = + Template codeMissing = codeUndefinedOperator; return _reportMissingOrAmbiguousMember( fileOffset, @@ -5764,7 +5768,7 @@ class _WhyNotPromotedVisitor member = stubTarget; } propertyReference = member; - Template template = + Template template = switch (reason.whyNotPromotable) { PropertyNonPromotabilityReason.isNotField => codeFieldNotPromotedBecauseNotField, diff --git a/pkg/front_end/tool/generate_messages_lib.dart b/pkg/front_end/tool/generate_messages_lib.dart index 893b57d2431..561fb36cb6e 100644 --- a/pkg/front_end/tool/generate_messages_lib.dart +++ b/pkg/front_end/tool/generate_messages_lib.dart @@ -488,6 +488,7 @@ const MessageCode code$name = } templateArguments.add("withArgumentsOld: _withArgumentsOld$name"); + templateArguments.add("withArguments: _withArguments$name"); templateArguments.addAll(codeArguments); String message = interpolate(problemMessage); @@ -520,9 +521,10 @@ const MessageCode code$name = .toList(); return new Template(""" // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template code$name = - const Template( - ${templateArguments.join(', ')},); +const Template< + Message Function(${positionalParameters.join(', ')}), + Message Function({${namedParameters.join(', ')}}) +> code$name = const Template(${templateArguments.join(', ')},); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArguments$name({${namedParameters.join(', ')}}) {