From b2c2acee093a2ceb66607b9e619023576b47fc1a Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Mon, 4 Oct 2021 13:32:46 +0000 Subject: [PATCH] Adjust front end nomenclature for error messages. This change updates the classes Message, MessageCode, Template, LocatedMessage, and FormattedMessage so that they uniformly refer to error message text using the terminology `problemMessage` and to correction suggestions using the terminology `correctionMessage`. This brings them into alignment with the names we've decided to use to unify the structure of front_end and analyzer, and makes them match the names used in the anlayzer and front end's `messages.yaml` files. Change-Id: Idcbb7ccfff6bb4e99ca22a3ef3c19d83880cf3c7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215154 Commit-Queue: Paul Berry Reviewed-by: Johnni Winther --- .../lib/src/messages/codes.dart | 36 +- .../lib/src/messages/codes_generated.dart | 2584 +++++++++-------- .../lib/src/messages/diagnostic_message.dart | 2 +- .../lib/src/parser/parser_error.dart | 3 +- .../lib/src/parser/stack_listener.dart | 8 +- .../lib/src/scanner/error_token.dart | 2 +- .../lib/src/util/options.dart | 2 +- pkg/analyzer/lib/src/fasta/ast_builder.dart | 4 +- pkg/analyzer/tool/summary/mini_ast.dart | 2 +- pkg/compiler/lib/src/ir/modular.dart | 2 +- .../lib/src/kernel/element_map_impl.dart | 2 +- .../test/end_to_end/user_crash_test.dart | 4 +- .../lib/src/kernel/expression_compiler.dart | 2 +- .../lib/src/base/processed_options.dart | 6 +- .../lib/src/fasta/builder/class_builder.dart | 2 +- .../src/fasta/builder/extension_builder.dart | 2 +- .../lib/src/fasta/command_line_reporting.dart | 11 +- .../lib/src/fasta/compiler_context.dart | 8 +- .../lib/src/fasta/dill/dill_loader.dart | 4 +- .../src/fasta/fasta_codes_cfe_generated.dart | 806 ++--- .../src/fasta/kernel/constant_evaluator.dart | 7 +- .../lib/src/fasta/kernel/type_labeler.dart | 2 +- pkg/front_end/lib/src/fasta/problems.dart | 2 +- .../fasta/source/source_library_builder.dart | 2 +- .../lib/src/fasta/source/source_loader.dart | 7 +- .../source/source_type_alias_builder.dart | 2 +- .../fasta/type_inference/type_inferrer.dart | 5 +- .../lib/src/testing/id_testing_utils.dart | 2 +- .../test/extensions/extensions_test.dart | 4 +- pkg/front_end/test/fasta/tool_git_test.dart | 2 +- pkg/front_end/test/kernel_generator_test.dart | 10 +- pkg/front_end/test/messages_json_test.dart | 2 +- pkg/front_end/test/parser_suite.dart | 4 +- .../test/src/base/processed_options_test.dart | 23 +- .../test/static_types/analysis_helper.dart | 7 +- .../tool/_fasta/additional_targets_test.dart | 2 +- pkg/front_end/tool/_fasta/command_line.dart | 13 +- .../tool/_fasta/generate_messages.dart | 14 +- pkg/front_end/tool/dart_doctest_impl.dart | 2 +- 39 files changed, 1917 insertions(+), 1687 deletions(-) diff --git a/pkg/_fe_analyzer_shared/lib/src/messages/codes.dart b/pkg/_fe_analyzer_shared/lib/src/messages/codes.dart index ca0f8161065..58664095ea1 100644 --- a/pkg/_fe_analyzer_shared/lib/src/messages/codes.dart +++ b/pkg/_fe_analyzer_shared/lib/src/messages/codes.dart @@ -39,14 +39,16 @@ class Code { class Message { final Code code; - final String message; + final String problemMessage; - final String? tip; + final String? correctionMessage; final Map arguments; const Message(this.code, - {required this.message, this.tip, this.arguments = const {}}); + {this.correctionMessage, + required this.problemMessage, + this.arguments = const {}}); LocatedMessage withLocation(Uri uri, int charOffset, int length) { return new LocatedMessage(uri, charOffset, length, this); @@ -57,21 +59,21 @@ class Message { } String toString() { - return "Message[$code, $message, $tip, $arguments]"; + return "Message[$code, $problemMessage, $correctionMessage, $arguments]"; } } class MessageCode extends Code implements Message { - final String message; + final String problemMessage; - final String? tip; + final String? correctionMessage; const MessageCode(String name, {int index: -1, List? analyzerCodes, Severity severity: Severity.error, - required this.message, - this.tip}) + required this.problemMessage, + this.correctionMessage}) : super(name, index: index, analyzerCodes: analyzerCodes, severity: severity); @@ -90,15 +92,15 @@ class MessageCode extends Code implements Message { } class Template { - final String messageTemplate; + final String problemMessageTemplate; - final String? tipTemplate; + final String? correctionMessageTemplate; final T withArguments; const Template( - {required this.messageTemplate, - this.tipTemplate, + {this.correctionMessageTemplate, + required this.problemMessageTemplate, required this.withArguments}); } @@ -116,9 +118,9 @@ class LocatedMessage implements Comparable { Code get code => messageObject.code; - String get message => messageObject.message; + String get problemMessage => messageObject.problemMessage; - String? get tip => messageObject.tip; + String? get correctionMessage => messageObject.correctionMessage; Map get arguments => messageObject.arguments; @@ -128,7 +130,7 @@ class LocatedMessage implements Comparable { if (result != 0) return result; result = charOffset.compareTo(other.charOffset); if (result != 0) return result; - return message.compareTo(message); + return problemMessage.compareTo(problemMessage); } FormattedMessage withFormatting(PlainAndColorizedString formatted, int line, @@ -209,9 +211,9 @@ class FormattedMessage implements DiagnosticMessage { String get codeName => code.name; - String get message => locatedMessage.message; + String get problemMessage => locatedMessage.problemMessage; - String? get tip => locatedMessage.tip; + String? get correctionMessage => locatedMessage.correctionMessage; Map get arguments => locatedMessage.arguments; 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 f170c1f26d3..0563d92f9b8 100644 --- a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart +++ b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart @@ -18,13 +18,13 @@ const Code codeAbstractClassConstructorTearOff = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageAbstractClassConstructorTearOff = const MessageCode( "AbstractClassConstructorTearOff", - message: r"""Constructors on abstract classes can't be torn off."""); + problemMessage: r"""Constructors on abstract classes can't be torn off."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateAbstractClassInstantiation = const Template( - messageTemplate: + problemMessageTemplate: r"""The class '#name' is abstract and can't be instantiated.""", withArguments: _withArgumentsAbstractClassInstantiation); @@ -38,7 +38,8 @@ Message _withArgumentsAbstractClassInstantiation(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeAbstractClassInstantiation, - message: """The class '${name}' is abstract and can't be instantiated.""", + problemMessage: + """The class '${name}' is abstract and can't be instantiated.""", arguments: {'name': name}); } @@ -49,8 +50,9 @@ const Code codeAbstractClassMember = messageAbstractClassMember; const MessageCode messageAbstractClassMember = const MessageCode( "AbstractClassMember", index: 51, - message: r"""Members of classes can't be declared to be 'abstract'.""", - tip: + problemMessage: + r"""Members of classes can't be declared to be 'abstract'.""", + correctionMessage: r"""Try removing the 'abstract' keyword. You can add the 'abstract' keyword before the class declaration."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -59,8 +61,8 @@ const Code codeAbstractExtensionField = messageAbstractExtensionField; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageAbstractExtensionField = const MessageCode( "AbstractExtensionField", - message: r"""Extension fields can't be declared 'abstract'.""", - tip: r"""Try removing the 'abstract' keyword."""); + problemMessage: r"""Extension fields can't be declared 'abstract'.""", + correctionMessage: r"""Try removing the 'abstract' keyword."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeAbstractExternalField = messageAbstractExternalField; @@ -69,8 +71,10 @@ const Code codeAbstractExternalField = messageAbstractExternalField; const MessageCode messageAbstractExternalField = const MessageCode( "AbstractExternalField", index: 110, - message: r"""Fields can't be declared both 'abstract' and 'external'.""", - tip: r"""Try removing the 'abstract' or 'external' keyword."""); + problemMessage: + r"""Fields can't be declared both 'abstract' and 'external'.""", + correctionMessage: + r"""Try removing the 'abstract' or 'external' keyword."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeAbstractFieldConstructorInitializer = @@ -79,8 +83,8 @@ const Code codeAbstractFieldConstructorInitializer = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageAbstractFieldConstructorInitializer = const MessageCode( "AbstractFieldConstructorInitializer", - message: r"""Abstract fields cannot have initializers.""", - tip: + problemMessage: r"""Abstract fields cannot have initializers.""", + correctionMessage: r"""Try removing the field initializer or the 'abstract' keyword from the field declaration."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -89,8 +93,9 @@ const Code codeAbstractFieldInitializer = messageAbstractFieldInitializer; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageAbstractFieldInitializer = const MessageCode( "AbstractFieldInitializer", - message: r"""Abstract fields cannot have initializers.""", - tip: r"""Try removing the initializer or the 'abstract' keyword."""); + problemMessage: r"""Abstract fields cannot have initializers.""", + correctionMessage: + r"""Try removing the initializer or the 'abstract' keyword."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeAbstractLateField = messageAbstractLateField; @@ -99,8 +104,8 @@ const Code codeAbstractLateField = messageAbstractLateField; const MessageCode messageAbstractLateField = const MessageCode( "AbstractLateField", index: 108, - message: r"""Abstract fields cannot be late.""", - tip: r"""Try removing the 'abstract' or 'late' keyword."""); + problemMessage: r"""Abstract fields cannot be late.""", + correctionMessage: r"""Try removing the 'abstract' or 'late' keyword."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeAbstractNotSync = messageAbstractNotSync; @@ -108,7 +113,8 @@ const Code codeAbstractNotSync = messageAbstractNotSync; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageAbstractNotSync = const MessageCode("AbstractNotSync", analyzerCodes: ["NON_SYNC_ABSTRACT_METHOD"], - message: r"""Abstract methods can't use 'async', 'async*', or 'sync*'."""); + problemMessage: + r"""Abstract methods can't use 'async', 'async*', or 'sync*'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -116,7 +122,7 @@ const Template< String name)> templateAbstractRedirectedClassInstantiation = const Template< Message Function(String name)>( - messageTemplate: + problemMessageTemplate: r"""Factory redirects to class '#name', which is abstract and can't be instantiated.""", withArguments: _withArgumentsAbstractRedirectedClassInstantiation); @@ -132,7 +138,7 @@ Message _withArgumentsAbstractRedirectedClassInstantiation(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeAbstractRedirectedClassInstantiation, - message: + problemMessage: """Factory redirects to class '${name}', which is abstract and can't be instantiated.""", arguments: {'name': name}); } @@ -144,13 +150,13 @@ const Code codeAbstractStaticField = messageAbstractStaticField; const MessageCode messageAbstractStaticField = const MessageCode( "AbstractStaticField", index: 107, - message: r"""Static fields can't be declared 'abstract'.""", - tip: r"""Try removing the 'abstract' or 'static' keyword."""); + problemMessage: r"""Static fields can't be declared 'abstract'.""", + correctionMessage: r"""Try removing the 'abstract' or 'static' keyword."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateAccessError = const Template( - messageTemplate: r"""Access error: '#name'.""", + problemMessageTemplate: r"""Access error: '#name'.""", withArguments: _withArgumentsAccessError); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -164,7 +170,8 @@ Message _withArgumentsAccessError(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeAccessError, - message: """Access error: '${name}'.""", arguments: {'name': name}); + problemMessage: """Access error: '${name}'.""", + arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -174,7 +181,7 @@ const Code codeAgnosticWithStrongDillLibrary = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageAgnosticWithStrongDillLibrary = const MessageCode( "AgnosticWithStrongDillLibrary", - message: + problemMessage: r"""Loaded library is compiled with sound null safety and cannot be used in compilation for agnostic null safety."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -184,7 +191,7 @@ const Code codeAgnosticWithWeakDillLibrary = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageAgnosticWithWeakDillLibrary = const MessageCode( "AgnosticWithWeakDillLibrary", - message: + problemMessage: r"""Loaded library is compiled with unsound null safety and cannot be used in compilation for agnostic null safety."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -194,7 +201,7 @@ const Code codeAmbiguousExtensionCause = messageAmbiguousExtensionCause; const MessageCode messageAmbiguousExtensionCause = const MessageCode( "AmbiguousExtensionCause", severity: Severity.context, - message: r"""This is one of the extension members."""); + problemMessage: r"""This is one of the extension members."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeAnnotationOnFunctionTypeTypeVariable = @@ -203,7 +210,7 @@ const Code codeAnnotationOnFunctionTypeTypeVariable = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageAnnotationOnFunctionTypeTypeVariable = const MessageCode("AnnotationOnFunctionTypeTypeVariable", - message: + problemMessage: r"""A type variable on a function type can't have annotations."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -213,7 +220,7 @@ const Code codeAnnotationOnTypeArgument = messageAnnotationOnTypeArgument; const MessageCode messageAnnotationOnTypeArgument = const MessageCode( "AnnotationOnTypeArgument", index: 111, - message: + problemMessage: r"""Type arguments can't have annotations because they aren't declarations."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -222,9 +229,11 @@ const Code codeAnonymousBreakTargetOutsideFunction = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageAnonymousBreakTargetOutsideFunction = - const MessageCode("AnonymousBreakTargetOutsideFunction", + const MessageCode( + "AnonymousBreakTargetOutsideFunction", analyzerCodes: ["LABEL_IN_OUTER_SCOPE"], - message: r"""Can't break to a target in a different function."""); + problemMessage: + r"""Can't break to a target in a different function."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeAnonymousContinueTargetOutsideFunction = @@ -232,9 +241,11 @@ const Code codeAnonymousContinueTargetOutsideFunction = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageAnonymousContinueTargetOutsideFunction = - const MessageCode("AnonymousContinueTargetOutsideFunction", + const MessageCode( + "AnonymousContinueTargetOutsideFunction", analyzerCodes: ["LABEL_IN_OUTER_SCOPE"], - message: r"""Can't continue at a target in a different function."""); + problemMessage: + r"""Can't continue at a target in a different function."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -242,7 +253,7 @@ const Template< int codePoint)> templateAsciiControlCharacter = const Template< Message Function(int codePoint)>( - messageTemplate: + problemMessageTemplate: r"""The control character #unicode can only be used in strings and comments.""", withArguments: _withArgumentsAsciiControlCharacter); @@ -256,7 +267,7 @@ Message _withArgumentsAsciiControlCharacter(int codePoint) { String unicode = "U+${codePoint.toRadixString(16).toUpperCase().padLeft(4, '0')}"; return new Message(codeAsciiControlCharacter, - message: + problemMessage: """The control character ${unicode} can only be used in strings and comments.""", arguments: {'unicode': codePoint}); } @@ -267,7 +278,7 @@ const Code codeAssertAsExpression = messageAssertAsExpression; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageAssertAsExpression = const MessageCode( "AssertAsExpression", - message: r"""`assert` can't be used as an expression."""); + problemMessage: r"""`assert` can't be used as an expression."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeAssertExtraneousArgument = messageAssertExtraneousArgument; @@ -275,7 +286,7 @@ const Code codeAssertExtraneousArgument = messageAssertExtraneousArgument; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageAssertExtraneousArgument = const MessageCode( "AssertExtraneousArgument", - message: r"""`assert` can't have more than two arguments."""); + problemMessage: r"""`assert` can't have more than two arguments."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeAwaitAsIdentifier = messageAwaitAsIdentifier; @@ -284,7 +295,7 @@ const Code codeAwaitAsIdentifier = messageAwaitAsIdentifier; const MessageCode messageAwaitAsIdentifier = const MessageCode( "AwaitAsIdentifier", analyzerCodes: ["ASYNC_KEYWORD_USED_AS_IDENTIFIER"], - message: + problemMessage: r"""'await' can't be used as an identifier in 'async', 'async*', or 'sync*' methods."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -294,9 +305,9 @@ const Code codeAwaitForNotAsync = messageAwaitForNotAsync; const MessageCode messageAwaitForNotAsync = const MessageCode( "AwaitForNotAsync", analyzerCodes: ["ASYNC_FOR_IN_WRONG_CONTEXT"], - message: + problemMessage: r"""The asynchronous for-in can only be used in functions marked with 'async' or 'async*'.""", - tip: + correctionMessage: r"""Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -306,7 +317,7 @@ const Code codeAwaitInLateLocalInitializer = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageAwaitInLateLocalInitializer = const MessageCode( "AwaitInLateLocalInitializer", - message: + problemMessage: r"""`await` expressions are not supported in late local initializers."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -315,7 +326,8 @@ const Code codeAwaitNotAsync = messageAwaitNotAsync; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageAwaitNotAsync = const MessageCode("AwaitNotAsync", analyzerCodes: ["AWAIT_IN_WRONG_CONTEXT"], - message: r"""'await' can only be used in 'async' or 'async*' methods."""); + problemMessage: + r"""'await' can only be used in 'async' or 'async*' methods."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -324,9 +336,9 @@ const Template< String string2)> templateBinaryOperatorWrittenOut = const Template< Message Function(String string, String string2)>( - messageTemplate: + problemMessageTemplate: r"""Binary operator '#string' is written as '#string2' instead of the written out word.""", - tipTemplate: r"""Try replacing '#string' with '#string2'.""", + correctionMessageTemplate: r"""Try replacing '#string' with '#string2'.""", withArguments: _withArgumentsBinaryOperatorWrittenOut); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -341,9 +353,9 @@ Message _withArgumentsBinaryOperatorWrittenOut(String string, String string2) { if (string.isEmpty) throw 'No string provided'; if (string2.isEmpty) throw 'No string provided'; return new Message(codeBinaryOperatorWrittenOut, - message: + problemMessage: """Binary operator '${string}' is written as '${string2}' instead of the written out word.""", - tip: """Try replacing '${string}' with '${string2}'.""", + correctionMessage: """Try replacing '${string}' with '${string2}'.""", arguments: {'string': string, 'string2': string2}); } @@ -353,11 +365,10 @@ const Template< String name, String name2)> templateBoundIssueViaCycleNonSimplicity = const Template< - Message Function(String name, - String name2)>( - messageTemplate: + Message Function(String name, String name2)>( + 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'.""", - tipTemplate: + correctionMessageTemplate: r"""Try providing type arguments to '#name2' here or to some other raw types in the bounds along the reference chain.""", withArguments: _withArgumentsBoundIssueViaCycleNonSimplicity); @@ -376,9 +387,9 @@ Message _withArgumentsBoundIssueViaCycleNonSimplicity( if (name2.isEmpty) throw 'No name provided'; name2 = demangleMixinApplicationName(name2); return new Message(codeBoundIssueViaCycleNonSimplicity, - message: + problemMessage: """Generic type '${name}' can't be used without type arguments in the bounds of its own type variables. It is referenced indirectly through '${name2}'.""", - tip: """Try providing type arguments to '${name2}' here or to some other raw types in the bounds along the reference chain.""", + correctionMessage: """Try providing type arguments to '${name2}' here or to some other raw types in the bounds along the reference chain.""", arguments: {'name': name, 'name2': name2}); } @@ -387,10 +398,12 @@ const Template< Message Function( String name)> templateBoundIssueViaLoopNonSimplicity = const Template< - Message Function(String name)>( - messageTemplate: + Message Function( + String name)>( + problemMessageTemplate: r"""Generic type '#name' can't be used without type arguments in the bounds of its own type variables.""", - tipTemplate: r"""Try providing type arguments to '#name' here.""", + correctionMessageTemplate: + r"""Try providing type arguments to '#name' here.""", withArguments: _withArgumentsBoundIssueViaLoopNonSimplicity); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -403,9 +416,9 @@ Message _withArgumentsBoundIssueViaLoopNonSimplicity(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeBoundIssueViaLoopNonSimplicity, - message: + problemMessage: """Generic type '${name}' can't be used without type arguments in the bounds of its own type variables.""", - tip: """Try providing type arguments to '${name}' here.""", + correctionMessage: """Try providing type arguments to '${name}' here.""", arguments: {'name': name}); } @@ -413,9 +426,10 @@ Message _withArgumentsBoundIssueViaLoopNonSimplicity(String name) { const Template templateBoundIssueViaRawTypeWithNonSimpleBounds = const Template( - messageTemplate: + problemMessageTemplate: r"""Generic type '#name' can't be used without type arguments in a type variable bound.""", - tipTemplate: r"""Try providing type arguments to '#name' here.""", + correctionMessageTemplate: + r"""Try providing type arguments to '#name' here.""", withArguments: _withArgumentsBoundIssueViaRawTypeWithNonSimpleBounds); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -430,9 +444,9 @@ Message _withArgumentsBoundIssueViaRawTypeWithNonSimpleBounds(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeBoundIssueViaRawTypeWithNonSimpleBounds, - message: + problemMessage: """Generic type '${name}' can't be used without type arguments in a type variable bound.""", - tip: """Try providing type arguments to '${name}' here.""", + correctionMessage: """Try providing type arguments to '${name}' here.""", arguments: {'name': name}); } @@ -443,15 +457,16 @@ const Code codeBreakOutsideOfLoop = messageBreakOutsideOfLoop; const MessageCode messageBreakOutsideOfLoop = const MessageCode( "BreakOutsideOfLoop", index: 52, - message: + problemMessage: r"""A break statement can't be used outside of a loop or switch statement.""", - tip: r"""Try removing the break statement."""); + correctionMessage: r"""Try removing the break statement."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateBreakTargetOutsideFunction = const Template( - messageTemplate: r"""Can't break to '#name' in a different function.""", + problemMessageTemplate: + r"""Can't break to '#name' in a different function.""", withArguments: _withArgumentsBreakTargetOutsideFunction); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -464,14 +479,14 @@ Message _withArgumentsBreakTargetOutsideFunction(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeBreakTargetOutsideFunction, - message: """Can't break to '${name}' in a different function.""", + problemMessage: """Can't break to '${name}' in a different function.""", arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateBuiltInIdentifierAsType = const Template( - messageTemplate: + problemMessageTemplate: r"""The built-in identifier '#lexeme' can't be used as a type.""", withArguments: _withArgumentsBuiltInIdentifierAsType); @@ -484,7 +499,7 @@ const Code codeBuiltInIdentifierAsType = Message _withArgumentsBuiltInIdentifierAsType(Token token) { String lexeme = token.lexeme; return new Message(codeBuiltInIdentifierAsType, - message: + problemMessage: """The built-in identifier '${lexeme}' can't be used as a type.""", arguments: {'lexeme': token}); } @@ -493,7 +508,7 @@ Message _withArgumentsBuiltInIdentifierAsType(Token token) { const Template templateBuiltInIdentifierInDeclaration = const Template( - messageTemplate: r"""Can't use '#lexeme' as a name here.""", + problemMessageTemplate: r"""Can't use '#lexeme' as a name here.""", withArguments: _withArgumentsBuiltInIdentifierInDeclaration); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -505,7 +520,7 @@ const Code codeBuiltInIdentifierInDeclaration = Message _withArgumentsBuiltInIdentifierInDeclaration(Token token) { String lexeme = token.lexeme; return new Message(codeBuiltInIdentifierInDeclaration, - message: """Can't use '${lexeme}' as a name here.""", + problemMessage: """Can't use '${lexeme}' as a name here.""", arguments: {'lexeme': token}); } @@ -515,13 +530,14 @@ const Code codeCandidateFound = messageCandidateFound; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageCandidateFound = const MessageCode("CandidateFound", severity: Severity.context, - message: r"""Found this candidate, but the arguments don't match."""); + problemMessage: + r"""Found this candidate, but the arguments don't match."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateCandidateFoundIsDefaultConstructor = const Template( - messageTemplate: + problemMessageTemplate: r"""The class '#name' has a constructor that takes no arguments.""", withArguments: _withArgumentsCandidateFoundIsDefaultConstructor); @@ -537,16 +553,17 @@ Message _withArgumentsCandidateFoundIsDefaultConstructor(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeCandidateFoundIsDefaultConstructor, - message: + problemMessage: """The class '${name}' has a constructor that takes no arguments.""", arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template - templateCannotAssignToConstVariable = +const Template< + Message Function(String name)> templateCannotAssignToConstVariable = const Template( - messageTemplate: r"""Can't assign to the const variable '#name'.""", + problemMessageTemplate: + r"""Can't assign to the const variable '#name'.""", withArguments: _withArgumentsCannotAssignToConstVariable); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -560,7 +577,7 @@ Message _withArgumentsCannotAssignToConstVariable(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeCannotAssignToConstVariable, - message: """Can't assign to the const variable '${name}'.""", + problemMessage: """Can't assign to the const variable '${name}'.""", arguments: {'name': name}); } @@ -571,13 +588,14 @@ const Code codeCannotAssignToExtensionThis = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageCannotAssignToExtensionThis = const MessageCode( "CannotAssignToExtensionThis", - message: r"""Can't assign to 'this'."""); + problemMessage: r"""Can't assign to 'this'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template - templateCannotAssignToFinalVariable = +const Template< + Message Function(String name)> templateCannotAssignToFinalVariable = const Template( - messageTemplate: r"""Can't assign to the final variable '#name'.""", + problemMessageTemplate: + r"""Can't assign to the final variable '#name'.""", withArguments: _withArgumentsCannotAssignToFinalVariable); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -591,7 +609,7 @@ Message _withArgumentsCannotAssignToFinalVariable(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeCannotAssignToFinalVariable, - message: """Can't assign to the final variable '${name}'.""", + problemMessage: """Can't assign to the final variable '${name}'.""", arguments: {'name': name}); } @@ -603,7 +621,7 @@ const Code codeCannotAssignToParenthesizedExpression = const MessageCode messageCannotAssignToParenthesizedExpression = const MessageCode("CannotAssignToParenthesizedExpression", analyzerCodes: ["ASSIGNMENT_TO_PARENTHESIZED_EXPRESSION"], - message: r"""Can't assign to a parenthesized expression."""); + problemMessage: r"""Can't assign to a parenthesized expression."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeCannotAssignToSuper = messageCannotAssignToSuper; @@ -612,7 +630,7 @@ const Code codeCannotAssignToSuper = messageCannotAssignToSuper; const MessageCode messageCannotAssignToSuper = const MessageCode( "CannotAssignToSuper", analyzerCodes: ["NOT_AN_LVALUE"], - message: r"""Can't assign to super."""); + problemMessage: r"""Can't assign to super."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeCannotAssignToTypeLiteral = @@ -621,13 +639,13 @@ const Code codeCannotAssignToTypeLiteral = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageCannotAssignToTypeLiteral = const MessageCode( "CannotAssignToTypeLiteral", - message: r"""Can't assign to a type literal."""); + problemMessage: r"""Can't assign to a type literal."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateCannotReadSdkSpecification = const Template( - messageTemplate: + problemMessageTemplate: r"""Unable to read the 'libraries.json' specification file: #string.""", withArguments: _withArgumentsCannotReadSdkSpecification); @@ -642,7 +660,7 @@ const Code codeCannotReadSdkSpecification = Message _withArgumentsCannotReadSdkSpecification(String string) { if (string.isEmpty) throw 'No string provided'; return new Message(codeCannotReadSdkSpecification, - message: """Unable to read the 'libraries.json' specification file: + problemMessage: """Unable to read the 'libraries.json' specification file: ${string}.""", arguments: {'string': string}); } @@ -653,7 +671,7 @@ const Code codeCantDisambiguateAmbiguousInformation = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageCantDisambiguateAmbiguousInformation = const MessageCode( "CantDisambiguateAmbiguousInformation", - message: + problemMessage: r"""Both Iterable and Map spread elements encountered in ambiguous literal."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -663,9 +681,9 @@ const Code codeCantDisambiguateNotEnoughInformation = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageCantDisambiguateNotEnoughInformation = const MessageCode( "CantDisambiguateNotEnoughInformation", - message: + problemMessage: r"""Not enough type information to disambiguate between literal set and literal map.""", - tip: + correctionMessage: r"""Try providing type arguments for the literal explicitly to disambiguate it."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -675,8 +693,10 @@ const Code codeCantInferPackagesFromManyInputs = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageCantInferPackagesFromManyInputs = const MessageCode( "CantInferPackagesFromManyInputs", - message: r"""Can't infer a packages file when compiling multiple inputs.""", - tip: r"""Try specifying the file explicitly with the --packages option."""); + problemMessage: + r"""Can't infer a packages file when compiling multiple inputs.""", + correctionMessage: + r"""Try specifying the file explicitly with the --packages option."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeCantInferPackagesFromPackageUri = @@ -685,16 +705,18 @@ const Code codeCantInferPackagesFromPackageUri = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageCantInferPackagesFromPackageUri = const MessageCode( "CantInferPackagesFromPackageUri", - message: r"""Can't infer a packages file from an input 'package:*' URI.""", - tip: r"""Try specifying the file explicitly with the --packages option."""); + problemMessage: + r"""Can't infer a packages file from an input 'package:*' URI.""", + correctionMessage: + r"""Try specifying the file explicitly with the --packages option."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateCantInferReturnTypeDueToNoCombinedSignature = const Template( - messageTemplate: + problemMessageTemplate: r"""Can't infer a return type for '#name' as the overridden members don't have a combined signature.""", - tipTemplate: r"""Try adding an explicit type.""", + correctionMessageTemplate: r"""Try adding an explicit type.""", withArguments: _withArgumentsCantInferReturnTypeDueToNoCombinedSignature); @@ -712,9 +734,9 @@ Message _withArgumentsCantInferReturnTypeDueToNoCombinedSignature(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeCantInferReturnTypeDueToNoCombinedSignature, - message: + problemMessage: """Can't infer a return type for '${name}' as the overridden members don't have a combined signature.""", - tip: """Try adding an explicit type.""", + correctionMessage: """Try adding an explicit type.""", arguments: {'name': name}); } @@ -724,9 +746,9 @@ const Template< String string)> templateCantInferTypeDueToCircularity = const Template< Message Function(String string)>( - messageTemplate: + problemMessageTemplate: r"""Can't infer the type of '#string': circularity found during type inference.""", - tipTemplate: r"""Specify the type explicitly.""", + correctionMessageTemplate: r"""Specify the type explicitly.""", withArguments: _withArgumentsCantInferTypeDueToCircularity); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -738,9 +760,9 @@ const Code codeCantInferTypeDueToCircularity = Message _withArgumentsCantInferTypeDueToCircularity(String string) { if (string.isEmpty) throw 'No string provided'; return new Message(codeCantInferTypeDueToCircularity, - message: + problemMessage: """Can't infer the type of '${string}': circularity found during type inference.""", - tip: """Specify the type explicitly.""", + correctionMessage: """Specify the type explicitly.""", arguments: {'string': string}); } @@ -750,9 +772,9 @@ const Template< String name)> templateCantInferTypeDueToNoCombinedSignature = const Template< Message Function(String name)>( - messageTemplate: + problemMessageTemplate: r"""Can't infer a type for '#name' as the overridden members don't have a combined signature.""", - tipTemplate: r"""Try adding an explicit type.""", + correctionMessageTemplate: r"""Try adding an explicit type.""", withArguments: _withArgumentsCantInferTypeDueToNoCombinedSignature); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -769,9 +791,9 @@ Message _withArgumentsCantInferTypeDueToNoCombinedSignature(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeCantInferTypeDueToNoCombinedSignature, - message: + problemMessage: """Can't infer a type for '${name}' as the overridden members don't have a combined signature.""", - tip: """Try adding an explicit type.""", + correctionMessage: """Try adding an explicit type.""", arguments: {'name': name}); } @@ -781,9 +803,9 @@ const Template< String name)> templateCantInferTypesDueToNoCombinedSignature = const Template< Message Function(String name)>( - messageTemplate: + problemMessageTemplate: r"""Can't infer types for '#name' as the overridden members don't have a combined signature.""", - tipTemplate: r"""Try adding explicit types.""", + correctionMessageTemplate: r"""Try adding explicit types.""", withArguments: _withArgumentsCantInferTypesDueToNoCombinedSignature); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -800,16 +822,16 @@ Message _withArgumentsCantInferTypesDueToNoCombinedSignature(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeCantInferTypesDueToNoCombinedSignature, - message: + problemMessage: """Can't infer types for '${name}' as the overridden members don't have a combined signature.""", - tip: """Try adding explicit types.""", + correctionMessage: """Try adding explicit types.""", arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateCantReadFile = const Template( - messageTemplate: r"""Error when reading '#uri': #string""", + problemMessageTemplate: r"""Error when reading '#uri': #string""", withArguments: _withArgumentsCantReadFile); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -822,7 +844,7 @@ Message _withArgumentsCantReadFile(Uri uri_, String string) { String? uri = relativizeUri(uri_); if (string.isEmpty) throw 'No string provided'; return new Message(codeCantReadFile, - message: """Error when reading '${uri}': ${string}""", + problemMessage: """Error when reading '${uri}': ${string}""", arguments: {'uri': uri_, 'string': string}); } @@ -830,7 +852,7 @@ Message _withArgumentsCantReadFile(Uri uri_, String string) { const Template templateCantUseControlFlowOrSpreadAsConstant = const Template( - messageTemplate: + problemMessageTemplate: r"""'#lexeme' is not supported in constant expressions.""", withArguments: _withArgumentsCantUseControlFlowOrSpreadAsConstant); @@ -845,7 +867,8 @@ const Code Message _withArgumentsCantUseControlFlowOrSpreadAsConstant(Token token) { String lexeme = token.lexeme; return new Message(codeCantUseControlFlowOrSpreadAsConstant, - message: """'${lexeme}' is not supported in constant expressions.""", + problemMessage: + """'${lexeme}' is not supported in constant expressions.""", arguments: {'lexeme': token}); } @@ -855,9 +878,9 @@ const Template< Token token)> templateCantUseDeferredPrefixAsConstant = const Template< Message Function(Token token)>( - messageTemplate: + 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.""", - tipTemplate: + correctionMessageTemplate: r"""Try moving the constant from the deferred library, or removing 'deferred' from the import. """, withArguments: _withArgumentsCantUseDeferredPrefixAsConstant); @@ -871,9 +894,9 @@ const Code codeCantUseDeferredPrefixAsConstant = Message _withArgumentsCantUseDeferredPrefixAsConstant(Token token) { String lexeme = token.lexeme; return new Message(codeCantUseDeferredPrefixAsConstant, - message: + problemMessage: """'${lexeme}' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded.""", - tip: """Try moving the constant from the deferred library, or removing 'deferred' from the import. + correctionMessage: """Try moving the constant from the deferred library, or removing 'deferred' from the import. """, arguments: {'lexeme': token}); } @@ -886,7 +909,7 @@ const Code codeCantUsePrefixAsExpression = const MessageCode messageCantUsePrefixAsExpression = const MessageCode( "CantUsePrefixAsExpression", analyzerCodes: ["PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT"], - message: r"""A prefix can't be used as an expression."""); + problemMessage: r"""A prefix can't be used as an expression."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeCantUsePrefixWithNullAware = @@ -896,8 +919,8 @@ const Code codeCantUsePrefixWithNullAware = const MessageCode messageCantUsePrefixWithNullAware = const MessageCode( "CantUsePrefixWithNullAware", analyzerCodes: ["PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT"], - message: r"""A prefix can't be used with null-aware operators.""", - tip: r"""Try replacing '?.' with '.'"""); + problemMessage: r"""A prefix can't be used with null-aware operators.""", + correctionMessage: r"""Try replacing '?.' with '.'"""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeCatchSyntax = messageCatchSyntax; @@ -905,9 +928,9 @@ const Code codeCatchSyntax = messageCatchSyntax; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageCatchSyntax = const MessageCode("CatchSyntax", index: 84, - message: + problemMessage: r"""'catch' must be followed by '(identifier)' or '(identifier, identifier)'.""", - tip: + correctionMessage: r"""No types are needed, the first is given by 'on', the second is always 'StackTrace'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -918,9 +941,9 @@ const Code codeCatchSyntaxExtraParameters = const MessageCode messageCatchSyntaxExtraParameters = const MessageCode( "CatchSyntaxExtraParameters", index: 83, - message: + problemMessage: r"""'catch' must be followed by '(identifier)' or '(identifier, identifier)'.""", - tip: + correctionMessage: r"""No types are needed, the first is given by 'on', the second is always 'StackTrace'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -929,14 +952,14 @@ const Code codeClassInClass = messageClassInClass; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageClassInClass = const MessageCode("ClassInClass", index: 53, - message: r"""Classes can't be declared inside other classes.""", - tip: r"""Try moving the class to the top-level."""); + problemMessage: r"""Classes can't be declared inside other classes.""", + correctionMessage: r"""Try moving the class to the top-level."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateClassInNullAwareReceiver = const Template( - messageTemplate: r"""The class '#name' cannot be null.""", - tipTemplate: r"""Try replacing '?.' with '.'""", + problemMessageTemplate: r"""The class '#name' cannot be null.""", + correctionMessageTemplate: r"""Try replacing '?.' with '.'""", withArguments: _withArgumentsClassInNullAwareReceiver); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -949,8 +972,8 @@ Message _withArgumentsClassInNullAwareReceiver(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeClassInNullAwareReceiver, - message: """The class '${name}' cannot be null.""", - tip: """Try replacing '?.' with '.'""", + problemMessage: """The class '${name}' cannot be null.""", + correctionMessage: """Try replacing '?.' with '.'""", arguments: {'name': name}); } @@ -961,8 +984,8 @@ const Code codeColonInPlaceOfIn = messageColonInPlaceOfIn; const MessageCode messageColonInPlaceOfIn = const MessageCode( "ColonInPlaceOfIn", index: 54, - message: r"""For-in loops use 'in' rather than a colon.""", - tip: r"""Try replacing the colon with the keyword 'in'."""); + problemMessage: r"""For-in loops use 'in' rather than a colon.""", + correctionMessage: r"""Try replacing the colon with the keyword 'in'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -971,9 +994,10 @@ const Template< String name2)> templateCombinedMemberSignatureFailed = const Template< Message Function(String name, String name2)>( - messageTemplate: + problemMessageTemplate: r"""Class '#name' inherits multiple members named '#name2' with incompatible signatures.""", - tipTemplate: r"""Try adding a declaration of '#name2' to '#name'.""", + correctionMessageTemplate: + r"""Try adding a declaration of '#name2' to '#name'.""", withArguments: _withArgumentsCombinedMemberSignatureFailed); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -990,9 +1014,9 @@ Message _withArgumentsCombinedMemberSignatureFailed(String name, String name2) { if (name2.isEmpty) throw 'No name provided'; name2 = demangleMixinApplicationName(name2); return new Message(codeCombinedMemberSignatureFailed, - message: + problemMessage: """Class '${name}' inherits multiple members named '${name2}' with incompatible signatures.""", - tip: """Try adding a declaration of '${name2}' to '${name}'.""", + correctionMessage: """Try adding a declaration of '${name2}' to '${name}'.""", arguments: {'name': name, 'name2': name2}); } @@ -1004,7 +1028,7 @@ const Code codeCompilingWithSoundNullSafety = const MessageCode messageCompilingWithSoundNullSafety = const MessageCode( "CompilingWithSoundNullSafety", severity: Severity.info, - message: r"""Compiling with sound null safety"""); + problemMessage: r"""Compiling with sound null safety"""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeCompilingWithoutSoundNullSafety = @@ -1014,7 +1038,7 @@ const Code codeCompilingWithoutSoundNullSafety = const MessageCode messageCompilingWithoutSoundNullSafety = const MessageCode( "CompilingWithoutSoundNullSafety", severity: Severity.info, - message: r"""Compiling without sound null safety"""); + problemMessage: r"""Compiling without sound null safety"""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -1023,9 +1047,9 @@ const Template< String string2)> templateConflictingModifiers = const Template< Message Function(String string, String string2)>( - messageTemplate: + problemMessageTemplate: r"""Members can't be declared to be both '#string' and '#string2'.""", - tipTemplate: r"""Try removing one of the keywords.""", + correctionMessageTemplate: r"""Try removing one of the keywords.""", withArguments: _withArgumentsConflictingModifiers); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1040,16 +1064,16 @@ Message _withArgumentsConflictingModifiers(String string, String string2) { if (string.isEmpty) throw 'No string provided'; if (string2.isEmpty) throw 'No string provided'; return new Message(codeConflictingModifiers, - message: + problemMessage: """Members can't be declared to be both '${string}' and '${string2}'.""", - tip: """Try removing one of the keywords.""", + correctionMessage: """Try removing one of the keywords.""", arguments: {'string': string, 'string2': string2}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateConflictsWithConstructor = const Template( - messageTemplate: r"""Conflicts with constructor '#name'.""", + problemMessageTemplate: r"""Conflicts with constructor '#name'.""", withArguments: _withArgumentsConflictsWithConstructor); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1062,14 +1086,14 @@ Message _withArgumentsConflictsWithConstructor(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeConflictsWithConstructor, - message: """Conflicts with constructor '${name}'.""", + problemMessage: """Conflicts with constructor '${name}'.""", arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateConflictsWithFactory = const Template( - messageTemplate: r"""Conflicts with factory '#name'.""", + problemMessageTemplate: r"""Conflicts with factory '#name'.""", withArguments: _withArgumentsConflictsWithFactory); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1083,7 +1107,7 @@ Message _withArgumentsConflictsWithFactory(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeConflictsWithFactory, - message: """Conflicts with factory '${name}'.""", + problemMessage: """Conflicts with factory '${name}'.""", arguments: {'name': name}); } @@ -1091,7 +1115,7 @@ Message _withArgumentsConflictsWithFactory(String name) { const Template templateConflictsWithImplicitSetter = const Template( - messageTemplate: + problemMessageTemplate: r"""Conflicts with the implicit setter of the field '#name'.""", withArguments: _withArgumentsConflictsWithImplicitSetter); @@ -1105,14 +1129,15 @@ Message _withArgumentsConflictsWithImplicitSetter(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeConflictsWithImplicitSetter, - message: """Conflicts with the implicit setter of the field '${name}'.""", + problemMessage: + """Conflicts with the implicit setter of the field '${name}'.""", arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateConflictsWithMember = const Template( - messageTemplate: r"""Conflicts with member '#name'.""", + problemMessageTemplate: r"""Conflicts with member '#name'.""", withArguments: _withArgumentsConflictsWithMember); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1125,14 +1150,14 @@ Message _withArgumentsConflictsWithMember(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeConflictsWithMember, - message: """Conflicts with member '${name}'.""", + problemMessage: """Conflicts with member '${name}'.""", arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateConflictsWithSetter = const Template( - messageTemplate: r"""Conflicts with setter '#name'.""", + problemMessageTemplate: r"""Conflicts with setter '#name'.""", withArguments: _withArgumentsConflictsWithSetter); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1145,7 +1170,7 @@ Message _withArgumentsConflictsWithSetter(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeConflictsWithSetter, - message: """Conflicts with setter '${name}'.""", + problemMessage: """Conflicts with setter '${name}'.""", arguments: {'name': name}); } @@ -1153,7 +1178,7 @@ Message _withArgumentsConflictsWithSetter(String name) { const Template templateConflictsWithTypeVariable = const Template( - messageTemplate: r"""Conflicts with type variable '#name'.""", + problemMessageTemplate: r"""Conflicts with type variable '#name'.""", withArguments: _withArgumentsConflictsWithTypeVariable); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1166,7 +1191,7 @@ Message _withArgumentsConflictsWithTypeVariable(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeConflictsWithTypeVariable, - message: """Conflicts with type variable '${name}'.""", + problemMessage: """Conflicts with type variable '${name}'.""", arguments: {'name': name}); } @@ -1178,7 +1203,7 @@ const Code codeConflictsWithTypeVariableCause = const MessageCode messageConflictsWithTypeVariableCause = const MessageCode( "ConflictsWithTypeVariableCause", severity: Severity.context, - message: r"""This is the type variable."""); + problemMessage: r"""This is the type variable."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeConstAndFinal = messageConstAndFinal; @@ -1186,8 +1211,10 @@ const Code codeConstAndFinal = messageConstAndFinal; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageConstAndFinal = const MessageCode("ConstAndFinal", index: 58, - message: r"""Members can't be declared to be both 'const' and 'final'.""", - tip: r"""Try removing either the 'const' or 'final' keyword."""); + problemMessage: + r"""Members can't be declared to be both 'const' and 'final'.""", + correctionMessage: + r"""Try removing either the 'const' or 'final' keyword."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeConstClass = messageConstClass; @@ -1195,8 +1222,8 @@ const Code codeConstClass = messageConstClass; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageConstClass = const MessageCode("ConstClass", index: 60, - message: r"""Classes can't be declared to be 'const'.""", - tip: + problemMessage: r"""Classes can't be declared to be 'const'.""", + correctionMessage: r"""Try removing the 'const' keyword. If you're trying to indicate that instances of the class can be constants, place the 'const' keyword on the class' constructor(s)."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1206,7 +1233,8 @@ const Code codeConstConstructorLateFinalFieldCause = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageConstConstructorLateFinalFieldCause = const MessageCode("ConstConstructorLateFinalFieldCause", - severity: Severity.context, message: r"""This constructor is const."""); + severity: Severity.context, + problemMessage: r"""This constructor is const."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeConstConstructorLateFinalFieldError = @@ -1215,7 +1243,7 @@ const Code codeConstConstructorLateFinalFieldError = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageConstConstructorLateFinalFieldError = const MessageCode( "ConstConstructorLateFinalFieldError", - message: + problemMessage: r"""Can't have a late final field in a class with a const constructor."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1226,7 +1254,8 @@ const Code codeConstConstructorNonFinalField = const MessageCode messageConstConstructorNonFinalField = const MessageCode( "ConstConstructorNonFinalField", analyzerCodes: ["CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD"], - message: r"""Constructor is marked 'const' so all fields must be final."""); + problemMessage: + r"""Constructor is marked 'const' so all fields must be final."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeConstConstructorNonFinalFieldCause = @@ -1236,7 +1265,7 @@ const Code codeConstConstructorNonFinalFieldCause = const MessageCode messageConstConstructorNonFinalFieldCause = const MessageCode( "ConstConstructorNonFinalFieldCause", severity: Severity.context, - message: r"""Field isn't final, but constructor is 'const'."""); + problemMessage: r"""Field isn't final, but constructor is 'const'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeConstConstructorRedirectionToNonConst = @@ -1245,7 +1274,7 @@ const Code codeConstConstructorRedirectionToNonConst = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageConstConstructorRedirectionToNonConst = const MessageCode("ConstConstructorRedirectionToNonConst", - message: + problemMessage: r"""A constant constructor can't call a non-constant constructor."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1255,8 +1284,9 @@ const Code codeConstConstructorWithBody = messageConstConstructorWithBody; const MessageCode messageConstConstructorWithBody = const MessageCode( "ConstConstructorWithBody", analyzerCodes: ["CONST_CONSTRUCTOR_WITH_BODY"], - message: r"""A const constructor can't have a body.""", - tip: r"""Try removing either the 'const' keyword or the body."""); + problemMessage: r"""A const constructor can't have a body.""", + correctionMessage: + r"""Try removing either the 'const' keyword or the body."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeConstConstructorWithNonConstSuper = @@ -1266,7 +1296,7 @@ const Code codeConstConstructorWithNonConstSuper = const MessageCode messageConstConstructorWithNonConstSuper = const MessageCode( "ConstConstructorWithNonConstSuper", analyzerCodes: ["CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER"], - message: + problemMessage: r"""A constant constructor can't call a non-constant super constructor."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1276,14 +1306,15 @@ const Code codeConstEvalCircularity = messageConstEvalCircularity; const MessageCode messageConstEvalCircularity = const MessageCode( "ConstEvalCircularity", analyzerCodes: ["RECURSIVE_COMPILE_TIME_CONSTANT"], - message: r"""Constant expression depends on itself."""); + problemMessage: r"""Constant expression depends on itself."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeConstEvalContext = messageConstEvalContext; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const MessageCode messageConstEvalContext = - const MessageCode("ConstEvalContext", message: r"""While analyzing:"""); +const MessageCode messageConstEvalContext = const MessageCode( + "ConstEvalContext", + problemMessage: r"""While analyzing:"""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -1291,9 +1322,9 @@ const Template< String nameOKEmpty)> templateConstEvalDeferredLibrary = const Template< Message Function(String nameOKEmpty)>( - messageTemplate: + 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.""", - tipTemplate: + correctionMessageTemplate: r"""Try moving the constant from the deferred library, or removing 'deferred' from the import. """, withArguments: _withArgumentsConstEvalDeferredLibrary); @@ -1310,9 +1341,9 @@ Message _withArgumentsConstEvalDeferredLibrary(String nameOKEmpty) { // ignore: unnecessary_null_comparison if (nameOKEmpty == null || nameOKEmpty.isEmpty) nameOKEmpty = '(unnamed)'; return new Message(codeConstEvalDeferredLibrary, - message: + problemMessage: """'${nameOKEmpty}' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded.""", - tip: """Try moving the constant from the deferred library, or removing 'deferred' from the import. + correctionMessage: """Try moving the constant from the deferred library, or removing 'deferred' from the import. """, arguments: {'nameOKEmpty': nameOKEmpty}); } @@ -1320,7 +1351,8 @@ Message _withArgumentsConstEvalDeferredLibrary(String nameOKEmpty) { // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateConstEvalError = const Template( - messageTemplate: r"""Error evaluating constant expression: #string""", + problemMessageTemplate: + r"""Error evaluating constant expression: #string""", withArguments: _withArgumentsConstEvalError); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1333,7 +1365,7 @@ const Code codeConstEvalError = Message _withArgumentsConstEvalError(String string) { if (string.isEmpty) throw 'No string provided'; return new Message(codeConstEvalError, - message: """Error evaluating constant expression: ${string}""", + problemMessage: """Error evaluating constant expression: ${string}""", arguments: {'string': string}); } @@ -1344,7 +1376,7 @@ const Code codeConstEvalExtension = messageConstEvalExtension; const MessageCode messageConstEvalExtension = const MessageCode( "ConstEvalExtension", analyzerCodes: ["NOT_CONSTANT_EXPRESSION"], - message: + problemMessage: r"""Extension operations can't be used in constant expressions."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1354,7 +1386,7 @@ const Code codeConstEvalExternalConstructor = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageConstEvalExternalConstructor = const MessageCode( "ConstEvalExternalConstructor", - message: + problemMessage: r"""External constructors can't be evaluated in constant expressions."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1363,7 +1395,7 @@ const Code codeConstEvalExternalFactory = messageConstEvalExternalFactory; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageConstEvalExternalFactory = const MessageCode( "ConstEvalExternalFactory", - message: + problemMessage: r"""External factory constructors can't be evaluated in constant expressions."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1373,13 +1405,13 @@ const Code codeConstEvalFailedAssertion = messageConstEvalFailedAssertion; const MessageCode messageConstEvalFailedAssertion = const MessageCode( "ConstEvalFailedAssertion", analyzerCodes: ["CONST_EVAL_THROWS_EXCEPTION"], - message: r"""This assertion failed."""); + problemMessage: r"""This assertion failed."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateConstEvalFailedAssertionWithMessage = const Template( - messageTemplate: + problemMessageTemplate: r"""This assertion failed with message: #stringOKEmpty""", withArguments: _withArgumentsConstEvalFailedAssertionWithMessage); @@ -1396,7 +1428,8 @@ Message _withArgumentsConstEvalFailedAssertionWithMessage( // ignore: unnecessary_null_comparison if (stringOKEmpty == null || stringOKEmpty.isEmpty) stringOKEmpty = '(empty)'; return new Message(codeConstEvalFailedAssertionWithMessage, - message: """This assertion failed with message: ${stringOKEmpty}""", + problemMessage: + """This assertion failed with message: ${stringOKEmpty}""", arguments: {'stringOKEmpty': stringOKEmpty}); } @@ -1404,7 +1437,7 @@ Message _withArgumentsConstEvalFailedAssertionWithMessage( const Template templateConstEvalGetterNotFound = const Template( - messageTemplate: r"""Variable get not found: '#nameOKEmpty'""", + problemMessageTemplate: r"""Variable get not found: '#nameOKEmpty'""", withArguments: _withArgumentsConstEvalGetterNotFound); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1418,7 +1451,7 @@ Message _withArgumentsConstEvalGetterNotFound(String nameOKEmpty) { // ignore: unnecessary_null_comparison if (nameOKEmpty == null || nameOKEmpty.isEmpty) nameOKEmpty = '(unnamed)'; return new Message(codeConstEvalGetterNotFound, - message: """Variable get not found: '${nameOKEmpty}'""", + problemMessage: """Variable get not found: '${nameOKEmpty}'""", arguments: {'nameOKEmpty': nameOKEmpty}); } @@ -1426,7 +1459,7 @@ Message _withArgumentsConstEvalGetterNotFound(String nameOKEmpty) { const Template templateConstEvalInvalidStaticInvocation = const Template( - messageTemplate: + problemMessageTemplate: r"""The invocation of '#nameOKEmpty' is not allowed in a constant expression.""", withArguments: _withArgumentsConstEvalInvalidStaticInvocation); @@ -1442,7 +1475,7 @@ Message _withArgumentsConstEvalInvalidStaticInvocation(String nameOKEmpty) { // ignore: unnecessary_null_comparison if (nameOKEmpty == null || nameOKEmpty.isEmpty) nameOKEmpty = '(unnamed)'; return new Message(codeConstEvalInvalidStaticInvocation, - message: + problemMessage: """The invocation of '${nameOKEmpty}' is not allowed in a constant expression.""", arguments: {'nameOKEmpty': nameOKEmpty}); } @@ -1455,7 +1488,7 @@ const Template< String string3)> templateConstEvalNegativeShift = const Template< Message Function(String string, String string2, String string3)>( - messageTemplate: + problemMessageTemplate: r"""Binary operator '#string' on '#string2' requires non-negative operand, but was '#string3'.""", withArguments: _withArgumentsConstEvalNegativeShift); @@ -1473,7 +1506,7 @@ Message _withArgumentsConstEvalNegativeShift( if (string2.isEmpty) throw 'No string provided'; if (string3.isEmpty) throw 'No string provided'; return new Message(codeConstEvalNegativeShift, - message: + problemMessage: """Binary operator '${string}' on '${string2}' requires non-negative operand, but was '${string3}'.""", arguments: {'string': string, 'string2': string2, 'string3': string3}); } @@ -1484,7 +1517,7 @@ const Template< String nameOKEmpty)> templateConstEvalNonConstantVariableGet = const Template< Message Function(String nameOKEmpty)>( - messageTemplate: + problemMessageTemplate: r"""The variable '#nameOKEmpty' is not a constant, only constant expressions are allowed.""", withArguments: _withArgumentsConstEvalNonConstantVariableGet); @@ -1500,7 +1533,7 @@ Message _withArgumentsConstEvalNonConstantVariableGet(String nameOKEmpty) { // ignore: unnecessary_null_comparison if (nameOKEmpty == null || nameOKEmpty.isEmpty) nameOKEmpty = '(unnamed)'; return new Message(codeConstEvalNonConstantVariableGet, - message: + problemMessage: """The variable '${nameOKEmpty}' is not a constant, only constant expressions are allowed.""", arguments: {'nameOKEmpty': nameOKEmpty}); } @@ -1511,7 +1544,7 @@ const Code codeConstEvalNonNull = messageConstEvalNonNull; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageConstEvalNonNull = const MessageCode( "ConstEvalNonNull", - message: r"""Constant expression must be non-null."""); + problemMessage: r"""Constant expression must be non-null."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeConstEvalNotListOrSetInSpread = @@ -1521,7 +1554,7 @@ const Code codeConstEvalNotListOrSetInSpread = const MessageCode messageConstEvalNotListOrSetInSpread = const MessageCode( "ConstEvalNotListOrSetInSpread", analyzerCodes: ["CONST_SPREAD_EXPECTED_LIST_OR_SET"], - message: + problemMessage: r"""Only lists and sets can be used in spreads in constant lists and sets."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1531,7 +1564,7 @@ const Code codeConstEvalNotMapInSpread = messageConstEvalNotMapInSpread; const MessageCode messageConstEvalNotMapInSpread = const MessageCode( "ConstEvalNotMapInSpread", analyzerCodes: ["CONST_SPREAD_EXPECTED_MAP"], - message: r"""Only maps can be used in spreads in constant maps."""); + problemMessage: r"""Only maps can be used in spreads in constant maps."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeConstEvalNullValue = messageConstEvalNullValue; @@ -1540,7 +1573,7 @@ const Code codeConstEvalNullValue = messageConstEvalNullValue; const MessageCode messageConstEvalNullValue = const MessageCode( "ConstEvalNullValue", analyzerCodes: ["CONST_EVAL_THROWS_EXCEPTION"], - message: r"""Null value during constant evaluation."""); + problemMessage: r"""Null value during constant evaluation."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeConstEvalStartingPoint = messageConstEvalStartingPoint; @@ -1548,7 +1581,7 @@ const Code codeConstEvalStartingPoint = messageConstEvalStartingPoint; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageConstEvalStartingPoint = const MessageCode( "ConstEvalStartingPoint", - message: r"""Constant evaluation error:"""); + problemMessage: r"""Constant evaluation error:"""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -1557,7 +1590,7 @@ const Template< String string2)> templateConstEvalTruncateError = const Template< Message Function(String string, String string2)>( - messageTemplate: + problemMessageTemplate: r"""Binary operator '#string ~/ #string2' results is Infinity or NaN.""", withArguments: _withArgumentsConstEvalTruncateError); @@ -1573,7 +1606,7 @@ Message _withArgumentsConstEvalTruncateError(String string, String string2) { if (string.isEmpty) throw 'No string provided'; if (string2.isEmpty) throw 'No string provided'; return new Message(codeConstEvalTruncateError, - message: + problemMessage: """Binary operator '${string} ~/ ${string2}' results is Infinity or NaN.""", arguments: {'string': string, 'string2': string2}); } @@ -1584,13 +1617,13 @@ const Code codeConstEvalUnevaluated = messageConstEvalUnevaluated; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageConstEvalUnevaluated = const MessageCode( "ConstEvalUnevaluated", - message: r"""Couldn't evaluate constant expression."""); + problemMessage: r"""Couldn't evaluate constant expression."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateConstEvalUnhandledCoreException = const Template( - messageTemplate: r"""Unhandled core exception: #stringOKEmpty""", + problemMessageTemplate: r"""Unhandled core exception: #stringOKEmpty""", withArguments: _withArgumentsConstEvalUnhandledCoreException); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1605,7 +1638,7 @@ Message _withArgumentsConstEvalUnhandledCoreException(String stringOKEmpty) { // ignore: unnecessary_null_comparison if (stringOKEmpty == null || stringOKEmpty.isEmpty) stringOKEmpty = '(empty)'; return new Message(codeConstEvalUnhandledCoreException, - message: """Unhandled core exception: ${stringOKEmpty}""", + problemMessage: """Unhandled core exception: ${stringOKEmpty}""", arguments: {'stringOKEmpty': stringOKEmpty}); } @@ -1616,7 +1649,7 @@ const Template< String string2)> templateConstEvalZeroDivisor = const Template< Message Function(String string, String string2)>( - messageTemplate: + problemMessageTemplate: r"""Binary operator '#string' on '#string2' requires non-zero divisor, but divisor was '0'.""", withArguments: _withArgumentsConstEvalZeroDivisor); @@ -1632,7 +1665,7 @@ Message _withArgumentsConstEvalZeroDivisor(String string, String string2) { if (string.isEmpty) throw 'No string provided'; if (string2.isEmpty) throw 'No string provided'; return new Message(codeConstEvalZeroDivisor, - message: + problemMessage: """Binary operator '${string}' on '${string2}' requires non-zero divisor, but divisor was '0'.""", arguments: {'string': string, 'string2': string2}); } @@ -1643,9 +1676,9 @@ const Code codeConstFactory = messageConstFactory; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageConstFactory = const MessageCode("ConstFactory", index: 62, - message: + problemMessage: r"""Only redirecting factory constructors can be declared to be 'const'.""", - tip: + correctionMessage: r"""Try removing the 'const' keyword, or replacing the body with '=' followed by a valid target."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1656,9 +1689,9 @@ const Code codeConstFactoryRedirectionToNonConst = const MessageCode messageConstFactoryRedirectionToNonConst = const MessageCode( "ConstFactoryRedirectionToNonConst", analyzerCodes: ["REDIRECT_TO_NON_CONST_CONSTRUCTOR"], - message: + problemMessage: r"""Constant factory constructor can't delegate to a non-constant constructor.""", - tip: + correctionMessage: r"""Try redirecting to a different constructor or marking the target constructor 'const'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1667,8 +1700,9 @@ const Template< String name)> templateConstFieldWithoutInitializer = const Template< Message Function(String name)>( - messageTemplate: r"""The const variable '#name' must be initialized.""", - tipTemplate: + problemMessageTemplate: + r"""The const variable '#name' must be initialized.""", + correctionMessageTemplate: r"""Try adding an initializer ('= expression') to the declaration.""", withArguments: _withArgumentsConstFieldWithoutInitializer); @@ -1682,8 +1716,9 @@ Message _withArgumentsConstFieldWithoutInitializer(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeConstFieldWithoutInitializer, - message: """The const variable '${name}' must be initialized.""", - tip: """Try adding an initializer ('= expression') to the declaration.""", + problemMessage: """The const variable '${name}' must be initialized.""", + correctionMessage: + """Try adding an initializer ('= expression') to the declaration.""", arguments: {'name': name}); } @@ -1694,8 +1729,8 @@ const Code codeConstInstanceField = messageConstInstanceField; const MessageCode messageConstInstanceField = const MessageCode( "ConstInstanceField", analyzerCodes: ["CONST_INSTANCE_FIELD"], - message: r"""Only static fields can be declared as const.""", - tip: + problemMessage: r"""Only static fields can be declared as const.""", + correctionMessage: r"""Try using 'final' instead of 'const', or adding the keyword 'static'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1704,9 +1739,9 @@ const Code codeConstMethod = messageConstMethod; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageConstMethod = const MessageCode("ConstMethod", index: 63, - message: + problemMessage: r"""Getters, setters and methods can't be declared to be 'const'.""", - tip: r"""Try removing the 'const' keyword."""); + correctionMessage: r"""Try removing the 'const' keyword."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeConstructorCyclic = messageConstructorCyclic; @@ -1715,15 +1750,15 @@ const Code codeConstructorCyclic = messageConstructorCyclic; const MessageCode messageConstructorCyclic = const MessageCode( "ConstructorCyclic", analyzerCodes: ["RECURSIVE_CONSTRUCTOR_REDIRECT"], - message: r"""Redirecting constructors can't be cyclic.""", - tip: + problemMessage: r"""Redirecting constructors can't be cyclic.""", + correctionMessage: r"""Try to have all constructors eventually redirect to a non-redirecting constructor."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateConstructorInitializeSameInstanceVariableSeveralTimes = const Template( - messageTemplate: + problemMessageTemplate: r"""'#name' was already initialized by this constructor.""", withArguments: _withArgumentsConstructorInitializeSameInstanceVariableSeveralTimes); @@ -1741,14 +1776,15 @@ Message _withArgumentsConstructorInitializeSameInstanceVariableSeveralTimes( if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeConstructorInitializeSameInstanceVariableSeveralTimes, - message: """'${name}' was already initialized by this constructor.""", + problemMessage: + """'${name}' was already initialized by this constructor.""", arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateConstructorNotFound = const Template( - messageTemplate: r"""Couldn't find constructor '#name'.""", + problemMessageTemplate: r"""Couldn't find constructor '#name'.""", withArguments: _withArgumentsConstructorNotFound); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1761,7 +1797,7 @@ Message _withArgumentsConstructorNotFound(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeConstructorNotFound, - message: """Couldn't find constructor '${name}'.""", + problemMessage: """Couldn't find constructor '${name}'.""", arguments: {'name': name}); } @@ -1772,7 +1808,7 @@ const Code codeConstructorNotSync = messageConstructorNotSync; const MessageCode messageConstructorNotSync = const MessageCode( "ConstructorNotSync", analyzerCodes: ["NON_SYNC_CONSTRUCTOR"], - message: + problemMessage: r"""Constructor bodies can't use 'async', 'async*', or 'sync*'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1782,9 +1818,9 @@ const Code codeConstructorTearOffWithTypeArguments = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageConstructorTearOffWithTypeArguments = const MessageCode( "ConstructorTearOffWithTypeArguments", - message: + problemMessage: r"""A constructor tear-off can't have type arguments after the constructor name.""", - tip: + correctionMessage: r"""Try removing the type arguments or placing them after the class name."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1795,8 +1831,8 @@ const Code codeConstructorWithReturnType = const MessageCode messageConstructorWithReturnType = const MessageCode( "ConstructorWithReturnType", index: 55, - message: r"""Constructors can't have a return type.""", - tip: r"""Try removing the return type."""); + problemMessage: r"""Constructors can't have a return type.""", + correctionMessage: r"""Try removing the return type."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeConstructorWithTypeArguments = @@ -1806,9 +1842,9 @@ const Code codeConstructorWithTypeArguments = const MessageCode messageConstructorWithTypeArguments = const MessageCode( "ConstructorWithTypeArguments", index: 118, - message: + problemMessage: r"""A constructor invocation can't have type arguments after the constructor name.""", - tip: + correctionMessage: r"""Try removing the type arguments or placing them after the class name."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1819,8 +1855,8 @@ const Code codeConstructorWithTypeParameters = const MessageCode messageConstructorWithTypeParameters = const MessageCode( "ConstructorWithTypeParameters", index: 99, - message: r"""Constructors can't have type parameters.""", - tip: r"""Try removing the type parameters."""); + problemMessage: r"""Constructors can't have type parameters.""", + correctionMessage: r"""Try removing the type parameters."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeConstructorWithWrongName = messageConstructorWithWrongName; @@ -1829,14 +1865,15 @@ const Code codeConstructorWithWrongName = messageConstructorWithWrongName; const MessageCode messageConstructorWithWrongName = const MessageCode( "ConstructorWithWrongName", index: 102, - message: + problemMessage: r"""The name of a constructor must match the name of the enclosing class."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateConstructorWithWrongNameContext = const Template( - messageTemplate: r"""The name of the enclosing class is '#name'.""", + problemMessageTemplate: + r"""The name of the enclosing class is '#name'.""", withArguments: _withArgumentsConstructorWithWrongNameContext); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1849,7 +1886,7 @@ Message _withArgumentsConstructorWithWrongNameContext(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeConstructorWithWrongNameContext, - message: """The name of the enclosing class is '${name}'.""", + problemMessage: """The name of the enclosing class is '${name}'.""", arguments: {'name': name}); } @@ -1860,7 +1897,7 @@ const Code codeContinueLabelNotTarget = messageContinueLabelNotTarget; const MessageCode messageContinueLabelNotTarget = const MessageCode( "ContinueLabelNotTarget", analyzerCodes: ["LABEL_UNDEFINED"], - message: r"""Target of continue must be a label."""); + problemMessage: r"""Target of continue must be a label."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeContinueOutsideOfLoop = messageContinueOutsideOfLoop; @@ -1869,15 +1906,15 @@ const Code codeContinueOutsideOfLoop = messageContinueOutsideOfLoop; const MessageCode messageContinueOutsideOfLoop = const MessageCode( "ContinueOutsideOfLoop", index: 2, - message: + problemMessage: r"""A continue statement can't be used outside of a loop or switch statement.""", - tip: r"""Try removing the continue statement."""); + correctionMessage: r"""Try removing the continue statement."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateContinueTargetOutsideFunction = const Template( - messageTemplate: + problemMessageTemplate: r"""Can't continue at '#name' in a different function.""", withArguments: _withArgumentsContinueTargetOutsideFunction); @@ -1891,7 +1928,8 @@ Message _withArgumentsContinueTargetOutsideFunction(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeContinueTargetOutsideFunction, - message: """Can't continue at '${name}' in a different function.""", + problemMessage: + """Can't continue at '${name}' in a different function.""", arguments: {'name': name}); } @@ -1903,16 +1941,16 @@ const Code codeContinueWithoutLabelInCase = const MessageCode messageContinueWithoutLabelInCase = const MessageCode( "ContinueWithoutLabelInCase", index: 64, - message: + problemMessage: r"""A continue statement in a switch statement must have a label as a target.""", - tip: + correctionMessage: r"""Try adding a label associated with one of the case clauses to the continue statement."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateCouldNotParseUri = const Template( - messageTemplate: r"""Couldn't parse URI '#string': + problemMessageTemplate: r"""Couldn't parse URI '#string': #string2.""", withArguments: _withArgumentsCouldNotParseUri); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1927,7 +1965,7 @@ Message _withArgumentsCouldNotParseUri(String string, String string2) { if (string.isEmpty) throw 'No string provided'; if (string2.isEmpty) throw 'No string provided'; return new Message(codeCouldNotParseUri, - message: """Couldn't parse URI '${string}': + problemMessage: """Couldn't parse URI '${string}': ${string2}.""", arguments: {'string': string, 'string2': string2}); } @@ -1938,9 +1976,10 @@ const Code codeCovariantAndStatic = messageCovariantAndStatic; const MessageCode messageCovariantAndStatic = const MessageCode( "CovariantAndStatic", index: 66, - message: + problemMessage: r"""Members can't be declared to be both 'covariant' and 'static'.""", - tip: r"""Try removing either the 'covariant' or 'static' keyword."""); + correctionMessage: + r"""Try removing either the 'covariant' or 'static' keyword."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeCovariantMember = messageCovariantMember; @@ -1948,21 +1987,19 @@ const Code codeCovariantMember = messageCovariantMember; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageCovariantMember = const MessageCode("CovariantMember", index: 67, - message: + problemMessage: r"""Getters, setters and methods can't be declared to be 'covariant'.""", - tip: r"""Try removing the 'covariant' keyword."""); + correctionMessage: r"""Try removing the 'covariant' keyword."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template< - Message Function( - String name, - String - string)> templateCycleInTypeVariables = const Template< - Message Function(String name, String string)>( - messageTemplate: r"""Type '#name' is a bound of itself via '#string'.""", - tipTemplate: - r"""Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle.""", - withArguments: _withArgumentsCycleInTypeVariables); +const Template + templateCycleInTypeVariables = + const Template( + problemMessageTemplate: + r"""Type '#name' is a bound of itself via '#string'.""", + correctionMessageTemplate: + r"""Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle.""", + withArguments: _withArgumentsCycleInTypeVariables); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code @@ -1977,8 +2014,9 @@ Message _withArgumentsCycleInTypeVariables(String name, String string) { name = demangleMixinApplicationName(name); if (string.isEmpty) throw 'No string provided'; return new Message(codeCycleInTypeVariables, - message: """Type '${name}' is a bound of itself via '${string}'.""", - tip: + problemMessage: + """Type '${name}' is a bound of itself via '${string}'.""", + correctionMessage: """Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle.""", arguments: {'name': name, 'string': string}); } @@ -1986,7 +2024,7 @@ Message _withArgumentsCycleInTypeVariables(String name, String string) { // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateCyclicClassHierarchy = const Template( - messageTemplate: r"""'#name' is a supertype of itself.""", + problemMessageTemplate: r"""'#name' is a supertype of itself.""", withArguments: _withArgumentsCyclicClassHierarchy); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1999,7 +2037,7 @@ Message _withArgumentsCyclicClassHierarchy(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeCyclicClassHierarchy, - message: """'${name}' is a supertype of itself.""", + problemMessage: """'${name}' is a supertype of itself.""", arguments: {'name': name}); } @@ -2007,7 +2045,7 @@ Message _withArgumentsCyclicClassHierarchy(String name) { const Template templateCyclicRedirectingFactoryConstructors = const Template( - messageTemplate: r"""Cyclic definition of factory '#name'.""", + problemMessageTemplate: r"""Cyclic definition of factory '#name'.""", withArguments: _withArgumentsCyclicRedirectingFactoryConstructors); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -2022,14 +2060,15 @@ Message _withArgumentsCyclicRedirectingFactoryConstructors(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeCyclicRedirectingFactoryConstructors, - message: """Cyclic definition of factory '${name}'.""", + problemMessage: """Cyclic definition of factory '${name}'.""", arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateCyclicTypedef = const Template( - messageTemplate: r"""The typedef '#name' has a reference to itself.""", + problemMessageTemplate: + r"""The typedef '#name' has a reference to itself.""", withArguments: _withArgumentsCyclicTypedef); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -2042,7 +2081,7 @@ Message _withArgumentsCyclicTypedef(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeCyclicTypedef, - message: """The typedef '${name}' has a reference to itself.""", + problemMessage: """The typedef '${name}' has a reference to itself.""", arguments: {'name': name}); } @@ -2050,7 +2089,7 @@ Message _withArgumentsCyclicTypedef(String name) { const Template templateDebugTrace = const Template( - messageTemplate: r"""Fatal '#name' at: + problemMessageTemplate: r"""Fatal '#name' at: #string""", withArguments: _withArgumentsDebugTrace); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -2063,7 +2102,7 @@ Message _withArgumentsDebugTrace(String name, String string) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); if (string.isEmpty) throw 'No string provided'; - return new Message(codeDebugTrace, message: """Fatal '${name}' at: + return new Message(codeDebugTrace, problemMessage: """Fatal '${name}' at: ${string}""", arguments: {'name': name, 'string': string}); } @@ -2075,7 +2114,7 @@ const Code codeDeclaredMemberConflictsWithInheritedMember = const MessageCode messageDeclaredMemberConflictsWithInheritedMember = const MessageCode("DeclaredMemberConflictsWithInheritedMember", analyzerCodes: ["DECLARED_MEMBER_CONFLICTS_WITH_INHERITED"], - message: + problemMessage: r"""Can't declare a member that conflicts with an inherited one."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -2086,7 +2125,7 @@ const Code codeDeclaredMemberConflictsWithInheritedMemberCause = const MessageCode messageDeclaredMemberConflictsWithInheritedMemberCause = const MessageCode("DeclaredMemberConflictsWithInheritedMemberCause", severity: Severity.context, - message: r"""This is the inherited member."""); + problemMessage: r"""This is the inherited member."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeDeclaredMemberConflictsWithOverriddenMembersCause = @@ -2096,7 +2135,7 @@ const Code codeDeclaredMemberConflictsWithOverriddenMembersCause = const MessageCode messageDeclaredMemberConflictsWithOverriddenMembersCause = const MessageCode("DeclaredMemberConflictsWithOverriddenMembersCause", severity: Severity.context, - message: r"""This is one of the overridden members."""); + problemMessage: r"""This is one of the overridden members."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeDefaultListConstructorError = @@ -2105,16 +2144,16 @@ const Code codeDefaultListConstructorError = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageDefaultListConstructorError = const MessageCode( "DefaultListConstructorError", - message: r"""Can't use the default List constructor.""", - tip: r"""Try using List.filled instead."""); + problemMessage: r"""Can't use the default List constructor.""", + correctionMessage: r"""Try using List.filled instead."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateDefaultValueInRedirectingFactoryConstructor = const Template( - messageTemplate: + problemMessageTemplate: r"""Can't have a default value here because any default values of '#name' would be used instead.""", - tipTemplate: r"""Try removing the default value.""", + correctionMessageTemplate: r"""Try removing the default value.""", withArguments: _withArgumentsDefaultValueInRedirectingFactoryConstructor); @@ -2132,9 +2171,9 @@ Message _withArgumentsDefaultValueInRedirectingFactoryConstructor(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeDefaultValueInRedirectingFactoryConstructor, - message: + problemMessage: """Can't have a default value here because any default values of '${name}' would be used instead.""", - tip: """Try removing the default value.""", + correctionMessage: """Try removing the default value.""", arguments: {'name': name}); } @@ -2145,9 +2184,10 @@ const Code codeDeferredAfterPrefix = messageDeferredAfterPrefix; const MessageCode messageDeferredAfterPrefix = const MessageCode( "DeferredAfterPrefix", index: 68, - message: + problemMessage: r"""The deferred keyword should come immediately before the prefix ('as' clause).""", - tip: r"""Try moving the deferred keyword before the prefix."""); + correctionMessage: + r"""Try moving the deferred keyword before the prefix."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -2155,9 +2195,10 @@ const Template< String name)> templateDeferredExtensionImport = const Template< Message Function(String name)>( - messageTemplate: + problemMessageTemplate: r"""Extension '#name' cannot be imported through a deferred import.""", - tipTemplate: r"""Try adding the `hide #name` to the import.""", + correctionMessageTemplate: + r"""Try adding the `hide #name` to the import.""", withArguments: _withArgumentsDeferredExtensionImport); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -2171,9 +2212,9 @@ Message _withArgumentsDeferredExtensionImport(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeDeferredExtensionImport, - message: + problemMessage: """Extension '${name}' cannot be imported through a deferred import.""", - tip: """Try adding the `hide ${name}` to the import.""", + correctionMessage: """Try adding the `hide ${name}` to the import.""", arguments: {'name': name}); } @@ -2183,7 +2224,7 @@ const Template< String name)> templateDeferredPrefixDuplicated = const Template< Message Function(String name)>( - messageTemplate: + problemMessageTemplate: r"""Can't use the name '#name' for a deferred library, as the name is used elsewhere.""", withArguments: _withArgumentsDeferredPrefixDuplicated); @@ -2197,7 +2238,7 @@ Message _withArgumentsDeferredPrefixDuplicated(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeDeferredPrefixDuplicated, - message: + problemMessage: """Can't use the name '${name}' for a deferred library, as the name is used elsewhere.""", arguments: {'name': name}); } @@ -2206,7 +2247,7 @@ Message _withArgumentsDeferredPrefixDuplicated(String name) { const Template templateDeferredPrefixDuplicatedCause = const Template( - messageTemplate: r"""'#name' is used here.""", + problemMessageTemplate: r"""'#name' is used here.""", withArguments: _withArgumentsDeferredPrefixDuplicatedCause); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -2219,7 +2260,7 @@ Message _withArgumentsDeferredPrefixDuplicatedCause(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeDeferredPrefixDuplicatedCause, - message: """'${name}' is used here.""", arguments: {'name': name}); + problemMessage: """'${name}' is used here.""", arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -2229,7 +2270,7 @@ const Template< templateDillOutlineSummary = const Template< Message Function( int count, int count2, num _num1, num _num2, num _num3)>( - messageTemplate: + problemMessageTemplate: r"""Indexed #count libraries (#count2 bytes) in #num1%.3ms, that is, #num2%12.3 bytes/ms, and #num3%12.3 ms/libraries.""", @@ -2260,7 +2301,7 @@ Message _withArgumentsDillOutlineSummary( if (_num3 == null) throw 'No number provided'; String num3 = _num3.toStringAsFixed(3).padLeft(12); return new Message(codeDillOutlineSummary, - message: + problemMessage: """Indexed ${count} libraries (${count2} bytes) in ${num1}ms, that is, ${num2} bytes/ms, and ${num3} ms/libraries.""", @@ -2279,8 +2320,8 @@ const Template< String name)> templateDirectCycleInTypeVariables = const Template< Message Function(String name)>( - messageTemplate: r"""Type '#name' can't use itself as a bound.""", - tipTemplate: + problemMessageTemplate: r"""Type '#name' can't use itself as a bound.""", + correctionMessageTemplate: r"""Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle.""", withArguments: _withArgumentsDirectCycleInTypeVariables); @@ -2294,8 +2335,8 @@ Message _withArgumentsDirectCycleInTypeVariables(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeDirectCycleInTypeVariables, - message: """Type '${name}' can't use itself as a bound.""", - tip: + problemMessage: """Type '${name}' can't use itself as a bound.""", + correctionMessage: """Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle.""", arguments: {'name': name}); } @@ -2308,8 +2349,9 @@ const Code codeDirectiveAfterDeclaration = const MessageCode messageDirectiveAfterDeclaration = const MessageCode( "DirectiveAfterDeclaration", index: 69, - message: r"""Directives must appear before any declarations.""", - tip: r"""Try moving the directive before any declarations."""); + problemMessage: r"""Directives must appear before any declarations.""", + correctionMessage: + r"""Try moving the directive before any declarations."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeDuplicateDeferred = messageDuplicateDeferred; @@ -2318,16 +2360,18 @@ const Code codeDuplicateDeferred = messageDuplicateDeferred; const MessageCode messageDuplicateDeferred = const MessageCode( "DuplicateDeferred", index: 71, - message: r"""An import directive can only have one 'deferred' keyword.""", - tip: r"""Try removing all but one 'deferred' keyword."""); + problemMessage: + r"""An import directive can only have one 'deferred' keyword.""", + correctionMessage: r"""Try removing all but one 'deferred' keyword."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateDuplicateLabelInSwitchStatement = const Template( - messageTemplate: + problemMessageTemplate: r"""The label '#name' was already used in this switch statement.""", - tipTemplate: r"""Try choosing a different name for this label.""", + correctionMessageTemplate: + r"""Try choosing a different name for this label.""", withArguments: _withArgumentsDuplicateLabelInSwitchStatement); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -2340,9 +2384,9 @@ Message _withArgumentsDuplicateLabelInSwitchStatement(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeDuplicateLabelInSwitchStatement, - message: + problemMessage: """The label '${name}' was already used in this switch statement.""", - tip: """Try choosing a different name for this label.""", + correctionMessage: """Try choosing a different name for this label.""", arguments: {'name': name}); } @@ -2352,13 +2396,15 @@ const Code codeDuplicatePrefix = messageDuplicatePrefix; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageDuplicatePrefix = const MessageCode("DuplicatePrefix", index: 73, - message: r"""An import directive can only have one prefix ('as' clause).""", - tip: r"""Try removing all but one prefix."""); + problemMessage: + r"""An import directive can only have one prefix ('as' clause).""", + correctionMessage: r"""Try removing all but one prefix."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateDuplicatedDeclaration = const Template( - messageTemplate: r"""'#name' is already declared in this scope.""", + problemMessageTemplate: + r"""'#name' is already declared in this scope.""", withArguments: _withArgumentsDuplicatedDeclaration); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -2371,7 +2417,7 @@ Message _withArgumentsDuplicatedDeclaration(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeDuplicatedDeclaration, - message: """'${name}' is already declared in this scope.""", + problemMessage: """'${name}' is already declared in this scope.""", arguments: {'name': name}); } @@ -2379,7 +2425,7 @@ Message _withArgumentsDuplicatedDeclaration(String name) { const Template templateDuplicatedDeclarationCause = const Template( - messageTemplate: r"""Previous declaration of '#name'.""", + problemMessageTemplate: r"""Previous declaration of '#name'.""", withArguments: _withArgumentsDuplicatedDeclarationCause); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -2392,7 +2438,7 @@ Message _withArgumentsDuplicatedDeclarationCause(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeDuplicatedDeclarationCause, - message: """Previous declaration of '${name}'.""", + problemMessage: """Previous declaration of '${name}'.""", arguments: {'name': name}); } @@ -2402,7 +2448,7 @@ const Template< String name)> templateDuplicatedDeclarationSyntheticCause = const Template< Message Function(String name)>( - messageTemplate: + problemMessageTemplate: r"""Previous declaration of '#name' is implied by this definition.""", withArguments: _withArgumentsDuplicatedDeclarationSyntheticCause); @@ -2418,7 +2464,7 @@ Message _withArgumentsDuplicatedDeclarationSyntheticCause(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeDuplicatedDeclarationSyntheticCause, - message: + problemMessage: """Previous declaration of '${name}' is implied by this definition.""", arguments: {'name': name}); } @@ -2426,7 +2472,7 @@ Message _withArgumentsDuplicatedDeclarationSyntheticCause(String name) { // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateDuplicatedDeclarationUse = const Template( - messageTemplate: + problemMessageTemplate: r"""Can't use '#name' because it is declared more than once.""", withArguments: _withArgumentsDuplicatedDeclarationUse); @@ -2441,7 +2487,8 @@ Message _withArgumentsDuplicatedDeclarationUse(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeDuplicatedDeclarationUse, - message: """Can't use '${name}' because it is declared more than once.""", + problemMessage: + """Can't use '${name}' because it is declared more than once.""", arguments: {'name': name}); } @@ -2449,7 +2496,7 @@ Message _withArgumentsDuplicatedDeclarationUse(String name) { const Template templateDuplicatedExport = const Template( - messageTemplate: + problemMessageTemplate: r"""'#name' is exported from both '#uri' and '#uri2'.""", withArguments: _withArgumentsDuplicatedExport); @@ -2467,7 +2514,8 @@ Message _withArgumentsDuplicatedExport(String name, Uri uri_, Uri uri2_) { String? uri = relativizeUri(uri_); String? uri2 = relativizeUri(uri2_); return new Message(codeDuplicatedExport, - message: """'${name}' is exported from both '${uri}' and '${uri2}'.""", + problemMessage: + """'${name}' is exported from both '${uri}' and '${uri2}'.""", arguments: {'name': name, 'uri': uri_, 'uri2': uri2_}); } @@ -2475,7 +2523,7 @@ Message _withArgumentsDuplicatedExport(String name, Uri uri_, Uri uri2_) { const Template templateDuplicatedExportInType = const Template( - messageTemplate: + problemMessageTemplate: r"""'#name' is exported from both '#uri' and '#uri2'.""", withArguments: _withArgumentsDuplicatedExportInType); @@ -2493,7 +2541,8 @@ Message _withArgumentsDuplicatedExportInType(String name, Uri uri_, Uri uri2_) { String? uri = relativizeUri(uri_); String? uri2 = relativizeUri(uri2_); return new Message(codeDuplicatedExportInType, - message: """'${name}' is exported from both '${uri}' and '${uri2}'.""", + problemMessage: + """'${name}' is exported from both '${uri}' and '${uri2}'.""", arguments: {'name': name, 'uri': uri_, 'uri2': uri2_}); } @@ -2501,7 +2550,7 @@ Message _withArgumentsDuplicatedExportInType(String name, Uri uri_, Uri uri2_) { const Template templateDuplicatedImportInType = const Template( - messageTemplate: + problemMessageTemplate: r"""'#name' is imported from both '#uri' and '#uri2'.""", withArguments: _withArgumentsDuplicatedImportInType); @@ -2519,15 +2568,17 @@ Message _withArgumentsDuplicatedImportInType(String name, Uri uri_, Uri uri2_) { String? uri = relativizeUri(uri_); String? uri2 = relativizeUri(uri2_); return new Message(codeDuplicatedImportInType, - message: """'${name}' is imported from both '${uri}' and '${uri2}'.""", + problemMessage: + """'${name}' is imported from both '${uri}' and '${uri2}'.""", arguments: {'name': name, 'uri': uri_, 'uri2': uri2_}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateDuplicatedModifier = const Template( - messageTemplate: r"""The modifier '#lexeme' was already specified.""", - tipTemplate: + problemMessageTemplate: + r"""The modifier '#lexeme' was already specified.""", + correctionMessageTemplate: r"""Try removing all but one occurrence of the modifier.""", withArguments: _withArgumentsDuplicatedModifier); @@ -2539,8 +2590,9 @@ const Code codeDuplicatedModifier = Message _withArgumentsDuplicatedModifier(Token token) { String lexeme = token.lexeme; return new Message(codeDuplicatedModifier, - message: """The modifier '${lexeme}' was already specified.""", - tip: """Try removing all but one occurrence of the modifier.""", + problemMessage: """The modifier '${lexeme}' was already specified.""", + correctionMessage: + """Try removing all but one occurrence of the modifier.""", arguments: {'lexeme': token}); } @@ -2550,7 +2602,7 @@ const Template< String name)> templateDuplicatedNamePreviouslyUsed = const Template< Message Function(String name)>( - messageTemplate: + problemMessageTemplate: r"""Can't declare '#name' because it was already used in this scope.""", withArguments: _withArgumentsDuplicatedNamePreviouslyUsed); @@ -2564,7 +2616,7 @@ Message _withArgumentsDuplicatedNamePreviouslyUsed(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeDuplicatedNamePreviouslyUsed, - message: + problemMessage: """Can't declare '${name}' because it was already used in this scope.""", arguments: {'name': name}); } @@ -2573,7 +2625,7 @@ Message _withArgumentsDuplicatedNamePreviouslyUsed(String name) { const Template templateDuplicatedNamePreviouslyUsedCause = const Template( - messageTemplate: r"""Previous use of '#name'.""", + problemMessageTemplate: r"""Previous use of '#name'.""", withArguments: _withArgumentsDuplicatedNamePreviouslyUsedCause); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -2588,13 +2640,14 @@ Message _withArgumentsDuplicatedNamePreviouslyUsedCause(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeDuplicatedNamePreviouslyUsedCause, - message: """Previous use of '${name}'.""", arguments: {'name': name}); + problemMessage: """Previous use of '${name}'.""", + arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateDuplicatedNamedArgument = const Template( - messageTemplate: r"""Duplicated named argument '#name'.""", + problemMessageTemplate: r"""Duplicated named argument '#name'.""", withArguments: _withArgumentsDuplicatedNamedArgument); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -2607,14 +2660,14 @@ Message _withArgumentsDuplicatedNamedArgument(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeDuplicatedNamedArgument, - message: """Duplicated named argument '${name}'.""", + problemMessage: """Duplicated named argument '${name}'.""", arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateDuplicatedParameterName = const Template( - messageTemplate: r"""Duplicated parameter name '#name'.""", + problemMessageTemplate: r"""Duplicated parameter name '#name'.""", withArguments: _withArgumentsDuplicatedParameterName); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -2627,7 +2680,7 @@ Message _withArgumentsDuplicatedParameterName(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeDuplicatedParameterName, - message: """Duplicated parameter name '${name}'.""", + problemMessage: """Duplicated parameter name '${name}'.""", arguments: {'name': name}); } @@ -2635,7 +2688,7 @@ Message _withArgumentsDuplicatedParameterName(String name) { const Template templateDuplicatedParameterNameCause = const Template( - messageTemplate: r"""Other parameter named '#name'.""", + problemMessageTemplate: r"""Other parameter named '#name'.""", withArguments: _withArgumentsDuplicatedParameterNameCause); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -2648,7 +2701,7 @@ Message _withArgumentsDuplicatedParameterNameCause(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeDuplicatedParameterNameCause, - message: """Other parameter named '${name}'.""", + problemMessage: """Other parameter named '${name}'.""", arguments: {'name': name}); } @@ -2659,8 +2712,8 @@ const Code codeEmptyNamedParameterList = messageEmptyNamedParameterList; const MessageCode messageEmptyNamedParameterList = const MessageCode( "EmptyNamedParameterList", analyzerCodes: ["MISSING_IDENTIFIER"], - message: r"""Named parameter lists cannot be empty.""", - tip: r"""Try adding a named parameter to the list."""); + problemMessage: r"""Named parameter lists cannot be empty.""", + correctionMessage: r"""Try adding a named parameter to the list."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeEmptyOptionalParameterList = @@ -2670,15 +2723,15 @@ const Code codeEmptyOptionalParameterList = const MessageCode messageEmptyOptionalParameterList = const MessageCode( "EmptyOptionalParameterList", analyzerCodes: ["MISSING_IDENTIFIER"], - message: r"""Optional parameter lists cannot be empty.""", - tip: r"""Try adding an optional parameter to the list."""); + problemMessage: r"""Optional parameter lists cannot be empty.""", + correctionMessage: r"""Try adding an optional parameter to the list."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeEncoding = messageEncoding; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageEncoding = const MessageCode("Encoding", - message: r"""Unable to decode bytes as UTF-8."""); + problemMessage: r"""Unable to decode bytes as UTF-8."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -2686,7 +2739,7 @@ const Template< String name)> templateEnumConstantSameNameAsEnclosing = const Template< Message Function(String name)>( - messageTemplate: + problemMessageTemplate: r"""Name of enum constant '#name' can't be the same as the enum's own name.""", withArguments: _withArgumentsEnumConstantSameNameAsEnclosing); @@ -2700,7 +2753,7 @@ Message _withArgumentsEnumConstantSameNameAsEnclosing(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeEnumConstantSameNameAsEnclosing, - message: + problemMessage: """Name of enum constant '${name}' can't be the same as the enum's own name.""", arguments: {'name': name}); } @@ -2712,7 +2765,7 @@ const Code codeEnumDeclarationEmpty = messageEnumDeclarationEmpty; const MessageCode messageEnumDeclarationEmpty = const MessageCode( "EnumDeclarationEmpty", analyzerCodes: ["EMPTY_ENUM_BODY"], - message: r"""An enum declaration can't be empty."""); + problemMessage: r"""An enum declaration can't be empty."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeEnumInClass = messageEnumInClass; @@ -2720,8 +2773,8 @@ const Code codeEnumInClass = messageEnumInClass; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageEnumInClass = const MessageCode("EnumInClass", index: 74, - message: r"""Enums can't be declared inside classes.""", - tip: r"""Try moving the enum to the top-level."""); + problemMessage: r"""Enums can't be declared inside classes.""", + correctionMessage: r"""Try moving the enum to the top-level."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeEnumInstantiation = messageEnumInstantiation; @@ -2730,7 +2783,7 @@ const Code codeEnumInstantiation = messageEnumInstantiation; const MessageCode messageEnumInstantiation = const MessageCode( "EnumInstantiation", analyzerCodes: ["INSTANTIATE_ENUM"], - message: r"""Enums can't be instantiated."""); + problemMessage: r"""Enums can't be instantiated."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeEqualityCannotBeEqualityOperand = @@ -2740,15 +2793,16 @@ const Code codeEqualityCannotBeEqualityOperand = const MessageCode messageEqualityCannotBeEqualityOperand = const MessageCode( "EqualityCannotBeEqualityOperand", index: 1, - message: + problemMessage: r"""A comparison expression can't be an operand of another comparison expression.""", - tip: r"""Try putting parentheses around one of the comparisons."""); + correctionMessage: + r"""Try putting parentheses around one of the comparisons."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateExceptionReadingFile = const Template( - messageTemplate: r"""Exception when reading '#uri': #string""", + problemMessageTemplate: r"""Exception when reading '#uri': #string""", withArguments: _withArgumentsExceptionReadingFile); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -2762,14 +2816,14 @@ Message _withArgumentsExceptionReadingFile(Uri uri_, String string) { String? uri = relativizeUri(uri_); if (string.isEmpty) throw 'No string provided'; return new Message(codeExceptionReadingFile, - message: """Exception when reading '${uri}': ${string}""", + problemMessage: """Exception when reading '${uri}': ${string}""", arguments: {'uri': uri_, 'string': string}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateExpectedAfterButGot = const Template( - messageTemplate: r"""Expected '#string' after this.""", + problemMessageTemplate: r"""Expected '#string' after this.""", withArguments: _withArgumentsExpectedAfterButGot); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -2781,7 +2835,7 @@ const Code codeExpectedAfterButGot = Message _withArgumentsExpectedAfterButGot(String string) { if (string.isEmpty) throw 'No string provided'; return new Message(codeExpectedAfterButGot, - message: """Expected '${string}' after this.""", + problemMessage: """Expected '${string}' after this.""", arguments: {'string': string}); } @@ -2792,7 +2846,7 @@ const Code codeExpectedAnInitializer = messageExpectedAnInitializer; const MessageCode messageExpectedAnInitializer = const MessageCode( "ExpectedAnInitializer", index: 36, - message: r"""Expected an initializer."""); + problemMessage: r"""Expected an initializer."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeExpectedBlock = messageExpectedBlock; @@ -2800,8 +2854,8 @@ const Code codeExpectedBlock = messageExpectedBlock; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageExpectedBlock = const MessageCode("ExpectedBlock", analyzerCodes: ["EXPECTED_TOKEN"], - message: r"""Expected a block.""", - tip: r"""Try adding {}."""); + problemMessage: r"""Expected a block.""", + correctionMessage: r"""Try adding {}."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeExpectedBlockToSkip = messageExpectedBlockToSkip; @@ -2810,8 +2864,8 @@ const Code codeExpectedBlockToSkip = messageExpectedBlockToSkip; const MessageCode messageExpectedBlockToSkip = const MessageCode( "ExpectedBlockToSkip", analyzerCodes: ["MISSING_FUNCTION_BODY"], - message: r"""Expected a function body or '=>'.""", - tip: r"""Try adding {}."""); + problemMessage: r"""Expected a function body or '=>'.""", + correctionMessage: r"""Try adding {}."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeExpectedBody = messageExpectedBody; @@ -2819,13 +2873,13 @@ const Code codeExpectedBody = messageExpectedBody; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageExpectedBody = const MessageCode("ExpectedBody", analyzerCodes: ["MISSING_FUNCTION_BODY"], - message: r"""Expected a function body or '=>'.""", - tip: r"""Try adding {}."""); + problemMessage: r"""Expected a function body or '=>'.""", + correctionMessage: r"""Try adding {}."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateExpectedButGot = const Template( - messageTemplate: r"""Expected '#string' before this.""", + problemMessageTemplate: r"""Expected '#string' before this.""", withArguments: _withArgumentsExpectedButGot); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -2837,14 +2891,15 @@ const Code codeExpectedButGot = Message _withArgumentsExpectedButGot(String string) { if (string.isEmpty) throw 'No string provided'; return new Message(codeExpectedButGot, - message: """Expected '${string}' before this.""", + problemMessage: """Expected '${string}' before this.""", arguments: {'string': string}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateExpectedClassMember = const Template( - messageTemplate: r"""Expected a class member, but got '#lexeme'.""", + problemMessageTemplate: + r"""Expected a class member, but got '#lexeme'.""", withArguments: _withArgumentsExpectedClassMember); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -2856,7 +2911,7 @@ const Code codeExpectedClassMember = Message _withArgumentsExpectedClassMember(Token token) { String lexeme = token.lexeme; return new Message(codeExpectedClassMember, - message: """Expected a class member, but got '${lexeme}'.""", + problemMessage: """Expected a class member, but got '${lexeme}'.""", arguments: {'lexeme': token}); } @@ -2864,9 +2919,9 @@ Message _withArgumentsExpectedClassMember(Token token) { const Template templateExpectedClassOrMixinBody = const Template( - messageTemplate: + problemMessageTemplate: r"""A #string must have a body, even if it is empty.""", - tipTemplate: r"""Try adding an empty body.""", + correctionMessageTemplate: r"""Try adding an empty body.""", withArguments: _withArgumentsExpectedClassOrMixinBody); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -2878,15 +2933,16 @@ const Code codeExpectedClassOrMixinBody = Message _withArgumentsExpectedClassOrMixinBody(String string) { if (string.isEmpty) throw 'No string provided'; return new Message(codeExpectedClassOrMixinBody, - message: """A ${string} must have a body, even if it is empty.""", - tip: """Try adding an empty body.""", + problemMessage: """A ${string} must have a body, even if it is empty.""", + correctionMessage: """Try adding an empty body.""", arguments: {'string': string}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateExpectedDeclaration = const Template( - messageTemplate: r"""Expected a declaration, but got '#lexeme'.""", + problemMessageTemplate: + r"""Expected a declaration, but got '#lexeme'.""", withArguments: _withArgumentsExpectedDeclaration); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -2898,7 +2954,7 @@ const Code codeExpectedDeclaration = Message _withArgumentsExpectedDeclaration(Token token) { String lexeme = token.lexeme; return new Message(codeExpectedDeclaration, - message: """Expected a declaration, but got '${lexeme}'.""", + problemMessage: """Expected a declaration, but got '${lexeme}'.""", arguments: {'lexeme': token}); } @@ -2909,14 +2965,14 @@ const Code codeExpectedElseOrComma = messageExpectedElseOrComma; const MessageCode messageExpectedElseOrComma = const MessageCode( "ExpectedElseOrComma", index: 46, - message: r"""Expected 'else' or comma."""); + problemMessage: r"""Expected 'else' or comma."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< Message Function(Token token)> templateExpectedEnumBody = const Template< Message Function(Token token)>( - messageTemplate: r"""Expected a enum body, but got '#lexeme'.""", - tipTemplate: + problemMessageTemplate: r"""Expected a enum body, but got '#lexeme'.""", + correctionMessageTemplate: r"""An enum definition must have a body with at least one constant name.""", withArguments: _withArgumentsExpectedEnumBody); @@ -2929,8 +2985,8 @@ const Code codeExpectedEnumBody = Message _withArgumentsExpectedEnumBody(Token token) { String lexeme = token.lexeme; return new Message(codeExpectedEnumBody, - message: """Expected a enum body, but got '${lexeme}'.""", - tip: + problemMessage: """Expected a enum body, but got '${lexeme}'.""", + correctionMessage: """An enum definition must have a body with at least one constant name.""", arguments: {'lexeme': token}); } @@ -2938,7 +2994,8 @@ Message _withArgumentsExpectedEnumBody(Token token) { // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateExpectedFunctionBody = const Template( - messageTemplate: r"""Expected a function body, but got '#lexeme'.""", + problemMessageTemplate: + r"""Expected a function body, but got '#lexeme'.""", withArguments: _withArgumentsExpectedFunctionBody); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -2950,7 +3007,7 @@ const Code codeExpectedFunctionBody = Message _withArgumentsExpectedFunctionBody(Token token) { String lexeme = token.lexeme; return new Message(codeExpectedFunctionBody, - message: """Expected a function body, but got '${lexeme}'.""", + problemMessage: """Expected a function body, but got '${lexeme}'.""", arguments: {'lexeme': token}); } @@ -2961,13 +3018,15 @@ const Code codeExpectedHexDigit = messageExpectedHexDigit; const MessageCode messageExpectedHexDigit = const MessageCode( "ExpectedHexDigit", analyzerCodes: ["MISSING_HEX_DIGIT"], - message: r"""A hex digit (0-9 or A-F) must follow '0x'."""); + problemMessage: r"""A hex digit (0-9 or A-F) must follow '0x'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateExpectedIdentifier = const Template( - messageTemplate: r"""Expected an identifier, but got '#lexeme'.""", - tipTemplate: r"""Try inserting an identifier before '#lexeme'.""", + problemMessageTemplate: + r"""Expected an identifier, but got '#lexeme'.""", + correctionMessageTemplate: + r"""Try inserting an identifier before '#lexeme'.""", withArguments: _withArgumentsExpectedIdentifier); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -2979,8 +3038,8 @@ const Code codeExpectedIdentifier = Message _withArgumentsExpectedIdentifier(Token token) { String lexeme = token.lexeme; return new Message(codeExpectedIdentifier, - message: """Expected an identifier, but got '${lexeme}'.""", - tip: """Try inserting an identifier before '${lexeme}'.""", + problemMessage: """Expected an identifier, but got '${lexeme}'.""", + correctionMessage: """Try inserting an identifier before '${lexeme}'.""", arguments: {'lexeme': token}); } @@ -2989,11 +3048,10 @@ const Template< Message Function( Token token)> templateExpectedIdentifierButGotKeyword = const Template< - Message Function( - Token token)>( - messageTemplate: + Message Function(Token token)>( + problemMessageTemplate: r"""'#lexeme' can't be used as an identifier because it's a keyword.""", - tipTemplate: + correctionMessageTemplate: r"""Try renaming this to be an identifier that isn't a keyword.""", withArguments: _withArgumentsExpectedIdentifierButGotKeyword); @@ -3006,16 +3064,16 @@ const Code codeExpectedIdentifierButGotKeyword = Message _withArgumentsExpectedIdentifierButGotKeyword(Token token) { String lexeme = token.lexeme; return new Message(codeExpectedIdentifierButGotKeyword, - message: + problemMessage: """'${lexeme}' can't be used as an identifier because it's a keyword.""", - tip: """Try renaming this to be an identifier that isn't a keyword.""", + correctionMessage: """Try renaming this to be an identifier that isn't a keyword.""", arguments: {'lexeme': token}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateExpectedInstead = const Template( - messageTemplate: r"""Expected '#string' instead of this.""", + problemMessageTemplate: r"""Expected '#string' instead of this.""", withArguments: _withArgumentsExpectedInstead); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -3026,7 +3084,7 @@ const Code codeExpectedInstead = Message _withArgumentsExpectedInstead(String string) { if (string.isEmpty) throw 'No string provided'; return new Message(codeExpectedInstead, - message: """Expected '${string}' instead of this.""", + problemMessage: """Expected '${string}' instead of this.""", arguments: {'string': string}); } @@ -3037,7 +3095,7 @@ const Code codeExpectedNamedArgument = messageExpectedNamedArgument; const MessageCode messageExpectedNamedArgument = const MessageCode( "ExpectedNamedArgument", analyzerCodes: ["EXTRA_POSITIONAL_ARGUMENTS"], - message: r"""Expected named argument."""); + problemMessage: r"""Expected named argument."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeExpectedOneExpression = messageExpectedOneExpression; @@ -3045,14 +3103,16 @@ const Code codeExpectedOneExpression = messageExpectedOneExpression; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageExpectedOneExpression = const MessageCode( "ExpectedOneExpression", - message: r"""Expected one expression, but found additional input."""); + problemMessage: + r"""Expected one expression, but found additional input."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeExpectedOpenParens = messageExpectedOpenParens; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const MessageCode messageExpectedOpenParens = - const MessageCode("ExpectedOpenParens", message: r"""Expected '('."""); +const MessageCode messageExpectedOpenParens = const MessageCode( + "ExpectedOpenParens", + problemMessage: r"""Expected '('."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeExpectedStatement = messageExpectedStatement; @@ -3061,12 +3121,12 @@ const Code codeExpectedStatement = messageExpectedStatement; const MessageCode messageExpectedStatement = const MessageCode( "ExpectedStatement", index: 29, - message: r"""Expected a statement."""); + problemMessage: r"""Expected a statement."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateExpectedString = const Template( - messageTemplate: r"""Expected a String, but got '#lexeme'.""", + problemMessageTemplate: r"""Expected a String, but got '#lexeme'.""", withArguments: _withArgumentsExpectedString); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -3078,14 +3138,14 @@ const Code codeExpectedString = Message _withArgumentsExpectedString(Token token) { String lexeme = token.lexeme; return new Message(codeExpectedString, - message: """Expected a String, but got '${lexeme}'.""", + problemMessage: """Expected a String, but got '${lexeme}'.""", arguments: {'lexeme': token}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateExpectedToken = const Template( - messageTemplate: r"""Expected to find '#string'.""", + problemMessageTemplate: r"""Expected to find '#string'.""", withArguments: _withArgumentsExpectedToken); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -3097,14 +3157,14 @@ const Code codeExpectedToken = Message _withArgumentsExpectedToken(String string) { if (string.isEmpty) throw 'No string provided'; return new Message(codeExpectedToken, - message: """Expected to find '${string}'.""", + problemMessage: """Expected to find '${string}'.""", arguments: {'string': string}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateExpectedType = const Template( - messageTemplate: r"""Expected a type, but got '#lexeme'.""", + problemMessageTemplate: r"""Expected a type, but got '#lexeme'.""", withArguments: _withArgumentsExpectedType); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -3116,7 +3176,7 @@ const Code codeExpectedType = Message _withArgumentsExpectedType(Token token) { String lexeme = token.lexeme; return new Message(codeExpectedType, - message: """Expected a type, but got '${lexeme}'.""", + problemMessage: """Expected a type, but got '${lexeme}'.""", arguments: {'lexeme': token}); } @@ -3125,7 +3185,7 @@ const Code codeExpectedUri = messageExpectedUri; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageExpectedUri = - const MessageCode("ExpectedUri", message: r"""Expected a URI."""); + const MessageCode("ExpectedUri", problemMessage: r"""Expected a URI."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -3133,9 +3193,9 @@ const Template< String string)> templateExperimentDisabled = const Template< Message Function(String string)>( - messageTemplate: + problemMessageTemplate: r"""This requires the '#string' language feature to be enabled.""", - tipTemplate: + correctionMessageTemplate: r"""The feature is on by default but is currently disabled, maybe because the '--enable-experiment=no-#string' command line option is passed.""", withArguments: _withArgumentsExperimentDisabled); @@ -3148,9 +3208,9 @@ const Code codeExperimentDisabled = Message _withArgumentsExperimentDisabled(String string) { if (string.isEmpty) throw 'No string provided'; return new Message(codeExperimentDisabled, - message: + problemMessage: """This requires the '${string}' language feature to be enabled.""", - tip: + correctionMessage: """The feature is on by default but is currently disabled, maybe because the '--enable-experiment=no-${string}' command line option is passed.""", arguments: {'string': string}); } @@ -3159,7 +3219,7 @@ Message _withArgumentsExperimentDisabled(String string) { const Template templateExperimentDisabledInvalidLanguageVersion = const Template( - messageTemplate: + problemMessageTemplate: r"""This requires the null safety language feature, which requires language version of #string2 or higher.""", withArguments: _withArgumentsExperimentDisabledInvalidLanguageVersion); @@ -3174,7 +3234,7 @@ const Code Message _withArgumentsExperimentDisabledInvalidLanguageVersion(String string2) { if (string2.isEmpty) throw 'No string provided'; return new Message(codeExperimentDisabledInvalidLanguageVersion, - message: + problemMessage: """This requires the null safety language feature, which requires language version of ${string2} or higher.""", arguments: {'string2': string2}); } @@ -3186,9 +3246,9 @@ const Template< String string2)> templateExperimentNotEnabled = const Template< Message Function(String string, String string2)>( - messageTemplate: + problemMessageTemplate: r"""This requires the '#string' language feature to be enabled.""", - tipTemplate: + correctionMessageTemplate: r"""Try updating your pubspec.yaml to set the minimum SDK constraint to #string2 or higher, and running 'pub get'.""", withArguments: _withArgumentsExperimentNotEnabled); @@ -3204,9 +3264,9 @@ Message _withArgumentsExperimentNotEnabled(String string, String string2) { if (string.isEmpty) throw 'No string provided'; if (string2.isEmpty) throw 'No string provided'; return new Message(codeExperimentNotEnabled, - message: + problemMessage: """This requires the '${string}' language feature to be enabled.""", - tip: + correctionMessage: """Try updating your pubspec.yaml to set the minimum SDK constraint to ${string2} or higher, and running 'pub get'.""", arguments: {'string': string, 'string2': string2}); } @@ -3219,18 +3279,18 @@ const Code codeExperimentNotEnabledNoFlag = const MessageCode messageExperimentNotEnabledNoFlag = const MessageCode( "ExperimentNotEnabledNoFlag", analyzerCodes: ["ParserErrorCode.EXPERIMENT_NOT_ENABLED"], - message: + problemMessage: r"""This requires the null safety language feature, which is experimental.""", - tip: + correctionMessage: r"""You can enable the experiment using the '--enable-experiment=non-nullable' command line option."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateExperimentNotEnabledNoFlagInvalidLanguageVersion = const Template( - messageTemplate: + problemMessageTemplate: r"""This requires the null safety language feature, which is experimental and requires language version of #string2 or higher.""", - tipTemplate: + correctionMessageTemplate: r"""You can enable the experiment using the '--enable-experiment=non-nullable' command line option.""", withArguments: _withArgumentsExperimentNotEnabledNoFlagInvalidLanguageVersion); @@ -3247,9 +3307,9 @@ Message _withArgumentsExperimentNotEnabledNoFlagInvalidLanguageVersion( String string2) { if (string2.isEmpty) throw 'No string provided'; return new Message(codeExperimentNotEnabledNoFlagInvalidLanguageVersion, - message: + problemMessage: """This requires the null safety language feature, which is experimental and requires language version of ${string2} or higher.""", - tip: """You can enable the experiment using the '--enable-experiment=non-nullable' command line option.""", + correctionMessage: """You can enable the experiment using the '--enable-experiment=non-nullable' command line option.""", arguments: {'string2': string2}); } @@ -3260,7 +3320,7 @@ const Code codeExplicitExtensionArgumentMismatch = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageExplicitExtensionArgumentMismatch = const MessageCode( "ExplicitExtensionArgumentMismatch", - message: + problemMessage: r"""Explicit extension application requires exactly 1 positional argument."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -3270,7 +3330,7 @@ const Code codeExplicitExtensionAsExpression = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageExplicitExtensionAsExpression = const MessageCode( "ExplicitExtensionAsExpression", - message: + problemMessage: r"""Explicit extension application cannot be used as an expression."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -3280,7 +3340,7 @@ const Code codeExplicitExtensionAsLvalue = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageExplicitExtensionAsLvalue = const MessageCode( "ExplicitExtensionAsLvalue", - message: + problemMessage: r"""Explicit extension application cannot be a target for assignment."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -3290,7 +3350,7 @@ const Template< int count)> templateExplicitExtensionTypeArgumentMismatch = const Template< Message Function(String name, int count)>( - messageTemplate: + problemMessageTemplate: r"""Explicit extension application of extension '#name' takes '#count' type argument(s).""", withArguments: _withArgumentsExplicitExtensionTypeArgumentMismatch); @@ -3309,7 +3369,7 @@ Message _withArgumentsExplicitExtensionTypeArgumentMismatch( // ignore: unnecessary_null_comparison if (count == null) throw 'No count provided'; return new Message(codeExplicitExtensionTypeArgumentMismatch, - message: + problemMessage: """Explicit extension application of extension '${name}' takes '${count}' type argument(s).""", arguments: {'name': name, 'count': count}); } @@ -3320,8 +3380,9 @@ const Code codeExportAfterPart = messageExportAfterPart; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageExportAfterPart = const MessageCode("ExportAfterPart", index: 75, - message: r"""Export directives must precede part directives.""", - tip: r"""Try moving the export directives before the part directives."""); + problemMessage: r"""Export directives must precede part directives.""", + correctionMessage: + r"""Try moving the export directives before the part directives."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeExportOptOutFromOptIn = messageExportOptOutFromOptIn; @@ -3329,7 +3390,7 @@ const Code codeExportOptOutFromOptIn = messageExportOptOutFromOptIn; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageExportOptOutFromOptIn = const MessageCode( "ExportOptOutFromOptIn", - message: + problemMessage: r"""Null safe libraries are not allowed to export declarations from of opt-out libraries."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -3338,7 +3399,7 @@ const Code codeExportedMain = messageExportedMain; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageExportedMain = const MessageCode("ExportedMain", severity: Severity.context, - message: r"""This is exported 'main' declaration."""); + problemMessage: r"""This is exported 'main' declaration."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeExpressionNotMetadata = messageExpressionNotMetadata; @@ -3346,7 +3407,7 @@ const Code codeExpressionNotMetadata = messageExpressionNotMetadata; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageExpressionNotMetadata = const MessageCode( "ExpressionNotMetadata", - message: + problemMessage: r"""This can't be used as an annotation; an annotation should be a reference to a compile-time constant variable, or a call to a constant constructor."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -3355,13 +3416,14 @@ const Code codeExtendFunction = messageExtendFunction; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageExtendFunction = const MessageCode("ExtendFunction", severity: Severity.ignored, - message: r"""Extending 'Function' is deprecated.""", - tip: r"""Try removing 'Function' from the 'extends' clause."""); + problemMessage: r"""Extending 'Function' is deprecated.""", + correctionMessage: + r"""Try removing 'Function' from the 'extends' clause."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateExtendingEnum = const Template( - messageTemplate: + problemMessageTemplate: r"""'#name' is an enum and can't be extended or implemented.""", withArguments: _withArgumentsExtendingEnum); @@ -3375,14 +3437,15 @@ Message _withArgumentsExtendingEnum(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeExtendingEnum, - message: """'${name}' is an enum and can't be extended or implemented.""", + problemMessage: + """'${name}' is an enum and can't be extended or implemented.""", arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateExtendingRestricted = const Template( - messageTemplate: + problemMessageTemplate: r"""'#name' is restricted and can't be extended or implemented.""", withArguments: _withArgumentsExtendingRestricted); @@ -3396,7 +3459,7 @@ Message _withArgumentsExtendingRestricted(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeExtendingRestricted, - message: + problemMessage: """'${name}' is restricted and can't be extended or implemented.""", arguments: {'name': name}); } @@ -3406,21 +3469,24 @@ const Code codeExtendsFutureOr = messageExtendsFutureOr; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageExtendsFutureOr = const MessageCode("ExtendsFutureOr", - message: r"""The type 'FutureOr' can't be used in an 'extends' clause."""); + problemMessage: + r"""The type 'FutureOr' can't be used in an 'extends' clause."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeExtendsNever = messageExtendsNever; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageExtendsNever = const MessageCode("ExtendsNever", - message: r"""The type 'Never' can't be used in an 'extends' clause."""); + problemMessage: + r"""The type 'Never' can't be used in an 'extends' clause."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeExtendsVoid = messageExtendsVoid; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageExtendsVoid = const MessageCode("ExtendsVoid", - message: r"""The type 'void' can't be used in an 'extends' clause."""); + problemMessage: + r"""The type 'void' can't be used in an 'extends' clause."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeExtensionDeclaresAbstractMember = @@ -3430,8 +3496,8 @@ const Code codeExtensionDeclaresAbstractMember = const MessageCode messageExtensionDeclaresAbstractMember = const MessageCode( "ExtensionDeclaresAbstractMember", index: 94, - message: r"""Extensions can't declare abstract members.""", - tip: r"""Try providing an implementation for the member."""); + problemMessage: r"""Extensions can't declare abstract members.""", + correctionMessage: r"""Try providing an implementation for the member."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeExtensionDeclaresConstructor = @@ -3441,8 +3507,8 @@ const Code codeExtensionDeclaresConstructor = const MessageCode messageExtensionDeclaresConstructor = const MessageCode( "ExtensionDeclaresConstructor", index: 92, - message: r"""Extensions can't declare constructors.""", - tip: r"""Try removing the constructor declaration."""); + problemMessage: r"""Extensions can't declare constructors.""", + correctionMessage: r"""Try removing the constructor declaration."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeExtensionDeclaresInstanceField = @@ -3452,14 +3518,15 @@ const Code codeExtensionDeclaresInstanceField = const MessageCode messageExtensionDeclaresInstanceField = const MessageCode( "ExtensionDeclaresInstanceField", index: 93, - message: r"""Extensions can't declare instance fields""", - tip: r"""Try removing the field declaration or making it a static field"""); + problemMessage: r"""Extensions can't declare instance fields""", + correctionMessage: + r"""Try removing the field declaration or making it a static field"""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateExtensionMemberConflictsWithObjectMember = const Template( - messageTemplate: + problemMessageTemplate: r"""This extension member conflicts with Object member '#name'.""", withArguments: _withArgumentsExtensionMemberConflictsWithObjectMember); @@ -3475,7 +3542,7 @@ Message _withArgumentsExtensionMemberConflictsWithObjectMember(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeExtensionMemberConflictsWithObjectMember, - message: + problemMessage: """This extension member conflicts with Object member '${name}'.""", arguments: {'name': name}); } @@ -3486,8 +3553,8 @@ const Code codeExternalClass = messageExternalClass; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageExternalClass = const MessageCode("ExternalClass", index: 3, - message: r"""Classes can't be declared to be 'external'.""", - tip: r"""Try removing the keyword 'external'."""); + problemMessage: r"""Classes can't be declared to be 'external'.""", + correctionMessage: r"""Try removing the keyword 'external'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeExternalConstructorWithBody = @@ -3497,8 +3564,8 @@ const Code codeExternalConstructorWithBody = const MessageCode messageExternalConstructorWithBody = const MessageCode( "ExternalConstructorWithBody", index: 87, - message: r"""External constructors can't have a body.""", - tip: + problemMessage: r"""External constructors can't have a body.""", + correctionMessage: r"""Try removing the body of the constructor, or removing the keyword 'external'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -3509,8 +3576,8 @@ const Code codeExternalConstructorWithFieldInitializers = const MessageCode messageExternalConstructorWithFieldInitializers = const MessageCode("ExternalConstructorWithFieldInitializers", analyzerCodes: ["EXTERNAL_CONSTRUCTOR_WITH_FIELD_INITIALIZERS"], - message: r"""An external constructor can't initialize fields.""", - tip: + problemMessage: r"""An external constructor can't initialize fields.""", + correctionMessage: r"""Try removing the field initializers, or removing the keyword 'external'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -3521,7 +3588,8 @@ const Code codeExternalConstructorWithInitializer = const MessageCode messageExternalConstructorWithInitializer = const MessageCode( "ExternalConstructorWithInitializer", index: 106, - message: r"""An external constructor can't have any initializers."""); + problemMessage: + r"""An external constructor can't have any initializers."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeExternalEnum = messageExternalEnum; @@ -3529,8 +3597,8 @@ const Code codeExternalEnum = messageExternalEnum; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageExternalEnum = const MessageCode("ExternalEnum", index: 5, - message: r"""Enums can't be declared to be 'external'.""", - tip: r"""Try removing the keyword 'external'."""); + problemMessage: r"""Enums can't be declared to be 'external'.""", + correctionMessage: r"""Try removing the keyword 'external'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeExternalFactoryRedirection = @@ -3540,8 +3608,8 @@ const Code codeExternalFactoryRedirection = const MessageCode messageExternalFactoryRedirection = const MessageCode( "ExternalFactoryRedirection", index: 85, - message: r"""A redirecting factory can't be external.""", - tip: r"""Try removing the 'external' modifier."""); + problemMessage: r"""A redirecting factory can't be external.""", + correctionMessage: r"""Try removing the 'external' modifier."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeExternalFactoryWithBody = messageExternalFactoryWithBody; @@ -3550,8 +3618,8 @@ const Code codeExternalFactoryWithBody = messageExternalFactoryWithBody; const MessageCode messageExternalFactoryWithBody = const MessageCode( "ExternalFactoryWithBody", index: 86, - message: r"""External factories can't have a body.""", - tip: + problemMessage: r"""External factories can't have a body.""", + correctionMessage: r"""Try removing the body of the factory, or removing the keyword 'external'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -3560,8 +3628,8 @@ const Code codeExternalField = messageExternalField; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageExternalField = const MessageCode("ExternalField", index: 50, - message: r"""Fields can't be declared to be 'external'.""", - tip: + problemMessage: r"""Fields can't be declared to be 'external'.""", + correctionMessage: r"""Try removing the keyword 'external', or replacing the field by an external getter and/or setter."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -3571,8 +3639,8 @@ const Code codeExternalFieldConstructorInitializer = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageExternalFieldConstructorInitializer = const MessageCode( "ExternalFieldConstructorInitializer", - message: r"""External fields cannot have initializers.""", - tip: + problemMessage: r"""External fields cannot have initializers.""", + correctionMessage: r"""Try removing the field initializer or the 'external' keyword from the field declaration."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -3581,8 +3649,9 @@ const Code codeExternalFieldInitializer = messageExternalFieldInitializer; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageExternalFieldInitializer = const MessageCode( "ExternalFieldInitializer", - message: r"""External fields cannot have initializers.""", - tip: r"""Try removing the initializer or the 'external' keyword."""); + problemMessage: r"""External fields cannot have initializers.""", + correctionMessage: + r"""Try removing the initializer or the 'external' keyword."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeExternalLateField = messageExternalLateField; @@ -3591,8 +3660,8 @@ const Code codeExternalLateField = messageExternalLateField; const MessageCode messageExternalLateField = const MessageCode( "ExternalLateField", index: 109, - message: r"""External fields cannot be late.""", - tip: r"""Try removing the 'external' or 'late' keyword."""); + problemMessage: r"""External fields cannot be late.""", + correctionMessage: r"""Try removing the 'external' or 'late' keyword."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeExternalMethodWithBody = messageExternalMethodWithBody; @@ -3601,7 +3670,7 @@ const Code codeExternalMethodWithBody = messageExternalMethodWithBody; const MessageCode messageExternalMethodWithBody = const MessageCode( "ExternalMethodWithBody", index: 49, - message: r"""An external or native method can't have a body."""); + problemMessage: r"""An external or native method can't have a body."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeExternalTypedef = messageExternalTypedef; @@ -3609,14 +3678,14 @@ const Code codeExternalTypedef = messageExternalTypedef; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageExternalTypedef = const MessageCode("ExternalTypedef", index: 76, - message: r"""Typedefs can't be declared to be 'external'.""", - tip: r"""Try removing the keyword 'external'."""); + problemMessage: r"""Typedefs can't be declared to be 'external'.""", + correctionMessage: r"""Try removing the keyword 'external'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateExtraneousModifier = const Template( - messageTemplate: r"""Can't have modifier '#lexeme' here.""", - tipTemplate: r"""Try removing '#lexeme'.""", + problemMessageTemplate: r"""Can't have modifier '#lexeme' here.""", + correctionMessageTemplate: r"""Try removing '#lexeme'.""", withArguments: _withArgumentsExtraneousModifier); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -3627,8 +3696,8 @@ const Code codeExtraneousModifier = Message _withArgumentsExtraneousModifier(Token token) { String lexeme = token.lexeme; return new Message(codeExtraneousModifier, - message: """Can't have modifier '${lexeme}' here.""", - tip: """Try removing '${lexeme}'.""", + problemMessage: """Can't have modifier '${lexeme}' here.""", + correctionMessage: """Try removing '${lexeme}'.""", arguments: {'lexeme': token}); } @@ -3636,8 +3705,9 @@ Message _withArgumentsExtraneousModifier(Token token) { const Template templateExtraneousModifierInExtension = const Template( - messageTemplate: r"""Can't have modifier '#lexeme' in an extension.""", - tipTemplate: r"""Try removing '#lexeme'.""", + problemMessageTemplate: + r"""Can't have modifier '#lexeme' in an extension.""", + correctionMessageTemplate: r"""Try removing '#lexeme'.""", withArguments: _withArgumentsExtraneousModifierInExtension); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -3649,8 +3719,8 @@ const Code codeExtraneousModifierInExtension = Message _withArgumentsExtraneousModifierInExtension(Token token) { String lexeme = token.lexeme; return new Message(codeExtraneousModifierInExtension, - message: """Can't have modifier '${lexeme}' in an extension.""", - tip: """Try removing '${lexeme}'.""", + problemMessage: """Can't have modifier '${lexeme}' in an extension.""", + correctionMessage: """Try removing '${lexeme}'.""", arguments: {'lexeme': token}); } @@ -3660,7 +3730,8 @@ const Code codeFactoryNotSync = messageFactoryNotSync; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageFactoryNotSync = const MessageCode("FactoryNotSync", analyzerCodes: ["NON_SYNC_FACTORY"], - message: r"""Factory bodies can't use 'async', 'async*', or 'sync*'."""); + problemMessage: + r"""Factory bodies can't use 'async', 'async*', or 'sync*'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeFactoryTopLevelDeclaration = @@ -3670,13 +3741,14 @@ const Code codeFactoryTopLevelDeclaration = const MessageCode messageFactoryTopLevelDeclaration = const MessageCode( "FactoryTopLevelDeclaration", index: 78, - message: r"""Top-level declarations can't be declared to be 'factory'.""", - tip: r"""Try removing the keyword 'factory'."""); + problemMessage: + r"""Top-level declarations can't be declared to be 'factory'.""", + correctionMessage: r"""Try removing the keyword 'factory'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateFastaCLIArgumentRequired = const Template( - messageTemplate: r"""Expected value after '#name'.""", + problemMessageTemplate: r"""Expected value after '#name'.""", withArguments: _withArgumentsFastaCLIArgumentRequired); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -3690,7 +3762,7 @@ Message _withArgumentsFastaCLIArgumentRequired(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeFastaCLIArgumentRequired, - message: """Expected value after '${name}'.""", + problemMessage: """Expected value after '${name}'.""", arguments: {'name': name}); } @@ -3699,7 +3771,7 @@ const Code codeFastaUsageLong = messageFastaUsageLong; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageFastaUsageLong = - const MessageCode("FastaUsageLong", message: r"""Supported options: + const MessageCode("FastaUsageLong", problemMessage: r"""Supported options: -o , --output= Generate the output into . @@ -3789,8 +3861,8 @@ const MessageCode messageFastaUsageLong = const Code codeFastaUsageShort = messageFastaUsageShort; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const MessageCode messageFastaUsageShort = - const MessageCode("FastaUsageShort", message: r"""Frequently used options: +const MessageCode messageFastaUsageShort = const MessageCode("FastaUsageShort", + problemMessage: r"""Frequently used options: -o Generate the output into . -h Display this message (add -v for information about all options)."""); @@ -3802,7 +3874,7 @@ const Template< String name)> templateFfiEmptyStruct = const Template< Message Function(String string, String name)>( - messageTemplate: + problemMessageTemplate: r"""#string '#name' is empty. Empty structs and unions are undefined behavior.""", withArguments: _withArgumentsFfiEmptyStruct); @@ -3818,7 +3890,7 @@ Message _withArgumentsFfiEmptyStruct(String string, String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeFfiEmptyStruct, - message: + problemMessage: """${string} '${name}' is empty. Empty structs and unions are undefined behavior.""", arguments: {'string': string, 'name': name}); } @@ -3829,7 +3901,7 @@ const Code codeFfiExceptionalReturnNull = messageFfiExceptionalReturnNull; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageFfiExceptionalReturnNull = const MessageCode( "FfiExceptionalReturnNull", - message: r"""Exceptional return value must not be null."""); + problemMessage: r"""Exceptional return value must not be null."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeFfiExpectedConstant = messageFfiExpectedConstant; @@ -3837,12 +3909,12 @@ const Code codeFfiExpectedConstant = messageFfiExpectedConstant; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageFfiExpectedConstant = const MessageCode( "FfiExpectedConstant", - message: r"""Exceptional return value must be a constant."""); + problemMessage: r"""Exceptional return value must be a constant."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateFfiExpectedConstantArg = const Template( - messageTemplate: r"""Argument '#name' must be a constant.""", + problemMessageTemplate: r"""Argument '#name' must be a constant.""", withArguments: _withArgumentsFfiExpectedConstantArg); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -3856,7 +3928,7 @@ Message _withArgumentsFfiExpectedConstantArg(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeFfiExpectedConstantArg, - message: """Argument '${name}' must be a constant.""", + problemMessage: """Argument '${name}' must be a constant.""", arguments: {'name': name}); } @@ -3864,7 +3936,7 @@ Message _withArgumentsFfiExpectedConstantArg(String name) { const Template templateFfiExtendsOrImplementsSealedClass = const Template( - messageTemplate: + problemMessageTemplate: r"""Class '#name' cannot be extended or implemented.""", withArguments: _withArgumentsFfiExtendsOrImplementsSealedClass); @@ -3880,7 +3952,7 @@ Message _withArgumentsFfiExtendsOrImplementsSealedClass(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeFfiExtendsOrImplementsSealedClass, - message: """Class '${name}' cannot be extended or implemented.""", + problemMessage: """Class '${name}' cannot be extended or implemented.""", arguments: {'name': name}); } @@ -3888,7 +3960,7 @@ Message _withArgumentsFfiExtendsOrImplementsSealedClass(String name) { const Template< Message Function(String name)> templateFfiFieldAnnotation = const Template< Message Function(String name)>( - messageTemplate: + 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.""", withArguments: _withArgumentsFfiFieldAnnotation); @@ -3903,7 +3975,7 @@ Message _withArgumentsFfiFieldAnnotation(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeFfiFieldAnnotation, - message: + problemMessage: """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.""", arguments: {'name': name}); } @@ -3913,8 +3985,10 @@ const Template< Message Function(String string, String name, List _names)> templateFfiFieldCyclic = const Template< Message Function(String string, String name, List _names)>( - messageTemplate: r"""#string '#name' contains itself. Cycle elements: -#names""", withArguments: _withArgumentsFfiFieldCyclic); + problemMessageTemplate: + r"""#string '#name' contains itself. Cycle elements: +#names""", + withArguments: _withArgumentsFfiFieldCyclic); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code _names)> @@ -3932,7 +4006,7 @@ Message _withArgumentsFfiFieldCyclic( if (_names.isEmpty) throw 'No names provided'; String names = itemizeNames(_names); return new Message(codeFfiFieldCyclic, - message: """${string} '${name}' contains itself. Cycle elements: + problemMessage: """${string} '${name}' contains itself. Cycle elements: ${names}""", arguments: {'string': string, 'name': name, 'names': _names}); } @@ -3940,9 +4014,9 @@ ${names}""", arguments: {'string': string, 'name': name, 'names': _names}); const Template< Message Function(String name)> templateFfiFieldInitializer = const Template< Message Function(String name)>( - messageTemplate: + problemMessageTemplate: r"""Field '#name' is a dart:ffi Pointer to a struct field and therefore cannot be initialized before constructor execution.""", - tipTemplate: + correctionMessageTemplate: r"""Mark the field as external to avoid having to initialize it.""", withArguments: _withArgumentsFfiFieldInitializer); @@ -3957,9 +4031,9 @@ Message _withArgumentsFfiFieldInitializer(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeFfiFieldInitializer, - message: + problemMessage: """Field '${name}' is a dart:ffi Pointer to a struct field and therefore cannot be initialized before constructor execution.""", - tip: """Mark the field as external to avoid having to initialize it.""", + correctionMessage: """Mark the field as external to avoid having to initialize it.""", arguments: {'name': name}); } @@ -3969,7 +4043,7 @@ const Template< String name)> templateFfiFieldNoAnnotation = const Template< Message Function(String name)>( - messageTemplate: + 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.""", withArguments: _withArgumentsFfiFieldNoAnnotation); @@ -3984,7 +4058,7 @@ Message _withArgumentsFfiFieldNoAnnotation(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeFfiFieldNoAnnotation, - message: + problemMessage: """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.""", arguments: {'name': name}); } @@ -3993,7 +4067,7 @@ Message _withArgumentsFfiFieldNoAnnotation(String name) { const Template< Message Function(String name)> templateFfiFieldNull = const Template< Message Function(String name)>( - messageTemplate: + problemMessageTemplate: r"""Field '#name' cannot have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.""", withArguments: _withArgumentsFfiFieldNull); @@ -4008,7 +4082,7 @@ Message _withArgumentsFfiFieldNull(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeFfiFieldNull, - message: + problemMessage: """Field '${name}' cannot have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.""", arguments: {'name': name}); } @@ -4020,7 +4094,7 @@ const Code codeFfiLeafCallMustNotReturnHandle = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageFfiLeafCallMustNotReturnHandle = const MessageCode( "FfiLeafCallMustNotReturnHandle", - message: r"""FFI leaf call must not have Handle return type."""); + problemMessage: r"""FFI leaf call must not have Handle return type."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeFfiLeafCallMustNotTakeHandle = @@ -4029,7 +4103,7 @@ const Code codeFfiLeafCallMustNotTakeHandle = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageFfiLeafCallMustNotTakeHandle = const MessageCode( "FfiLeafCallMustNotTakeHandle", - message: r"""FFI leaf call must not have Handle argument types."""); + problemMessage: r"""FFI leaf call must not have Handle argument types."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeFfiNativeAnnotationMustAnnotateStatic = @@ -4038,14 +4112,14 @@ const Code codeFfiNativeAnnotationMustAnnotateStatic = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageFfiNativeAnnotationMustAnnotateStatic = const MessageCode("FfiNativeAnnotationMustAnnotateStatic", - message: + problemMessage: r"""FfiNative annotations can only be used on static functions."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< Message Function(String name)> templateFfiNotStatic = const Template< Message Function(String name)>( - messageTemplate: + 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.""", withArguments: _withArgumentsFfiNotStatic); @@ -4060,7 +4134,7 @@ Message _withArgumentsFfiNotStatic(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeFfiNotStatic, - message: + problemMessage: """${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.""", arguments: {'name': name}); } @@ -4068,7 +4142,7 @@ Message _withArgumentsFfiNotStatic(String name) { // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateFfiPackedAnnotation = const Template( - messageTemplate: + problemMessageTemplate: r"""Struct '#name' must have at most one 'Packed' annotation.""", withArguments: _withArgumentsFfiPackedAnnotation); @@ -4083,7 +4157,7 @@ Message _withArgumentsFfiPackedAnnotation(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeFfiPackedAnnotation, - message: + problemMessage: """Struct '${name}' must have at most one 'Packed' annotation.""", arguments: {'name': name}); } @@ -4095,7 +4169,8 @@ const Code codeFfiPackedAnnotationAlignment = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageFfiPackedAnnotationAlignment = const MessageCode( "FfiPackedAnnotationAlignment", - message: r"""Only packing to 1, 2, 4, 8, and 16 bytes is supported."""); + problemMessage: + r"""Only packing to 1, 2, 4, 8, and 16 bytes is supported."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -4104,7 +4179,7 @@ const Template< String name2)> templateFfiPackedNestingNonPacked = const Template< Message Function(String name, String name2)>( - messageTemplate: + problemMessageTemplate: r"""Nesting the non-packed or less tightly packed struct '#name' in a packed struct '#name2' is not supported.""", withArguments: _withArgumentsFfiPackedNestingNonPacked); @@ -4122,7 +4197,7 @@ Message _withArgumentsFfiPackedNestingNonPacked(String name, String name2) { if (name2.isEmpty) throw 'No name provided'; name2 = demangleMixinApplicationName(name2); return new Message(codeFfiPackedNestingNonPacked, - message: + problemMessage: """Nesting the non-packed or less tightly packed struct '${name}' in a packed struct '${name2}' is not supported.""", arguments: {'name': name, 'name2': name2}); } @@ -4130,7 +4205,7 @@ Message _withArgumentsFfiPackedNestingNonPacked(String name, String name2) { // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateFfiSizeAnnotation = const Template( - messageTemplate: + problemMessageTemplate: r"""Field '#name' must have exactly one 'Array' annotation.""", withArguments: _withArgumentsFfiSizeAnnotation); @@ -4145,7 +4220,8 @@ Message _withArgumentsFfiSizeAnnotation(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeFfiSizeAnnotation, - message: """Field '${name}' must have exactly one 'Array' annotation.""", + problemMessage: + """Field '${name}' must have exactly one 'Array' annotation.""", arguments: {'name': name}); } @@ -4155,7 +4231,7 @@ const Template< String name)> templateFfiSizeAnnotationDimensions = const Template< Message Function(String name)>( - messageTemplate: + problemMessageTemplate: r"""Field '#name' must have an 'Array' annotation that matches the dimensions.""", withArguments: _withArgumentsFfiSizeAnnotationDimensions); @@ -4170,7 +4246,7 @@ Message _withArgumentsFfiSizeAnnotationDimensions(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeFfiSizeAnnotationDimensions, - message: + problemMessage: """Field '${name}' must have an 'Array' annotation that matches the dimensions.""", arguments: {'name': name}); } @@ -4179,7 +4255,7 @@ Message _withArgumentsFfiSizeAnnotationDimensions(String name) { const Template templateFfiStructGeneric = const Template( - messageTemplate: r"""#string '#name' should not be generic.""", + problemMessageTemplate: r"""#string '#name' should not be generic.""", withArguments: _withArgumentsFfiStructGeneric); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -4194,7 +4270,7 @@ Message _withArgumentsFfiStructGeneric(String string, String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeFfiStructGeneric, - message: """${string} '${name}' should not be generic.""", + problemMessage: """${string} '${name}' should not be generic.""", arguments: {'string': string, 'name': name}); } @@ -4204,7 +4280,7 @@ const Template< String name)> templateFieldAlreadyInitializedAtDeclaration = const Template< Message Function(String name)>( - messageTemplate: + problemMessageTemplate: r"""'#name' is a final instance variable that was initialized at the declaration.""", withArguments: _withArgumentsFieldAlreadyInitializedAtDeclaration); @@ -4222,7 +4298,7 @@ Message _withArgumentsFieldAlreadyInitializedAtDeclaration(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeFieldAlreadyInitializedAtDeclaration, - message: + problemMessage: """'${name}' is a final instance variable that was initialized at the declaration.""", arguments: {'name': name}); } @@ -4231,7 +4307,7 @@ Message _withArgumentsFieldAlreadyInitializedAtDeclaration(String name) { const Template templateFieldAlreadyInitializedAtDeclarationCause = const Template( - messageTemplate: r"""'#name' was initialized here.""", + problemMessageTemplate: r"""'#name' was initialized here.""", withArguments: _withArgumentsFieldAlreadyInitializedAtDeclarationCause); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -4246,7 +4322,7 @@ Message _withArgumentsFieldAlreadyInitializedAtDeclarationCause(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeFieldAlreadyInitializedAtDeclarationCause, - message: """'${name}' was initialized here.""", + problemMessage: """'${name}' was initialized here.""", arguments: {'name': name}); } @@ -4258,8 +4334,9 @@ const Code codeFieldInitializedOutsideDeclaringClass = const MessageCode messageFieldInitializedOutsideDeclaringClass = const MessageCode( "FieldInitializedOutsideDeclaringClass", index: 88, - message: r"""A field can only be initialized in its declaring class""", - tip: + problemMessage: + r"""A field can only be initialized in its declaring class""", + correctionMessage: r"""Try passing a value into the superclass constructor, or moving the initialization into the constructor body."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -4270,16 +4347,17 @@ const Code codeFieldInitializerOutsideConstructor = const MessageCode messageFieldInitializerOutsideConstructor = const MessageCode( "FieldInitializerOutsideConstructor", index: 79, - message: r"""Field formal parameters can only be used in a constructor.""", - tip: r"""Try removing 'this.'."""); + problemMessage: + r"""Field formal parameters can only be used in a constructor.""", + correctionMessage: r"""Try removing 'this.'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateFieldNotPromoted = const Template( - messageTemplate: + problemMessageTemplate: r"""'#name' refers to a property so it couldn't be promoted.""", - tipTemplate: r"""See #string""", + correctionMessageTemplate: r"""See #string""", withArguments: _withArgumentsFieldNotPromoted); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -4294,8 +4372,9 @@ Message _withArgumentsFieldNotPromoted(String name, String string) { name = demangleMixinApplicationName(name); if (string.isEmpty) throw 'No string provided'; return new Message(codeFieldNotPromoted, - message: """'${name}' refers to a property so it couldn't be promoted.""", - tip: """See ${string}""", + problemMessage: + """'${name}' refers to a property so it couldn't be promoted.""", + correctionMessage: """See ${string}""", arguments: {'name': name, 'string': string}); } @@ -4306,9 +4385,10 @@ const Code codeFinalAndCovariant = messageFinalAndCovariant; const MessageCode messageFinalAndCovariant = const MessageCode( "FinalAndCovariant", index: 80, - message: + problemMessage: r"""Members can't be declared to be both 'final' and 'covariant'.""", - tip: r"""Try removing either the 'final' or 'covariant' keyword."""); + correctionMessage: + r"""Try removing either the 'final' or 'covariant' keyword."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeFinalAndCovariantLateWithInitializer = @@ -4318,9 +4398,9 @@ const Code codeFinalAndCovariantLateWithInitializer = const MessageCode messageFinalAndCovariantLateWithInitializer = const MessageCode( "FinalAndCovariantLateWithInitializer", index: 101, - message: + problemMessage: r"""Members marked 'late' with an initializer can't be declared to be both 'final' and 'covariant'.""", - tip: + correctionMessage: r"""Try removing either the 'final' or 'covariant' keyword, or removing the initializer."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -4329,8 +4409,9 @@ const Code codeFinalAndVar = messageFinalAndVar; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageFinalAndVar = const MessageCode("FinalAndVar", index: 81, - message: r"""Members can't be declared to be both 'final' and 'var'.""", - tip: r"""Try removing the keyword 'var'."""); + problemMessage: + r"""Members can't be declared to be both 'final' and 'var'.""", + correctionMessage: r"""Try removing the keyword 'var'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -4338,8 +4419,8 @@ const Template< String name)> templateFinalFieldNotInitialized = const Template< Message Function(String name)>( - messageTemplate: r"""Final field '#name' is not initialized.""", - tipTemplate: + problemMessageTemplate: r"""Final field '#name' is not initialized.""", + correctionMessageTemplate: r"""Try to initialize the field in the declaration or in every constructor.""", withArguments: _withArgumentsFinalFieldNotInitialized); @@ -4353,8 +4434,8 @@ Message _withArgumentsFinalFieldNotInitialized(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeFinalFieldNotInitialized, - message: """Final field '${name}' is not initialized.""", - tip: + problemMessage: """Final field '${name}' is not initialized.""", + correctionMessage: """Try to initialize the field in the declaration or in every constructor.""", arguments: {'name': name}); } @@ -4365,9 +4446,9 @@ const Template< String name)> templateFinalFieldNotInitializedByConstructor = const Template< Message Function(String name)>( - messageTemplate: + problemMessageTemplate: r"""Final field '#name' is not initialized by this constructor.""", - tipTemplate: + correctionMessageTemplate: r"""Try to initialize the field using an initializing formal or a field initializer.""", withArguments: _withArgumentsFinalFieldNotInitializedByConstructor); @@ -4383,9 +4464,9 @@ Message _withArgumentsFinalFieldNotInitializedByConstructor(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeFinalFieldNotInitializedByConstructor, - message: + problemMessage: """Final field '${name}' is not initialized by this constructor.""", - tip: + correctionMessage: """Try to initialize the field using an initializing formal or a field initializer.""", arguments: {'name': name}); } @@ -4396,8 +4477,9 @@ const Template< String name)> templateFinalFieldWithoutInitializer = const Template< Message Function(String name)>( - messageTemplate: r"""The final variable '#name' must be initialized.""", - tipTemplate: + problemMessageTemplate: + r"""The final variable '#name' must be initialized.""", + correctionMessageTemplate: r"""Try adding an initializer ('= expression') to the declaration.""", withArguments: _withArgumentsFinalFieldWithoutInitializer); @@ -4411,8 +4493,9 @@ Message _withArgumentsFinalFieldWithoutInitializer(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeFinalFieldWithoutInitializer, - message: """The final variable '${name}' must be initialized.""", - tip: """Try adding an initializer ('= expression') to the declaration.""", + problemMessage: """The final variable '${name}' must be initialized.""", + correctionMessage: + """Try adding an initializer ('= expression') to the declaration.""", arguments: {'name': name}); } @@ -4422,7 +4505,7 @@ const Template< String name)> templateFinalNotAssignedError = const Template< Message Function(String name)>( - messageTemplate: + problemMessageTemplate: r"""Final variable '#name' must be assigned before it can be used.""", withArguments: _withArgumentsFinalNotAssignedError); @@ -4436,7 +4519,7 @@ Message _withArgumentsFinalNotAssignedError(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeFinalNotAssignedError, - message: + problemMessage: """Final variable '${name}' must be assigned before it can be used.""", arguments: {'name': name}); } @@ -4447,7 +4530,7 @@ const Template< String name)> templateFinalPossiblyAssignedError = const Template< Message Function(String name)>( - messageTemplate: + problemMessageTemplate: r"""Final variable '#name' might already be assigned at this point.""", withArguments: _withArgumentsFinalPossiblyAssignedError); @@ -4461,7 +4544,7 @@ Message _withArgumentsFinalPossiblyAssignedError(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeFinalPossiblyAssignedError, - message: + problemMessage: """Final variable '${name}' might already be assigned at this point.""", arguments: {'name': name}); } @@ -4473,7 +4556,8 @@ const Code codeForInLoopExactlyOneVariable = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageForInLoopExactlyOneVariable = const MessageCode( "ForInLoopExactlyOneVariable", - message: r"""A for-in loop can't have more than one loop variable."""); + problemMessage: + r"""A for-in loop can't have more than one loop variable."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeForInLoopNotAssignable = messageForInLoopNotAssignable; @@ -4481,7 +4565,7 @@ const Code codeForInLoopNotAssignable = messageForInLoopNotAssignable; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageForInLoopNotAssignable = const MessageCode( "ForInLoopNotAssignable", - message: + problemMessage: r"""Can't assign to this, so it can't be used in a for-in loop."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -4492,8 +4576,8 @@ const Code codeForInLoopWithConstVariable = const MessageCode messageForInLoopWithConstVariable = const MessageCode( "ForInLoopWithConstVariable", analyzerCodes: ["FOR_IN_WITH_CONST_VARIABLE"], - message: r"""A for-in loop-variable can't be 'const'.""", - tip: r"""Try removing the 'const' modifier."""); + problemMessage: r"""A for-in loop-variable can't be 'const'.""", + correctionMessage: r"""Try removing the 'const' modifier."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeFunctionAsTypeParameter = messageFunctionAsTypeParameter; @@ -4501,7 +4585,7 @@ const Code codeFunctionAsTypeParameter = messageFunctionAsTypeParameter; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageFunctionAsTypeParameter = const MessageCode( "FunctionAsTypeParameter", - message: + problemMessage: r"""'Function' is a built-in identifier, could not used as a type identifier."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -4511,7 +4595,7 @@ const Code codeFunctionTypeDefaultValue = messageFunctionTypeDefaultValue; const MessageCode messageFunctionTypeDefaultValue = const MessageCode( "FunctionTypeDefaultValue", analyzerCodes: ["DEFAULT_VALUE_IN_FUNCTION_TYPE"], - message: r"""Can't have a default value in a function type."""); + problemMessage: r"""Can't have a default value in a function type."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeFunctionTypedParameterVar = @@ -4521,15 +4605,15 @@ const Code codeFunctionTypedParameterVar = const MessageCode messageFunctionTypedParameterVar = const MessageCode( "FunctionTypedParameterVar", analyzerCodes: ["FUNCTION_TYPED_PARAMETER_VAR"], - message: + problemMessage: r"""Function-typed parameters can't specify 'const', 'final' or 'var' in place of a return type.""", - tip: r"""Try replacing the keyword with a return type."""); + correctionMessage: r"""Try replacing the keyword with a return type."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< Message Function(String name)> templateFunctionUsedAsDec = const Template< Message Function(String name)>( - messageTemplate: + problemMessageTemplate: r"""'Function' is a built-in identifier, could not used as a #name name.""", withArguments: _withArgumentsFunctionUsedAsDec); @@ -4544,7 +4628,7 @@ Message _withArgumentsFunctionUsedAsDec(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeFunctionUsedAsDec, - message: + problemMessage: """'Function' is a built-in identifier, could not used as a ${name} name.""", arguments: {'name': name}); } @@ -4556,7 +4640,7 @@ const Code codeGeneratorReturnsValue = messageGeneratorReturnsValue; const MessageCode messageGeneratorReturnsValue = const MessageCode( "GeneratorReturnsValue", analyzerCodes: ["RETURN_IN_GENERATOR"], - message: r"""'sync*' and 'async*' can't return a value."""); + problemMessage: r"""'sync*' and 'async*' can't return a value."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeGenericFunctionTypeInBound = @@ -4566,7 +4650,7 @@ const Code codeGenericFunctionTypeInBound = const MessageCode messageGenericFunctionTypeInBound = const MessageCode( "GenericFunctionTypeInBound", analyzerCodes: ["GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND"], - message: + problemMessage: r"""Type variables can't have generic function types in their bounds."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -4577,9 +4661,9 @@ const Code codeGenericFunctionTypeUsedAsActualTypeArgument = const MessageCode messageGenericFunctionTypeUsedAsActualTypeArgument = const MessageCode("GenericFunctionTypeUsedAsActualTypeArgument", analyzerCodes: ["GENERIC_FUNCTION_CANNOT_BE_TYPE_ARGUMENT"], - message: + problemMessage: r"""A generic function type can't be used as a type argument.""", - tip: r"""Try using a non-generic function type."""); + correctionMessage: r"""Try using a non-generic function type."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeGetterConstructor = messageGetterConstructor; @@ -4588,13 +4672,13 @@ const Code codeGetterConstructor = messageGetterConstructor; const MessageCode messageGetterConstructor = const MessageCode( "GetterConstructor", index: 103, - message: r"""Constructors can't be a getter.""", - tip: r"""Try removing 'get'."""); + problemMessage: r"""Constructors can't be a getter.""", + correctionMessage: r"""Try removing 'get'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateGetterNotFound = const Template( - messageTemplate: r"""Getter not found: '#name'.""", + problemMessageTemplate: r"""Getter not found: '#name'.""", withArguments: _withArgumentsGetterNotFound); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -4607,7 +4691,8 @@ Message _withArgumentsGetterNotFound(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeGetterNotFound, - message: """Getter not found: '${name}'.""", arguments: {'name': name}); + problemMessage: """Getter not found: '${name}'.""", + arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -4617,8 +4702,8 @@ const Code codeGetterWithFormals = messageGetterWithFormals; const MessageCode messageGetterWithFormals = const MessageCode( "GetterWithFormals", analyzerCodes: ["GETTER_WITH_PARAMETERS"], - message: r"""A getter can't have formal parameters.""", - tip: r"""Try removing '(...)'."""); + problemMessage: r"""A getter can't have formal parameters.""", + correctionMessage: r"""Try removing '(...)'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeIllegalAssignmentToNonAssignable = @@ -4628,7 +4713,7 @@ const Code codeIllegalAssignmentToNonAssignable = const MessageCode messageIllegalAssignmentToNonAssignable = const MessageCode( "IllegalAssignmentToNonAssignable", index: 45, - message: r"""Illegal assignment to non-assignable expression."""); + problemMessage: r"""Illegal assignment to non-assignable expression."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeIllegalAsyncGeneratorReturnType = @@ -4638,7 +4723,7 @@ const Code codeIllegalAsyncGeneratorReturnType = const MessageCode messageIllegalAsyncGeneratorReturnType = const MessageCode( "IllegalAsyncGeneratorReturnType", analyzerCodes: ["ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE"], - message: + problemMessage: r"""Functions marked 'async*' must have a return type assignable to 'Stream'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -4648,7 +4733,7 @@ const Code codeIllegalAsyncGeneratorVoidReturnType = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageIllegalAsyncGeneratorVoidReturnType = const MessageCode("IllegalAsyncGeneratorVoidReturnType", - message: + problemMessage: r"""Functions marked 'async*' can't have return type 'void'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -4658,13 +4743,13 @@ const Code codeIllegalAsyncReturnType = messageIllegalAsyncReturnType; const MessageCode messageIllegalAsyncReturnType = const MessageCode( "IllegalAsyncReturnType", analyzerCodes: ["ILLEGAL_ASYNC_RETURN_TYPE"], - message: + problemMessage: r"""Functions marked 'async' must have a return type assignable to 'Future'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateIllegalMixin = const Template( - messageTemplate: r"""The type '#name' can't be mixed in.""", + problemMessageTemplate: r"""The type '#name' can't be mixed in.""", withArguments: _withArgumentsIllegalMixin); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -4677,7 +4762,7 @@ Message _withArgumentsIllegalMixin(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeIllegalMixin, - message: """The type '${name}' can't be mixed in.""", + problemMessage: """The type '${name}' can't be mixed in.""", arguments: {'name': name}); } @@ -4685,7 +4770,7 @@ Message _withArgumentsIllegalMixin(String name) { const Template templateIllegalMixinDueToConstructors = const Template( - messageTemplate: + problemMessageTemplate: r"""Can't use '#name' as a mixin because it has constructors.""", withArguments: _withArgumentsIllegalMixinDueToConstructors); @@ -4699,7 +4784,7 @@ Message _withArgumentsIllegalMixinDueToConstructors(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeIllegalMixinDueToConstructors, - message: + problemMessage: """Can't use '${name}' as a mixin because it has constructors.""", arguments: {'name': name}); } @@ -4708,7 +4793,7 @@ Message _withArgumentsIllegalMixinDueToConstructors(String name) { const Template templateIllegalMixinDueToConstructorsCause = const Template( - messageTemplate: + problemMessageTemplate: r"""This constructor prevents using '#name' as a mixin.""", withArguments: _withArgumentsIllegalMixinDueToConstructorsCause); @@ -4724,7 +4809,8 @@ Message _withArgumentsIllegalMixinDueToConstructorsCause(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeIllegalMixinDueToConstructorsCause, - message: """This constructor prevents using '${name}' as a mixin.""", + problemMessage: + """This constructor prevents using '${name}' as a mixin.""", arguments: {'name': name}); } @@ -4736,7 +4822,7 @@ const Code codeIllegalSyncGeneratorReturnType = const MessageCode messageIllegalSyncGeneratorReturnType = const MessageCode( "IllegalSyncGeneratorReturnType", analyzerCodes: ["ILLEGAL_SYNC_GENERATOR_RETURN_TYPE"], - message: + problemMessage: r"""Functions marked 'sync*' must have a return type assignable to 'Iterable'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -4746,7 +4832,8 @@ const Code codeIllegalSyncGeneratorVoidReturnType = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageIllegalSyncGeneratorVoidReturnType = const MessageCode( "IllegalSyncGeneratorVoidReturnType", - message: r"""Functions marked 'sync*' can't have return type 'void'."""); + problemMessage: + r"""Functions marked 'sync*' can't have return type 'void'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeImplementFunction = messageImplementFunction; @@ -4755,8 +4842,9 @@ const Code codeImplementFunction = messageImplementFunction; const MessageCode messageImplementFunction = const MessageCode( "ImplementFunction", severity: Severity.ignored, - message: r"""Implementing 'Function' is deprecated.""", - tip: r"""Try removing 'Function' from the 'implements' clause."""); + problemMessage: r"""Implementing 'Function' is deprecated.""", + correctionMessage: + r"""Try removing 'Function' from the 'implements' clause."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeImplementsBeforeExtends = messageImplementsBeforeExtends; @@ -4765,8 +4853,10 @@ const Code codeImplementsBeforeExtends = messageImplementsBeforeExtends; const MessageCode messageImplementsBeforeExtends = const MessageCode( "ImplementsBeforeExtends", index: 44, - message: r"""The extends clause must be before the implements clause.""", - tip: r"""Try moving the extends clause before the implements clause."""); + problemMessage: + r"""The extends clause must be before the implements clause.""", + correctionMessage: + r"""Try moving the extends clause before the implements clause."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeImplementsBeforeOn = messageImplementsBeforeOn; @@ -4775,8 +4865,9 @@ const Code codeImplementsBeforeOn = messageImplementsBeforeOn; const MessageCode messageImplementsBeforeOn = const MessageCode( "ImplementsBeforeOn", index: 43, - message: r"""The on clause must be before the implements clause.""", - tip: r"""Try moving the on clause before the implements clause."""); + problemMessage: r"""The on clause must be before the implements clause.""", + correctionMessage: + r"""Try moving the on clause before the implements clause."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeImplementsBeforeWith = messageImplementsBeforeWith; @@ -4785,8 +4876,10 @@ const Code codeImplementsBeforeWith = messageImplementsBeforeWith; const MessageCode messageImplementsBeforeWith = const MessageCode( "ImplementsBeforeWith", index: 42, - message: r"""The with clause must be before the implements clause.""", - tip: r"""Try moving the with clause before the implements clause."""); + problemMessage: + r"""The with clause must be before the implements clause.""", + correctionMessage: + r"""Try moving the with clause before the implements clause."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeImplementsFutureOr = messageImplementsFutureOr; @@ -4794,7 +4887,7 @@ const Code codeImplementsFutureOr = messageImplementsFutureOr; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageImplementsFutureOr = const MessageCode( "ImplementsFutureOr", - message: + problemMessage: r"""The type 'FutureOr' can't be used in an 'implements' clause."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -4802,14 +4895,16 @@ const Code codeImplementsNever = messageImplementsNever; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageImplementsNever = const MessageCode("ImplementsNever", - message: r"""The type 'Never' can't be used in an 'implements' clause."""); + problemMessage: + r"""The type 'Never' can't be used in an 'implements' clause."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateImplementsRepeated = const Template( - messageTemplate: r"""'#name' can only be implemented once.""", - tipTemplate: r"""Try removing #count of the occurrences.""", + problemMessageTemplate: r"""'#name' can only be implemented once.""", + correctionMessageTemplate: + r"""Try removing #count of the occurrences.""", withArguments: _withArgumentsImplementsRepeated); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -4824,8 +4919,8 @@ Message _withArgumentsImplementsRepeated(String name, int count) { // ignore: unnecessary_null_comparison if (count == null) throw 'No count provided'; return new Message(codeImplementsRepeated, - message: """'${name}' can only be implemented once.""", - tip: """Try removing ${count} of the occurrences.""", + problemMessage: """'${name}' can only be implemented once.""", + correctionMessage: """Try removing ${count} of the occurrences.""", arguments: {'name': name, 'count': count}); } @@ -4835,9 +4930,9 @@ const Template< String name)> templateImplementsSuperClass = const Template< Message Function(String name)>( - messageTemplate: + problemMessageTemplate: r"""'#name' can't be used in both 'extends' and 'implements' clauses.""", - tipTemplate: r"""Try removing one of the occurrences.""", + correctionMessageTemplate: r"""Try removing one of the occurrences.""", withArguments: _withArgumentsImplementsSuperClass); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -4850,9 +4945,9 @@ Message _withArgumentsImplementsSuperClass(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeImplementsSuperClass, - message: + problemMessage: """'${name}' can't be used in both 'extends' and 'implements' clauses.""", - tip: """Try removing one of the occurrences.""", + correctionMessage: """Try removing one of the occurrences.""", arguments: {'name': name}); } @@ -4861,7 +4956,8 @@ const Code codeImplementsVoid = messageImplementsVoid; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageImplementsVoid = const MessageCode("ImplementsVoid", - message: r"""The type 'void' can't be used in an 'implements' clause."""); + problemMessage: + r"""The type 'void' can't be used in an 'implements' clause."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -4871,7 +4967,7 @@ const Template< String name3)> templateImplicitMixinOverride = const Template< Message Function(String name, String name2, String name3)>( - messageTemplate: + problemMessageTemplate: r"""Applying the mixin '#name' to '#name2' introduces an erroneous override of '#name3'.""", withArguments: _withArgumentsImplicitMixinOverride); @@ -4892,7 +4988,7 @@ Message _withArgumentsImplicitMixinOverride( if (name3.isEmpty) throw 'No name provided'; name3 = demangleMixinApplicationName(name3); return new Message(codeImplicitMixinOverride, - message: + problemMessage: """Applying the mixin '${name}' to '${name2}' introduces an erroneous override of '${name3}'.""", arguments: {'name': name, 'name2': name2, 'name3': name3}); } @@ -4903,8 +4999,9 @@ const Code codeImportAfterPart = messageImportAfterPart; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageImportAfterPart = const MessageCode("ImportAfterPart", index: 10, - message: r"""Import directives must precede part directives.""", - tip: r"""Try moving the import directives before the part directives."""); + problemMessage: r"""Import directives must precede part directives.""", + correctionMessage: + r"""Try moving the import directives before the part directives."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeIncorrectTypeArgumentVariable = @@ -4914,7 +5011,8 @@ const Code codeIncorrectTypeArgumentVariable = const MessageCode messageIncorrectTypeArgumentVariable = const MessageCode( "IncorrectTypeArgumentVariable", severity: Severity.context, - message: r"""This is the type variable whose bound isn't conformed to."""); + problemMessage: + r"""This is the type variable whose bound isn't conformed to."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -4922,7 +5020,7 @@ const Template< String string)> templateIncrementalCompilerIllegalParameter = const Template< Message Function(String string)>( - messageTemplate: + problemMessageTemplate: r"""Illegal parameter name '#string' found during expression compilation.""", withArguments: _withArgumentsIncrementalCompilerIllegalParameter); @@ -4937,7 +5035,7 @@ const Code Message _withArgumentsIncrementalCompilerIllegalParameter(String string) { if (string.isEmpty) throw 'No string provided'; return new Message(codeIncrementalCompilerIllegalParameter, - message: + problemMessage: """Illegal parameter name '${string}' found during expression compilation.""", arguments: {'string': string}); } @@ -4946,7 +5044,7 @@ Message _withArgumentsIncrementalCompilerIllegalParameter(String string) { const Template templateIncrementalCompilerIllegalTypeParameter = const Template( - messageTemplate: + problemMessageTemplate: r"""Illegal type parameter name '#string' found during expression compilation.""", withArguments: _withArgumentsIncrementalCompilerIllegalTypeParameter); @@ -4961,7 +5059,7 @@ const Code Message _withArgumentsIncrementalCompilerIllegalTypeParameter(String string) { if (string.isEmpty) throw 'No string provided'; return new Message(codeIncrementalCompilerIllegalTypeParameter, - message: + problemMessage: """Illegal type parameter name '${string}' found during expression compilation.""", arguments: {'string': string}); } @@ -4969,7 +5067,8 @@ Message _withArgumentsIncrementalCompilerIllegalTypeParameter(String string) { // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateInferredPackageUri = const Template( - messageTemplate: r"""Interpreting this as package URI, '#uri'.""", + problemMessageTemplate: + r"""Interpreting this as package URI, '#uri'.""", withArguments: _withArgumentsInferredPackageUri); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -4981,7 +5080,7 @@ const Code codeInferredPackageUri = Message _withArgumentsInferredPackageUri(Uri uri_) { String? uri = relativizeUri(uri_); return new Message(codeInferredPackageUri, - message: """Interpreting this as package URI, '${uri}'.""", + problemMessage: """Interpreting this as package URI, '${uri}'.""", arguments: {'uri': uri_}); } @@ -4992,7 +5091,8 @@ const Code codeInheritedMembersConflict = messageInheritedMembersConflict; const MessageCode messageInheritedMembersConflict = const MessageCode( "InheritedMembersConflict", analyzerCodes: ["CONFLICTS_WITH_INHERITED_MEMBER"], - message: r"""Can't inherit members that conflict with each other."""); + problemMessage: + r"""Can't inherit members that conflict with each other."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeInheritedMembersConflictCause1 = @@ -5002,7 +5102,7 @@ const Code codeInheritedMembersConflictCause1 = const MessageCode messageInheritedMembersConflictCause1 = const MessageCode( "InheritedMembersConflictCause1", severity: Severity.context, - message: r"""This is one inherited member."""); + problemMessage: r"""This is one inherited member."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeInheritedMembersConflictCause2 = @@ -5012,7 +5112,7 @@ const Code codeInheritedMembersConflictCause2 = const MessageCode messageInheritedMembersConflictCause2 = const MessageCode( "InheritedMembersConflictCause2", severity: Severity.context, - message: r"""This is the other inherited member."""); + problemMessage: r"""This is the other inherited member."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -5021,7 +5121,7 @@ const Template< Uri uri_)> templateInitializeFromDillNotSelfContained = const Template< Message Function(String string, Uri uri_)>( - messageTemplate: + 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. @@ -5042,7 +5142,7 @@ Message _withArgumentsInitializeFromDillNotSelfContained( if (string.isEmpty) throw 'No string provided'; String? uri = relativizeUri(uri_); return new Message(codeInitializeFromDillNotSelfContained, - message: + problemMessage: """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. @@ -5055,7 +5155,7 @@ Either way, you should probably delete the file so it doesn't use unnecessary di const Template templateInitializeFromDillNotSelfContainedNoDump = const Template( - messageTemplate: + 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.""", @@ -5072,7 +5172,7 @@ const Code Message _withArgumentsInitializeFromDillNotSelfContainedNoDump(String string) { if (string.isEmpty) throw 'No string provided'; return new Message(codeInitializeFromDillNotSelfContainedNoDump, - message: + problemMessage: """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.""", @@ -5089,7 +5189,7 @@ const Template< uri_)> templateInitializeFromDillUnknownProblem = const Template< Message Function( String string, String string2, String string3, Uri uri_)>( - messageTemplate: + problemMessageTemplate: r"""Tried to initialize from a previous compilation (#string), but couldn't. Error message was '#string2'. Stacktrace included '#string3'. @@ -5118,7 +5218,7 @@ Message _withArgumentsInitializeFromDillUnknownProblem( if (string3.isEmpty) throw 'No string provided'; String? uri = relativizeUri(uri_); return new Message(codeInitializeFromDillUnknownProblem, - message: + problemMessage: """Tried to initialize from a previous compilation (${string}), but couldn't. Error message was '${string2}'. Stacktrace included '${string3}'. @@ -5139,7 +5239,7 @@ Either way, you should probably delete the file so it doesn't use unnecessary di const Template templateInitializeFromDillUnknownProblemNoDump = const Template< Message Function(String string, String string2, String string3)>( - messageTemplate: + problemMessageTemplate: r"""Tried to initialize from a previous compilation (#string), but couldn't. Error message was '#string2'. Stacktrace included '#string3'. @@ -5162,7 +5262,7 @@ Message _withArgumentsInitializeFromDillUnknownProblemNoDump( if (string2.isEmpty) throw 'No string provided'; if (string3.isEmpty) throw 'No string provided'; return new Message(codeInitializeFromDillUnknownProblemNoDump, - message: + problemMessage: """Tried to initialize from a previous compilation (${string}), but couldn't. Error message was '${string2}'. Stacktrace included '${string3}'. @@ -5180,15 +5280,17 @@ const Code codeInitializedVariableInForEach = const MessageCode messageInitializedVariableInForEach = const MessageCode( "InitializedVariableInForEach", index: 82, - message: r"""The loop variable in a for-each loop can't be initialized.""", - tip: + problemMessage: + r"""The loop variable in a for-each loop can't be initialized.""", + correctionMessage: r"""Try removing the initializer, or using a different kind of loop."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateInitializerForStaticField = const Template( - messageTemplate: r"""'#name' isn't an instance field of this class.""", + problemMessageTemplate: + r"""'#name' isn't an instance field of this class.""", withArguments: _withArgumentsInitializerForStaticField); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5201,7 +5303,7 @@ Message _withArgumentsInitializerForStaticField(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeInitializerForStaticField, - message: """'${name}' isn't an instance field of this class.""", + problemMessage: """'${name}' isn't an instance field of this class.""", arguments: {'name': name}); } @@ -5213,12 +5315,12 @@ const Code codeInitializingFormalTypeMismatchField = const MessageCode messageInitializingFormalTypeMismatchField = const MessageCode("InitializingFormalTypeMismatchField", severity: Severity.context, - message: r"""The field that corresponds to the parameter."""); + problemMessage: r"""The field that corresponds to the parameter."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateInputFileNotFound = const Template( - messageTemplate: r"""Input file not found: #uri.""", + problemMessageTemplate: r"""Input file not found: #uri.""", withArguments: _withArgumentsInputFileNotFound); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5231,16 +5333,18 @@ const Code codeInputFileNotFound = Message _withArgumentsInputFileNotFound(Uri uri_) { String? uri = relativizeUri(uri_); return new Message(codeInputFileNotFound, - message: """Input file not found: ${uri}.""", arguments: {'uri': uri_}); + problemMessage: """Input file not found: ${uri}.""", + arguments: {'uri': uri_}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateInstantiationTooFewArguments = const Template( - messageTemplate: + problemMessageTemplate: r"""Too few type arguments: #count required, #count2 given.""", - tipTemplate: r"""Try adding the missing type arguments.""", + correctionMessageTemplate: + r"""Try adding the missing type arguments.""", withArguments: _withArgumentsInstantiationTooFewArguments); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5257,9 +5361,9 @@ Message _withArgumentsInstantiationTooFewArguments(int count, int count2) { // ignore: unnecessary_null_comparison if (count2 == null) throw 'No count provided'; return new Message(codeInstantiationTooFewArguments, - message: + problemMessage: """Too few type arguments: ${count} required, ${count2} given.""", - tip: """Try adding the missing type arguments.""", + correctionMessage: """Try adding the missing type arguments.""", arguments: {'count': count, 'count2': count2}); } @@ -5267,9 +5371,10 @@ Message _withArgumentsInstantiationTooFewArguments(int count, int count2) { const Template templateInstantiationTooManyArguments = const Template( - messageTemplate: + problemMessageTemplate: r"""Too many type arguments: #count allowed, but #count2 found.""", - tipTemplate: r"""Try removing the extra type arguments.""", + correctionMessageTemplate: + r"""Try removing the extra type arguments.""", withArguments: _withArgumentsInstantiationTooManyArguments); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5286,9 +5391,9 @@ Message _withArgumentsInstantiationTooManyArguments(int count, int count2) { // ignore: unnecessary_null_comparison if (count2 == null) throw 'No count provided'; return new Message(codeInstantiationTooManyArguments, - message: + problemMessage: """Too many type arguments: ${count} allowed, but ${count2} found.""", - tip: """Try removing the extra type arguments.""", + correctionMessage: """Try removing the extra type arguments.""", arguments: {'count': count, 'count2': count2}); } @@ -5298,9 +5403,9 @@ const Template< String string)> templateIntegerLiteralIsOutOfRange = const Template< Message Function(String string)>( - messageTemplate: + problemMessageTemplate: r"""The integer literal #string can't be represented in 64 bits.""", - tipTemplate: + 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.""", withArguments: _withArgumentsIntegerLiteralIsOutOfRange); @@ -5313,9 +5418,9 @@ const Code codeIntegerLiteralIsOutOfRange = Message _withArgumentsIntegerLiteralIsOutOfRange(String string) { if (string.isEmpty) throw 'No string provided'; return new Message(codeIntegerLiteralIsOutOfRange, - message: + problemMessage: """The integer literal ${string} can't be represented in 64 bits.""", - tip: + correctionMessage: """Try using the BigInt class if you need an integer larger than 9,223,372,036,854,775,807 or less than -9,223,372,036,854,775,808.""", arguments: {'string': string}); } @@ -5327,7 +5432,7 @@ const Template< String name2)> templateInterfaceCheck = const Template< Message Function(String name, String name2)>( - messageTemplate: + problemMessageTemplate: r"""The implementation of '#name' in the non-abstract class '#name2' does not conform to its interface.""", withArguments: _withArgumentsInterfaceCheck); @@ -5344,7 +5449,7 @@ Message _withArgumentsInterfaceCheck(String name, String name2) { if (name2.isEmpty) throw 'No name provided'; name2 = demangleMixinApplicationName(name2); return new Message(codeInterfaceCheck, - message: + problemMessage: """The implementation of '${name}' in the non-abstract class '${name2}' does not conform to its interface.""", arguments: {'name': name, 'name2': name2}); } @@ -5357,7 +5462,8 @@ const Code codeInternalProblemAlreadyInitialized = const MessageCode messageInternalProblemAlreadyInitialized = const MessageCode( "InternalProblemAlreadyInitialized", severity: Severity.internalProblem, - message: r"""Attempt to set initializer on field without initializer."""); + problemMessage: + r"""Attempt to set initializer on field without initializer."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeInternalProblemBodyOnAbstractMethod = @@ -5367,13 +5473,13 @@ const Code codeInternalProblemBodyOnAbstractMethod = const MessageCode messageInternalProblemBodyOnAbstractMethod = const MessageCode("InternalProblemBodyOnAbstractMethod", severity: Severity.internalProblem, - message: r"""Attempting to set body on abstract method."""); + problemMessage: r"""Attempting to set body on abstract method."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateInternalProblemConstructorNotFound = const Template( - messageTemplate: r"""No constructor named '#name' in '#uri'.""", + problemMessageTemplate: r"""No constructor named '#name' in '#uri'.""", withArguments: _withArgumentsInternalProblemConstructorNotFound); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5390,7 +5496,7 @@ Message _withArgumentsInternalProblemConstructorNotFound( name = demangleMixinApplicationName(name); String? uri = relativizeUri(uri_); return new Message(codeInternalProblemConstructorNotFound, - message: """No constructor named '${name}' in '${uri}'.""", + problemMessage: """No constructor named '${name}' in '${uri}'.""", arguments: {'name': name, 'uri': uri_}); } @@ -5398,7 +5504,7 @@ Message _withArgumentsInternalProblemConstructorNotFound( const Template templateInternalProblemContextSeverity = const Template( - messageTemplate: + problemMessageTemplate: r"""Non-context message has context severity: #string""", withArguments: _withArgumentsInternalProblemContextSeverity); @@ -5412,7 +5518,7 @@ const Code codeInternalProblemContextSeverity = Message _withArgumentsInternalProblemContextSeverity(String string) { if (string.isEmpty) throw 'No string provided'; return new Message(codeInternalProblemContextSeverity, - message: """Non-context message has context severity: ${string}""", + problemMessage: """Non-context message has context severity: ${string}""", arguments: {'string': string}); } @@ -5420,7 +5526,7 @@ Message _withArgumentsInternalProblemContextSeverity(String string) { const Template templateInternalProblemDebugAbort = const Template( - messageTemplate: r"""Compilation aborted due to fatal '#name' at: + problemMessageTemplate: r"""Compilation aborted due to fatal '#name' at: #string""", withArguments: _withArgumentsInternalProblemDebugAbort); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5436,7 +5542,7 @@ Message _withArgumentsInternalProblemDebugAbort(String name, String string) { name = demangleMixinApplicationName(name); if (string.isEmpty) throw 'No string provided'; return new Message(codeInternalProblemDebugAbort, - message: """Compilation aborted due to fatal '${name}' at: + problemMessage: """Compilation aborted due to fatal '${name}' at: ${string}""", arguments: {'name': name, 'string': string}); } @@ -5448,7 +5554,7 @@ const Code codeInternalProblemExtendingUnmodifiableScope = const MessageCode messageInternalProblemExtendingUnmodifiableScope = const MessageCode("InternalProblemExtendingUnmodifiableScope", severity: Severity.internalProblem, - message: r"""Can't extend an unmodifiable scope."""); + problemMessage: r"""Can't extend an unmodifiable scope."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeInternalProblemLabelUsageInVariablesDeclaration = @@ -5458,7 +5564,7 @@ const Code codeInternalProblemLabelUsageInVariablesDeclaration = const MessageCode messageInternalProblemLabelUsageInVariablesDeclaration = const MessageCode("InternalProblemLabelUsageInVariablesDeclaration", severity: Severity.internalProblem, - message: + problemMessage: r"""Unexpected usage of label inside declaration of variables."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5469,14 +5575,14 @@ const Code codeInternalProblemMissingContext = const MessageCode messageInternalProblemMissingContext = const MessageCode( "InternalProblemMissingContext", severity: Severity.internalProblem, - message: r"""Compiler cannot run without a compiler context.""", - tip: + problemMessage: r"""Compiler cannot run without a compiler context.""", + correctionMessage: r"""Are calls to the compiler wrapped in CompilerContext.runInContext?"""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateInternalProblemNotFound = const Template( - messageTemplate: r"""Couldn't find '#name'.""", + problemMessageTemplate: r"""Couldn't find '#name'.""", withArguments: _withArgumentsInternalProblemNotFound); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5489,14 +5595,15 @@ Message _withArgumentsInternalProblemNotFound(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeInternalProblemNotFound, - message: """Couldn't find '${name}'.""", arguments: {'name': name}); + problemMessage: """Couldn't find '${name}'.""", + arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateInternalProblemNotFoundIn = const Template( - messageTemplate: r"""Couldn't find '#name' in '#name2'.""", + problemMessageTemplate: r"""Couldn't find '#name' in '#name2'.""", withArguments: _withArgumentsInternalProblemNotFoundIn); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5513,7 +5620,7 @@ Message _withArgumentsInternalProblemNotFoundIn(String name, String name2) { if (name2.isEmpty) throw 'No name provided'; name2 = demangleMixinApplicationName(name2); return new Message(codeInternalProblemNotFoundIn, - message: """Couldn't find '${name}' in '${name2}'.""", + problemMessage: """Couldn't find '${name}' in '${name2}'.""", arguments: {'name': name, 'name2': name2}); } @@ -5525,13 +5632,14 @@ const Code codeInternalProblemPreviousTokenNotFound = const MessageCode messageInternalProblemPreviousTokenNotFound = const MessageCode("InternalProblemPreviousTokenNotFound", severity: Severity.internalProblem, - message: r"""Couldn't find previous token."""); + problemMessage: r"""Couldn't find previous token."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateInternalProblemPrivateConstructorAccess = const Template( - messageTemplate: r"""Can't access private constructor '#name'.""", + problemMessageTemplate: + r"""Can't access private constructor '#name'.""", withArguments: _withArgumentsInternalProblemPrivateConstructorAccess); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5546,7 +5654,7 @@ Message _withArgumentsInternalProblemPrivateConstructorAccess(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeInternalProblemPrivateConstructorAccess, - message: """Can't access private constructor '${name}'.""", + problemMessage: """Can't access private constructor '${name}'.""", arguments: {'name': name}); } @@ -5558,14 +5666,14 @@ const Code codeInternalProblemProvidedBothCompileSdkAndSdkSummary = const MessageCode messageInternalProblemProvidedBothCompileSdkAndSdkSummary = const MessageCode("InternalProblemProvidedBothCompileSdkAndSdkSummary", severity: Severity.internalProblem, - message: + problemMessage: r"""The compileSdk and sdkSummary options are mutually exclusive"""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateInternalProblemStackNotEmpty = const Template( - messageTemplate: r"""#name.stack isn't empty: + problemMessageTemplate: r"""#name.stack isn't empty: #string""", withArguments: _withArgumentsInternalProblemStackNotEmpty); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5581,7 +5689,7 @@ Message _withArgumentsInternalProblemStackNotEmpty(String name, String string) { name = demangleMixinApplicationName(name); if (string.isEmpty) throw 'No string provided'; return new Message(codeInternalProblemStackNotEmpty, - message: """${name}.stack isn't empty: + problemMessage: """${name}.stack isn't empty: ${string}""", arguments: {'name': name, 'string': string}); } @@ -5589,7 +5697,7 @@ Message _withArgumentsInternalProblemStackNotEmpty(String name, String string) { const Template templateInternalProblemUnexpected = const Template( - messageTemplate: r"""Expected '#string', but got '#string2'.""", + problemMessageTemplate: r"""Expected '#string', but got '#string2'.""", withArguments: _withArgumentsInternalProblemUnexpected); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5604,7 +5712,7 @@ Message _withArgumentsInternalProblemUnexpected(String string, String string2) { if (string.isEmpty) throw 'No string provided'; if (string2.isEmpty) throw 'No string provided'; return new Message(codeInternalProblemUnexpected, - message: """Expected '${string}', but got '${string2}'.""", + problemMessage: """Expected '${string}', but got '${string2}'.""", arguments: {'string': string, 'string2': string2}); } @@ -5615,7 +5723,7 @@ const Template< Uri uri_)> templateInternalProblemUnfinishedTypeVariable = const Template< Message Function(String name, Uri uri_)>( - messageTemplate: + problemMessageTemplate: r"""Unfinished type variable '#name' found in non-source library '#uri'.""", withArguments: _withArgumentsInternalProblemUnfinishedTypeVariable); @@ -5633,7 +5741,7 @@ Message _withArgumentsInternalProblemUnfinishedTypeVariable( name = demangleMixinApplicationName(name); String? uri = relativizeUri(uri_); return new Message(codeInternalProblemUnfinishedTypeVariable, - message: + problemMessage: """Unfinished type variable '${name}' found in non-source library '${uri}'.""", arguments: {'name': name, 'uri': uri_}); } @@ -5642,7 +5750,7 @@ Message _withArgumentsInternalProblemUnfinishedTypeVariable( const Template templateInternalProblemUnhandled = const Template( - messageTemplate: r"""Unhandled #string in #string2.""", + problemMessageTemplate: r"""Unhandled #string in #string2.""", withArguments: _withArgumentsInternalProblemUnhandled); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5657,7 +5765,7 @@ Message _withArgumentsInternalProblemUnhandled(String string, String string2) { if (string.isEmpty) throw 'No string provided'; if (string2.isEmpty) throw 'No string provided'; return new Message(codeInternalProblemUnhandled, - message: """Unhandled ${string} in ${string2}.""", + problemMessage: """Unhandled ${string} in ${string2}.""", arguments: {'string': string, 'string2': string2}); } @@ -5665,7 +5773,7 @@ Message _withArgumentsInternalProblemUnhandled(String string, String string2) { const Template templateInternalProblemUnimplemented = const Template( - messageTemplate: r"""Unimplemented #string.""", + problemMessageTemplate: r"""Unimplemented #string.""", withArguments: _withArgumentsInternalProblemUnimplemented); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5677,14 +5785,15 @@ const Code codeInternalProblemUnimplemented = Message _withArgumentsInternalProblemUnimplemented(String string) { if (string.isEmpty) throw 'No string provided'; return new Message(codeInternalProblemUnimplemented, - message: """Unimplemented ${string}.""", arguments: {'string': string}); + problemMessage: """Unimplemented ${string}.""", + arguments: {'string': string}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateInternalProblemUnsupported = const Template( - messageTemplate: r"""Unsupported operation: '#name'.""", + problemMessageTemplate: r"""Unsupported operation: '#name'.""", withArguments: _withArgumentsInternalProblemUnsupported); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5697,7 +5806,7 @@ Message _withArgumentsInternalProblemUnsupported(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeInternalProblemUnsupported, - message: """Unsupported operation: '${name}'.""", + problemMessage: """Unsupported operation: '${name}'.""", arguments: {'name': name}); } @@ -5705,7 +5814,7 @@ Message _withArgumentsInternalProblemUnsupported(String name) { const Template templateInternalProblemUriMissingScheme = const Template( - messageTemplate: r"""The URI '#uri' has no scheme.""", + problemMessageTemplate: r"""The URI '#uri' has no scheme.""", withArguments: _withArgumentsInternalProblemUriMissingScheme); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5717,15 +5826,18 @@ const Code codeInternalProblemUriMissingScheme = Message _withArgumentsInternalProblemUriMissingScheme(Uri uri_) { String? uri = relativizeUri(uri_); return new Message(codeInternalProblemUriMissingScheme, - message: """The URI '${uri}' has no scheme.""", arguments: {'uri': uri_}); + problemMessage: """The URI '${uri}' has no scheme.""", + arguments: {'uri': uri_}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateInternalProblemVerificationError = const Template( - messageTemplate: r"""Verification of the generated program failed: -#string""", withArguments: _withArgumentsInternalProblemVerificationError); + problemMessageTemplate: + r"""Verification of the generated program failed: +#string""", + withArguments: _withArgumentsInternalProblemVerificationError); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code @@ -5738,7 +5850,7 @@ const Code Message _withArgumentsInternalProblemVerificationError(String string) { if (string.isEmpty) throw 'No string provided'; return new Message(codeInternalProblemVerificationError, - message: """Verification of the generated program failed: + problemMessage: """Verification of the generated program failed: ${string}""", arguments: {'string': string}); } @@ -5749,7 +5861,7 @@ const Code codeInterpolationInUri = messageInterpolationInUri; const MessageCode messageInterpolationInUri = const MessageCode( "InterpolationInUri", analyzerCodes: ["INVALID_LITERAL_IN_CONFIGURATION"], - message: r"""Can't use string interpolation in a URI."""); + problemMessage: r"""Can't use string interpolation in a URI."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeInvalidAwaitFor = messageInvalidAwaitFor; @@ -5757,14 +5869,15 @@ const Code codeInvalidAwaitFor = messageInvalidAwaitFor; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageInvalidAwaitFor = const MessageCode("InvalidAwaitFor", index: 9, - message: + problemMessage: r"""The keyword 'await' isn't allowed for a normal 'for' statement.""", - tip: r"""Try removing the keyword, or use a for-each statement."""); + correctionMessage: + r"""Try removing the keyword, or use a for-each statement."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateInvalidBreakTarget = const Template( - messageTemplate: r"""Can't break to '#name'.""", + problemMessageTemplate: r"""Can't break to '#name'.""", withArguments: _withArgumentsInvalidBreakTarget); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5778,7 +5891,8 @@ Message _withArgumentsInvalidBreakTarget(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeInvalidBreakTarget, - message: """Can't break to '${name}'.""", arguments: {'name': name}); + problemMessage: """Can't break to '${name}'.""", + arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5788,7 +5902,7 @@ const Code codeInvalidCatchArguments = messageInvalidCatchArguments; const MessageCode messageInvalidCatchArguments = const MessageCode( "InvalidCatchArguments", analyzerCodes: ["INVALID_CATCH_ARGUMENTS"], - message: r"""Invalid catch arguments."""); + problemMessage: r"""Invalid catch arguments."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeInvalidCodePoint = messageInvalidCodePoint; @@ -5797,13 +5911,13 @@ const Code codeInvalidCodePoint = messageInvalidCodePoint; const MessageCode messageInvalidCodePoint = const MessageCode( "InvalidCodePoint", analyzerCodes: ["INVALID_CODE_POINT"], - message: + problemMessage: r"""The escape sequence starting with '\u' isn't a valid code point."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateInvalidContinueTarget = const Template( - messageTemplate: r"""Can't continue at '#name'.""", + problemMessageTemplate: r"""Can't continue at '#name'.""", withArguments: _withArgumentsInvalidContinueTarget); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5817,14 +5931,16 @@ Message _withArgumentsInvalidContinueTarget(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeInvalidContinueTarget, - message: """Can't continue at '${name}'.""", arguments: {'name': name}); + problemMessage: """Can't continue at '${name}'.""", + arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateInvalidGetterSetterTypeFieldContext = const Template( - messageTemplate: r"""This is the declaration of the field '#name'.""", + problemMessageTemplate: + r"""This is the declaration of the field '#name'.""", withArguments: _withArgumentsInvalidGetterSetterTypeFieldContext); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5839,7 +5955,7 @@ Message _withArgumentsInvalidGetterSetterTypeFieldContext(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeInvalidGetterSetterTypeFieldContext, - message: """This is the declaration of the field '${name}'.""", + problemMessage: """This is the declaration of the field '${name}'.""", arguments: {'name': name}); } @@ -5847,7 +5963,8 @@ Message _withArgumentsInvalidGetterSetterTypeFieldContext(String name) { const Template templateInvalidGetterSetterTypeGetterContext = const Template( - messageTemplate: r"""This is the declaration of the getter '#name'.""", + problemMessageTemplate: + r"""This is the declaration of the getter '#name'.""", withArguments: _withArgumentsInvalidGetterSetterTypeGetterContext); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5862,7 +5979,7 @@ Message _withArgumentsInvalidGetterSetterTypeGetterContext(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeInvalidGetterSetterTypeGetterContext, - message: """This is the declaration of the getter '${name}'.""", + problemMessage: """This is the declaration of the getter '${name}'.""", arguments: {'name': name}); } @@ -5870,7 +5987,8 @@ Message _withArgumentsInvalidGetterSetterTypeGetterContext(String name) { const Template templateInvalidGetterSetterTypeSetterContext = const Template( - messageTemplate: r"""This is the declaration of the setter '#name'.""", + problemMessageTemplate: + r"""This is the declaration of the setter '#name'.""", withArguments: _withArgumentsInvalidGetterSetterTypeSetterContext); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5885,7 +6003,7 @@ Message _withArgumentsInvalidGetterSetterTypeSetterContext(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeInvalidGetterSetterTypeSetterContext, - message: """This is the declaration of the setter '${name}'.""", + problemMessage: """This is the declaration of the setter '${name}'.""", arguments: {'name': name}); } @@ -5896,7 +6014,7 @@ const Code codeInvalidHexEscape = messageInvalidHexEscape; const MessageCode messageInvalidHexEscape = const MessageCode( "InvalidHexEscape", index: 40, - message: + problemMessage: r"""An escape sequence starting with '\x' must be followed by 2 hexadecimal digits."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5906,8 +6024,9 @@ const Code codeInvalidInitializer = messageInvalidInitializer; const MessageCode messageInvalidInitializer = const MessageCode( "InvalidInitializer", index: 90, - message: r"""Not a valid initializer.""", - tip: r"""To initialize a field, use the syntax 'name = value'."""); + problemMessage: r"""Not a valid initializer.""", + correctionMessage: + r"""To initialize a field, use the syntax 'name = value'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeInvalidInlineFunctionType = @@ -5917,9 +6036,9 @@ const Code codeInvalidInlineFunctionType = const MessageCode messageInvalidInlineFunctionType = const MessageCode( "InvalidInlineFunctionType", analyzerCodes: ["INVALID_INLINE_FUNCTION_TYPE"], - message: + problemMessage: r"""Inline function types cannot be used for parameters in a generic function type.""", - tip: + correctionMessage: r"""Try changing the inline function type (as in 'int f()') to a prefixed function type using the `Function` keyword (as in 'int Function() f')."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5928,12 +6047,12 @@ const Code codeInvalidNnbdDillLibrary = messageInvalidNnbdDillLibrary; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageInvalidNnbdDillLibrary = const MessageCode( "InvalidNnbdDillLibrary", - message: r"""Trying to use library with invalid null safety."""); + problemMessage: r"""Trying to use library with invalid null safety."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateInvalidOperator = const Template( - messageTemplate: + problemMessageTemplate: r"""The string '#lexeme' isn't a user-definable operator.""", withArguments: _withArgumentsInvalidOperator); @@ -5945,7 +6064,8 @@ const Code codeInvalidOperator = Message _withArgumentsInvalidOperator(Token token) { String lexeme = token.lexeme; return new Message(codeInvalidOperator, - message: """The string '${lexeme}' isn't a user-definable operator.""", + problemMessage: + """The string '${lexeme}' isn't a user-definable operator.""", arguments: {'lexeme': token}); } @@ -5953,7 +6073,7 @@ Message _withArgumentsInvalidOperator(Token token) { const Template templateInvalidPackageUri = const Template( - messageTemplate: r"""Invalid package URI '#uri': + problemMessageTemplate: r"""Invalid package URI '#uri': #string.""", withArguments: _withArgumentsInvalidPackageUri); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5967,7 +6087,7 @@ Message _withArgumentsInvalidPackageUri(Uri uri_, String string) { String? uri = relativizeUri(uri_); if (string.isEmpty) throw 'No string provided'; return new Message(codeInvalidPackageUri, - message: """Invalid package URI '${uri}': + problemMessage: """Invalid package URI '${uri}': ${string}.""", arguments: {'uri': uri_, 'string': string}); } @@ -5979,7 +6099,7 @@ const Code codeInvalidSuperInInitializer = const MessageCode messageInvalidSuperInInitializer = const MessageCode( "InvalidSuperInInitializer", index: 47, - message: + problemMessage: r"""Can only use 'super' in an initializer for calling the superclass constructor (e.g. 'super()' or 'super.namedConstructor()')"""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -5989,8 +6109,8 @@ const Code codeInvalidSyncModifier = messageInvalidSyncModifier; const MessageCode messageInvalidSyncModifier = const MessageCode( "InvalidSyncModifier", analyzerCodes: ["MISSING_STAR_AFTER_SYNC"], - message: r"""Invalid modifier 'sync'.""", - tip: r"""Try replacing 'sync' with 'sync*'."""); + problemMessage: r"""Invalid modifier 'sync'.""", + correctionMessage: r"""Try replacing 'sync' with 'sync*'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeInvalidThisInInitializer = messageInvalidThisInInitializer; @@ -5999,7 +6119,7 @@ const Code codeInvalidThisInInitializer = messageInvalidThisInInitializer; const MessageCode messageInvalidThisInInitializer = const MessageCode( "InvalidThisInInitializer", index: 65, - message: + problemMessage: r"""Can only use 'this' in an initializer for field initialization (e.g. 'this.x = something') and constructor redirection (e.g. 'this()' or 'this.namedConstructor())"""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -6009,8 +6129,9 @@ const Template< String string2, String name2)> templateInvalidTypeVariableInSupertype = const Template< - Message Function(String name, String string2, String name2)>( - messageTemplate: + Message Function( + String name, String string2, String name2)>( + problemMessageTemplate: r"""Can't use implicitly 'out' variable '#name' in an '#string2' position in supertype '#name2'.""", withArguments: _withArgumentsInvalidTypeVariableInSupertype); @@ -6030,7 +6151,7 @@ Message _withArgumentsInvalidTypeVariableInSupertype( if (name2.isEmpty) throw 'No name provided'; name2 = demangleMixinApplicationName(name2); return new Message(codeInvalidTypeVariableInSupertype, - message: + problemMessage: """Can't use implicitly 'out' variable '${name}' in an '${string2}' position in supertype '${name2}'.""", arguments: {'name': name, 'string2': string2, 'name2': name2}); } @@ -6042,7 +6163,7 @@ const Template< templateInvalidTypeVariableInSupertypeWithVariance = const Template< Message Function( String string, String name, String string2, String name2)>( - messageTemplate: + problemMessageTemplate: r"""Can't use '#string' type variable '#name' in an '#string2' position in supertype '#name2'.""", withArguments: _withArgumentsInvalidTypeVariableInSupertypeWithVariance); @@ -6067,7 +6188,7 @@ Message _withArgumentsInvalidTypeVariableInSupertypeWithVariance( if (name2.isEmpty) throw 'No name provided'; name2 = demangleMixinApplicationName(name2); return new Message(codeInvalidTypeVariableInSupertypeWithVariance, - message: + problemMessage: """Can't use '${string}' type variable '${name}' in an '${string2}' position in supertype '${name2}'.""", arguments: { 'string': string, @@ -6085,7 +6206,7 @@ const Template< String string2)> templateInvalidTypeVariableVariancePosition = const Template< Message Function(String string, String name, String string2)>( - messageTemplate: + problemMessageTemplate: r"""Can't use '#string' type variable '#name' in an '#string2' position.""", withArguments: _withArgumentsInvalidTypeVariableVariancePosition); @@ -6104,7 +6225,7 @@ Message _withArgumentsInvalidTypeVariableVariancePosition( name = demangleMixinApplicationName(name); if (string2.isEmpty) throw 'No string provided'; return new Message(codeInvalidTypeVariableVariancePosition, - message: + problemMessage: """Can't use '${string}' type variable '${name}' in an '${string2}' position.""", arguments: {'string': string, 'name': name, 'string2': string2}); } @@ -6113,7 +6234,7 @@ Message _withArgumentsInvalidTypeVariableVariancePosition( const Template templateInvalidTypeVariableVariancePositionInReturnType = const Template< Message Function(String string, String name, String string2)>( - messageTemplate: + problemMessageTemplate: r"""Can't use '#string' type variable '#name' in an '#string2' position in the return type.""", withArguments: _withArgumentsInvalidTypeVariableVariancePositionInReturnType); @@ -6133,7 +6254,7 @@ Message _withArgumentsInvalidTypeVariableVariancePositionInReturnType( name = demangleMixinApplicationName(name); if (string2.isEmpty) throw 'No string provided'; return new Message(codeInvalidTypeVariableVariancePositionInReturnType, - message: + problemMessage: """Can't use '${string}' type variable '${name}' in an '${string2}' position in the return type.""", arguments: {'string': string, 'name': name, 'string2': string2}); } @@ -6145,7 +6266,7 @@ const Code codeInvalidUnicodeEscape = messageInvalidUnicodeEscape; const MessageCode messageInvalidUnicodeEscape = const MessageCode( "InvalidUnicodeEscape", index: 38, - message: + problemMessage: r"""An escape sequence starting with '\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -6156,8 +6277,8 @@ const Code codeInvalidUseOfNullAwareAccess = const MessageCode messageInvalidUseOfNullAwareAccess = const MessageCode( "InvalidUseOfNullAwareAccess", analyzerCodes: ["INVALID_USE_OF_NULL_AWARE_ACCESS"], - message: r"""Cannot use '?.' here.""", - tip: r"""Try using '.'."""); + problemMessage: r"""Cannot use '?.' here.""", + correctionMessage: r"""Try using '.'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeInvalidVoid = messageInvalidVoid; @@ -6165,14 +6286,14 @@ const Code codeInvalidVoid = messageInvalidVoid; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageInvalidVoid = const MessageCode("InvalidVoid", analyzerCodes: ["EXPECTED_TYPE_NAME"], - message: r"""Type 'void' can't be used here.""", - tip: + problemMessage: r"""Type 'void' can't be used here.""", + correctionMessage: r"""Try removing 'void' keyword or replace it with 'var', 'final', or a type."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateInvokeNonFunction = const Template( - messageTemplate: + problemMessageTemplate: r"""'#name' isn't a function or method and can't be invoked.""", withArguments: _withArgumentsInvokeNonFunction); @@ -6186,7 +6307,8 @@ Message _withArgumentsInvokeNonFunction(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeInvokeNonFunction, - message: """'${name}' isn't a function or method and can't be invoked.""", + problemMessage: + """'${name}' isn't a function or method and can't be invoked.""", arguments: {'name': name}); } @@ -6197,9 +6319,10 @@ const Code codeJsInteropAnonymousFactoryPositionalParameters = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageJsInteropAnonymousFactoryPositionalParameters = const MessageCode("JsInteropAnonymousFactoryPositionalParameters", - message: + problemMessage: r"""Factory constructors for @anonymous JS interop classes should not contain any positional parameters.""", - tip: r"""Try replacing them with named parameters instead."""); + correctionMessage: + r"""Try replacing them with named parameters instead."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -6208,9 +6331,9 @@ const Template< String name2)> templateJsInteropDartClassExtendsJSClass = const Template< Message Function(String name, String name2)>( - messageTemplate: + problemMessageTemplate: r"""Dart class '#name' cannot extend JS interop class '#name2'.""", - tipTemplate: + correctionMessageTemplate: r"""Try adding the JS interop annotation or removing it from the parent class.""", withArguments: _withArgumentsJsInteropDartClassExtendsJSClass); @@ -6229,9 +6352,9 @@ Message _withArgumentsJsInteropDartClassExtendsJSClass( if (name2.isEmpty) throw 'No name provided'; name2 = demangleMixinApplicationName(name2); return new Message(codeJsInteropDartClassExtendsJSClass, - message: + problemMessage: """Dart class '${name}' cannot extend JS interop class '${name2}'.""", - tip: + correctionMessage: """Try adding the JS interop annotation or removing it from the parent class.""", arguments: {'name': name, 'name2': name2}); } @@ -6243,9 +6366,10 @@ const Code codeJsInteropEnclosingClassJSAnnotation = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageJsInteropEnclosingClassJSAnnotation = const MessageCode( "JsInteropEnclosingClassJSAnnotation", - message: + problemMessage: r"""Member has a JS interop annotation but the enclosing class does not.""", - tip: r"""Try adding the annotation to the enclosing class."""); + correctionMessage: + r"""Try adding the annotation to the enclosing class."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeJsInteropEnclosingClassJSAnnotationContext = @@ -6255,7 +6379,7 @@ const Code codeJsInteropEnclosingClassJSAnnotationContext = const MessageCode messageJsInteropEnclosingClassJSAnnotationContext = const MessageCode("JsInteropEnclosingClassJSAnnotationContext", severity: Severity.context, - message: r"""This is the enclosing class."""); + problemMessage: r"""This is the enclosing class."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeJsInteropExternalExtensionMemberOnTypeInvalid = @@ -6264,9 +6388,9 @@ const Code codeJsInteropExternalExtensionMemberOnTypeInvalid = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageJsInteropExternalExtensionMemberOnTypeInvalid = const MessageCode("JsInteropExternalExtensionMemberOnTypeInvalid", - message: + problemMessage: r"""JS interop or Native class required for 'external' extension members.""", - tip: + correctionMessage: r"""Try adding a JS interop annotation to the on type class of the extension."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -6276,8 +6400,8 @@ const Code codeJsInteropExternalMemberNotJSAnnotated = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageJsInteropExternalMemberNotJSAnnotated = const MessageCode( "JsInteropExternalMemberNotJSAnnotated", - message: r"""Only JS interop members may be 'external'.""", - tip: + problemMessage: r"""Only JS interop members may be 'external'.""", + correctionMessage: r"""Try removing the 'external' keyword or adding a JS interop annotation."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -6287,9 +6411,9 @@ const Code codeJsInteropIndexNotSupported = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageJsInteropIndexNotSupported = const MessageCode( "JsInteropIndexNotSupported", - message: + problemMessage: r"""JS interop classes do not support [] and []= operator methods.""", - tip: r"""Try replacing with a normal method."""); + correctionMessage: r"""Try replacing with a normal method."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -6298,9 +6422,9 @@ const Template< String name2)> templateJsInteropJSClassExtendsDartClass = const Template< Message Function(String name, String name2)>( - messageTemplate: + problemMessageTemplate: r"""JS interop class '#name' cannot extend Dart class '#name2'.""", - tipTemplate: + correctionMessageTemplate: r"""Try removing the JS interop annotation or adding it to the parent class.""", withArguments: _withArgumentsJsInteropJSClassExtendsDartClass); @@ -6319,9 +6443,9 @@ Message _withArgumentsJsInteropJSClassExtendsDartClass( if (name2.isEmpty) throw 'No name provided'; name2 = demangleMixinApplicationName(name2); return new Message(codeJsInteropJSClassExtendsDartClass, - message: + problemMessage: """JS interop class '${name}' cannot extend Dart class '${name2}'.""", - tip: + correctionMessage: """Try removing the JS interop annotation or adding it to the parent class.""", arguments: {'name': name, 'name2': name2}); } @@ -6332,9 +6456,10 @@ const Code codeJsInteropNamedParameters = messageJsInteropNamedParameters; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageJsInteropNamedParameters = const MessageCode( "JsInteropNamedParameters", - message: + problemMessage: r"""Named parameters for JS interop functions are only allowed in a factory constructor of an @anonymous JS class.""", - tip: r"""Try replacing them with normal or optional parameters."""); + correctionMessage: + r"""Try replacing them with normal or optional parameters."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -6343,10 +6468,11 @@ const Template< String name2, String string3)> templateJsInteropNativeClassInAnnotation = const Template< - Message Function(String name, String name2, String string3)>( - messageTemplate: + Message Function( + String name, String name2, String string3)>( + problemMessageTemplate: r"""JS interop class '#name' conflicts with natively supported class '#name2' in '#string3'.""", - tipTemplate: + correctionMessageTemplate: r"""Try making the @JS class into an @anonymous class or use js_util on the JS object.""", withArguments: _withArgumentsJsInteropNativeClassInAnnotation); @@ -6366,9 +6492,9 @@ Message _withArgumentsJsInteropNativeClassInAnnotation( name2 = demangleMixinApplicationName(name2); if (string3.isEmpty) throw 'No string provided'; return new Message(codeJsInteropNativeClassInAnnotation, - message: + problemMessage: """JS interop class '${name}' conflicts with natively supported class '${name2}' in '${string3}'.""", - tip: """Try making the @JS class into an @anonymous class or use js_util on the JS object.""", + correctionMessage: """Try making the @JS class into an @anonymous class or use js_util on the JS object.""", arguments: {'name': name, 'name2': name2, 'string3': string3}); } @@ -6379,9 +6505,9 @@ const Code codeJsInteropNonExternalConstructor = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageJsInteropNonExternalConstructor = const MessageCode( "JsInteropNonExternalConstructor", - message: + problemMessage: r"""JS interop classes do not support non-external constructors.""", - tip: r"""Try annotating with `external`."""); + correctionMessage: r"""Try annotating with `external`."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeJsInteropNonExternalMember = @@ -6390,16 +6516,16 @@ const Code codeJsInteropNonExternalMember = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageJsInteropNonExternalMember = const MessageCode( "JsInteropNonExternalMember", - message: + problemMessage: r"""This JS interop member must be annotated with `external`. Only factories and static methods can be non-external.""", - tip: r"""Try annotating the member with `external`."""); + correctionMessage: r"""Try annotating the member with `external`."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< Message Function(String name)> templateLabelNotFound = const Template< Message Function(String name)>( - messageTemplate: r"""Can't find label '#name'.""", - tipTemplate: + problemMessageTemplate: r"""Can't find label '#name'.""", + correctionMessageTemplate: r"""Try defining the label, or correcting the name to match an existing label.""", withArguments: _withArgumentsLabelNotFound); @@ -6413,8 +6539,8 @@ Message _withArgumentsLabelNotFound(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeLabelNotFound, - message: """Can't find label '${name}'.""", - tip: + problemMessage: """Can't find label '${name}'.""", + correctionMessage: """Try defining the label, or correcting the name to match an existing label.""", arguments: {'name': name}); } @@ -6426,7 +6552,7 @@ const Code codeLanguageVersionInvalidInDotPackages = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageLanguageVersionInvalidInDotPackages = const MessageCode( "LanguageVersionInvalidInDotPackages", - message: + problemMessage: r"""The language version is not specified correctly in the packages file."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -6437,7 +6563,7 @@ const Code codeLanguageVersionLibraryContext = const MessageCode messageLanguageVersionLibraryContext = const MessageCode( "LanguageVersionLibraryContext", severity: Severity.context, - message: r"""This is language version annotation in the library."""); + problemMessage: r"""This is language version annotation in the library."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeLanguageVersionMismatchInPart = @@ -6446,7 +6572,7 @@ const Code codeLanguageVersionMismatchInPart = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageLanguageVersionMismatchInPart = const MessageCode( "LanguageVersionMismatchInPart", - message: + problemMessage: r"""The language version override has to be the same in the library and its part(s)."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -6456,7 +6582,7 @@ const Code codeLanguageVersionMismatchInPatch = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageLanguageVersionMismatchInPatch = const MessageCode( "LanguageVersionMismatchInPatch", - message: + problemMessage: r"""The language version override has to be the same in the library and its patch(es)."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -6467,7 +6593,7 @@ const Code codeLanguageVersionPartContext = const MessageCode messageLanguageVersionPartContext = const MessageCode( "LanguageVersionPartContext", severity: Severity.context, - message: r"""This is language version annotation in the part."""); + problemMessage: r"""This is language version annotation in the part."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeLanguageVersionPatchContext = @@ -6477,7 +6603,7 @@ const Code codeLanguageVersionPatchContext = const MessageCode messageLanguageVersionPatchContext = const MessageCode( "LanguageVersionPatchContext", severity: Severity.context, - message: r"""This is language version annotation in the patch."""); + problemMessage: r"""This is language version annotation in the patch."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -6486,7 +6612,7 @@ const Template< int count2)> templateLanguageVersionTooHigh = const Template< Message Function(int count, int count2)>( - messageTemplate: + problemMessageTemplate: r"""The specified language version is too high. The highest supported language version is #count.#count2.""", withArguments: _withArgumentsLanguageVersionTooHigh); @@ -6503,7 +6629,7 @@ Message _withArgumentsLanguageVersionTooHigh(int count, int count2) { // ignore: unnecessary_null_comparison if (count2 == null) throw 'No count provided'; return new Message(codeLanguageVersionTooHigh, - message: + problemMessage: """The specified language version is too high. The highest supported language version is ${count}.${count2}.""", arguments: {'count': count, 'count2': count2}); } @@ -6512,7 +6638,7 @@ Message _withArgumentsLanguageVersionTooHigh(int count, int count2) { const Template templateLateDefinitelyAssignedError = const Template( - messageTemplate: + problemMessageTemplate: r"""Late final variable '#name' definitely assigned.""", withArguments: _withArgumentsLateDefinitelyAssignedError); @@ -6527,7 +6653,7 @@ Message _withArgumentsLateDefinitelyAssignedError(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeLateDefinitelyAssignedError, - message: """Late final variable '${name}' definitely assigned.""", + problemMessage: """Late final variable '${name}' definitely assigned.""", arguments: {'name': name}); } @@ -6537,7 +6663,7 @@ const Template< String name)> templateLateDefinitelyUnassignedError = const Template< Message Function(String name)>( - messageTemplate: + problemMessageTemplate: r"""Late variable '#name' without initializer is definitely unassigned.""", withArguments: _withArgumentsLateDefinitelyUnassignedError); @@ -6552,7 +6678,7 @@ Message _withArgumentsLateDefinitelyUnassignedError(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeLateDefinitelyUnassignedError, - message: + problemMessage: """Late variable '${name}' without initializer is definitely unassigned.""", arguments: {'name': name}); } @@ -6564,9 +6690,10 @@ const Code codeLibraryDirectiveNotFirst = messageLibraryDirectiveNotFirst; const MessageCode messageLibraryDirectiveNotFirst = const MessageCode( "LibraryDirectiveNotFirst", index: 37, - message: + problemMessage: r"""The library directive must appear before all other directives.""", - tip: r"""Try moving the library directive before any other directives."""); + correctionMessage: + r"""Try moving the library directive before any other directives."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeListLiteralTooManyTypeArguments = @@ -6576,15 +6703,15 @@ const Code codeListLiteralTooManyTypeArguments = const MessageCode messageListLiteralTooManyTypeArguments = const MessageCode( "ListLiteralTooManyTypeArguments", analyzerCodes: ["EXPECTED_ONE_LIST_TYPE_ARGUMENTS"], - message: r"""List literal requires exactly one type argument."""); + problemMessage: r"""List literal requires exactly one type argument."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateLiteralWithClass = const Template( - messageTemplate: + problemMessageTemplate: r"""A #string literal can't be prefixed by '#lexeme'.""", - tipTemplate: r"""Try removing '#lexeme'""", + correctionMessageTemplate: r"""Try removing '#lexeme'""", withArguments: _withArgumentsLiteralWithClass); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -6597,18 +6724,20 @@ Message _withArgumentsLiteralWithClass(String string, Token token) { if (string.isEmpty) throw 'No string provided'; String lexeme = token.lexeme; return new Message(codeLiteralWithClass, - message: """A ${string} literal can't be prefixed by '${lexeme}'.""", - tip: """Try removing '${lexeme}'""", + problemMessage: + """A ${string} literal can't be prefixed by '${lexeme}'.""", + correctionMessage: """Try removing '${lexeme}'""", arguments: {'string': string, 'lexeme': token}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template +const Template< + Message Function(String string, Token token)> templateLiteralWithClassAndNew = const Template( - messageTemplate: + problemMessageTemplate: r"""A #string literal can't be prefixed by 'new #lexeme'.""", - tipTemplate: r"""Try removing 'new' and '#lexeme'""", + correctionMessageTemplate: r"""Try removing 'new' and '#lexeme'""", withArguments: _withArgumentsLiteralWithClassAndNew); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -6623,8 +6752,9 @@ Message _withArgumentsLiteralWithClassAndNew(String string, Token token) { if (string.isEmpty) throw 'No string provided'; String lexeme = token.lexeme; return new Message(codeLiteralWithClassAndNew, - message: """A ${string} literal can't be prefixed by 'new ${lexeme}'.""", - tip: """Try removing 'new' and '${lexeme}'""", + problemMessage: + """A ${string} literal can't be prefixed by 'new ${lexeme}'.""", + correctionMessage: """Try removing 'new' and '${lexeme}'""", arguments: {'string': string, 'lexeme': token}); } @@ -6634,8 +6764,8 @@ const Code codeLiteralWithNew = messageLiteralWithNew; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageLiteralWithNew = const MessageCode("LiteralWithNew", index: 117, - message: r"""A literal can't be prefixed by 'new'.""", - tip: r"""Try removing 'new'"""); + problemMessage: r"""A literal can't be prefixed by 'new'.""", + correctionMessage: r"""Try removing 'new'"""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeLoadLibraryTakesNoArguments = @@ -6645,7 +6775,7 @@ const Code codeLoadLibraryTakesNoArguments = const MessageCode messageLoadLibraryTakesNoArguments = const MessageCode( "LoadLibraryTakesNoArguments", analyzerCodes: ["LOAD_LIBRARY_TAKES_NO_ARGUMENTS"], - message: r"""'loadLibrary' takes no arguments."""); + problemMessage: r"""'loadLibrary' takes no arguments."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeMainNotFunctionDeclaration = @@ -6654,7 +6784,8 @@ const Code codeMainNotFunctionDeclaration = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageMainNotFunctionDeclaration = const MessageCode( "MainNotFunctionDeclaration", - message: r"""The 'main' declaration must be a function declaration."""); + problemMessage: + r"""The 'main' declaration must be a function declaration."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeMainNotFunctionDeclarationExported = @@ -6663,7 +6794,7 @@ const Code codeMainNotFunctionDeclarationExported = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageMainNotFunctionDeclarationExported = const MessageCode( "MainNotFunctionDeclarationExported", - message: + problemMessage: r"""The exported 'main' declaration must be a function declaration."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -6673,7 +6804,8 @@ const Code codeMainRequiredNamedParameters = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageMainRequiredNamedParameters = const MessageCode( "MainRequiredNamedParameters", - message: r"""The 'main' method cannot have required named parameters."""); + problemMessage: + r"""The 'main' method cannot have required named parameters."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeMainRequiredNamedParametersExported = @@ -6682,7 +6814,7 @@ const Code codeMainRequiredNamedParametersExported = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageMainRequiredNamedParametersExported = const MessageCode( "MainRequiredNamedParametersExported", - message: + problemMessage: r"""The exported 'main' method cannot have required named parameters."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -6692,7 +6824,8 @@ const Code codeMainTooManyRequiredParameters = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageMainTooManyRequiredParameters = const MessageCode( "MainTooManyRequiredParameters", - message: r"""The 'main' method must have at most 2 required parameters."""); + problemMessage: + r"""The 'main' method must have at most 2 required parameters."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeMainTooManyRequiredParametersExported = @@ -6701,7 +6834,7 @@ const Code codeMainTooManyRequiredParametersExported = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageMainTooManyRequiredParametersExported = const MessageCode( "MainTooManyRequiredParametersExported", - message: + problemMessage: r"""The exported 'main' method must have at most 2 required parameters."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -6712,12 +6845,12 @@ const Code codeMapLiteralTypeArgumentMismatch = const MessageCode messageMapLiteralTypeArgumentMismatch = const MessageCode( "MapLiteralTypeArgumentMismatch", analyzerCodes: ["EXPECTED_TWO_MAP_TYPE_ARGUMENTS"], - message: r"""A map literal requires exactly two type arguments."""); + problemMessage: r"""A map literal requires exactly two type arguments."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateMemberNotFound = const Template( - messageTemplate: r"""Member not found: '#name'.""", + problemMessageTemplate: r"""Member not found: '#name'.""", withArguments: _withArgumentsMemberNotFound); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -6730,7 +6863,8 @@ Message _withArgumentsMemberNotFound(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeMemberNotFound, - message: """Member not found: '${name}'.""", arguments: {'name': name}); + problemMessage: """Member not found: '${name}'.""", + arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -6741,9 +6875,9 @@ const Code codeMemberWithSameNameAsClass = const MessageCode messageMemberWithSameNameAsClass = const MessageCode( "MemberWithSameNameAsClass", index: 105, - message: + problemMessage: r"""A class member can't have the same name as the enclosing class.""", - tip: r"""Try renaming the member."""); + correctionMessage: r"""Try renaming the member."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeMetadataTypeArguments = messageMetadataTypeArguments; @@ -6752,7 +6886,7 @@ const Code codeMetadataTypeArguments = messageMetadataTypeArguments; const MessageCode messageMetadataTypeArguments = const MessageCode( "MetadataTypeArguments", index: 91, - message: r"""An annotation can't use type arguments."""); + problemMessage: r"""An annotation can't use type arguments."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeMetadataTypeArgumentsUninstantiated = @@ -6762,13 +6896,13 @@ const Code codeMetadataTypeArgumentsUninstantiated = const MessageCode messageMetadataTypeArgumentsUninstantiated = const MessageCode( "MetadataTypeArgumentsUninstantiated", index: 114, - message: + problemMessage: r"""An annotation with type arguments must be followed by an argument list."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateMethodNotFound = const Template( - messageTemplate: r"""Method not found: '#name'.""", + problemMessageTemplate: r"""Method not found: '#name'.""", withArguments: _withArgumentsMethodNotFound); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -6781,7 +6915,8 @@ Message _withArgumentsMethodNotFound(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeMethodNotFound, - message: """Method not found: '${name}'.""", arguments: {'name': name}); + problemMessage: """Method not found: '${name}'.""", + arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -6790,7 +6925,7 @@ const Code codeMissingArgumentList = messageMissingArgumentList; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageMissingArgumentList = const MessageCode( "MissingArgumentList", - message: r"""Constructor invocations must have an argument list."""); + problemMessage: r"""Constructor invocations must have an argument list."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeMissingAssignableSelector = @@ -6800,8 +6935,8 @@ const Code codeMissingAssignableSelector = const MessageCode messageMissingAssignableSelector = const MessageCode( "MissingAssignableSelector", index: 35, - message: r"""Missing selector such as '.identifier' or '[0]'.""", - tip: r"""Try adding a selector."""); + problemMessage: r"""Missing selector such as '.identifier' or '[0]'.""", + correctionMessage: r"""Try adding a selector."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeMissingAssignmentInInitializer = @@ -6811,8 +6946,9 @@ const Code codeMissingAssignmentInInitializer = const MessageCode messageMissingAssignmentInInitializer = const MessageCode( "MissingAssignmentInInitializer", index: 34, - message: r"""Expected an assignment after the field name.""", - tip: r"""To initialize a field, use the syntax 'name = value'."""); + problemMessage: r"""Expected an assignment after the field name.""", + correctionMessage: + r"""To initialize a field, use the syntax 'name = value'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeMissingConstFinalVarOrType = @@ -6822,9 +6958,9 @@ const Code codeMissingConstFinalVarOrType = const MessageCode messageMissingConstFinalVarOrType = const MessageCode( "MissingConstFinalVarOrType", index: 33, - message: + problemMessage: r"""Variables must be declared using the keywords 'const', 'final', 'var' or a type name.""", - tip: + correctionMessage: r"""Try adding the name of the type of the variable or the keyword 'var'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -6834,8 +6970,8 @@ const Code codeMissingExplicitConst = messageMissingExplicitConst; const MessageCode messageMissingExplicitConst = const MessageCode( "MissingExplicitConst", analyzerCodes: ["NOT_CONSTANT_EXPRESSION"], - message: r"""Constant expression expected.""", - tip: r"""Try inserting 'const'."""); + problemMessage: r"""Constant expression expected.""", + correctionMessage: r"""Try inserting 'const'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeMissingExponent = messageMissingExponent; @@ -6843,9 +6979,9 @@ const Code codeMissingExponent = messageMissingExponent; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageMissingExponent = const MessageCode("MissingExponent", analyzerCodes: ["MISSING_DIGIT"], - message: + problemMessage: r"""Numbers in exponential notation should always contain an exponent (an integer number with an optional sign).""", - tip: + correctionMessage: r"""Make sure there is an exponent, and remove any whitespace before it."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -6855,8 +6991,8 @@ const Code codeMissingExpressionInThrow = messageMissingExpressionInThrow; const MessageCode messageMissingExpressionInThrow = const MessageCode( "MissingExpressionInThrow", index: 32, - message: r"""Missing expression after 'throw'.""", - tip: + problemMessage: r"""Missing expression after 'throw'.""", + correctionMessage: r"""Add an expression after 'throw' or use 'rethrow' to throw a caught exception"""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -6867,15 +7003,16 @@ const Code codeMissingFunctionParameters = const MessageCode messageMissingFunctionParameters = const MessageCode( "MissingFunctionParameters", analyzerCodes: ["MISSING_FUNCTION_PARAMETERS"], - message: + problemMessage: r"""A function declaration needs an explicit list of parameters.""", - tip: r"""Try adding a parameter list to the function declaration."""); + correctionMessage: + r"""Try adding a parameter list to the function declaration."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateMissingImplementationCause = const Template( - messageTemplate: r"""'#name' is defined here.""", + problemMessageTemplate: r"""'#name' is defined here.""", withArguments: _withArgumentsMissingImplementationCause); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -6888,7 +7025,8 @@ Message _withArgumentsMissingImplementationCause(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeMissingImplementationCause, - message: """'${name}' is defined here.""", arguments: {'name': name}); + problemMessage: """'${name}' is defined here.""", + arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -6898,10 +7036,10 @@ const Template< List _names)> templateMissingImplementationNotAbstract = const Template< Message Function(String name, List _names)>( - messageTemplate: + problemMessageTemplate: r"""The non-abstract class '#name' is missing implementations for these members: #names""", - tipTemplate: 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 @@ -6924,10 +7062,10 @@ Message _withArgumentsMissingImplementationNotAbstract( if (_names.isEmpty) throw 'No names provided'; String names = itemizeNames(_names); return new Message(codeMissingImplementationNotAbstract, - message: + problemMessage: """The non-abstract class '${name}' is missing implementations for these members: ${names}""", - tip: """Try to either + correctionMessage: """Try to either - provide an implementation, - inherit an implementation from a superclass or mixin, - mark the class as abstract, or @@ -6941,15 +7079,16 @@ const Code codeMissingInput = messageMissingInput; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageMissingInput = const MessageCode("MissingInput", - message: r"""No input file provided to the compiler."""); + problemMessage: r"""No input file provided to the compiler."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeMissingMain = messageMissingMain; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageMissingMain = const MessageCode("MissingMain", - message: r"""No 'main' method found.""", - tip: r"""Try adding a method named 'main' to your program."""); + problemMessage: r"""No 'main' method found.""", + correctionMessage: + r"""Try adding a method named 'main' to your program."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeMissingMethodParameters = messageMissingMethodParameters; @@ -6958,8 +7097,10 @@ const Code codeMissingMethodParameters = messageMissingMethodParameters; const MessageCode messageMissingMethodParameters = const MessageCode( "MissingMethodParameters", analyzerCodes: ["MISSING_METHOD_PARAMETERS"], - message: r"""A method declaration needs an explicit list of parameters.""", - tip: r"""Try adding a parameter list to the method declaration."""); + problemMessage: + r"""A method declaration needs an explicit list of parameters.""", + correctionMessage: + r"""Try adding a parameter list to the method declaration."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeMissingOperatorKeyword = messageMissingOperatorKeyword; @@ -6968,15 +7109,15 @@ const Code codeMissingOperatorKeyword = messageMissingOperatorKeyword; const MessageCode messageMissingOperatorKeyword = const MessageCode( "MissingOperatorKeyword", index: 31, - message: + problemMessage: r"""Operator declarations must be preceded by the keyword 'operator'.""", - tip: r"""Try adding the keyword 'operator'."""); + correctionMessage: r"""Try adding the keyword 'operator'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< Message Function(Uri uri_)> templateMissingPartOf = const Template< Message Function(Uri uri_)>( - messageTemplate: + problemMessageTemplate: r"""Can't use '#uri' as a part, because it has no 'part of' declaration.""", withArguments: _withArgumentsMissingPartOf); @@ -6989,7 +7130,7 @@ const Code codeMissingPartOf = Message _withArgumentsMissingPartOf(Uri uri_) { String? uri = relativizeUri(uri_); return new Message(codeMissingPartOf, - message: + problemMessage: """Can't use '${uri}' as a part, because it has no 'part of' declaration.""", arguments: {'uri': uri_}); } @@ -7002,8 +7143,9 @@ const Code codeMissingPrefixInDeferredImport = const MessageCode messageMissingPrefixInDeferredImport = const MessageCode( "MissingPrefixInDeferredImport", index: 30, - message: r"""Deferred imports should have a prefix.""", - tip: r"""Try adding a prefix to the import by adding an 'as' clause."""); + problemMessage: r"""Deferred imports should have a prefix.""", + correctionMessage: + r"""Try adding a prefix to the import by adding an 'as' clause."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeMissingTypedefParameters = messageMissingTypedefParameters; @@ -7012,8 +7154,8 @@ const Code codeMissingTypedefParameters = messageMissingTypedefParameters; const MessageCode messageMissingTypedefParameters = const MessageCode( "MissingTypedefParameters", analyzerCodes: ["MISSING_TYPEDEF_PARAMETERS"], - message: r"""A typedef needs an explicit list of parameters.""", - tip: r"""Try adding a parameter list to the typedef."""); + problemMessage: r"""A typedef needs an explicit list of parameters.""", + correctionMessage: r"""Try adding a parameter list to the typedef."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeMixinDeclaresConstructor = messageMixinDeclaresConstructor; @@ -7022,7 +7164,7 @@ const Code codeMixinDeclaresConstructor = messageMixinDeclaresConstructor; const MessageCode messageMixinDeclaresConstructor = const MessageCode( "MixinDeclaresConstructor", index: 95, - message: r"""Mixins can't declare constructors."""); + problemMessage: r"""Mixins can't declare constructors."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeMixinFunction = messageMixinFunction; @@ -7030,8 +7172,8 @@ const Code codeMixinFunction = messageMixinFunction; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageMixinFunction = const MessageCode("MixinFunction", severity: Severity.ignored, - message: r"""Mixing in 'Function' is deprecated.""", - tip: r"""Try removing 'Function' from the 'with' clause."""); + problemMessage: r"""Mixing in 'Function' is deprecated.""", + correctionMessage: r"""Try removing 'Function' from the 'with' clause."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -7040,9 +7182,9 @@ const Template< String string2)> templateModifierOutOfOrder = const Template< Message Function(String string, String string2)>( - messageTemplate: + problemMessageTemplate: r"""The modifier '#string' should be before the modifier '#string2'.""", - tipTemplate: r"""Try re-ordering the modifiers.""", + correctionMessageTemplate: r"""Try re-ordering the modifiers.""", withArguments: _withArgumentsModifierOutOfOrder); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -7057,9 +7199,9 @@ Message _withArgumentsModifierOutOfOrder(String string, String string2) { if (string.isEmpty) throw 'No string provided'; if (string2.isEmpty) throw 'No string provided'; return new Message(codeModifierOutOfOrder, - message: + problemMessage: """The modifier '${string}' should be before the modifier '${string2}'.""", - tip: """Try re-ordering the modifiers.""", + correctionMessage: """Try re-ordering the modifiers.""", arguments: {'string': string, 'string2': string2}); } @@ -7071,7 +7213,7 @@ const Code codeMoreThanOneSuperInitializer = const MessageCode messageMoreThanOneSuperInitializer = const MessageCode( "MoreThanOneSuperInitializer", analyzerCodes: ["MULTIPLE_SUPER_INITIALIZERS"], - message: r"""Can't have more than one 'super' initializer."""); + problemMessage: r"""Can't have more than one 'super' initializer."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeMultipleExtends = messageMultipleExtends; @@ -7079,8 +7221,9 @@ const Code codeMultipleExtends = messageMultipleExtends; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageMultipleExtends = const MessageCode("MultipleExtends", index: 28, - message: r"""Each class definition can have at most one extends clause.""", - tip: + problemMessage: + r"""Each class definition can have at most one extends clause.""", + correctionMessage: r"""Try choosing one superclass and define your class to implement (or mix in) the others."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -7090,9 +7233,9 @@ const Code codeMultipleImplements = messageMultipleImplements; const MessageCode messageMultipleImplements = const MessageCode( "MultipleImplements", analyzerCodes: ["MULTIPLE_IMPLEMENTS_CLAUSES"], - message: + problemMessage: r"""Each class definition can have at most one implements clause.""", - tip: + correctionMessage: r"""Try combining all of the implements clauses into a single clause."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -7103,8 +7246,10 @@ const Code codeMultipleLibraryDirectives = const MessageCode messageMultipleLibraryDirectives = const MessageCode( "MultipleLibraryDirectives", index: 27, - message: r"""Only one library directive may be declared in a file.""", - tip: r"""Try removing all but one of the library directives."""); + problemMessage: + r"""Only one library directive may be declared in a file.""", + correctionMessage: + r"""Try removing all but one of the library directives."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeMultipleOnClauses = messageMultipleOnClauses; @@ -7113,8 +7258,10 @@ const Code codeMultipleOnClauses = messageMultipleOnClauses; const MessageCode messageMultipleOnClauses = const MessageCode( "MultipleOnClauses", index: 26, - message: r"""Each mixin definition can have at most one on clause.""", - tip: r"""Try combining all of the on clauses into a single clause."""); + problemMessage: + r"""Each mixin definition can have at most one on clause.""", + correctionMessage: + r"""Try combining all of the on clauses into a single clause."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeMultipleVarianceModifiers = @@ -7124,8 +7271,10 @@ const Code codeMultipleVarianceModifiers = const MessageCode messageMultipleVarianceModifiers = const MessageCode( "MultipleVarianceModifiers", index: 97, - message: r"""Each type parameter can have at most one variance modifier.""", - tip: r"""Use at most one of the 'in', 'out', or 'inout' modifiers."""); + problemMessage: + r"""Each type parameter can have at most one variance modifier.""", + correctionMessage: + r"""Use at most one of the 'in', 'out', or 'inout' modifiers."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeMultipleWith = messageMultipleWith; @@ -7133,13 +7282,15 @@ const Code codeMultipleWith = messageMultipleWith; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageMultipleWith = const MessageCode("MultipleWith", index: 24, - message: r"""Each class definition can have at most one with clause.""", - tip: r"""Try combining all of the with clauses into a single clause."""); + problemMessage: + r"""Each class definition can have at most one with clause.""", + correctionMessage: + r"""Try combining all of the with clauses into a single clause."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateNameNotFound = const Template( - messageTemplate: r"""Undefined name '#name'.""", + problemMessageTemplate: r"""Undefined name '#name'.""", withArguments: _withArgumentsNameNotFound); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -7152,7 +7303,8 @@ Message _withArgumentsNameNotFound(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeNameNotFound, - message: """Undefined name '${name}'.""", arguments: {'name': name}); + problemMessage: """Undefined name '${name}'.""", + arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -7162,7 +7314,7 @@ const Code codeNamedFunctionExpression = messageNamedFunctionExpression; const MessageCode messageNamedFunctionExpression = const MessageCode( "NamedFunctionExpression", analyzerCodes: ["NAMED_FUNCTION_EXPRESSION"], - message: r"""A function expression can't have a name."""); + problemMessage: r"""A function expression can't have a name."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -7171,7 +7323,7 @@ const Template< String name2)> templateNamedMixinOverride = const Template< Message Function(String name, String name2)>( - messageTemplate: + problemMessageTemplate: r"""The mixin application class '#name' introduces an erroneous override of '#name2'.""", withArguments: _withArgumentsNamedMixinOverride); @@ -7188,7 +7340,7 @@ Message _withArgumentsNamedMixinOverride(String name, String name2) { if (name2.isEmpty) throw 'No name provided'; name2 = demangleMixinApplicationName(name2); return new Message(codeNamedMixinOverride, - message: + problemMessage: """The mixin application class '${name}' introduces an erroneous override of '${name2}'.""", arguments: {'name': name, 'name2': name2}); } @@ -7201,8 +7353,8 @@ const Code codeNativeClauseShouldBeAnnotation = const MessageCode messageNativeClauseShouldBeAnnotation = const MessageCode( "NativeClauseShouldBeAnnotation", index: 23, - message: r"""Native clause in this form is deprecated.""", - tip: + problemMessage: r"""Native clause in this form is deprecated.""", + correctionMessage: r"""Try removing this native clause and adding @native() or @native('native-name') before the declaration."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -7212,7 +7364,7 @@ const Code codeNeverReachableSwitchDefaultError = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageNeverReachableSwitchDefaultError = const MessageCode( "NeverReachableSwitchDefaultError", - message: + problemMessage: r"""`null` encountered as case in a switch expression with a non-nullable enum type."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -7223,7 +7375,7 @@ const Code codeNeverReachableSwitchDefaultWarning = const MessageCode messageNeverReachableSwitchDefaultWarning = const MessageCode( "NeverReachableSwitchDefaultWarning", severity: Severity.warning, - message: + problemMessage: r"""The default case is not reachable with sound null safety because the switch expression is non-nullable."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -7231,7 +7383,7 @@ const Code codeNeverValueError = messageNeverValueError; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageNeverValueError = const MessageCode("NeverValueError", - message: + problemMessage: r"""`null` encountered as the result from expression with type `Never`."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -7241,15 +7393,15 @@ const Code codeNeverValueWarning = messageNeverValueWarning; const MessageCode messageNeverValueWarning = const MessageCode( "NeverValueWarning", severity: Severity.warning, - message: + problemMessage: r"""The expression can not result in a value with sound null safety because the expression type is `Never`."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< Message Function(Token token)> templateNoFormals = const Template< Message Function(Token token)>( - messageTemplate: r"""A function should have formal parameters.""", - tipTemplate: + problemMessageTemplate: r"""A function should have formal parameters.""", + correctionMessageTemplate: r"""Try adding '()' after '#lexeme', or add 'get' before '#lexeme' to declare a getter.""", withArguments: _withArgumentsNoFormals); @@ -7262,8 +7414,8 @@ const Code codeNoFormals = Message _withArgumentsNoFormals(Token token) { String lexeme = token.lexeme; return new Message(codeNoFormals, - message: """A function should have formal parameters.""", - tip: + problemMessage: """A function should have formal parameters.""", + correctionMessage: """Try adding '()' after '${lexeme}', or add 'get' before '${lexeme}' to declare a getter.""", arguments: {'lexeme': token}); } @@ -7271,7 +7423,8 @@ Message _withArgumentsNoFormals(Token token) { // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateNoSuchNamedParameter = const Template( - messageTemplate: r"""No named parameter with the name '#name'.""", + problemMessageTemplate: + r"""No named parameter with the name '#name'.""", withArguments: _withArgumentsNoSuchNamedParameter); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -7284,7 +7437,7 @@ Message _withArgumentsNoSuchNamedParameter(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeNoSuchNamedParameter, - message: """No named parameter with the name '${name}'.""", + problemMessage: """No named parameter with the name '${name}'.""", arguments: {'name': name}); } @@ -7295,7 +7448,7 @@ const Code codeNoUnnamedConstructorInObject = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageNoUnnamedConstructorInObject = const MessageCode( "NoUnnamedConstructorInObject", - message: r"""'Object' has no unnamed constructor."""); + problemMessage: r"""'Object' has no unnamed constructor."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeNonAgnosticConstant = messageNonAgnosticConstant; @@ -7303,7 +7456,7 @@ const Code codeNonAgnosticConstant = messageNonAgnosticConstant; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageNonAgnosticConstant = const MessageCode( "NonAgnosticConstant", - message: r"""Constant value is not strong/weak mode agnostic."""); + problemMessage: r"""Constant value is not strong/weak mode agnostic."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -7312,9 +7465,9 @@ const Template< int codePoint)> templateNonAsciiIdentifier = const Template< Message Function(String character, int codePoint)>( - messageTemplate: + problemMessageTemplate: r"""The non-ASCII character '#character' (#unicode) can't be used in identifiers, only in strings and comments.""", - tipTemplate: + correctionMessageTemplate: r"""Try using an US-ASCII letter, a digit, '_' (an underscore), or '$' (a dollar sign).""", withArguments: _withArgumentsNonAsciiIdentifier); @@ -7331,9 +7484,9 @@ Message _withArgumentsNonAsciiIdentifier(String character, int codePoint) { String unicode = "U+${codePoint.toRadixString(16).toUpperCase().padLeft(4, '0')}"; return new Message(codeNonAsciiIdentifier, - message: + problemMessage: """The non-ASCII character '${character}' (${unicode}) can't be used in identifiers, only in strings and comments.""", - tip: """Try using an US-ASCII letter, a digit, '_' (an underscore), or '\$' (a dollar sign).""", + correctionMessage: """Try using an US-ASCII letter, a digit, '_' (an underscore), or '\$' (a dollar sign).""", arguments: {'character': character, 'unicode': codePoint}); } @@ -7343,7 +7496,7 @@ const Template< int codePoint)> templateNonAsciiWhitespace = const Template< Message Function(int codePoint)>( - messageTemplate: + problemMessageTemplate: r"""The non-ASCII space character #unicode can only be used in strings and comments.""", withArguments: _withArgumentsNonAsciiWhitespace); @@ -7357,7 +7510,7 @@ Message _withArgumentsNonAsciiWhitespace(int codePoint) { String unicode = "U+${codePoint.toRadixString(16).toUpperCase().padLeft(4, '0')}"; return new Message(codeNonAsciiWhitespace, - message: + problemMessage: """The non-ASCII space character ${unicode} can only be used in strings and comments.""", arguments: {'unicode': codePoint}); } @@ -7369,9 +7522,10 @@ const Code codeNonConstConstructor = messageNonConstConstructor; const MessageCode messageNonConstConstructor = const MessageCode( "NonConstConstructor", analyzerCodes: ["NOT_CONSTANT_EXPRESSION"], - message: + problemMessage: r"""Cannot invoke a non-'const' constructor where a const expression is expected.""", - tip: r"""Try using a constructor or factory that is 'const'."""); + correctionMessage: + r"""Try using a constructor or factory that is 'const'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeNonConstFactory = messageNonConstFactory; @@ -7379,9 +7533,10 @@ const Code codeNonConstFactory = messageNonConstFactory; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageNonConstFactory = const MessageCode("NonConstFactory", analyzerCodes: ["NOT_CONSTANT_EXPRESSION"], - message: + problemMessage: r"""Cannot invoke a non-'const' factory where a const expression is expected.""", - tip: r"""Try using a constructor or factory that is 'const'."""); + correctionMessage: + r"""Try using a constructor or factory that is 'const'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeNonInstanceTypeVariableUse = @@ -7391,7 +7546,7 @@ const Code codeNonInstanceTypeVariableUse = const MessageCode messageNonInstanceTypeVariableUse = const MessageCode( "NonInstanceTypeVariableUse", analyzerCodes: ["TYPE_PARAMETER_REFERENCED_BY_STATIC"], - message: r"""Can only use type variables in instance methods."""); + problemMessage: r"""Can only use type variables in instance methods."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -7399,7 +7554,7 @@ const Template< String name)> templateNonNullableNotAssignedError = const Template< Message Function(String name)>( - messageTemplate: + problemMessageTemplate: r"""Non-nullable variable '#name' must be assigned before it can be used.""", withArguments: _withArgumentsNonNullableNotAssignedError); @@ -7414,7 +7569,7 @@ Message _withArgumentsNonNullableNotAssignedError(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeNonNullableNotAssignedError, - message: + problemMessage: """Non-nullable variable '${name}' must be assigned before it can be used.""", arguments: {'name': name}); } @@ -7426,7 +7581,7 @@ const Code codeNonNullableOptOutComment = messageNonNullableOptOutComment; const MessageCode messageNonNullableOptOutComment = const MessageCode( "NonNullableOptOutComment", severity: Severity.context, - message: + problemMessage: r"""This is the annotation that opts out this library from null safety features."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -7435,8 +7590,9 @@ const Template< String string)> templateNonNullableOptOutExplicit = const Template< Message Function(String string)>( - messageTemplate: r"""Null safety features are disabled for this library.""", - tipTemplate: + problemMessageTemplate: + r"""Null safety features are disabled for this library.""", + correctionMessageTemplate: r"""Try removing the `@dart=` annotation or setting the language version to #string or higher.""", withArguments: _withArgumentsNonNullableOptOutExplicit); @@ -7450,8 +7606,8 @@ const Code codeNonNullableOptOutExplicit = Message _withArgumentsNonNullableOptOutExplicit(String string) { if (string.isEmpty) throw 'No string provided'; return new Message(codeNonNullableOptOutExplicit, - message: """Null safety features are disabled for this library.""", - tip: + problemMessage: """Null safety features are disabled for this library.""", + correctionMessage: """Try removing the `@dart=` annotation or setting the language version to ${string} or higher.""", arguments: {'string': string}); } @@ -7462,8 +7618,9 @@ const Template< String string)> templateNonNullableOptOutImplicit = const Template< Message Function(String string)>( - messageTemplate: r"""Null safety features are disabled for this library.""", - tipTemplate: + problemMessageTemplate: + r"""Null safety features are disabled for this library.""", + correctionMessageTemplate: r"""Try removing the package language version or setting the language version to #string or higher.""", withArguments: _withArgumentsNonNullableOptOutImplicit); @@ -7477,8 +7634,8 @@ const Code codeNonNullableOptOutImplicit = Message _withArgumentsNonNullableOptOutImplicit(String string) { if (string.isEmpty) throw 'No string provided'; return new Message(codeNonNullableOptOutImplicit, - message: """Null safety features are disabled for this library.""", - tip: + problemMessage: """Null safety features are disabled for this library.""", + correctionMessage: """Try removing the package language version or setting the language version to ${string} or higher.""", arguments: {'string': string}); } @@ -7490,8 +7647,9 @@ const Code codeNonPartOfDirectiveInPart = messageNonPartOfDirectiveInPart; const MessageCode messageNonPartOfDirectiveInPart = const MessageCode( "NonPartOfDirectiveInPart", analyzerCodes: ["NON_PART_OF_DIRECTIVE_IN_PART"], - message: r"""The part-of directive must be the only directive in a part.""", - tip: + problemMessage: + r"""The part-of directive must be the only directive in a part.""", + correctionMessage: r"""Try removing the other directives, or moving them to the library for which this is a part."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -7501,13 +7659,13 @@ const Code codeNonPositiveArrayDimensions = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageNonPositiveArrayDimensions = const MessageCode( "NonPositiveArrayDimensions", - message: r"""Array dimensions must be positive numbers."""); + problemMessage: r"""Array dimensions must be positive numbers."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateNonSimpleBoundViaReference = const Template( - messageTemplate: + problemMessageTemplate: r"""Bound of this variable references raw type '#name'.""", withArguments: _withArgumentsNonSimpleBoundViaReference); @@ -7521,7 +7679,8 @@ Message _withArgumentsNonSimpleBoundViaReference(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeNonSimpleBoundViaReference, - message: """Bound of this variable references raw type '${name}'.""", + problemMessage: + """Bound of this variable references raw type '${name}'.""", arguments: {'name': name}); } @@ -7531,7 +7690,7 @@ const Template< String name)> templateNonSimpleBoundViaVariable = const Template< Message Function(String name)>( - messageTemplate: + problemMessageTemplate: r"""Bound of this variable references variable '#name' from the same declaration.""", withArguments: _withArgumentsNonSimpleBoundViaVariable); @@ -7545,7 +7704,7 @@ Message _withArgumentsNonSimpleBoundViaVariable(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeNonSimpleBoundViaVariable, - message: + problemMessage: """Bound of this variable references variable '${name}' from the same declaration.""", arguments: {'name': name}); } @@ -7557,8 +7716,8 @@ const Code codeNonVoidReturnOperator = messageNonVoidReturnOperator; const MessageCode messageNonVoidReturnOperator = const MessageCode( "NonVoidReturnOperator", analyzerCodes: ["NON_VOID_RETURN_FOR_OPERATOR"], - message: r"""The return type of the operator []= must be 'void'.""", - tip: r"""Try changing the return type to 'void'."""); + problemMessage: r"""The return type of the operator []= must be 'void'.""", + correctionMessage: r"""Try changing the return type to 'void'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeNonVoidReturnSetter = messageNonVoidReturnSetter; @@ -7567,8 +7726,9 @@ const Code codeNonVoidReturnSetter = messageNonVoidReturnSetter; const MessageCode messageNonVoidReturnSetter = const MessageCode( "NonVoidReturnSetter", analyzerCodes: ["NON_VOID_RETURN_FOR_SETTER"], - message: r"""The return type of the setter must be 'void' or absent.""", - tip: + problemMessage: + r"""The return type of the setter must be 'void' or absent.""", + correctionMessage: r"""Try removing the return type, or define a method rather than a setter."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -7578,7 +7738,7 @@ const Code codeNotAConstantExpression = messageNotAConstantExpression; const MessageCode messageNotAConstantExpression = const MessageCode( "NotAConstantExpression", analyzerCodes: ["NOT_CONSTANT_EXPRESSION"], - message: r"""Not a constant expression."""); + problemMessage: r"""Not a constant expression."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -7587,7 +7747,7 @@ const Template< String name2)> templateNotAPrefixInTypeAnnotation = const Template< Message Function(String name, String name2)>( - messageTemplate: + problemMessageTemplate: r"""'#name.#name2' can't be used as a type because '#name' doesn't refer to an import prefix.""", withArguments: _withArgumentsNotAPrefixInTypeAnnotation); @@ -7605,7 +7765,7 @@ Message _withArgumentsNotAPrefixInTypeAnnotation(String name, String name2) { if (name2.isEmpty) throw 'No name provided'; name2 = demangleMixinApplicationName(name2); return new Message(codeNotAPrefixInTypeAnnotation, - message: + problemMessage: """'${name}.${name2}' can't be used as a type because '${name}' doesn't refer to an import prefix.""", arguments: {'name': name, 'name2': name2}); } @@ -7613,7 +7773,7 @@ Message _withArgumentsNotAPrefixInTypeAnnotation(String name, String name2) { // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateNotAType = const Template( - messageTemplate: r"""'#name' isn't a type.""", + problemMessageTemplate: r"""'#name' isn't a type.""", withArguments: _withArgumentsNotAType); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -7626,7 +7786,7 @@ Message _withArgumentsNotAType(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeNotAType, - message: """'${name}' isn't a type.""", arguments: {'name': name}); + problemMessage: """'${name}' isn't a type.""", arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -7634,7 +7794,7 @@ const Code codeNotATypeContext = messageNotATypeContext; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageNotATypeContext = const MessageCode("NotATypeContext", - severity: Severity.context, message: r"""This isn't a type."""); + severity: Severity.context, problemMessage: r"""This isn't a type."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeNotAnLvalue = messageNotAnLvalue; @@ -7642,12 +7802,12 @@ const Code codeNotAnLvalue = messageNotAnLvalue; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageNotAnLvalue = const MessageCode("NotAnLvalue", analyzerCodes: ["NOT_AN_LVALUE"], - message: r"""Can't assign to this."""); + problemMessage: r"""Can't assign to this."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateNotBinaryOperator = const Template( - messageTemplate: r"""'#lexeme' isn't a binary operator.""", + problemMessageTemplate: r"""'#lexeme' isn't a binary operator.""", withArguments: _withArgumentsNotBinaryOperator); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -7660,14 +7820,14 @@ const Code codeNotBinaryOperator = Message _withArgumentsNotBinaryOperator(Token token) { String lexeme = token.lexeme; return new Message(codeNotBinaryOperator, - message: """'${lexeme}' isn't a binary operator.""", + problemMessage: """'${lexeme}' isn't a binary operator.""", arguments: {'lexeme': token}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateNotConstantExpression = const Template( - messageTemplate: r"""#string is not a constant expression.""", + problemMessageTemplate: r"""#string is not a constant expression.""", withArguments: _withArgumentsNotConstantExpression); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -7679,7 +7839,7 @@ const Code codeNotConstantExpression = Message _withArgumentsNotConstantExpression(String string) { if (string.isEmpty) throw 'No string provided'; return new Message(codeNotConstantExpression, - message: """${string} is not a constant expression.""", + problemMessage: """${string} is not a constant expression.""", arguments: {'string': string}); } @@ -7691,15 +7851,15 @@ const Code codeNullAwareCascadeOutOfOrder = const MessageCode messageNullAwareCascadeOutOfOrder = const MessageCode( "NullAwareCascadeOutOfOrder", index: 96, - message: + problemMessage: r"""The '?..' cascade operator must be first in the cascade sequence.""", - tip: + correctionMessage: r"""Try moving the '?..' operator to be the first cascade operator in the sequence."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateNullableInterfaceError = const Template( - messageTemplate: + problemMessageTemplate: r"""Can't implement '#name' because it's marked with '?'.""", withArguments: _withArgumentsNullableInterfaceError); @@ -7714,14 +7874,15 @@ Message _withArgumentsNullableInterfaceError(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeNullableInterfaceError, - message: """Can't implement '${name}' because it's marked with '?'.""", + problemMessage: + """Can't implement '${name}' because it's marked with '?'.""", arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateNullableMixinError = const Template( - messageTemplate: + problemMessageTemplate: r"""Can't mix '#name' in because it's marked with '?'.""", withArguments: _withArgumentsNullableMixinError); @@ -7736,7 +7897,8 @@ Message _withArgumentsNullableMixinError(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeNullableMixinError, - message: """Can't mix '${name}' in because it's marked with '?'.""", + problemMessage: + """Can't mix '${name}' in because it's marked with '?'.""", arguments: {'name': name}); } @@ -7746,13 +7908,13 @@ const Code codeNullableSpreadError = messageNullableSpreadError; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageNullableSpreadError = const MessageCode( "NullableSpreadError", - message: + problemMessage: r"""An expression whose value can be 'null' must be null-checked before it can be dereferenced."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateNullableSuperclassError = const Template( - messageTemplate: + problemMessageTemplate: r"""Can't extend '#name' because it's marked with '?'.""", withArguments: _withArgumentsNullableSuperclassError); @@ -7767,14 +7929,15 @@ Message _withArgumentsNullableSuperclassError(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeNullableSuperclassError, - message: """Can't extend '${name}' because it's marked with '?'.""", + problemMessage: + """Can't extend '${name}' because it's marked with '?'.""", arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateNullableTearoffError = const Template( - messageTemplate: + problemMessageTemplate: r"""Can't tear off method '#name' from a potentially null value.""", withArguments: _withArgumentsNullableTearoffError); @@ -7789,7 +7952,7 @@ Message _withArgumentsNullableTearoffError(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeNullableTearoffError, - message: + problemMessage: """Can't tear off method '${name}' from a potentially null value.""", arguments: {'name': name}); } @@ -7799,7 +7962,7 @@ const Code codeObjectExtends = messageObjectExtends; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageObjectExtends = const MessageCode("ObjectExtends", - message: r"""The class 'Object' can't have a superclass."""); + problemMessage: r"""The class 'Object' can't have a superclass."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeObjectImplements = messageObjectImplements; @@ -7807,14 +7970,14 @@ const Code codeObjectImplements = messageObjectImplements; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageObjectImplements = const MessageCode( "ObjectImplements", - message: r"""The class 'Object' can't implement anything."""); + problemMessage: r"""The class 'Object' can't implement anything."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeObjectMixesIn = messageObjectMixesIn; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageObjectMixesIn = const MessageCode("ObjectMixesIn", - message: r"""The class 'Object' can't use mixins."""); + problemMessage: r"""The class 'Object' can't use mixins."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeOnlyTry = messageOnlyTry; @@ -7822,9 +7985,9 @@ const Code codeOnlyTry = messageOnlyTry; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageOnlyTry = const MessageCode("OnlyTry", index: 20, - message: + problemMessage: r"""A try block must be followed by an 'on', 'catch', or 'finally' clause.""", - tip: + correctionMessage: r"""Try adding either a catch or finally clause, or remove the try statement."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -7833,8 +7996,9 @@ const Template< String name)> templateOperatorMinusParameterMismatch = const Template< Message Function(String name)>( - messageTemplate: r"""Operator '#name' should have zero or one parameter.""", - tipTemplate: + 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 '-'.""", withArguments: _withArgumentsOperatorMinusParameterMismatch); @@ -7850,8 +8014,9 @@ Message _withArgumentsOperatorMinusParameterMismatch(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeOperatorMinusParameterMismatch, - message: """Operator '${name}' should have zero or one parameter.""", - tip: + problemMessage: + """Operator '${name}' should have zero or one parameter.""", + correctionMessage: """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 '-'.""", arguments: {'name': name}); } @@ -7860,7 +8025,8 @@ Message _withArgumentsOperatorMinusParameterMismatch(String name) { const Template templateOperatorParameterMismatch0 = const Template( - messageTemplate: r"""Operator '#name' shouldn't have any parameters.""", + problemMessageTemplate: + r"""Operator '#name' shouldn't have any parameters.""", withArguments: _withArgumentsOperatorParameterMismatch0); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -7874,7 +8040,7 @@ Message _withArgumentsOperatorParameterMismatch0(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeOperatorParameterMismatch0, - message: """Operator '${name}' shouldn't have any parameters.""", + problemMessage: """Operator '${name}' shouldn't have any parameters.""", arguments: {'name': name}); } @@ -7882,7 +8048,7 @@ Message _withArgumentsOperatorParameterMismatch0(String name) { const Template templateOperatorParameterMismatch1 = const Template( - messageTemplate: + problemMessageTemplate: r"""Operator '#name' should have exactly one parameter.""", withArguments: _withArgumentsOperatorParameterMismatch1); @@ -7896,7 +8062,8 @@ Message _withArgumentsOperatorParameterMismatch1(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeOperatorParameterMismatch1, - message: """Operator '${name}' should have exactly one parameter.""", + problemMessage: + """Operator '${name}' should have exactly one parameter.""", arguments: {'name': name}); } @@ -7904,7 +8071,7 @@ Message _withArgumentsOperatorParameterMismatch1(String name) { const Template templateOperatorParameterMismatch2 = const Template( - messageTemplate: + problemMessageTemplate: r"""Operator '#name' should have exactly two parameters.""", withArguments: _withArgumentsOperatorParameterMismatch2); @@ -7918,7 +8085,8 @@ Message _withArgumentsOperatorParameterMismatch2(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeOperatorParameterMismatch2, - message: """Operator '${name}' should have exactly two parameters.""", + problemMessage: + """Operator '${name}' should have exactly two parameters.""", arguments: {'name': name}); } @@ -7929,7 +8097,7 @@ const Code codeOperatorWithOptionalFormals = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageOperatorWithOptionalFormals = const MessageCode( "OperatorWithOptionalFormals", - message: r"""An operator can't have optional parameters."""); + problemMessage: r"""An operator can't have optional parameters."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeOperatorWithTypeParameters = @@ -7939,13 +8107,14 @@ const Code codeOperatorWithTypeParameters = const MessageCode messageOperatorWithTypeParameters = const MessageCode( "OperatorWithTypeParameters", analyzerCodes: ["TYPE_PARAMETER_ON_OPERATOR"], - message: r"""Types parameters aren't allowed when defining an operator.""", - tip: r"""Try removing the type parameters."""); + problemMessage: + r"""Types parameters aren't allowed when defining an operator.""", + correctionMessage: r"""Try removing the type parameters."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateOverriddenMethodCause = const Template( - messageTemplate: r"""This is the overridden method ('#name').""", + problemMessageTemplate: r"""This is the overridden method ('#name').""", withArguments: _withArgumentsOverriddenMethodCause); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -7958,7 +8127,7 @@ Message _withArgumentsOverriddenMethodCause(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeOverriddenMethodCause, - message: """This is the overridden method ('${name}').""", + problemMessage: """This is the overridden method ('${name}').""", arguments: {'name': name}); } @@ -7969,7 +8138,7 @@ const Template< String name2)> templateOverrideFewerNamedArguments = const Template< Message Function(String name, String name2)>( - messageTemplate: + problemMessageTemplate: r"""The method '#name' has fewer named arguments than those of overridden method '#name2'.""", withArguments: _withArgumentsOverrideFewerNamedArguments); @@ -7987,7 +8156,7 @@ Message _withArgumentsOverrideFewerNamedArguments(String name, String name2) { if (name2.isEmpty) throw 'No name provided'; name2 = demangleMixinApplicationName(name2); return new Message(codeOverrideFewerNamedArguments, - message: + problemMessage: """The method '${name}' has fewer named arguments than those of overridden method '${name2}'.""", arguments: {'name': name, 'name2': name2}); } @@ -7999,7 +8168,7 @@ const Template< String name2)> templateOverrideFewerPositionalArguments = const Template< Message Function(String name, String name2)>( - messageTemplate: + problemMessageTemplate: r"""The method '#name' has fewer positional arguments than those of overridden method '#name2'.""", withArguments: _withArgumentsOverrideFewerPositionalArguments); @@ -8018,7 +8187,7 @@ Message _withArgumentsOverrideFewerPositionalArguments( if (name2.isEmpty) throw 'No name provided'; name2 = demangleMixinApplicationName(name2); return new Message(codeOverrideFewerPositionalArguments, - message: + problemMessage: """The method '${name}' has fewer positional arguments than those of overridden method '${name2}'.""", arguments: {'name': name, 'name2': name2}); } @@ -8031,7 +8200,7 @@ const Template< String name3)> templateOverrideMismatchNamedParameter = const Template< Message Function(String name, String name2, String name3)>( - messageTemplate: + problemMessageTemplate: r"""The method '#name' doesn't have the named parameter '#name2' of overridden method '#name3'.""", withArguments: _withArgumentsOverrideMismatchNamedParameter); @@ -8052,7 +8221,7 @@ Message _withArgumentsOverrideMismatchNamedParameter( if (name3.isEmpty) throw 'No name provided'; name3 = demangleMixinApplicationName(name3); return new Message(codeOverrideMismatchNamedParameter, - message: + problemMessage: """The method '${name}' doesn't have the named parameter '${name2}' of overridden method '${name3}'.""", arguments: {'name': name, 'name2': name2, 'name3': name3}); } @@ -8061,7 +8230,7 @@ Message _withArgumentsOverrideMismatchNamedParameter( const Template templateOverrideMismatchRequiredNamedParameter = const Template( - messageTemplate: + problemMessageTemplate: r"""The required named parameter '#name' in method '#name2' is not required in overridden method '#name3'.""", withArguments: _withArgumentsOverrideMismatchRequiredNamedParameter); @@ -8082,7 +8251,7 @@ Message _withArgumentsOverrideMismatchRequiredNamedParameter( if (name3.isEmpty) throw 'No name provided'; name3 = demangleMixinApplicationName(name3); return new Message(codeOverrideMismatchRequiredNamedParameter, - message: + problemMessage: """The required named parameter '${name}' in method '${name2}' is not required in overridden method '${name3}'.""", arguments: {'name': name, 'name2': name2, 'name3': name3}); } @@ -8094,7 +8263,7 @@ const Template< String name2)> templateOverrideMoreRequiredArguments = const Template< Message Function(String name, String name2)>( - messageTemplate: + problemMessageTemplate: r"""The method '#name' has more required arguments than those of overridden method '#name2'.""", withArguments: _withArgumentsOverrideMoreRequiredArguments); @@ -8112,7 +8281,7 @@ Message _withArgumentsOverrideMoreRequiredArguments(String name, String name2) { if (name2.isEmpty) throw 'No name provided'; name2 = demangleMixinApplicationName(name2); return new Message(codeOverrideMoreRequiredArguments, - message: + problemMessage: """The method '${name}' has more required arguments than those of overridden method '${name2}'.""", arguments: {'name': name, 'name2': name2}); } @@ -8124,7 +8293,7 @@ const Template< String name2)> templateOverrideTypeVariablesMismatch = const Template< Message Function(String name, String name2)>( - messageTemplate: + problemMessageTemplate: r"""Declared type variables of '#name' doesn't match those on overridden method '#name2'.""", withArguments: _withArgumentsOverrideTypeVariablesMismatch); @@ -8142,7 +8311,7 @@ Message _withArgumentsOverrideTypeVariablesMismatch(String name, String name2) { if (name2.isEmpty) throw 'No name provided'; name2 = demangleMixinApplicationName(name2); return new Message(codeOverrideTypeVariablesMismatch, - message: + problemMessage: """Declared type variables of '${name}' doesn't match those on overridden method '${name2}'.""", arguments: {'name': name, 'name2': name2}); } @@ -8151,7 +8320,8 @@ Message _withArgumentsOverrideTypeVariablesMismatch(String name, String name2) { const Template templatePackageNotFound = const Template( - messageTemplate: r"""Couldn't resolve the package '#name' in '#uri'.""", + problemMessageTemplate: + r"""Couldn't resolve the package '#name' in '#uri'.""", withArguments: _withArgumentsPackageNotFound); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -8166,14 +8336,15 @@ Message _withArgumentsPackageNotFound(String name, Uri uri_) { name = demangleMixinApplicationName(name); String? uri = relativizeUri(uri_); return new Message(codePackageNotFound, - message: """Couldn't resolve the package '${name}' in '${uri}'.""", + problemMessage: """Couldn't resolve the package '${name}' in '${uri}'.""", arguments: {'name': name, 'uri': uri_}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templatePackagesFileFormat = const Template( - messageTemplate: r"""Problem in packages configuration file: #string""", + problemMessageTemplate: + r"""Problem in packages configuration file: #string""", withArguments: _withArgumentsPackagesFileFormat); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -8186,7 +8357,7 @@ const Code codePackagesFileFormat = Message _withArgumentsPackagesFileFormat(String string) { if (string.isEmpty) throw 'No string provided'; return new Message(codePackagesFileFormat, - message: """Problem in packages configuration file: ${string}""", + problemMessage: """Problem in packages configuration file: ${string}""", arguments: {'string': string}); } @@ -8196,7 +8367,7 @@ const Code codePartExport = messagePartExport; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messagePartExport = const MessageCode("PartExport", analyzerCodes: ["EXPORT_OF_NON_LIBRARY"], - message: + problemMessage: r"""Can't export this file because it contains a 'part of' declaration."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -8206,7 +8377,7 @@ const Code codePartExportContext = messagePartExportContext; const MessageCode messagePartExportContext = const MessageCode( "PartExportContext", severity: Severity.context, - message: r"""This is the file that can't be exported."""); + problemMessage: r"""This is the file that can't be exported."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codePartInPart = messagePartInPart; @@ -8214,8 +8385,10 @@ const Code codePartInPart = messagePartInPart; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messagePartInPart = const MessageCode("PartInPart", analyzerCodes: ["NON_PART_OF_DIRECTIVE_IN_PART"], - message: r"""A file that's a part of a library can't have parts itself.""", - tip: r"""Try moving the 'part' declaration to the containing library."""); + problemMessage: + r"""A file that's a part of a library can't have parts itself.""", + correctionMessage: + r"""Try moving the 'part' declaration to the containing library."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codePartInPartLibraryContext = messagePartInPartLibraryContext; @@ -8224,15 +8397,15 @@ const Code codePartInPartLibraryContext = messagePartInPartLibraryContext; const MessageCode messagePartInPartLibraryContext = const MessageCode( "PartInPartLibraryContext", severity: Severity.context, - message: r"""This is the containing library."""); + problemMessage: r"""This is the containing library."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< Message Function(Uri uri_)> templatePartOfInLibrary = const Template< Message Function(Uri uri_)>( - messageTemplate: + problemMessageTemplate: r"""Can't import '#uri', because it has a 'part of' declaration.""", - tipTemplate: + correctionMessageTemplate: r"""Try removing the 'part of' declaration, or using '#uri' as a part.""", withArguments: _withArgumentsPartOfInLibrary); @@ -8245,9 +8418,9 @@ const Code codePartOfInLibrary = Message _withArgumentsPartOfInLibrary(Uri uri_) { String? uri = relativizeUri(uri_); return new Message(codePartOfInLibrary, - message: + problemMessage: """Can't import '${uri}', because it has a 'part of' declaration.""", - tip: + correctionMessage: """Try removing the 'part of' declaration, or using '${uri}' as a part.""", arguments: {'uri': uri_}); } @@ -8260,7 +8433,7 @@ const Template< String name2)> templatePartOfLibraryNameMismatch = const Template< Message Function(Uri uri_, String name, String name2)>( - messageTemplate: + problemMessageTemplate: r"""Using '#uri' as part of '#name' but its 'part of' declaration says '#name2'.""", withArguments: _withArgumentsPartOfLibraryNameMismatch); @@ -8280,7 +8453,7 @@ Message _withArgumentsPartOfLibraryNameMismatch( if (name2.isEmpty) throw 'No name provided'; name2 = demangleMixinApplicationName(name2); return new Message(codePartOfLibraryNameMismatch, - message: + problemMessage: """Using '${uri}' as part of '${name}' but its 'part of' declaration says '${name2}'.""", arguments: {'uri': uri_, 'name': name, 'name2': name2}); } @@ -8291,7 +8464,7 @@ const Code codePartOfSelf = messagePartOfSelf; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messagePartOfSelf = const MessageCode("PartOfSelf", analyzerCodes: ["PART_OF_NON_PART"], - message: r"""A file can't be a part of itself."""); + problemMessage: r"""A file can't be a part of itself."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codePartOfTwice = messagePartOfTwice; @@ -8299,8 +8472,10 @@ const Code codePartOfTwice = messagePartOfTwice; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messagePartOfTwice = const MessageCode("PartOfTwice", index: 25, - message: r"""Only one part-of directive may be declared in a file.""", - tip: r"""Try removing all but one of the part-of directives."""); + problemMessage: + r"""Only one part-of directive may be declared in a file.""", + correctionMessage: + r"""Try removing all but one of the part-of directives."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codePartOfTwoLibraries = messagePartOfTwoLibraries; @@ -8309,8 +8484,8 @@ const Code codePartOfTwoLibraries = messagePartOfTwoLibraries; const MessageCode messagePartOfTwoLibraries = const MessageCode( "PartOfTwoLibraries", analyzerCodes: ["PART_OF_DIFFERENT_LIBRARY"], - message: r"""A file can't be part of more than one library.""", - tip: + problemMessage: r"""A file can't be part of more than one library.""", + correctionMessage: r"""Try moving the shared declarations into the libraries, or into a new library."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -8321,7 +8496,7 @@ const Code codePartOfTwoLibrariesContext = const MessageCode messagePartOfTwoLibrariesContext = const MessageCode( "PartOfTwoLibrariesContext", severity: Severity.context, - message: r"""Used as a part in this library."""); + problemMessage: r"""Used as a part in this library."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -8331,7 +8506,7 @@ const Template< Uri uri3_)> templatePartOfUriMismatch = const Template< Message Function(Uri uri_, Uri uri2_, Uri uri3_)>( - messageTemplate: + problemMessageTemplate: r"""Using '#uri' as part of '#uri2' but its 'part of' declaration says '#uri3'.""", withArguments: _withArgumentsPartOfUriMismatch); @@ -8348,7 +8523,7 @@ Message _withArgumentsPartOfUriMismatch(Uri uri_, Uri uri2_, Uri uri3_) { String? uri2 = relativizeUri(uri2_); String? uri3 = relativizeUri(uri3_); return new Message(codePartOfUriMismatch, - message: + problemMessage: """Using '${uri}' as part of '${uri2}' but its 'part of' declaration says '${uri3}'.""", arguments: {'uri': uri_, 'uri2': uri2_, 'uri3': uri3_}); } @@ -8361,9 +8536,9 @@ const Template< String name)> templatePartOfUseUri = const Template< Message Function(Uri uri_, Uri uri2_, String name)>( - messageTemplate: + problemMessageTemplate: r"""Using '#uri' as part of '#uri2' but its 'part of' declaration says '#name'.""", - tipTemplate: + correctionMessageTemplate: r"""Try changing the 'part of' declaration to use a relative file name.""", withArguments: _withArgumentsPartOfUseUri); @@ -8381,9 +8556,9 @@ Message _withArgumentsPartOfUseUri(Uri uri_, Uri uri2_, String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codePartOfUseUri, - message: + problemMessage: """Using '${uri}' as part of '${uri2}' but its 'part of' declaration says '${name}'.""", - tip: """Try changing the 'part of' declaration to use a relative file name.""", + correctionMessage: """Try changing the 'part of' declaration to use a relative file name.""", arguments: {'uri': uri_, 'uri2': uri2_, 'name': name}); } @@ -8392,13 +8567,14 @@ const Code codePartOrphan = messagePartOrphan; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messagePartOrphan = const MessageCode("PartOrphan", - message: r"""This part doesn't have a containing library.""", - tip: r"""Try removing the 'part of' declaration."""); + problemMessage: r"""This part doesn't have a containing library.""", + correctionMessage: r"""Try removing the 'part of' declaration."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templatePartTwice = const Template( - messageTemplate: r"""Can't use '#uri' as a part more than once.""", + problemMessageTemplate: + r"""Can't use '#uri' as a part more than once.""", withArguments: _withArgumentsPartTwice); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -8410,7 +8586,7 @@ const Code codePartTwice = Message _withArgumentsPartTwice(Uri uri_) { String? uri = relativizeUri(uri_); return new Message(codePartTwice, - message: """Can't use '${uri}' as a part more than once.""", + problemMessage: """Can't use '${uri}' as a part more than once.""", arguments: {'uri': uri_}); } @@ -8421,7 +8597,7 @@ const Code codePatchClassOrigin = messagePatchClassOrigin; const MessageCode messagePatchClassOrigin = const MessageCode( "PatchClassOrigin", severity: Severity.context, - message: r"""This is the origin class."""); + problemMessage: r"""This is the origin class."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codePatchClassTypeVariablesMismatch = @@ -8430,7 +8606,7 @@ const Code codePatchClassTypeVariablesMismatch = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messagePatchClassTypeVariablesMismatch = const MessageCode( "PatchClassTypeVariablesMismatch", - message: + problemMessage: r"""A patch class must have the same number of type variables as its origin class."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -8439,7 +8615,7 @@ const Code codePatchDeclarationMismatch = messagePatchDeclarationMismatch; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messagePatchDeclarationMismatch = const MessageCode( "PatchDeclarationMismatch", - message: r"""This patch doesn't match origin declaration."""); + problemMessage: r"""This patch doesn't match origin declaration."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codePatchDeclarationOrigin = messagePatchDeclarationOrigin; @@ -8448,14 +8624,14 @@ const Code codePatchDeclarationOrigin = messagePatchDeclarationOrigin; const MessageCode messagePatchDeclarationOrigin = const MessageCode( "PatchDeclarationOrigin", severity: Severity.context, - message: r"""This is the origin declaration."""); + problemMessage: r"""This is the origin declaration."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templatePatchInjectionFailed = const Template( - messageTemplate: r"""Can't inject '#name' into '#uri'.""", - tipTemplate: r"""Try adding '@patch'.""", + problemMessageTemplate: r"""Can't inject '#name' into '#uri'.""", + correctionMessageTemplate: r"""Try adding '@patch'.""", withArguments: _withArgumentsPatchInjectionFailed); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -8470,8 +8646,8 @@ Message _withArgumentsPatchInjectionFailed(String name, Uri uri_) { name = demangleMixinApplicationName(name); String? uri = relativizeUri(uri_); return new Message(codePatchInjectionFailed, - message: """Can't inject '${name}' into '${uri}'.""", - tip: """Try adding '@patch'.""", + problemMessage: """Can't inject '${name}' into '${uri}'.""", + correctionMessage: """Try adding '@patch'.""", arguments: {'name': name, 'uri': uri_}); } @@ -8481,9 +8657,9 @@ const Code codePatchNonExternal = messagePatchNonExternal; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messagePatchNonExternal = const MessageCode( "PatchNonExternal", - message: + problemMessage: r"""Can't apply this patch as its origin declaration isn't external.""", - tip: r"""Try adding 'external' to the origin declaration."""); + correctionMessage: r"""Try adding 'external' to the origin declaration."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codePlatformPrivateLibraryAccess = @@ -8493,7 +8669,7 @@ const Code codePlatformPrivateLibraryAccess = const MessageCode messagePlatformPrivateLibraryAccess = const MessageCode( "PlatformPrivateLibraryAccess", analyzerCodes: ["IMPORT_INTERNAL_LIBRARY"], - message: r"""Can't access platform private library."""); + problemMessage: r"""Can't access platform private library."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codePositionalAfterNamedArgument = @@ -8503,8 +8679,8 @@ const Code codePositionalAfterNamedArgument = const MessageCode messagePositionalAfterNamedArgument = const MessageCode( "PositionalAfterNamedArgument", analyzerCodes: ["POSITIONAL_AFTER_NAMED_ARGUMENT"], - message: r"""Place positional arguments before named arguments.""", - tip: + problemMessage: r"""Place positional arguments before named arguments.""", + correctionMessage: r"""Try moving the positional argument before the named arguments, or add a name to the argument."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -8515,9 +8691,9 @@ const Code codePositionalParameterWithEquals = const MessageCode messagePositionalParameterWithEquals = const MessageCode( "PositionalParameterWithEquals", analyzerCodes: ["WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER"], - message: + problemMessage: r"""Positional optional parameters can't use ':' to specify a default value.""", - tip: r"""Try replacing ':' with '='."""); + correctionMessage: r"""Try replacing ':' with '='."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codePrefixAfterCombinator = messagePrefixAfterCombinator; @@ -8526,9 +8702,9 @@ const Code codePrefixAfterCombinator = messagePrefixAfterCombinator; const MessageCode messagePrefixAfterCombinator = const MessageCode( "PrefixAfterCombinator", index: 6, - message: + problemMessage: r"""The prefix ('as' clause) should come before any show/hide combinators.""", - tip: r"""Try moving the prefix before the combinators."""); + correctionMessage: r"""Try moving the prefix before the combinators."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codePrivateNamedParameter = messagePrivateNamedParameter; @@ -8537,7 +8713,7 @@ const Code codePrivateNamedParameter = messagePrivateNamedParameter; const MessageCode messagePrivateNamedParameter = const MessageCode( "PrivateNamedParameter", analyzerCodes: ["PRIVATE_OPTIONAL_PARAMETER"], - message: r"""An optional named parameter can't start with '_'."""); + problemMessage: r"""An optional named parameter can't start with '_'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeRedirectingConstructorWithAnotherInitializer = @@ -8547,7 +8723,7 @@ const Code codeRedirectingConstructorWithAnotherInitializer = const MessageCode messageRedirectingConstructorWithAnotherInitializer = const MessageCode("RedirectingConstructorWithAnotherInitializer", analyzerCodes: ["FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR"], - message: + problemMessage: r"""A redirecting constructor can't have other initializers."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -8558,8 +8734,8 @@ const Code codeRedirectingConstructorWithBody = const MessageCode messageRedirectingConstructorWithBody = const MessageCode( "RedirectingConstructorWithBody", index: 22, - message: r"""Redirecting constructors can't have a body.""", - tip: + problemMessage: r"""Redirecting constructors can't have a body.""", + correctionMessage: r"""Try removing the body, or not making this a redirecting constructor."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -8571,7 +8747,7 @@ const MessageCode messageRedirectingConstructorWithMultipleRedirectInitializers = const MessageCode("RedirectingConstructorWithMultipleRedirectInitializers", analyzerCodes: ["MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS"], - message: + problemMessage: r"""A redirecting constructor can't have more than one redirection."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -8582,7 +8758,7 @@ const Code codeRedirectingConstructorWithSuperInitializer = const MessageCode messageRedirectingConstructorWithSuperInitializer = const MessageCode("RedirectingConstructorWithSuperInitializer", analyzerCodes: ["SUPER_IN_REDIRECTING_CONSTRUCTOR"], - message: + problemMessage: r"""A redirecting constructor can't have a 'super' initializer."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -8592,15 +8768,16 @@ const Code codeRedirectionInNonFactory = messageRedirectionInNonFactory; const MessageCode messageRedirectionInNonFactory = const MessageCode( "RedirectionInNonFactory", index: 21, - message: r"""Only factory constructor can specify '=' redirection.""", - tip: + problemMessage: + r"""Only factory constructor can specify '=' redirection.""", + correctionMessage: r"""Try making this a factory constructor, or remove the redirection."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateRedirectionTargetNotFound = const Template( - messageTemplate: + problemMessageTemplate: r"""Redirection constructor target not found: '#name'""", withArguments: _withArgumentsRedirectionTargetNotFound); @@ -8614,7 +8791,7 @@ Message _withArgumentsRedirectionTargetNotFound(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeRedirectionTargetNotFound, - message: """Redirection constructor target not found: '${name}'""", + problemMessage: """Redirection constructor target not found: '${name}'""", arguments: {'name': name}); } @@ -8622,7 +8799,7 @@ Message _withArgumentsRedirectionTargetNotFound(String name) { const Template templateRequiredNamedParameterHasDefaultValueError = const Template( - messageTemplate: + problemMessageTemplate: r"""Named parameter '#name' is required and can't have a default value.""", withArguments: _withArgumentsRequiredNamedParameterHasDefaultValueError); @@ -8639,7 +8816,7 @@ Message _withArgumentsRequiredNamedParameterHasDefaultValueError(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeRequiredNamedParameterHasDefaultValueError, - message: + problemMessage: """Named parameter '${name}' is required and can't have a default value.""", arguments: {'name': name}); } @@ -8652,8 +8829,8 @@ const Code codeRequiredParameterWithDefault = const MessageCode messageRequiredParameterWithDefault = const MessageCode( "RequiredParameterWithDefault", analyzerCodes: ["NAMED_PARAMETER_OUTSIDE_GROUP"], - message: r"""Non-optional parameters can't have a default value.""", - tip: + problemMessage: r"""Non-optional parameters can't have a default value.""", + correctionMessage: r"""Try removing the default value or making the parameter optional."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -8662,7 +8839,7 @@ const Code codeRethrowNotCatch = messageRethrowNotCatch; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageRethrowNotCatch = const MessageCode("RethrowNotCatch", analyzerCodes: ["RETHROW_OUTSIDE_CATCH"], - message: r"""'rethrow' can only be used in catch clauses."""); + problemMessage: r"""'rethrow' can only be used in catch clauses."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeReturnFromVoidFunction = messageReturnFromVoidFunction; @@ -8671,7 +8848,7 @@ const Code codeReturnFromVoidFunction = messageReturnFromVoidFunction; const MessageCode messageReturnFromVoidFunction = const MessageCode( "ReturnFromVoidFunction", analyzerCodes: ["RETURN_OF_INVALID_TYPE"], - message: r"""Can't return a value from a void function."""); + problemMessage: r"""Can't return a value from a void function."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeReturnTypeFunctionExpression = @@ -8680,7 +8857,7 @@ const Code codeReturnTypeFunctionExpression = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageReturnTypeFunctionExpression = const MessageCode( "ReturnTypeFunctionExpression", - message: r"""A function expression can't have a return type."""); + problemMessage: r"""A function expression can't have a return type."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeReturnWithoutExpression = messageReturnWithoutExpression; @@ -8690,7 +8867,8 @@ const MessageCode messageReturnWithoutExpression = const MessageCode( "ReturnWithoutExpression", analyzerCodes: ["RETURN_WITHOUT_VALUE"], severity: Severity.warning, - message: r"""Must explicitly return a value from a non-void function."""); + problemMessage: + r"""Must explicitly return a value from a non-void function."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeReturnWithoutExpressionAsync = @@ -8699,7 +8877,7 @@ const Code codeReturnWithoutExpressionAsync = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageReturnWithoutExpressionAsync = const MessageCode( "ReturnWithoutExpressionAsync", - message: + problemMessage: r"""A value must be explicitly returned from a non-void async function."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -8709,13 +8887,13 @@ const Code codeReturnWithoutExpressionSync = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageReturnWithoutExpressionSync = const MessageCode( "ReturnWithoutExpressionSync", - message: + problemMessage: r"""A value must be explicitly returned from a non-void function."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateSdkRootNotFound = const Template( - messageTemplate: r"""SDK root directory not found: #uri.""", + problemMessageTemplate: r"""SDK root directory not found: #uri.""", withArguments: _withArgumentsSdkRootNotFound); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -8728,7 +8906,7 @@ const Code codeSdkRootNotFound = Message _withArgumentsSdkRootNotFound(Uri uri_) { String? uri = relativizeUri(uri_); return new Message(codeSdkRootNotFound, - message: """SDK root directory not found: ${uri}.""", + problemMessage: """SDK root directory not found: ${uri}.""", arguments: {'uri': uri_}); } @@ -8738,8 +8916,8 @@ const Template< Uri uri_)> templateSdkSpecificationNotFound = const Template< Message Function(Uri uri_)>( - messageTemplate: r"""SDK libraries specification not found: #uri.""", - tipTemplate: + 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.""", withArguments: _withArgumentsSdkSpecificationNotFound); @@ -8753,8 +8931,8 @@ const Code codeSdkSpecificationNotFound = Message _withArgumentsSdkSpecificationNotFound(Uri uri_) { String? uri = relativizeUri(uri_); return new Message(codeSdkSpecificationNotFound, - message: """SDK libraries specification not found: ${uri}.""", - tip: + problemMessage: """SDK libraries specification not found: ${uri}.""", + correctionMessage: """Normally, the specification is a file named 'libraries.json' in the Dart SDK install location.""", arguments: {'uri': uri_}); } @@ -8762,7 +8940,7 @@ Message _withArgumentsSdkSpecificationNotFound(Uri uri_) { // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateSdkSummaryNotFound = const Template( - messageTemplate: r"""SDK summary not found: #uri.""", + problemMessageTemplate: r"""SDK summary not found: #uri.""", withArguments: _withArgumentsSdkSummaryNotFound); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -8775,7 +8953,8 @@ const Code codeSdkSummaryNotFound = Message _withArgumentsSdkSummaryNotFound(Uri uri_) { String? uri = relativizeUri(uri_); return new Message(codeSdkSummaryNotFound, - message: """SDK summary not found: ${uri}.""", arguments: {'uri': uri_}); + problemMessage: """SDK summary not found: ${uri}.""", + arguments: {'uri': uri_}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -8785,7 +8964,7 @@ const Code codeSetLiteralTooManyTypeArguments = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageSetLiteralTooManyTypeArguments = const MessageCode( "SetLiteralTooManyTypeArguments", - message: r"""A set literal requires exactly one type argument."""); + problemMessage: r"""A set literal requires exactly one type argument."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeSetOrMapLiteralTooManyTypeArguments = @@ -8794,7 +8973,7 @@ const Code codeSetOrMapLiteralTooManyTypeArguments = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageSetOrMapLiteralTooManyTypeArguments = const MessageCode( "SetOrMapLiteralTooManyTypeArguments", - message: + problemMessage: r"""A set or map literal requires exactly one or two type arguments, respectively."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -8804,13 +8983,13 @@ const Code codeSetterConstructor = messageSetterConstructor; const MessageCode messageSetterConstructor = const MessageCode( "SetterConstructor", index: 104, - message: r"""Constructors can't be a setter.""", - tip: r"""Try removing 'set'."""); + problemMessage: r"""Constructors can't be a setter.""", + correctionMessage: r"""Try removing 'set'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateSetterNotFound = const Template( - messageTemplate: r"""Setter not found: '#name'.""", + problemMessageTemplate: r"""Setter not found: '#name'.""", withArguments: _withArgumentsSetterNotFound); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -8823,7 +9002,8 @@ Message _withArgumentsSetterNotFound(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeSetterNotFound, - message: """Setter not found: '${name}'.""", arguments: {'name': name}); + problemMessage: """Setter not found: '${name}'.""", + arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -8832,7 +9012,7 @@ const Code codeSetterNotSync = messageSetterNotSync; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageSetterNotSync = const MessageCode("SetterNotSync", analyzerCodes: ["INVALID_MODIFIER_ON_SETTER"], - message: r"""Setters can't use 'async', 'async*', or 'sync*'."""); + problemMessage: r"""Setters can't use 'async', 'async*', or 'sync*'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeSetterWithWrongNumberOfFormals = @@ -8842,7 +9022,7 @@ const Code codeSetterWithWrongNumberOfFormals = const MessageCode messageSetterWithWrongNumberOfFormals = const MessageCode( "SetterWithWrongNumberOfFormals", analyzerCodes: ["WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER"], - message: r"""A setter should have exactly one formal parameter."""); + problemMessage: r"""A setter should have exactly one formal parameter."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -8855,7 +9035,7 @@ const Template< _num3)> templateSourceBodySummary = const Template< Message Function( int count, int count2, num _num1, num _num2, num _num3)>( - messageTemplate: + 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.""", @@ -8886,7 +9066,7 @@ Message _withArgumentsSourceBodySummary( if (_num3 == null) throw 'No number provided'; String num3 = _num3.toStringAsFixed(3).padLeft(12); return new Message(codeSourceBodySummary, - message: + problemMessage: """Built bodies for ${count} compilation units (${count2} bytes) in ${num1}ms, that is, ${num2} bytes/ms, and ${num3} ms/compilation unit.""", @@ -8910,7 +9090,7 @@ const Template< _num3)> templateSourceOutlineSummary = const Template< Message Function( int count, int count2, num _num1, num _num2, num _num3)>( - messageTemplate: + 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.""", @@ -8941,7 +9121,7 @@ Message _withArgumentsSourceOutlineSummary( if (_num3 == null) throw 'No number provided'; String num3 = _num3.toStringAsFixed(3).padLeft(12); return new Message(codeSourceOutlineSummary, - message: + problemMessage: """Built outlines for ${count} compilation units (${count2} bytes) in ${num1}ms, that is, ${num2} bytes/ms, and ${num3} ms/compilation unit.""", @@ -8959,7 +9139,7 @@ const Code codeSpreadElement = messageSpreadElement; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageSpreadElement = const MessageCode("SpreadElement", - severity: Severity.context, message: r"""Iterable spread."""); + severity: Severity.context, problemMessage: r"""Iterable spread."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeSpreadMapElement = messageSpreadMapElement; @@ -8968,7 +9148,7 @@ const Code codeSpreadMapElement = messageSpreadMapElement; const MessageCode messageSpreadMapElement = const MessageCode( "SpreadMapElement", severity: Severity.context, - message: r"""Map spread."""); + problemMessage: r"""Map spread."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeStackOverflow = messageStackOverflow; @@ -8976,8 +9156,9 @@ const Code codeStackOverflow = messageStackOverflow; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageStackOverflow = const MessageCode("StackOverflow", index: 19, - message: r"""The file has too many nested expressions or statements.""", - tip: r"""Try simplifying the code."""); + problemMessage: + r"""The file has too many nested expressions or statements.""", + correctionMessage: r"""Try simplifying the code."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeStaticAndInstanceConflict = @@ -8987,7 +9168,8 @@ const Code codeStaticAndInstanceConflict = const MessageCode messageStaticAndInstanceConflict = const MessageCode( "StaticAndInstanceConflict", analyzerCodes: ["CONFLICTING_STATIC_AND_INSTANCE"], - message: r"""This static member conflicts with an instance member."""); + problemMessage: + r"""This static member conflicts with an instance member."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeStaticAndInstanceConflictCause = @@ -8997,7 +9179,7 @@ const Code codeStaticAndInstanceConflictCause = const MessageCode messageStaticAndInstanceConflictCause = const MessageCode( "StaticAndInstanceConflictCause", severity: Severity.context, - message: r"""This is the instance member."""); + problemMessage: r"""This is the instance member."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeStaticConstructor = messageStaticConstructor; @@ -9006,8 +9188,8 @@ const Code codeStaticConstructor = messageStaticConstructor; const MessageCode messageStaticConstructor = const MessageCode( "StaticConstructor", index: 4, - message: r"""Constructors can't be static.""", - tip: r"""Try removing the keyword 'static'."""); + problemMessage: r"""Constructors can't be static.""", + correctionMessage: r"""Try removing the keyword 'static'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeStaticOperator = messageStaticOperator; @@ -9015,8 +9197,8 @@ const Code codeStaticOperator = messageStaticOperator; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageStaticOperator = const MessageCode("StaticOperator", index: 17, - message: r"""Operators can't be static.""", - tip: r"""Try removing the keyword 'static'."""); + problemMessage: r"""Operators can't be static.""", + correctionMessage: r"""Try removing the keyword 'static'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeStaticTearOffFromInstantiatedClass = @@ -9025,9 +9207,9 @@ const Code codeStaticTearOffFromInstantiatedClass = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageStaticTearOffFromInstantiatedClass = const MessageCode( "StaticTearOffFromInstantiatedClass", - message: + problemMessage: r"""Cannot access static member on an instantiated generic class.""", - tip: + correctionMessage: r"""Try removing the type arguments or placing them after the member name."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9036,7 +9218,7 @@ const Code codeStrongModeNNBDButOptOut = messageStrongModeNNBDButOptOut; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageStrongModeNNBDButOptOut = const MessageCode( "StrongModeNNBDButOptOut", - message: + problemMessage: r"""A library can't opt out of null safety by default, when using sound null safety."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9045,7 +9227,7 @@ const Template< List _names)> templateStrongModeNNBDPackageOptOut = const Template< Message Function(List _names)>( - messageTemplate: + problemMessageTemplate: r"""Cannot run with sound null safety, because the following dependencies don't support null safety: @@ -9066,7 +9248,7 @@ Message _withArgumentsStrongModeNNBDPackageOptOut(List _names) { if (_names.isEmpty) throw 'No names provided'; String names = itemizeNames(_names); return new Message(codeStrongModeNNBDPackageOptOut, - message: + problemMessage: """Cannot run with sound null safety, because the following dependencies don't support null safety: @@ -9083,7 +9265,7 @@ const Code codeStrongWithWeakDillLibrary = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageStrongWithWeakDillLibrary = const MessageCode( "StrongWithWeakDillLibrary", - message: + problemMessage: r"""Loaded library is compiled with unsound null safety and cannot be used in compilation for sound null safety."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9093,8 +9275,8 @@ const Code codeSuperAsExpression = messageSuperAsExpression; const MessageCode messageSuperAsExpression = const MessageCode( "SuperAsExpression", analyzerCodes: ["SUPER_AS_EXPRESSION"], - message: r"""Can't use 'super' as an expression.""", - tip: + problemMessage: r"""Can't use 'super' as an expression.""", + correctionMessage: r"""To delegate a constructor to a super constructor, put the super call as an initializer."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9104,7 +9286,7 @@ const Code codeSuperAsIdentifier = messageSuperAsIdentifier; const MessageCode messageSuperAsIdentifier = const MessageCode( "SuperAsIdentifier", analyzerCodes: ["SUPER_AS_EXPRESSION"], - message: r"""Expected identifier, but got 'super'."""); + problemMessage: r"""Expected identifier, but got 'super'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeSuperInitializerNotLast = messageSuperInitializerNotLast; @@ -9113,7 +9295,7 @@ const Code codeSuperInitializerNotLast = messageSuperInitializerNotLast; const MessageCode messageSuperInitializerNotLast = const MessageCode( "SuperInitializerNotLast", analyzerCodes: ["INVALID_SUPER_INVOCATION"], - message: r"""Can't have initializers after 'super'."""); + problemMessage: r"""Can't have initializers after 'super'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeSuperNullAware = messageSuperNullAware; @@ -9121,15 +9303,16 @@ const Code codeSuperNullAware = messageSuperNullAware; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageSuperNullAware = const MessageCode("SuperNullAware", index: 18, - message: + problemMessage: r"""The operator '?.' cannot be used with 'super' because 'super' cannot be null.""", - tip: r"""Try replacing '?.' with '.'"""); + correctionMessage: r"""Try replacing '?.' with '.'"""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateSuperclassHasNoConstructor = const Template( - messageTemplate: r"""Superclass has no constructor named '#name'.""", + problemMessageTemplate: + r"""Superclass has no constructor named '#name'.""", withArguments: _withArgumentsSuperclassHasNoConstructor); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9145,7 +9328,7 @@ Message _withArgumentsSuperclassHasNoConstructor(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeSuperclassHasNoConstructor, - message: """Superclass has no constructor named '${name}'.""", + problemMessage: """Superclass has no constructor named '${name}'.""", arguments: {'name': name}); } @@ -9155,7 +9338,7 @@ const Template< String name)> templateSuperclassHasNoDefaultConstructor = const Template< Message Function(String name)>( - messageTemplate: + problemMessageTemplate: r"""The superclass, '#name', has no unnamed constructor that takes no arguments.""", withArguments: _withArgumentsSuperclassHasNoDefaultConstructor); @@ -9171,7 +9354,7 @@ Message _withArgumentsSuperclassHasNoDefaultConstructor(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeSuperclassHasNoDefaultConstructor, - message: + problemMessage: """The superclass, '${name}', has no unnamed constructor that takes no arguments.""", arguments: {'name': name}); } @@ -9179,7 +9362,7 @@ Message _withArgumentsSuperclassHasNoDefaultConstructor(String name) { // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateSuperclassHasNoGetter = const Template( - messageTemplate: r"""Superclass has no getter named '#name'.""", + problemMessageTemplate: r"""Superclass has no getter named '#name'.""", withArguments: _withArgumentsSuperclassHasNoGetter); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9192,14 +9375,14 @@ Message _withArgumentsSuperclassHasNoGetter(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeSuperclassHasNoGetter, - message: """Superclass has no getter named '${name}'.""", + problemMessage: """Superclass has no getter named '${name}'.""", arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateSuperclassHasNoMember = const Template( - messageTemplate: r"""Superclass has no member named '#name'.""", + problemMessageTemplate: r"""Superclass has no member named '#name'.""", withArguments: _withArgumentsSuperclassHasNoMember); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9212,14 +9395,14 @@ Message _withArgumentsSuperclassHasNoMember(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeSuperclassHasNoMember, - message: """Superclass has no member named '${name}'.""", + problemMessage: """Superclass has no member named '${name}'.""", arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateSuperclassHasNoMethod = const Template( - messageTemplate: r"""Superclass has no method named '#name'.""", + problemMessageTemplate: r"""Superclass has no method named '#name'.""", withArguments: _withArgumentsSuperclassHasNoMethod); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9232,14 +9415,14 @@ Message _withArgumentsSuperclassHasNoMethod(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeSuperclassHasNoMethod, - message: """Superclass has no method named '${name}'.""", + problemMessage: """Superclass has no method named '${name}'.""", arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateSuperclassHasNoSetter = const Template( - messageTemplate: r"""Superclass has no setter named '#name'.""", + problemMessageTemplate: r"""Superclass has no setter named '#name'.""", withArguments: _withArgumentsSuperclassHasNoSetter); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9252,7 +9435,7 @@ Message _withArgumentsSuperclassHasNoSetter(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeSuperclassHasNoSetter, - message: """Superclass has no setter named '${name}'.""", + problemMessage: """Superclass has no setter named '${name}'.""", arguments: {'name': name}); } @@ -9262,7 +9445,7 @@ const Template< String name)> templateSuperclassMethodArgumentMismatch = const Template< Message Function(String name)>( - messageTemplate: + problemMessageTemplate: r"""Superclass doesn't have a method named '#name' with matching arguments.""", withArguments: _withArgumentsSuperclassMethodArgumentMismatch); @@ -9277,7 +9460,7 @@ Message _withArgumentsSuperclassMethodArgumentMismatch(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeSuperclassMethodArgumentMismatch, - message: + problemMessage: """Superclass doesn't have a method named '${name}' with matching arguments.""", arguments: {'name': name}); } @@ -9288,12 +9471,13 @@ const Code codeSupertypeIsFunction = messageSupertypeIsFunction; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageSupertypeIsFunction = const MessageCode( "SupertypeIsFunction", - message: r"""Can't use a function type as supertype."""); + problemMessage: r"""Can't use a function type as supertype."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateSupertypeIsIllegal = const Template( - messageTemplate: r"""The type '#name' can't be used as supertype.""", + problemMessageTemplate: + r"""The type '#name' can't be used as supertype.""", withArguments: _withArgumentsSupertypeIsIllegal); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9306,14 +9490,14 @@ Message _withArgumentsSupertypeIsIllegal(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeSupertypeIsIllegal, - message: """The type '${name}' can't be used as supertype.""", + problemMessage: """The type '${name}' can't be used as supertype.""", arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateSupertypeIsTypeVariable = const Template( - messageTemplate: + problemMessageTemplate: r"""The type variable '#name' can't be used as supertype.""", withArguments: _withArgumentsSupertypeIsTypeVariable); @@ -9327,7 +9511,8 @@ Message _withArgumentsSupertypeIsTypeVariable(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeSupertypeIsTypeVariable, - message: """The type variable '${name}' can't be used as supertype.""", + problemMessage: + """The type variable '${name}' can't be used as supertype.""", arguments: {'name': name}); } @@ -9338,7 +9523,7 @@ const Code codeSwitchCaseFallThrough = messageSwitchCaseFallThrough; const MessageCode messageSwitchCaseFallThrough = const MessageCode( "SwitchCaseFallThrough", analyzerCodes: ["CASE_BLOCK_NOT_TERMINATED"], - message: r"""Switch case may fall through to the next case."""); + problemMessage: r"""Switch case may fall through to the next case."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeSwitchExpressionNotAssignableCause = @@ -9348,7 +9533,7 @@ const Code codeSwitchExpressionNotAssignableCause = const MessageCode messageSwitchExpressionNotAssignableCause = const MessageCode( "SwitchExpressionNotAssignableCause", severity: Severity.context, - message: r"""The switch expression is here."""); + problemMessage: r"""The switch expression is here."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeSwitchHasCaseAfterDefault = @@ -9358,9 +9543,10 @@ const Code codeSwitchHasCaseAfterDefault = const MessageCode messageSwitchHasCaseAfterDefault = const MessageCode( "SwitchHasCaseAfterDefault", index: 16, - message: + problemMessage: r"""The default case should be the last case in a switch statement.""", - tip: r"""Try moving the default case after the other case clauses."""); + correctionMessage: + r"""Try moving the default case after the other case clauses."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeSwitchHasMultipleDefaults = @@ -9370,21 +9556,21 @@ const Code codeSwitchHasMultipleDefaults = const MessageCode messageSwitchHasMultipleDefaults = const MessageCode( "SwitchHasMultipleDefaults", index: 15, - message: r"""The 'default' case can only be declared once.""", - tip: r"""Try removing all but one default case."""); + problemMessage: r"""The 'default' case can only be declared once.""", + correctionMessage: r"""Try removing all but one default case."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeSyntheticToken = messageSyntheticToken; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageSyntheticToken = const MessageCode("SyntheticToken", - message: r"""This couldn't be parsed."""); + problemMessage: r"""This couldn't be parsed."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateThisAccessInFieldInitializer = const Template( - messageTemplate: + problemMessageTemplate: r"""Can't access 'this' in a field initializer to read '#name'.""", withArguments: _withArgumentsThisAccessInFieldInitializer); @@ -9398,7 +9584,7 @@ Message _withArgumentsThisAccessInFieldInitializer(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeThisAccessInFieldInitializer, - message: + problemMessage: """Can't access 'this' in a field initializer to read '${name}'.""", arguments: {'name': name}); } @@ -9410,7 +9596,7 @@ const Code codeThisAsIdentifier = messageThisAsIdentifier; const MessageCode messageThisAsIdentifier = const MessageCode( "ThisAsIdentifier", analyzerCodes: ["INVALID_REFERENCE_TO_THIS"], - message: r"""Expected identifier, but got 'this'."""); + problemMessage: r"""Expected identifier, but got 'this'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeThisInNullAwareReceiver = messageThisInNullAwareReceiver; @@ -9419,14 +9605,14 @@ const Code codeThisInNullAwareReceiver = messageThisInNullAwareReceiver; const MessageCode messageThisInNullAwareReceiver = const MessageCode( "ThisInNullAwareReceiver", severity: Severity.warning, - message: r"""The receiver 'this' cannot be null.""", - tip: r"""Try replacing '?.' with '.'"""); + problemMessage: r"""The receiver 'this' cannot be null.""", + correctionMessage: r"""Try replacing '?.' with '.'"""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateThisNotPromoted = const Template( - messageTemplate: r"""'this' can't be promoted.""", - tipTemplate: r"""See #string""", + problemMessageTemplate: r"""'this' can't be promoted.""", + correctionMessageTemplate: r"""See #string""", withArguments: _withArgumentsThisNotPromoted); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9439,8 +9625,8 @@ const Code codeThisNotPromoted = Message _withArgumentsThisNotPromoted(String string) { if (string.isEmpty) throw 'No string provided'; return new Message(codeThisNotPromoted, - message: """'this' can't be promoted.""", - tip: """See ${string}""", + problemMessage: """'this' can't be promoted.""", + correctionMessage: """See ${string}""", arguments: {'string': string}); } @@ -9448,7 +9634,8 @@ Message _withArgumentsThisNotPromoted(String string) { const Template templateThisOrSuperAccessInFieldInitializer = const Template( - messageTemplate: r"""Can't access '#string' in a field initializer.""", + problemMessageTemplate: + r"""Can't access '#string' in a field initializer.""", withArguments: _withArgumentsThisOrSuperAccessInFieldInitializer); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9462,7 +9649,7 @@ const Code Message _withArgumentsThisOrSuperAccessInFieldInitializer(String string) { if (string.isEmpty) throw 'No string provided'; return new Message(codeThisOrSuperAccessInFieldInitializer, - message: """Can't access '${string}' in a field initializer.""", + problemMessage: """Can't access '${string}' in a field initializer.""", arguments: {'string': string}); } @@ -9473,7 +9660,7 @@ const Template< int count2)> templateTooFewArguments = const Template< Message Function(int count, int count2)>( - messageTemplate: + problemMessageTemplate: r"""Too few positional arguments: #count required, #count2 given.""", withArguments: _withArgumentsTooFewArguments); @@ -9489,7 +9676,7 @@ Message _withArgumentsTooFewArguments(int count, int count2) { // ignore: unnecessary_null_comparison if (count2 == null) throw 'No count provided'; return new Message(codeTooFewArguments, - message: + problemMessage: """Too few positional arguments: ${count} required, ${count2} given.""", arguments: {'count': count, 'count2': count2}); } @@ -9501,9 +9688,10 @@ const Template< int count2)> templateTooManyArguments = const Template< Message Function(int count, int count2)>( - messageTemplate: + problemMessageTemplate: r"""Too many positional arguments: #count allowed, but #count2 found.""", - tipTemplate: r"""Try removing the extra positional arguments.""", + correctionMessageTemplate: + r"""Try removing the extra positional arguments.""", withArguments: _withArgumentsTooManyArguments); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9518,9 +9706,9 @@ Message _withArgumentsTooManyArguments(int count, int count2) { // ignore: unnecessary_null_comparison if (count2 == null) throw 'No count provided'; return new Message(codeTooManyArguments, - message: + problemMessage: """Too many positional arguments: ${count} allowed, but ${count2} found.""", - tip: """Try removing the extra positional arguments.""", + correctionMessage: """Try removing the extra positional arguments.""", arguments: {'count': count, 'count2': count2}); } @@ -9531,8 +9719,8 @@ const Code codeTopLevelOperator = messageTopLevelOperator; const MessageCode messageTopLevelOperator = const MessageCode( "TopLevelOperator", index: 14, - message: r"""Operators must be declared within a class.""", - tip: + problemMessage: r"""Operators must be declared within a class.""", + correctionMessage: r"""Try removing the operator, moving it to a class, or converting it to be a function."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9541,14 +9729,14 @@ const Code codeTypeAfterVar = messageTypeAfterVar; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageTypeAfterVar = const MessageCode("TypeAfterVar", index: 89, - message: + problemMessage: r"""Variables can't be declared using both 'var' and a type name.""", - tip: r"""Try removing 'var.'"""); + correctionMessage: r"""Try removing 'var.'"""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateTypeArgumentMismatch = const Template( - messageTemplate: r"""Expected #count type arguments.""", + problemMessageTemplate: r"""Expected #count type arguments.""", withArguments: _withArgumentsTypeArgumentMismatch); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9561,7 +9749,7 @@ Message _withArgumentsTypeArgumentMismatch(int count) { // ignore: unnecessary_null_comparison if (count == null) throw 'No count provided'; return new Message(codeTypeArgumentMismatch, - message: """Expected ${count} type arguments.""", + problemMessage: """Expected ${count} type arguments.""", arguments: {'count': count}); } @@ -9569,9 +9757,9 @@ Message _withArgumentsTypeArgumentMismatch(int count) { const Template templateTypeArgumentsOnTypeVariable = const Template( - messageTemplate: + problemMessageTemplate: r"""Can't use type arguments with type variable '#name'.""", - tipTemplate: r"""Try removing the type arguments.""", + correctionMessageTemplate: r"""Try removing the type arguments.""", withArguments: _withArgumentsTypeArgumentsOnTypeVariable); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9584,8 +9772,9 @@ Message _withArgumentsTypeArgumentsOnTypeVariable(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeTypeArgumentsOnTypeVariable, - message: """Can't use type arguments with type variable '${name}'.""", - tip: """Try removing the type arguments.""", + problemMessage: + """Can't use type arguments with type variable '${name}'.""", + correctionMessage: """Try removing the type arguments.""", arguments: {'name': name}); } @@ -9596,13 +9785,14 @@ const Code codeTypeBeforeFactory = messageTypeBeforeFactory; const MessageCode messageTypeBeforeFactory = const MessageCode( "TypeBeforeFactory", index: 57, - message: r"""Factory constructors cannot have a return type.""", - tip: r"""Try removing the type appearing before 'factory'."""); + problemMessage: r"""Factory constructors cannot have a return type.""", + correctionMessage: + r"""Try removing the type appearing before 'factory'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateTypeNotFound = const Template( - messageTemplate: r"""Type '#name' not found.""", + problemMessageTemplate: r"""Type '#name' not found.""", withArguments: _withArgumentsTypeNotFound); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9615,13 +9805,14 @@ Message _withArgumentsTypeNotFound(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeTypeNotFound, - message: """Type '${name}' not found.""", arguments: {'name': name}); + problemMessage: """Type '${name}' not found.""", + arguments: {'name': name}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateTypeOrigin = const Template( - messageTemplate: r"""'#name' is from '#uri'.""", + problemMessageTemplate: r"""'#name' is from '#uri'.""", withArguments: _withArgumentsTypeOrigin); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9636,7 +9827,7 @@ Message _withArgumentsTypeOrigin(String name, Uri uri_) { name = demangleMixinApplicationName(name); String? uri = relativizeUri(uri_); return new Message(codeTypeOrigin, - message: """'${name}' is from '${uri}'.""", + problemMessage: """'${name}' is from '${uri}'.""", arguments: {'name': name, 'uri': uri_}); } @@ -9644,7 +9835,7 @@ Message _withArgumentsTypeOrigin(String name, Uri uri_) { const Template templateTypeOriginWithFileUri = const Template( - messageTemplate: r"""'#name' is from '#uri' ('#uri2').""", + problemMessageTemplate: r"""'#name' is from '#uri' ('#uri2').""", withArguments: _withArgumentsTypeOriginWithFileUri); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9661,7 +9852,7 @@ Message _withArgumentsTypeOriginWithFileUri(String name, Uri uri_, Uri uri2_) { String? uri = relativizeUri(uri_); String? uri2 = relativizeUri(uri2_); return new Message(codeTypeOriginWithFileUri, - message: """'${name}' is from '${uri}' ('${uri2}').""", + problemMessage: """'${name}' is from '${uri}' ('${uri2}').""", arguments: {'name': name, 'uri': uri_, 'uri2': uri2_}); } @@ -9673,13 +9864,14 @@ const Code codeTypeVariableDuplicatedName = const MessageCode messageTypeVariableDuplicatedName = const MessageCode( "TypeVariableDuplicatedName", analyzerCodes: ["DUPLICATE_DEFINITION"], - message: r"""A type variable can't have the same name as another."""); + problemMessage: + r"""A type variable can't have the same name as another."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateTypeVariableDuplicatedNameCause = const Template( - messageTemplate: r"""The other type variable named '#name'.""", + problemMessageTemplate: r"""The other type variable named '#name'.""", withArguments: _withArgumentsTypeVariableDuplicatedNameCause); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9692,7 +9884,7 @@ Message _withArgumentsTypeVariableDuplicatedNameCause(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeTypeVariableDuplicatedNameCause, - message: """The other type variable named '${name}'.""", + problemMessage: """The other type variable named '${name}'.""", arguments: {'name': name}); } @@ -9704,7 +9896,7 @@ const Code codeTypeVariableInConstantContext = const MessageCode messageTypeVariableInConstantContext = const MessageCode( "TypeVariableInConstantContext", analyzerCodes: ["TYPE_PARAMETER_IN_CONST_EXPRESSION"], - message: r"""Type variables can't be used as constants."""); + problemMessage: r"""Type variables can't be used as constants."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeTypeVariableInStaticContext = @@ -9714,7 +9906,7 @@ const Code codeTypeVariableInStaticContext = const MessageCode messageTypeVariableInStaticContext = const MessageCode( "TypeVariableInStaticContext", analyzerCodes: ["TYPE_PARAMETER_REFERENCED_BY_STATIC"], - message: r"""Type variables can't be used in static members."""); + problemMessage: r"""Type variables can't be used in static members."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeTypeVariableSameNameAsEnclosing = @@ -9724,7 +9916,7 @@ const Code codeTypeVariableSameNameAsEnclosing = const MessageCode messageTypeVariableSameNameAsEnclosing = const MessageCode( "TypeVariableSameNameAsEnclosing", analyzerCodes: ["CONFLICTING_TYPE_VARIABLE_AND_CLASS"], - message: + problemMessage: r"""A type variable can't have the same name as its enclosing declaration."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9733,7 +9925,7 @@ const Code codeTypedefCause = messageTypedefCause; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageTypedefCause = const MessageCode("TypedefCause", severity: Severity.context, - message: r"""The issue arises via this type alias."""); + problemMessage: r"""The issue arises via this type alias."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeTypedefInClass = messageTypedefInClass; @@ -9741,8 +9933,8 @@ const Code codeTypedefInClass = messageTypedefInClass; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageTypedefInClass = const MessageCode("TypedefInClass", index: 7, - message: r"""Typedefs can't be declared inside classes.""", - tip: r"""Try moving the typedef to the top-level."""); + problemMessage: r"""Typedefs can't be declared inside classes.""", + correctionMessage: r"""Try moving the typedef to the top-level."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeTypedefNotFunction = messageTypedefNotFunction; @@ -9751,7 +9943,7 @@ const Code codeTypedefNotFunction = messageTypedefNotFunction; const MessageCode messageTypedefNotFunction = const MessageCode( "TypedefNotFunction", analyzerCodes: ["INVALID_GENERIC_FUNCTION_TYPE"], - message: r"""Can't create typedef from non-function type."""); + problemMessage: r"""Can't create typedef from non-function type."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeTypedefNotType = messageTypedefNotType; @@ -9759,7 +9951,7 @@ const Code codeTypedefNotType = messageTypedefNotType; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageTypedefNotType = const MessageCode("TypedefNotType", analyzerCodes: ["INVALID_TYPE_IN_TYPEDEF"], - message: r"""Can't create typedef from non-type."""); + problemMessage: r"""Can't create typedef from non-type."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeTypedefNullableType = messageTypedefNullableType; @@ -9767,7 +9959,7 @@ const Code codeTypedefNullableType = messageTypedefNullableType; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageTypedefNullableType = const MessageCode( "TypedefNullableType", - message: r"""Can't create typedef from nullable type."""); + problemMessage: r"""Can't create typedef from nullable type."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeTypedefTypeVariableNotConstructor = @@ -9776,7 +9968,7 @@ const Code codeTypedefTypeVariableNotConstructor = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageTypedefTypeVariableNotConstructor = const MessageCode( "TypedefTypeVariableNotConstructor", - message: + problemMessage: r"""Can't use a typedef denoting a type variable as a constructor, nor for a static member access."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9787,7 +9979,7 @@ const Code codeTypedefTypeVariableNotConstructorCause = const MessageCode messageTypedefTypeVariableNotConstructorCause = const MessageCode("TypedefTypeVariableNotConstructorCause", severity: Severity.context, - message: r"""This is the type variable ultimately denoted."""); + problemMessage: r"""This is the type variable ultimately denoted."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeTypedefUnaliasedTypeCause = @@ -9797,7 +9989,7 @@ const Code codeTypedefUnaliasedTypeCause = const MessageCode messageTypedefUnaliasedTypeCause = const MessageCode( "TypedefUnaliasedTypeCause", severity: Severity.context, - message: r"""This is the type denoted by the type alias."""); + problemMessage: r"""This is the type denoted by the type alias."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeUnexpectedDollarInString = messageUnexpectedDollarInString; @@ -9806,9 +9998,9 @@ const Code codeUnexpectedDollarInString = messageUnexpectedDollarInString; const MessageCode messageUnexpectedDollarInString = const MessageCode( "UnexpectedDollarInString", analyzerCodes: ["UNEXPECTED_DOLLAR_IN_STRING"], - message: + problemMessage: r"""A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}).""", - tip: r"""Try adding a backslash (\) to escape the '$'."""); + correctionMessage: r"""Try adding a backslash (\) to escape the '$'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -9816,7 +10008,7 @@ const Template< Token token)> templateUnexpectedModifierInNonNnbd = const Template< Message Function(Token token)>( - messageTemplate: + problemMessageTemplate: r"""The modifier '#lexeme' is only available in null safe libraries.""", withArguments: _withArgumentsUnexpectedModifierInNonNnbd); @@ -9829,7 +10021,7 @@ const Code codeUnexpectedModifierInNonNnbd = Message _withArgumentsUnexpectedModifierInNonNnbd(Token token) { String lexeme = token.lexeme; return new Message(codeUnexpectedModifierInNonNnbd, - message: + problemMessage: """The modifier '${lexeme}' is only available in null safe libraries.""", arguments: {'lexeme': token}); } @@ -9837,7 +10029,7 @@ Message _withArgumentsUnexpectedModifierInNonNnbd(Token token) { // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateUnexpectedToken = const Template( - messageTemplate: r"""Unexpected token '#lexeme'.""", + problemMessageTemplate: r"""Unexpected token '#lexeme'.""", withArguments: _withArgumentsUnexpectedToken); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9849,7 +10041,7 @@ const Code codeUnexpectedToken = Message _withArgumentsUnexpectedToken(Token token) { String lexeme = token.lexeme; return new Message(codeUnexpectedToken, - message: """Unexpected token '${lexeme}'.""", + problemMessage: """Unexpected token '${lexeme}'.""", arguments: {'lexeme': token}); } @@ -9857,7 +10049,7 @@ Message _withArgumentsUnexpectedToken(Token token) { const Template templateUnmatchedToken = const Template( - messageTemplate: r"""Can't find '#string' to match '#lexeme'.""", + problemMessageTemplate: r"""Can't find '#string' to match '#lexeme'.""", withArguments: _withArgumentsUnmatchedToken); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9870,7 +10062,7 @@ Message _withArgumentsUnmatchedToken(String string, Token token) { if (string.isEmpty) throw 'No string provided'; String lexeme = token.lexeme; return new Message(codeUnmatchedToken, - message: """Can't find '${string}' to match '${lexeme}'.""", + problemMessage: """Can't find '${string}' to match '${lexeme}'.""", arguments: {'string': string, 'lexeme': token}); } @@ -9881,7 +10073,7 @@ const Template< String name2)> templateUnresolvedPrefixInTypeAnnotation = const Template< Message Function(String name, String name2)>( - messageTemplate: + problemMessageTemplate: r"""'#name.#name2' can't be used as a type because '#name' isn't defined.""", withArguments: _withArgumentsUnresolvedPrefixInTypeAnnotation); @@ -9900,7 +10092,7 @@ Message _withArgumentsUnresolvedPrefixInTypeAnnotation( if (name2.isEmpty) throw 'No name provided'; name2 = demangleMixinApplicationName(name2); return new Message(codeUnresolvedPrefixInTypeAnnotation, - message: + problemMessage: """'${name}.${name2}' can't be used as a type because '${name}' isn't defined.""", arguments: {'name': name, 'name2': name2}); } @@ -9908,7 +10100,7 @@ Message _withArgumentsUnresolvedPrefixInTypeAnnotation( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateUnspecified = const Template( - messageTemplate: r"""#string""", + problemMessageTemplate: r"""#string""", withArguments: _withArgumentsUnspecified); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9921,7 +10113,7 @@ const Code codeUnspecified = Message _withArgumentsUnspecified(String string) { if (string.isEmpty) throw 'No string provided'; return new Message(codeUnspecified, - message: """${string}""", arguments: {'string': string}); + problemMessage: """${string}""", arguments: {'string': string}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9930,14 +10122,14 @@ const Code codeUnsupportedDartExt = messageUnsupportedDartExt; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageUnsupportedDartExt = const MessageCode( "UnsupportedDartExt", - message: r"""Dart native extensions are no longer supported.""", - tip: + problemMessage: r"""Dart native extensions are no longer supported.""", + correctionMessage: r"""Migrate to using FFI instead (https://dart.dev/guides/libraries/c-interop)"""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateUnsupportedOperator = const Template( - messageTemplate: r"""The '#lexeme' operator is not supported.""", + problemMessageTemplate: r"""The '#lexeme' operator is not supported.""", withArguments: _withArgumentsUnsupportedOperator); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -9949,7 +10141,7 @@ const Code codeUnsupportedOperator = Message _withArgumentsUnsupportedOperator(Token token) { String lexeme = token.lexeme; return new Message(codeUnsupportedOperator, - message: """The '${lexeme}' operator is not supported.""", + problemMessage: """The '${lexeme}' operator is not supported.""", arguments: {'lexeme': token}); } @@ -9960,8 +10152,8 @@ const Code codeUnsupportedPrefixPlus = messageUnsupportedPrefixPlus; const MessageCode messageUnsupportedPrefixPlus = const MessageCode( "UnsupportedPrefixPlus", analyzerCodes: ["MISSING_IDENTIFIER"], - message: r"""'+' is not a prefix operator.""", - tip: r"""Try removing '+'."""); + problemMessage: r"""'+' is not a prefix operator.""", + correctionMessage: r"""Try removing '+'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeUnterminatedComment = messageUnterminatedComment; @@ -9970,13 +10162,14 @@ const Code codeUnterminatedComment = messageUnterminatedComment; const MessageCode messageUnterminatedComment = const MessageCode( "UnterminatedComment", analyzerCodes: ["UNTERMINATED_MULTI_LINE_COMMENT"], - message: r"""Comment starting with '/*' must end with '*/'."""); + problemMessage: r"""Comment starting with '/*' must end with '*/'."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template +const Template< + Message Function(String string, String string2)> templateUnterminatedString = const Template( - messageTemplate: + problemMessageTemplate: r"""String starting with #string must end with #string2.""", withArguments: _withArgumentsUnterminatedString); @@ -9992,7 +10185,8 @@ Message _withArgumentsUnterminatedString(String string, String string2) { if (string.isEmpty) throw 'No string provided'; if (string2.isEmpty) throw 'No string provided'; return new Message(codeUnterminatedString, - message: """String starting with ${string} must end with ${string2}.""", + problemMessage: + """String starting with ${string} must end with ${string2}.""", arguments: {'string': string, 'string2': string2}); } @@ -10000,13 +10194,14 @@ Message _withArgumentsUnterminatedString(String string, String string2) { const Code codeUnterminatedToken = messageUnterminatedToken; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const MessageCode messageUnterminatedToken = - const MessageCode("UnterminatedToken", message: r"""Incomplete token."""); +const MessageCode messageUnterminatedToken = const MessageCode( + "UnterminatedToken", + problemMessage: r"""Incomplete token."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateUntranslatableUri = const Template( - messageTemplate: r"""Not found: '#uri'""", + problemMessageTemplate: r"""Not found: '#uri'""", withArguments: _withArgumentsUntranslatableUri); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -10018,14 +10213,14 @@ const Code codeUntranslatableUri = Message _withArgumentsUntranslatableUri(Uri uri_) { String? uri = relativizeUri(uri_); return new Message(codeUntranslatableUri, - message: """Not found: '${uri}'""", arguments: {'uri': uri_}); + problemMessage: """Not found: '${uri}'""", arguments: {'uri': uri_}); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateValueForRequiredParameterNotProvidedError = const Template( - messageTemplate: + problemMessageTemplate: r"""Required named parameter '#name' must be provided.""", withArguments: _withArgumentsValueForRequiredParameterNotProvidedError); @@ -10041,7 +10236,8 @@ Message _withArgumentsValueForRequiredParameterNotProvidedError(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message(codeValueForRequiredParameterNotProvidedError, - message: """Required named parameter '${name}' must be provided.""", + problemMessage: + """Required named parameter '${name}' must be provided.""", arguments: {'name': name}); } @@ -10050,7 +10246,8 @@ const Code codeVarAsTypeName = messageVarAsTypeName; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageVarAsTypeName = const MessageCode("VarAsTypeName", - index: 61, message: r"""The keyword 'var' can't be used as a type name."""); + index: 61, + problemMessage: r"""The keyword 'var' can't be used as a type name."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeVarReturnType = messageVarReturnType; @@ -10058,8 +10255,8 @@ const Code codeVarReturnType = messageVarReturnType; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageVarReturnType = const MessageCode("VarReturnType", index: 12, - message: r"""The return type can't be 'var'.""", - tip: + problemMessage: r"""The return type can't be 'var'.""", + correctionMessage: r"""Try removing the keyword 'var', or replacing it with the name of the return type."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -10069,9 +10266,9 @@ const Template< String string)> templateVariableCouldBeNullDueToWrite = const Template< Message Function(String name, String string)>( - messageTemplate: + problemMessageTemplate: r"""Variable '#name' could not be promoted due to an assignment.""", - tipTemplate: + correctionMessageTemplate: r"""Try null checking the variable after the assignment. See #string""", withArguments: _withArgumentsVariableCouldBeNullDueToWrite); @@ -10089,9 +10286,9 @@ Message _withArgumentsVariableCouldBeNullDueToWrite( name = demangleMixinApplicationName(name); if (string.isEmpty) throw 'No string provided'; return new Message(codeVariableCouldBeNullDueToWrite, - message: + problemMessage: """Variable '${name}' could not be promoted due to an assignment.""", - tip: + correctionMessage: """Try null checking the variable after the assignment. See ${string}""", arguments: {'name': name, 'string': string}); } @@ -10104,7 +10301,8 @@ const Code codeVerificationErrorOriginContext = const MessageCode messageVerificationErrorOriginContext = const MessageCode( "VerificationErrorOriginContext", severity: Severity.context, - message: r"""The node most likely is taken from here by a transformer."""); + problemMessage: + r"""The node most likely is taken from here by a transformer."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeVoidExpression = messageVoidExpression; @@ -10112,7 +10310,7 @@ const Code codeVoidExpression = messageVoidExpression; // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageVoidExpression = const MessageCode("VoidExpression", analyzerCodes: ["USE_OF_VOID_RESULT"], - message: r"""This expression has type 'void' and can't be used."""); + problemMessage: r"""This expression has type 'void' and can't be used."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeVoidWithTypeArguments = messageVoidWithTypeArguments; @@ -10121,8 +10319,8 @@ const Code codeVoidWithTypeArguments = messageVoidWithTypeArguments; const MessageCode messageVoidWithTypeArguments = const MessageCode( "VoidWithTypeArguments", index: 100, - message: r"""Type 'void' can't have type arguments.""", - tip: r"""Try removing the type arguments."""); + problemMessage: r"""Type 'void' can't have type arguments.""", + correctionMessage: r"""Try removing the type arguments."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeWeakWithStrongDillLibrary = @@ -10131,7 +10329,7 @@ const Code codeWeakWithStrongDillLibrary = // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode messageWeakWithStrongDillLibrary = const MessageCode( "WeakWithStrongDillLibrary", - message: + problemMessage: r"""Loaded library is compiled with sound null safety and cannot be used in compilation for unsound null safety."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -10141,9 +10339,9 @@ const Template< String string2)> templateWebLiteralCannotBeRepresentedExactly = const Template< Message Function(String string, String string2)>( - messageTemplate: + problemMessageTemplate: r"""The integer literal #string can't be represented exactly in JavaScript.""", - tipTemplate: + 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.""", withArguments: _withArgumentsWebLiteralCannotBeRepresentedExactly); @@ -10160,9 +10358,9 @@ Message _withArgumentsWebLiteralCannotBeRepresentedExactly( if (string.isEmpty) throw 'No string provided'; if (string2.isEmpty) throw 'No string provided'; return new Message(codeWebLiteralCannotBeRepresentedExactly, - message: + problemMessage: """The integer literal ${string} can't be represented exactly in JavaScript.""", - tip: """Try changing the literal to something that can be represented in Javascript. In Javascript ${string2} is the nearest value that can be represented exactly.""", + correctionMessage: """Try changing the literal to something that can be represented in Javascript. In Javascript ${string2} is the nearest value that can be represented exactly.""", arguments: {'string': string, 'string2': string2}); } @@ -10173,8 +10371,9 @@ const Code codeWithBeforeExtends = messageWithBeforeExtends; const MessageCode messageWithBeforeExtends = const MessageCode( "WithBeforeExtends", index: 11, - message: r"""The extends clause must be before the with clause.""", - tip: r"""Try moving the extends clause before the with clause."""); + problemMessage: r"""The extends clause must be before the with clause.""", + correctionMessage: + r"""Try moving the extends clause before the with clause."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeYieldAsIdentifier = messageYieldAsIdentifier; @@ -10183,7 +10382,7 @@ const Code codeYieldAsIdentifier = messageYieldAsIdentifier; const MessageCode messageYieldAsIdentifier = const MessageCode( "YieldAsIdentifier", analyzerCodes: ["ASYNC_KEYWORD_USED_AS_IDENTIFIER"], - message: + problemMessage: r"""'yield' can't be used as an identifier in 'async', 'async*', or 'sync*' methods."""); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -10193,4 +10392,5 @@ const Code codeYieldNotGenerator = messageYieldNotGenerator; const MessageCode messageYieldNotGenerator = const MessageCode( "YieldNotGenerator", analyzerCodes: ["YIELD_IN_NON_GENERATOR"], - message: r"""'yield' can only be used in 'sync*' or 'async*' methods."""); + problemMessage: + r"""'yield' can only be used in 'sync*' or 'async*' methods."""); diff --git a/pkg/_fe_analyzer_shared/lib/src/messages/diagnostic_message.dart b/pkg/_fe_analyzer_shared/lib/src/messages/diagnostic_message.dart index 14540d98adf..983ebb4f782 100644 --- a/pkg/_fe_analyzer_shared/lib/src/messages/diagnostic_message.dart +++ b/pkg/_fe_analyzer_shared/lib/src/messages/diagnostic_message.dart @@ -66,7 +66,7 @@ Code? getMessageCodeObject(DiagnosticMessage message) { /// This method is subject to change. String? getMessageHeaderText(DiagnosticMessage message) { - return message is FormattedMessage ? message.message : null; + return message is FormattedMessage ? message.problemMessage : null; } /// This method is subject to change. diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/parser_error.dart b/pkg/_fe_analyzer_shared/lib/src/parser/parser_error.dart index 8c46c13fca7..16d647e4a41 100644 --- a/pkg/_fe_analyzer_shared/lib/src/parser/parser_error.dart +++ b/pkg/_fe_analyzer_shared/lib/src/parser/parser_error.dart @@ -22,5 +22,6 @@ class ParserError { ParserError.fromTokens(Token begin, Token end, Message message) : this(begin.charOffset, end.charOffset + end.charCount, message); - String toString() => "@${beginOffset}: ${message.message}\n${message.tip}"; + String toString() => "@${beginOffset}: ${message.problemMessage}\n" + "${message.correctionMessage}"; } diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/stack_listener.dart b/pkg/_fe_analyzer_shared/lib/src/parser/stack_listener.dart index 208db6141ef..1d103e58e10 100644 --- a/pkg/_fe_analyzer_shared/lib/src/parser/stack_listener.dart +++ b/pkg/_fe_analyzer_shared/lib/src/parser/stack_listener.dart @@ -96,7 +96,8 @@ abstract class StackListener extends Listener { // If offset is available report and internal problem to show the // parsed code in the output. throw internalProblem( - new Message(const Code('Internal error'), message: message), + new Message(const Code('Internal error'), + problemMessage: message), token.charOffset, uri); } else { @@ -198,7 +199,8 @@ abstract class StackListener extends Listener { // If offset is available report and internal problem to show the // parsed code in the output. throw internalProblem( - new Message(const Code('Internal error'), message: message), + new Message(const Code('Internal error'), + problemMessage: message), token.charOffset, uri); } else { @@ -480,7 +482,7 @@ abstract class StackListener extends Listener { @override void handleRecoverableError( Message message, Token startToken, Token endToken) { - debugEvent("Error: ${message.message}"); + debugEvent("Error: ${message.problemMessage}"); if (isIgnoredError(message.code, startToken)) return; addProblem( message, startToken.charOffset, lengthOfSpan(startToken, endToken)); diff --git a/pkg/_fe_analyzer_shared/lib/src/scanner/error_token.dart b/pkg/_fe_analyzer_shared/lib/src/scanner/error_token.dart index 9b39e96149d..35b46528b73 100644 --- a/pkg/_fe_analyzer_shared/lib/src/scanner/error_token.dart +++ b/pkg/_fe_analyzer_shared/lib/src/scanner/error_token.dart @@ -73,7 +73,7 @@ abstract class ErrorToken extends SimpleToken { int get length => 1; String get lexeme { - String errorMsg = assertionMessage.message; + String errorMsg = assertionMessage.problemMessage; // Attempt to include the location which is calling the parser // in an effort to debug https://github.com/dart-lang/sdk/issues/37528 diff --git a/pkg/_fe_analyzer_shared/lib/src/util/options.dart b/pkg/_fe_analyzer_shared/lib/src/util/options.dart index 7837865c791..17c3c015c27 100644 --- a/pkg/_fe_analyzer_shared/lib/src/util/options.dart +++ b/pkg/_fe_analyzer_shared/lib/src/util/options.dart @@ -13,7 +13,7 @@ class CommandLineProblem { CommandLineProblem.deprecated(String message) : this(templateUnspecified.withArguments(message)); - String toString() => message.message; + String toString() => message.problemMessage; } class ParsedOptions { diff --git a/pkg/analyzer/lib/src/fasta/ast_builder.dart b/pkg/analyzer/lib/src/fasta/ast_builder.dart index 9abd454cc55..6f77e5f4243 100644 --- a/pkg/analyzer/lib/src/fasta/ast_builder.dart +++ b/pkg/analyzer/lib/src/fasta/ast_builder.dart @@ -3416,7 +3416,7 @@ class AstBuilder extends StackListener { if (message == messageNativeClauseShouldBeAnnotation && allowNativeClause) { return; } - debugEvent("Error: ${message.message}"); + debugEvent("Error: ${message.problemMessage}"); if (message.code.analyzerCodes == null && startToken is ErrorToken) { translateErrorToken(startToken, errorReporter.reportScannerError); } else { @@ -3728,7 +3728,7 @@ class AstBuilder extends StackListener { @override Never internalProblem(Message message, int charOffset, Uri uri) { - throw UnsupportedError(message.message); + throw UnsupportedError(message.problemMessage); } /// Return `true` if [token] is either `null` or is the symbol or keyword diff --git a/pkg/analyzer/tool/summary/mini_ast.dart b/pkg/analyzer/tool/summary/mini_ast.dart index b7ded86a2e6..ecf9036a5f2 100644 --- a/pkg/analyzer/tool/summary/mini_ast.dart +++ b/pkg/analyzer/tool/summary/mini_ast.dart @@ -582,7 +582,7 @@ class MiniAstBuilder extends StackListener { @override internalProblem(Message message, int charOffset, Uri? uri) { - throw UnsupportedError(message.message); + throw UnsupportedError(message.problemMessage); } List? popList(int n, List list) { diff --git a/pkg/compiler/lib/src/ir/modular.dart b/pkg/compiler/lib/src/ir/modular.dart index a924f1676b1..e9df3816672 100644 --- a/pkg/compiler/lib/src/ir/modular.dart +++ b/pkg/compiler/lib/src/ir/modular.dart @@ -141,5 +141,5 @@ DiagnosticMessage _createDiagnosticMessage( var sourceSpan = SourceSpan( message.uri, message.charOffset, message.charOffset + message.length); return reporter.createMessage( - sourceSpan, MessageKind.GENERIC, {'text': message.message}); + sourceSpan, MessageKind.GENERIC, {'text': message.problemMessage}); } diff --git a/pkg/compiler/lib/src/kernel/element_map_impl.dart b/pkg/compiler/lib/src/kernel/element_map_impl.dart index 164734404ca..0bd26197188 100644 --- a/pkg/compiler/lib/src/kernel/element_map_impl.dart +++ b/pkg/compiler/lib/src/kernel/element_map_impl.dart @@ -2168,7 +2168,7 @@ DiagnosticMessage _createDiagnosticMessage( SourceSpan sourceSpan = SourceSpan( message.uri, message.charOffset, message.charOffset + message.length); return reporter.createMessage( - sourceSpan, MessageKind.GENERIC, {'text': message.message}); + sourceSpan, MessageKind.GENERIC, {'text': message.problemMessage}); } void reportLocatedMessage(DiagnosticReporter reporter, diff --git a/pkg/compiler/test/end_to_end/user_crash_test.dart b/pkg/compiler/test/end_to_end/user_crash_test.dart index ab7f26ff758..6dfea6dbb0b 100644 --- a/pkg/compiler/test/end_to_end/user_crash_test.dart +++ b/pkg/compiler/test/end_to_end/user_crash_test.dart @@ -31,8 +31,8 @@ main() { var cantReadFile = templateCantReadFile.withArguments(entryPoint, EXCEPTION); List expectedLines = [ - "Error: ${cantReadFile.message}", - "Error: ${messageMissingMain.message}", + "Error: ${cantReadFile.problemMessage}", + "Error: ${messageMissingMain.problemMessage}", ]; test('Throw in input provider', await run(memorySourceFiles: new CrashingMap()), diff --git a/pkg/dev_compiler/lib/src/kernel/expression_compiler.dart b/pkg/dev_compiler/lib/src/kernel/expression_compiler.dart index 8d195b37696..fa46af33456 100644 --- a/pkg/dev_compiler/lib/src/kernel/expression_compiler.dart +++ b/pkg/dev_compiler/lib/src/kernel/expression_compiler.dart @@ -38,7 +38,7 @@ import 'package:kernel/ast.dart' DiagnosticMessage _createInternalError(Uri uri, int line, int col, String msg) { return Message(Code('Expression Compiler Internal error'), - message: msg) + problemMessage: msg) .withLocation(uri, 0, 0) .withFormatting(PlainAndColorizedString.plainOnly('Internal error: $msg'), line, col, Severity.internalProblem, []); diff --git a/pkg/front_end/lib/src/base/processed_options.dart b/pkg/front_end/lib/src/base/processed_options.dart index 8601e94a08f..de2886dc370 100644 --- a/pkg/front_end/lib/src/base/processed_options.dart +++ b/pkg/front_end/lib/src/base/processed_options.dart @@ -251,7 +251,7 @@ class ProcessedOptions { if (_raw.skipForDebugging < 0) { print(templateDebugTrace .withArguments("$severity", "${StackTrace.current}") - .message); + .problemMessage); } else { throw new DebugAbort( message.uri, message.charOffset, severity, StackTrace.current); @@ -606,7 +606,7 @@ class ProcessedOptions { // We throw a new exception to ensure that the message include the uri // that led to the exception. Exceptions in Uri don't include the // offending uri in the exception message. - throw new ArgumentError(message.message); + throw new ArgumentError(message.problemMessage); } return null; } @@ -729,7 +729,7 @@ class ProcessedOptions { // We throw a new exception to ensure that the message include the uri // that led to the exception. Exceptions in Uri don't include the // offending uri in the exception message. - throw new ArgumentError(message.message); + throw new ArgumentError(message.problemMessage); } } diff --git a/pkg/front_end/lib/src/fasta/builder/class_builder.dart b/pkg/front_end/lib/src/fasta/builder/class_builder.dart index e893019728e..9c908053626 100644 --- a/pkg/front_end/lib/src/fasta/builder/class_builder.dart +++ b/pkg/front_end/lib/src/fasta/builder/class_builder.dart @@ -604,7 +604,7 @@ abstract class ClassBuilderImpl extends DeclarationBuilderImpl return unhandled( templateTypeArgumentMismatch .withArguments(typeVariablesCount) - .message, + .problemMessage, "buildTypeArguments", -1, null); diff --git a/pkg/front_end/lib/src/fasta/builder/extension_builder.dart b/pkg/front_end/lib/src/fasta/builder/extension_builder.dart index 4ac03ac5758..8460e591d0b 100644 --- a/pkg/front_end/lib/src/fasta/builder/extension_builder.dart +++ b/pkg/front_end/lib/src/fasta/builder/extension_builder.dart @@ -137,7 +137,7 @@ abstract class ExtensionBuilderImpl extends DeclarationBuilderImpl return unhandled( templateTypeArgumentMismatch .withArguments(typeVariablesCount) - .message, + .problemMessage, "buildTypeArguments", -1, null); diff --git a/pkg/front_end/lib/src/fasta/command_line_reporting.dart b/pkg/front_end/lib/src/fasta/command_line_reporting.dart index 9cb19b47cd9..d3bf0bf69fb 100644 --- a/pkg/front_end/lib/src/fasta/command_line_reporting.dart +++ b/pkg/front_end/lib/src/fasta/command_line_reporting.dart @@ -53,10 +53,11 @@ PlainAndColorizedString format(LocatedMessage message, Severity severity, length = 1; } String? prefix = severityPrefixes[severity]; - String messageTextTmp = - prefix == null ? message.message : "$prefix: ${message.message}"; - if (message.tip != null) { - messageTextTmp += "\n${message.tip}"; + String messageTextTmp = prefix == null + ? message.problemMessage + : "$prefix: ${message.problemMessage}"; + if (message.correctionMessage != null) { + messageTextTmp += "\n${message.correctionMessage}"; } final String messageTextPlain = messageTextTmp; String messageTextColorized; @@ -106,7 +107,7 @@ PlainAndColorizedString format(LocatedMessage message, Severity severity, } } catch (error, trace) { print("Crash when formatting: " - "[${message.code.name}] ${safeToString(message.message)}\n" + "[${message.code.name}] ${safeToString(message.problemMessage)}\n" "${safeToString(error)}\n" "$trace"); throw new Crash(message.uri, message.charOffset, error, trace); diff --git a/pkg/front_end/lib/src/fasta/compiler_context.dart b/pkg/front_end/lib/src/fasta/compiler_context.dart index a3a99e1959d..59605748f2e 100644 --- a/pkg/front_end/lib/src/fasta/compiler_context.dart +++ b/pkg/front_end/lib/src/fasta/compiler_context.dart @@ -100,9 +100,11 @@ class CompilerContext { if (context == null) { // Note: we throw directly and don't use internalProblem, because // internalProblem depends on having a compiler context available. - String message = messageInternalProblemMissingContext.message; - String tip = messageInternalProblemMissingContext.tip!; - throw "Internal problem: $message\nTip: $tip"; + String problemMessage = + messageInternalProblemMissingContext.problemMessage; + String correctionMessage = + messageInternalProblemMissingContext.correctionMessage!; + throw "Internal problem: $problemMessage\nTip: $correctionMessage"; } return context; } diff --git a/pkg/front_end/lib/src/fasta/dill/dill_loader.dart b/pkg/front_end/lib/src/fasta/dill/dill_loader.dart index 3598ae503e0..3a4bdc0f59d 100644 --- a/pkg/front_end/lib/src/fasta/dill/dill_loader.dart +++ b/pkg/front_end/lib/src/fasta/dill/dill_loader.dart @@ -172,7 +172,7 @@ class DillLoader extends Loader { double ms = elapsed.inMicroseconds / Duration.microsecondsPerMillisecond; Message message = template.withArguments( libraryCount, byteCount, ms, byteCount / ms, ms / libraryCount); - print("$sinceStart: ${message.message}"); + print("$sinceStart: ${message.problemMessage}"); }); } @@ -218,7 +218,7 @@ class DillLoader extends Loader { severity ??= message.code.severity; if (severity == Severity.ignored) return null; String trace = """ -message: ${message.message} +message: ${message.problemMessage} charOffset: $charOffset fileUri: $fileUri severity: $severity diff --git a/pkg/front_end/lib/src/fasta/fasta_codes_cfe_generated.dart b/pkg/front_end/lib/src/fasta/fasta_codes_cfe_generated.dart index 5674281bf0f..53468abd036 100644 --- a/pkg/front_end/lib/src/fasta/fasta_codes_cfe_generated.dart +++ b/pkg/front_end/lib/src/fasta/fasta_codes_cfe_generated.dart @@ -20,9 +20,9 @@ const Template< isNonNullableByDefault)> templateAmbiguousExtensionMethod = const Template< Message Function( String name, DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The method '#name' is defined in multiple extensions for '#type' and neither is more specific.""", - tipTemplate: + correctionMessageTemplate: r"""Try using an explicit extension application of the wanted extension or hiding unwanted extensions from scope.""", withArguments: _withArgumentsAmbiguousExtensionMethod); @@ -43,10 +43,10 @@ Message _withArgumentsAmbiguousExtensionMethod( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeAmbiguousExtensionMethod, - message: + problemMessage: """The method '${name}' is defined in multiple extensions for '${type}' and neither is more specific.""" + labeler.originMessages, - tip: """Try using an explicit extension application of the wanted extension or hiding unwanted extensions from scope.""", + correctionMessage: """Try using an explicit extension application of the wanted extension or hiding unwanted extensions from scope.""", arguments: {'name': name, 'type': _type}); } @@ -57,9 +57,9 @@ const Template< templateAmbiguousExtensionOperator = const Template< Message Function( String name, DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The operator '#name' is defined in multiple extensions for '#type' and neither is more specific.""", - tipTemplate: + correctionMessageTemplate: r"""Try using an explicit extension application of the wanted extension or hiding unwanted extensions from scope.""", withArguments: _withArgumentsAmbiguousExtensionOperator); @@ -82,10 +82,10 @@ Message _withArgumentsAmbiguousExtensionOperator( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeAmbiguousExtensionOperator, - message: + problemMessage: """The operator '${name}' is defined in multiple extensions for '${type}' and neither is more specific.""" + labeler.originMessages, - tip: """Try using an explicit extension application of the wanted extension or hiding unwanted extensions from scope.""", + correctionMessage: """Try using an explicit extension application of the wanted extension or hiding unwanted extensions from scope.""", arguments: {'name': name, 'type': _type}); } @@ -96,9 +96,9 @@ const Template< templateAmbiguousExtensionProperty = const Template< Message Function( String name, DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The property '#name' is defined in multiple extensions for '#type' and neither is more specific.""", - tipTemplate: + correctionMessageTemplate: r"""Try using an explicit extension application of the wanted extension or hiding unwanted extensions from scope.""", withArguments: _withArgumentsAmbiguousExtensionProperty); @@ -121,10 +121,10 @@ Message _withArgumentsAmbiguousExtensionProperty( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeAmbiguousExtensionProperty, - message: + problemMessage: """The property '${name}' is defined in multiple extensions for '${type}' and neither is more specific.""" + labeler.originMessages, - tip: """Try using an explicit extension application of the wanted extension or hiding unwanted extensions from scope.""", + correctionMessage: """Try using an explicit extension application of the wanted extension or hiding unwanted extensions from scope.""", arguments: {'name': name, 'type': _type}); } @@ -135,7 +135,7 @@ const Template< const Template< Message Function(String name, DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""'#name' can't implement both '#type' and '#type2'""", withArguments: _withArgumentsAmbiguousSupertypes); @@ -159,8 +159,9 @@ Message _withArgumentsAmbiguousSupertypes( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeAmbiguousSupertypes, - message: """'${name}' can't implement both '${type}' and '${type2}'""" + - labeler.originMessages, + problemMessage: + """'${name}' can't implement both '${type}' and '${type2}'""" + + labeler.originMessages, arguments: {'name': name, 'type': _type, 'type2': _type2}); } @@ -171,7 +172,7 @@ const Template< templateArgumentTypeNotAssignable = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The argument type '#type' can't be assigned to the parameter type '#type2'.""", withArguments: _withArgumentsArgumentTypeNotAssignable); @@ -194,7 +195,7 @@ Message _withArgumentsArgumentTypeNotAssignable( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeArgumentTypeNotAssignable, - message: + problemMessage: """The argument type '${type}' can't be assigned to the parameter type '${type2}'.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2}); @@ -207,7 +208,7 @@ const Template< templateArgumentTypeNotAssignableNullability = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The argument type '#type' can't be assigned to the parameter type '#type2' because '#type' is nullable and '#type2' isn't.""", withArguments: _withArgumentsArgumentTypeNotAssignableNullability); @@ -230,7 +231,7 @@ Message _withArgumentsArgumentTypeNotAssignableNullability( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeArgumentTypeNotAssignableNullability, - message: + problemMessage: """The argument type '${type}' can't be assigned to the parameter type '${type2}' because '${type}' is nullable and '${type2}' isn't.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2}); @@ -240,7 +241,7 @@ Message _withArgumentsArgumentTypeNotAssignableNullability( const Template templateArgumentTypeNotAssignableNullabilityNull = const Template< Message Function(DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The value 'null' can't be assigned to the parameter type '#type' because '#type' is not nullable.""", withArguments: _withArgumentsArgumentTypeNotAssignableNullabilityNull); @@ -258,7 +259,7 @@ Message _withArgumentsArgumentTypeNotAssignableNullabilityNull( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeArgumentTypeNotAssignableNullabilityNull, - message: + problemMessage: """The value 'null' can't be assigned to the parameter type '${type}' because '${type}' is not nullable.""" + labeler.originMessages, arguments: {'type': _type}); @@ -271,7 +272,7 @@ const Template< templateArgumentTypeNotAssignableNullabilityNullType = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The argument type '#type' can't be assigned to the parameter type '#type2' because '#type2' is not nullable.""", withArguments: _withArgumentsArgumentTypeNotAssignableNullabilityNullType); @@ -295,7 +296,7 @@ Message _withArgumentsArgumentTypeNotAssignableNullabilityNullType( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeArgumentTypeNotAssignableNullabilityNullType, - message: + problemMessage: """The argument type '${type}' can't be assigned to the parameter type '${type2}' because '${type2}' is not nullable.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2}); @@ -308,7 +309,7 @@ const Template< templateArgumentTypeNotAssignablePartNullability = const Template< Message Function(DartType _type, DartType _type2, DartType _type3, DartType _type4, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The argument type '#type' can't be assigned to the parameter type '#type2' because '#type3' is nullable and '#type4' isn't.""", withArguments: _withArgumentsArgumentTypeNotAssignablePartNullability); @@ -339,7 +340,7 @@ Message _withArgumentsArgumentTypeNotAssignablePartNullability( String type3 = type3Parts.join(); String type4 = type4Parts.join(); return new Message(codeArgumentTypeNotAssignablePartNullability, - message: + problemMessage: """The argument type '${type}' can't be assigned to the parameter type '${type2}' because '${type3}' is nullable and '${type4}' isn't.""" + labeler.originMessages, arguments: { @@ -355,7 +356,7 @@ const Template< Message Function(Constant _constant, bool isNonNullableByDefault)> templateConstEvalCaseImplementsEqual = const Template< Message Function(Constant _constant, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Case expression '#constant' does not have a primitive operator '=='.""", withArguments: _withArgumentsConstEvalCaseImplementsEqual); @@ -373,7 +374,7 @@ Message _withArgumentsConstEvalCaseImplementsEqual( List constantParts = labeler.labelConstant(_constant); String constant = constantParts.join(); return new Message(codeConstEvalCaseImplementsEqual, - message: + problemMessage: """Case expression '${constant}' does not have a primitive operator '=='.""" + labeler.originMessages, arguments: {'constant': _constant}); @@ -384,7 +385,7 @@ const Template< Message Function(Constant _constant, bool isNonNullableByDefault)> templateConstEvalDuplicateElement = const Template< Message Function(Constant _constant, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The element '#constant' conflicts with another existing element in the set.""", withArguments: _withArgumentsConstEvalDuplicateElement); @@ -402,7 +403,7 @@ Message _withArgumentsConstEvalDuplicateElement( List constantParts = labeler.labelConstant(_constant); String constant = constantParts.join(); return new Message(codeConstEvalDuplicateElement, - message: + problemMessage: """The element '${constant}' conflicts with another existing element in the set.""" + labeler.originMessages, arguments: {'constant': _constant}); @@ -413,7 +414,7 @@ const Template< Message Function(Constant _constant, bool isNonNullableByDefault)> templateConstEvalDuplicateKey = const Template< Message Function(Constant _constant, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The key '#constant' conflicts with another existing key in the map.""", withArguments: _withArgumentsConstEvalDuplicateKey); @@ -431,7 +432,7 @@ Message _withArgumentsConstEvalDuplicateKey( List constantParts = labeler.labelConstant(_constant); String constant = constantParts.join(); return new Message(codeConstEvalDuplicateKey, - message: + problemMessage: """The key '${constant}' conflicts with another existing key in the map.""" + labeler.originMessages, arguments: {'constant': _constant}); @@ -442,7 +443,7 @@ const Template< Message Function(Constant _constant, bool isNonNullableByDefault)> templateConstEvalElementImplementsEqual = const Template< Message Function(Constant _constant, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The element '#constant' does not have a primitive operator '=='.""", withArguments: _withArgumentsConstEvalElementImplementsEqual); @@ -460,7 +461,7 @@ Message _withArgumentsConstEvalElementImplementsEqual( List constantParts = labeler.labelConstant(_constant); String constant = constantParts.join(); return new Message(codeConstEvalElementImplementsEqual, - message: + problemMessage: """The element '${constant}' does not have a primitive operator '=='.""" + labeler.originMessages, arguments: {'constant': _constant}); @@ -470,7 +471,7 @@ Message _withArgumentsConstEvalElementImplementsEqual( const Template templateConstEvalFreeTypeParameter = const Template< Message Function(DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The type '#type' is not a constant because it depends on a type parameter, only instantiated types are allowed.""", withArguments: _withArgumentsConstEvalFreeTypeParameter); @@ -488,7 +489,7 @@ Message _withArgumentsConstEvalFreeTypeParameter( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeConstEvalFreeTypeParameter, - message: + problemMessage: """The type '${type}' is not a constant because it depends on a type parameter, only instantiated types are allowed.""" + labeler.originMessages, arguments: {'type': _type}); @@ -501,7 +502,7 @@ const Template< templateConstEvalInvalidBinaryOperandType = const Template< Message Function(String stringOKEmpty, Constant _constant, DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Binary operator '#stringOKEmpty' on '#constant' requires operand of type '#type', but was of type '#type2'.""", withArguments: _withArgumentsConstEvalInvalidBinaryOperandType); @@ -532,7 +533,7 @@ Message _withArgumentsConstEvalInvalidBinaryOperandType( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeConstEvalInvalidBinaryOperandType, - message: + problemMessage: """Binary operator '${stringOKEmpty}' on '${constant}' requires operand of type '${type}', but was of type '${type2}'.""" + labeler.originMessages, arguments: { @@ -550,7 +551,7 @@ const Template< templateConstEvalInvalidEqualsOperandType = const Template< Message Function(Constant _constant, DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Binary operator '==' requires receiver constant '#constant' of type 'Null', 'bool', 'int', 'double', or 'String', but was of type '#type'.""", withArguments: _withArgumentsConstEvalInvalidEqualsOperandType); @@ -573,7 +574,7 @@ Message _withArgumentsConstEvalInvalidEqualsOperandType( String constant = constantParts.join(); String type = typeParts.join(); return new Message(codeConstEvalInvalidEqualsOperandType, - message: + problemMessage: """Binary operator '==' requires receiver constant '${constant}' of type 'Null', 'bool', 'int', 'double', or 'String', but was of type '${type}'.""" + labeler.originMessages, arguments: {'constant': _constant, 'type': _type}); @@ -584,9 +585,12 @@ const Template< Message Function(String stringOKEmpty, Constant _constant, bool isNonNullableByDefault)> templateConstEvalInvalidMethodInvocation = const Template< - Message Function(String stringOKEmpty, Constant _constant, - bool isNonNullableByDefault)>( - messageTemplate: + Message Function( + String stringOKEmpty, + Constant _constant, + bool + isNonNullableByDefault)>( + problemMessageTemplate: r"""The method '#stringOKEmpty' can't be invoked on '#constant' in a constant expression.""", withArguments: _withArgumentsConstEvalInvalidMethodInvocation); @@ -609,7 +613,7 @@ Message _withArgumentsConstEvalInvalidMethodInvocation( List constantParts = labeler.labelConstant(_constant); String constant = constantParts.join(); return new Message(codeConstEvalInvalidMethodInvocation, - message: + problemMessage: """The method '${stringOKEmpty}' can't be invoked on '${constant}' in a constant expression.""" + labeler.originMessages, arguments: {'stringOKEmpty': stringOKEmpty, 'constant': _constant}); @@ -620,9 +624,12 @@ const Template< Message Function(String stringOKEmpty, Constant _constant, bool isNonNullableByDefault)> templateConstEvalInvalidPropertyGet = const Template< - Message Function(String stringOKEmpty, Constant _constant, - bool isNonNullableByDefault)>( - messageTemplate: + Message Function( + String stringOKEmpty, + Constant _constant, + bool + isNonNullableByDefault)>( + problemMessageTemplate: r"""The property '#stringOKEmpty' can't be accessed on '#constant' in a constant expression.""", withArguments: _withArgumentsConstEvalInvalidPropertyGet); @@ -644,7 +651,7 @@ Message _withArgumentsConstEvalInvalidPropertyGet( List constantParts = labeler.labelConstant(_constant); String constant = constantParts.join(); return new Message(codeConstEvalInvalidPropertyGet, - message: + problemMessage: """The property '${stringOKEmpty}' can't be accessed on '${constant}' in a constant expression.""" + labeler.originMessages, arguments: {'stringOKEmpty': stringOKEmpty, 'constant': _constant}); @@ -655,7 +662,7 @@ const Template< Message Function(Constant _constant, bool isNonNullableByDefault)> templateConstEvalInvalidStringInterpolationOperand = const Template< Message Function(Constant _constant, bool isNonNullableByDefault)>( - messageTemplate: + 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.""", withArguments: @@ -675,7 +682,7 @@ Message _withArgumentsConstEvalInvalidStringInterpolationOperand( List constantParts = labeler.labelConstant(_constant); String constant = constantParts.join(); return new Message(codeConstEvalInvalidStringInterpolationOperand, - message: + problemMessage: """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.""" + labeler.originMessages, @@ -687,7 +694,7 @@ const Template< Message Function(Constant _constant, bool isNonNullableByDefault)> templateConstEvalInvalidSymbolName = const Template< Message Function(Constant _constant, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The symbol name must be a valid public Dart member name, public constructor name, or library name, optionally qualified, but was '#constant'.""", withArguments: _withArgumentsConstEvalInvalidSymbolName); @@ -705,7 +712,7 @@ Message _withArgumentsConstEvalInvalidSymbolName( List constantParts = labeler.labelConstant(_constant); String constant = constantParts.join(); return new Message(codeConstEvalInvalidSymbolName, - message: + problemMessage: """The symbol name must be a valid public Dart member name, public constructor name, or library name, optionally qualified, but was '${constant}'.""" + labeler.originMessages, arguments: {'constant': _constant}); @@ -721,7 +728,7 @@ const Template< isNonNullableByDefault)> templateConstEvalInvalidType = const Template< Message Function(Constant _constant, DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Expected constant '#constant' to be of type '#type', but was of type '#type2'.""", withArguments: _withArgumentsConstEvalInvalidType); @@ -745,7 +752,7 @@ Message _withArgumentsConstEvalInvalidType(Constant _constant, DartType _type, String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeConstEvalInvalidType, - message: + problemMessage: """Expected constant '${constant}' to be of type '${type}', but was of type '${type2}'.""" + labeler.originMessages, arguments: {'constant': _constant, 'type': _type, 'type2': _type2}); @@ -756,7 +763,7 @@ const Template< Message Function(Constant _constant, bool isNonNullableByDefault)> templateConstEvalKeyImplementsEqual = const Template< Message Function(Constant _constant, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The key '#constant' does not have a primitive operator '=='.""", withArguments: _withArgumentsConstEvalKeyImplementsEqual); @@ -776,7 +783,7 @@ Message _withArgumentsConstEvalKeyImplementsEqual( List constantParts = labeler.labelConstant(_constant); String constant = constantParts.join(); return new Message(codeConstEvalKeyImplementsEqual, - message: + problemMessage: """The key '${constant}' does not have a primitive operator '=='.""" + labeler.originMessages, arguments: {'constant': _constant}); @@ -787,7 +794,7 @@ const Template< Message Function(Constant _constant, bool isNonNullableByDefault)> templateConstEvalUnhandledException = const Template< Message Function(Constant _constant, bool isNonNullableByDefault)>( - messageTemplate: r"""Unhandled exception: #constant""", + problemMessageTemplate: r"""Unhandled exception: #constant""", withArguments: _withArgumentsConstEvalUnhandledException); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -804,7 +811,8 @@ Message _withArgumentsConstEvalUnhandledException( List constantParts = labeler.labelConstant(_constant); String constant = constantParts.join(); return new Message(codeConstEvalUnhandledException, - message: """Unhandled exception: ${constant}""" + labeler.originMessages, + problemMessage: + """Unhandled exception: ${constant}""" + labeler.originMessages, arguments: {'constant': _constant}); } @@ -817,9 +825,9 @@ const Template< isNonNullableByDefault)> templateDeferredTypeAnnotation = const Template< Message Function( DartType _type, String name, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The type '#type' is deferred loaded via prefix '#name' and can't be used as a type annotation.""", - tipTemplate: + correctionMessageTemplate: r"""Try removing 'deferred' from the import of '#name' or use a supertype of '#type' that isn't deferred.""", withArguments: _withArgumentsDeferredTypeAnnotation); @@ -842,10 +850,10 @@ Message _withArgumentsDeferredTypeAnnotation( name = demangleMixinApplicationName(name); String type = typeParts.join(); return new Message(codeDeferredTypeAnnotation, - message: + problemMessage: """The type '${type}' is deferred loaded via prefix '${name}' and can't be used as a type annotation.""" + labeler.originMessages, - tip: """Try removing 'deferred' from the import of '${name}' or use a supertype of '${type}' that isn't deferred.""", + correctionMessage: """Try removing 'deferred' from the import of '${name}' or use a supertype of '${type}' that isn't deferred.""", arguments: {'type': _type, 'name': name}); } @@ -856,7 +864,8 @@ const Template< templateFfiDartTypeMismatch = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: r"""Expected '#type' to be a subtype of '#type2'.""", + problemMessageTemplate: + r"""Expected '#type' to be a subtype of '#type2'.""", withArguments: _withArgumentsFfiDartTypeMismatch); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -878,7 +887,7 @@ Message _withArgumentsFfiDartTypeMismatch( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeFfiDartTypeMismatch, - message: """Expected '${type}' to be a subtype of '${type2}'.""" + + problemMessage: """Expected '${type}' to be a subtype of '${type2}'.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2}); } @@ -887,7 +896,7 @@ Message _withArgumentsFfiDartTypeMismatch( const Template templateFfiExpectedExceptionalReturn = const Template< Message Function(DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Expected an exceptional return value for a native callback returning '#type'.""", withArguments: _withArgumentsFfiExpectedExceptionalReturn); @@ -905,7 +914,7 @@ Message _withArgumentsFfiExpectedExceptionalReturn( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeFfiExpectedExceptionalReturn, - message: + problemMessage: """Expected an exceptional return value for a native callback returning '${type}'.""" + labeler.originMessages, arguments: {'type': _type}); @@ -915,7 +924,7 @@ Message _withArgumentsFfiExpectedExceptionalReturn( const Template templateFfiExpectedNoExceptionalReturn = const Template< Message Function(DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Exceptional return value cannot be provided for a native callback returning '#type'.""", withArguments: _withArgumentsFfiExpectedNoExceptionalReturn); @@ -933,7 +942,7 @@ Message _withArgumentsFfiExpectedNoExceptionalReturn( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeFfiExpectedNoExceptionalReturn, - message: + problemMessage: """Exceptional return value cannot be provided for a native callback returning '${type}'.""" + labeler.originMessages, arguments: {'type': _type}); @@ -946,7 +955,7 @@ const Template< bool isNonNullableByDefault)> templateFfiTypeInvalid = const Template< Message Function(DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Expected type '#type' to be a valid and instantiated subtype of 'NativeType'.""", withArguments: _withArgumentsFfiTypeInvalid); @@ -964,7 +973,7 @@ Message _withArgumentsFfiTypeInvalid( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeFfiTypeInvalid, - message: + problemMessage: """Expected type '${type}' to be a valid and instantiated subtype of 'NativeType'.""" + labeler.originMessages, arguments: {'type': _type}); @@ -980,7 +989,7 @@ const Template< isNonNullableByDefault)> templateFfiTypeMismatch = const Template< Message Function(DartType _type, DartType _type2, DartType _type3, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Expected type '#type' to be '#type2', which is the Dart type corresponding to '#type3'.""", withArguments: _withArgumentsFfiTypeMismatch); @@ -1004,7 +1013,7 @@ Message _withArgumentsFfiTypeMismatch(DartType _type, DartType _type2, String type2 = type2Parts.join(); String type3 = type3Parts.join(); return new Message(codeFfiTypeMismatch, - message: + problemMessage: """Expected type '${type}' to be '${type2}', which is the Dart type corresponding to '${type3}'.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2, 'type3': _type3}); @@ -1017,7 +1026,7 @@ const Template< templateFieldNonNullableNotInitializedByConstructorError = const Template< Message Function( String name, DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""This constructor should initialize field '#name' because its type '#type' doesn't allow null.""", withArguments: _withArgumentsFieldNonNullableNotInitializedByConstructorError); @@ -1041,7 +1050,7 @@ Message _withArgumentsFieldNonNullableNotInitializedByConstructorError( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeFieldNonNullableNotInitializedByConstructorError, - message: + problemMessage: """This constructor should initialize field '${name}' because its type '${type}' doesn't allow null.""" + labeler.originMessages, arguments: {'name': name, 'type': _type}); @@ -1054,7 +1063,7 @@ const Template< templateFieldNonNullableWithoutInitializerError = const Template< Message Function( String name, DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Field '#name' should be initialized because its type '#type' doesn't allow null.""", withArguments: _withArgumentsFieldNonNullableWithoutInitializerError); @@ -1077,7 +1086,7 @@ Message _withArgumentsFieldNonNullableWithoutInitializerError( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeFieldNonNullableWithoutInitializerError, - message: + problemMessage: """Field '${name}' should be initialized because its type '${type}' doesn't allow null.""" + labeler.originMessages, arguments: {'name': name, 'type': _type}); @@ -1090,9 +1099,10 @@ const Template< templateForInLoopElementTypeNotAssignable = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""A value of type '#type' can't be assigned to a variable of type '#type2'.""", - tipTemplate: r"""Try changing the type of the variable.""", + correctionMessageTemplate: + r"""Try changing the type of the variable.""", withArguments: _withArgumentsForInLoopElementTypeNotAssignable); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -1114,10 +1124,10 @@ Message _withArgumentsForInLoopElementTypeNotAssignable( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeForInLoopElementTypeNotAssignable, - message: + problemMessage: """A value of type '${type}' can't be assigned to a variable of type '${type2}'.""" + labeler.originMessages, - tip: """Try changing the type of the variable.""", + correctionMessage: """Try changing the type of the variable.""", arguments: {'type': _type, 'type2': _type2}); } @@ -1128,9 +1138,10 @@ const Template< templateForInLoopElementTypeNotAssignableNullability = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""A value of type '#type' can't be assigned to a variable of type '#type2' because '#type' is nullable and '#type2' isn't.""", - tipTemplate: r"""Try changing the type of the variable.""", + correctionMessageTemplate: + r"""Try changing the type of the variable.""", withArguments: _withArgumentsForInLoopElementTypeNotAssignableNullability); @@ -1153,10 +1164,10 @@ Message _withArgumentsForInLoopElementTypeNotAssignableNullability( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeForInLoopElementTypeNotAssignableNullability, - message: + problemMessage: """A value of type '${type}' can't be assigned to a variable of type '${type2}' because '${type}' is nullable and '${type2}' isn't.""" + labeler.originMessages, - tip: """Try changing the type of the variable.""", + correctionMessage: """Try changing the type of the variable.""", arguments: {'type': _type, 'type2': _type2}); } @@ -1167,9 +1178,10 @@ const Template< templateForInLoopElementTypeNotAssignablePartNullability = const Template< Message Function(DartType _type, DartType _type2, DartType _type3, DartType _type4, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""A value of type '#type' can't be assigned to a variable of type '#type2' because '#type3' is nullable and '#type4' isn't.""", - tipTemplate: r"""Try changing the type of the variable.""", + correctionMessageTemplate: + r"""Try changing the type of the variable.""", withArguments: _withArgumentsForInLoopElementTypeNotAssignablePartNullability); @@ -1200,10 +1212,10 @@ Message _withArgumentsForInLoopElementTypeNotAssignablePartNullability( String type3 = type3Parts.join(); String type4 = type4Parts.join(); return new Message(codeForInLoopElementTypeNotAssignablePartNullability, - message: + problemMessage: """A value of type '${type}' can't be assigned to a variable of type '${type2}' because '${type3}' is nullable and '${type4}' isn't.""" + labeler.originMessages, - tip: """Try changing the type of the variable.""", + correctionMessage: """Try changing the type of the variable.""", arguments: { 'type': _type, 'type2': _type2, @@ -1219,7 +1231,7 @@ const Template< templateForInLoopTypeNotIterable = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The type '#type' used in the 'for' loop must implement '#type2'.""", withArguments: _withArgumentsForInLoopTypeNotIterable); @@ -1242,7 +1254,7 @@ Message _withArgumentsForInLoopTypeNotIterable( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeForInLoopTypeNotIterable, - message: + problemMessage: """The type '${type}' used in the 'for' loop must implement '${type2}'.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2}); @@ -1255,7 +1267,7 @@ const Template< templateForInLoopTypeNotIterableNullability = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The type '#type' used in the 'for' loop must implement '#type2' because '#type' is nullable and '#type2' isn't.""", withArguments: _withArgumentsForInLoopTypeNotIterableNullability); @@ -1278,7 +1290,7 @@ Message _withArgumentsForInLoopTypeNotIterableNullability( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeForInLoopTypeNotIterableNullability, - message: + problemMessage: """The type '${type}' used in the 'for' loop must implement '${type2}' because '${type}' is nullable and '${type2}' isn't.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2}); @@ -1291,7 +1303,7 @@ const Template< templateForInLoopTypeNotIterablePartNullability = const Template< Message Function(DartType _type, DartType _type2, DartType _type3, DartType _type4, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The type '#type' used in the 'for' loop must implement '#type2' because '#type3' is nullable and '#type4' isn't.""", withArguments: _withArgumentsForInLoopTypeNotIterablePartNullability); @@ -1322,7 +1334,7 @@ Message _withArgumentsForInLoopTypeNotIterablePartNullability( String type3 = type3Parts.join(); String type4 = type4Parts.join(); return new Message(codeForInLoopTypeNotIterablePartNullability, - message: + problemMessage: """The type '${type}' used in the 'for' loop must implement '${type2}' because '${type3}' is nullable and '${type4}' isn't.""" + labeler.originMessages, arguments: { @@ -1337,9 +1349,9 @@ Message _withArgumentsForInLoopTypeNotIterablePartNullability( const Template templateGenericFunctionTypeInferredAsActualTypeArgument = const Template< Message Function(DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Generic function type '#type' inferred as a type argument.""", - tipTemplate: + correctionMessageTemplate: r"""Try providing a non-generic function type explicitly.""", withArguments: _withArgumentsGenericFunctionTypeInferredAsActualTypeArgument); @@ -1358,10 +1370,11 @@ Message _withArgumentsGenericFunctionTypeInferredAsActualTypeArgument( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeGenericFunctionTypeInferredAsActualTypeArgument, - message: + problemMessage: """Generic function type '${type}' inferred as a type argument.""" + labeler.originMessages, - tip: """Try providing a non-generic function type explicitly.""", + correctionMessage: + """Try providing a non-generic function type explicitly.""", arguments: {'type': _type}); } @@ -1369,9 +1382,9 @@ Message _withArgumentsGenericFunctionTypeInferredAsActualTypeArgument( const Template templateImplicitCallOfNonMethod = const Template< Message Function(DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Cannot invoke an instance of '#type' because it declares 'call' to be something other than a method.""", - tipTemplate: + correctionMessageTemplate: r"""Try changing 'call' to a method or explicitly invoke 'call'.""", withArguments: _withArgumentsImplicitCallOfNonMethod); @@ -1389,10 +1402,10 @@ Message _withArgumentsImplicitCallOfNonMethod( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeImplicitCallOfNonMethod, - message: + problemMessage: """Cannot invoke an instance of '${type}' because it declares 'call' to be something other than a method.""" + labeler.originMessages, - tip: """Try changing 'call' to a method or explicitly invoke 'call'.""", + correctionMessage: """Try changing 'call' to a method or explicitly invoke 'call'.""", arguments: {'type': _type}); } @@ -1403,7 +1416,7 @@ const Template< bool isNonNullableByDefault)> templateImplicitReturnNull = const Template< Message Function(DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""A non-null value must be returned since the return type '#type' doesn't allow null.""", withArguments: _withArgumentsImplicitReturnNull); @@ -1421,7 +1434,7 @@ Message _withArgumentsImplicitReturnNull( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeImplicitReturnNull, - message: + problemMessage: """A non-null value must be returned since the return type '${type}' doesn't allow null.""" + labeler.originMessages, arguments: {'type': _type}); @@ -1434,7 +1447,7 @@ const Template< templateIncompatibleRedirecteeFunctionType = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The constructor function type '#type' isn't a subtype of '#type2'.""", withArguments: _withArgumentsIncompatibleRedirecteeFunctionType); @@ -1457,7 +1470,7 @@ Message _withArgumentsIncompatibleRedirecteeFunctionType( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeIncompatibleRedirecteeFunctionType, - message: + problemMessage: """The constructor function type '${type}' isn't a subtype of '${type2}'.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2}); @@ -1465,16 +1478,20 @@ Message _withArgumentsIncompatibleRedirecteeFunctionType( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< + Message Function( + DartType _type, + DartType _type2, + String name, + String name2, + bool + isNonNullableByDefault)> templateIncorrectTypeArgument = const Template< Message Function(DartType _type, DartType _type2, String name, - String name2, bool isNonNullableByDefault)> - templateIncorrectTypeArgument = const Template< - Message Function(DartType _type, DartType _type2, String name, - String name2, bool isNonNullableByDefault)>( - messageTemplate: - r"""Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2'.""", - tipTemplate: - r"""Try changing type arguments so that they conform to the bounds.""", - withArguments: _withArgumentsIncorrectTypeArgument); + String name2, bool isNonNullableByDefault)>( + 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.""", + withArguments: _withArgumentsIncorrectTypeArgument); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code< @@ -1502,10 +1519,10 @@ Message _withArgumentsIncorrectTypeArgument(DartType _type, DartType _type2, String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeIncorrectTypeArgument, - message: + problemMessage: """Type argument '${type}' doesn't conform to the bound '${type2}' of the type variable '${name}' on '${name2}'.""" + labeler.originMessages, - tip: """Try changing type arguments so that they conform to the bounds.""", + correctionMessage: """Try changing type arguments so that they conform to the bounds.""", arguments: { 'type': _type, 'type2': _type2, @@ -1521,9 +1538,9 @@ const Template< templateIncorrectTypeArgumentInReturnType = const Template< Message Function(DartType _type, DartType _type2, String name, String name2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2' in the return type.""", - tipTemplate: + correctionMessageTemplate: r"""Try changing type arguments so that they conform to the bounds.""", withArguments: _withArgumentsIncorrectTypeArgumentInReturnType); @@ -1550,10 +1567,10 @@ Message _withArgumentsIncorrectTypeArgumentInReturnType(DartType _type, String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeIncorrectTypeArgumentInReturnType, - message: + problemMessage: """Type argument '${type}' doesn't conform to the bound '${type2}' of the type variable '${name}' on '${name2}' in the return type.""" + labeler.originMessages, - tip: """Try changing type arguments so that they conform to the bounds.""", + correctionMessage: """Try changing type arguments so that they conform to the bounds.""", arguments: { 'type': _type, 'type2': _type2, @@ -1581,9 +1598,9 @@ const Template< String name3, String name4, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2' in the supertype '#name3' of class '#name4'.""", - tipTemplate: + correctionMessageTemplate: r"""Try changing type arguments so that they conform to the bounds.""", withArguments: _withArgumentsIncorrectTypeArgumentInSupertype); @@ -1632,10 +1649,10 @@ Message _withArgumentsIncorrectTypeArgumentInSupertype( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeIncorrectTypeArgumentInSupertype, - message: + problemMessage: """Type argument '${type}' doesn't conform to the bound '${type2}' of the type variable '${name}' on '${name2}' in the supertype '${name3}' of class '${name4}'.""" + labeler.originMessages, - tip: + correctionMessage: """Try changing type arguments so that they conform to the bounds.""", arguments: { 'type': _type, @@ -1666,9 +1683,9 @@ const Template< String name3, String name4, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Inferred type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2' in the supertype '#name3' of class '#name4'.""", - tipTemplate: + correctionMessageTemplate: r"""Try specifying type arguments explicitly so that they conform to the bounds.""", withArguments: _withArgumentsIncorrectTypeArgumentInSupertypeInferred); @@ -1717,10 +1734,10 @@ Message _withArgumentsIncorrectTypeArgumentInSupertypeInferred( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeIncorrectTypeArgumentInSupertypeInferred, - message: + problemMessage: """Inferred type argument '${type}' doesn't conform to the bound '${type2}' of the type variable '${name}' on '${name2}' in the supertype '${name3}' of class '${name4}'.""" + labeler.originMessages, - tip: + correctionMessage: """Try specifying type arguments explicitly so that they conform to the bounds.""", arguments: { 'type': _type, @@ -1739,9 +1756,9 @@ const Template< templateIncorrectTypeArgumentInferred = const Template< Message Function(DartType _type, DartType _type2, String name, String name2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Inferred type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2'.""", - tipTemplate: + correctionMessageTemplate: r"""Try specifying type arguments explicitly so that they conform to the bounds.""", withArguments: _withArgumentsIncorrectTypeArgumentInferred); @@ -1771,10 +1788,10 @@ Message _withArgumentsIncorrectTypeArgumentInferred(DartType _type, String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeIncorrectTypeArgumentInferred, - message: + problemMessage: """Inferred type argument '${type}' doesn't conform to the bound '${type2}' of the type variable '${name}' on '${name2}'.""" + labeler.originMessages, - tip: """Try specifying type arguments explicitly so that they conform to the bounds.""", + correctionMessage: """Try specifying type arguments explicitly so that they conform to the bounds.""", arguments: { 'type': _type, 'type2': _type2, @@ -1790,9 +1807,9 @@ const Template< templateIncorrectTypeArgumentInstantiation = const Template< Message Function(DartType _type, DartType _type2, String name, DartType _type3, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#type3'.""", - tipTemplate: + correctionMessageTemplate: r"""Try changing type arguments so that they conform to the bounds.""", withArguments: _withArgumentsIncorrectTypeArgumentInstantiation); @@ -1823,10 +1840,10 @@ Message _withArgumentsIncorrectTypeArgumentInstantiation( String type2 = type2Parts.join(); String type3 = type3Parts.join(); return new Message(codeIncorrectTypeArgumentInstantiation, - message: + problemMessage: """Type argument '${type}' doesn't conform to the bound '${type2}' of the type variable '${name}' on '${type3}'.""" + labeler.originMessages, - tip: """Try changing type arguments so that they conform to the bounds.""", + correctionMessage: """Try changing type arguments so that they conform to the bounds.""", arguments: { 'type': _type, 'type2': _type2, @@ -1842,9 +1859,9 @@ const Template< templateIncorrectTypeArgumentInstantiationInferred = const Template< Message Function(DartType _type, DartType _type2, String name, DartType _type3, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Inferred type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#type3'.""", - tipTemplate: + correctionMessageTemplate: r"""Try specifying type arguments explicitly so that they conform to the bounds.""", withArguments: _withArgumentsIncorrectTypeArgumentInstantiationInferred); @@ -1876,10 +1893,10 @@ Message _withArgumentsIncorrectTypeArgumentInstantiationInferred( String type2 = type2Parts.join(); String type3 = type3Parts.join(); return new Message(codeIncorrectTypeArgumentInstantiationInferred, - message: + problemMessage: """Inferred type argument '${type}' doesn't conform to the bound '${type2}' of the type variable '${name}' on '${type3}'.""" + labeler.originMessages, - tip: """Try specifying type arguments explicitly so that they conform to the bounds.""", + correctionMessage: """Try specifying type arguments explicitly so that they conform to the bounds.""", arguments: { 'type': _type, 'type2': _type2, @@ -1895,9 +1912,9 @@ const Template< templateIncorrectTypeArgumentQualified = const Template< Message Function(DartType _type, DartType _type2, String name, DartType _type3, String name2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#type3.#name2'.""", - tipTemplate: + correctionMessageTemplate: r"""Try changing type arguments so that they conform to the bounds.""", withArguments: _withArgumentsIncorrectTypeArgumentQualified); @@ -1935,10 +1952,10 @@ Message _withArgumentsIncorrectTypeArgumentQualified( String type2 = type2Parts.join(); String type3 = type3Parts.join(); return new Message(codeIncorrectTypeArgumentQualified, - message: + problemMessage: """Type argument '${type}' doesn't conform to the bound '${type2}' of the type variable '${name}' on '${type3}.${name2}'.""" + labeler.originMessages, - tip: """Try changing type arguments so that they conform to the bounds.""", + correctionMessage: """Try changing type arguments so that they conform to the bounds.""", arguments: { 'type': _type, 'type2': _type2, @@ -1955,9 +1972,9 @@ const Template< templateIncorrectTypeArgumentQualifiedInferred = const Template< Message Function(DartType _type, DartType _type2, String name, DartType _type3, String name2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Inferred type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#type3.#name2'.""", - tipTemplate: + correctionMessageTemplate: r"""Try specifying type arguments explicitly so that they conform to the bounds.""", withArguments: _withArgumentsIncorrectTypeArgumentQualifiedInferred); @@ -1991,10 +2008,10 @@ Message _withArgumentsIncorrectTypeArgumentQualifiedInferred( String type2 = type2Parts.join(); String type3 = type3Parts.join(); return new Message(codeIncorrectTypeArgumentQualifiedInferred, - message: + problemMessage: """Inferred type argument '${type}' doesn't conform to the bound '${type2}' of the type variable '${name}' on '${type3}.${name2}'.""" + labeler.originMessages, - tip: """Try specifying type arguments explicitly so that they conform to the bounds.""", + correctionMessage: """Try specifying type arguments explicitly so that they conform to the bounds.""", arguments: { 'type': _type, 'type2': _type2, @@ -2006,14 +2023,22 @@ Message _withArgumentsIncorrectTypeArgumentQualifiedInferred( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(String name, DartType _type, DartType _type2, - bool isNonNullableByDefault)> + Message Function( + String name, + DartType _type, + DartType _type2, + bool + isNonNullableByDefault)> templateInitializingFormalTypeMismatch = const Template< - Message Function(String name, DartType _type, DartType _type2, - bool isNonNullableByDefault)>( - messageTemplate: + Message Function( + String name, + DartType _type, + DartType _type2, + bool + isNonNullableByDefault)>( + problemMessageTemplate: r"""The type of parameter '#name', '#type' is not a subtype of the corresponding field's type, '#type2'.""", - tipTemplate: + correctionMessageTemplate: r"""Try changing the type of parameter '#name' to a subtype of '#type2'.""", withArguments: _withArgumentsInitializingFormalTypeMismatch); @@ -2037,10 +2062,10 @@ Message _withArgumentsInitializingFormalTypeMismatch( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInitializingFormalTypeMismatch, - message: + problemMessage: """The type of parameter '${name}', '${type}' is not a subtype of the corresponding field's type, '${type2}'.""" + labeler.originMessages, - tip: """Try changing the type of parameter '${name}' to a subtype of '${type2}'.""", + correctionMessage: """Try changing the type of parameter '${name}' to a subtype of '${type2}'.""", arguments: {'name': name, 'type': _type, 'type2': _type2}); } @@ -2048,9 +2073,9 @@ Message _withArgumentsInitializingFormalTypeMismatch( const Template templateInstantiationNonGenericFunctionType = const Template< Message Function(DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The static type of the explicit instantiation operand must be a generic function type but is '#type'.""", - tipTemplate: + correctionMessageTemplate: r"""Try changing the operand or remove the type arguments.""", withArguments: _withArgumentsInstantiationNonGenericFunctionType); @@ -2068,10 +2093,10 @@ Message _withArgumentsInstantiationNonGenericFunctionType( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeInstantiationNonGenericFunctionType, - message: + problemMessage: """The static type of the explicit instantiation operand must be a generic function type but is '${type}'.""" + labeler.originMessages, - tip: """Try changing the operand or remove the type arguments.""", + correctionMessage: """Try changing the operand or remove the type arguments.""", arguments: {'type': _type}); } @@ -2082,7 +2107,7 @@ const Template< templateInternalProblemUnsupportedNullability = const Template< Message Function( String string, DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Unsupported nullability value '#string' on type '#type'.""", withArguments: _withArgumentsInternalProblemUnsupportedNullability); @@ -2104,7 +2129,7 @@ Message _withArgumentsInternalProblemUnsupportedNullability( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeInternalProblemUnsupportedNullability, - message: + problemMessage: """Unsupported nullability value '${string}' on type '${type}'.""" + labeler.originMessages, arguments: {'string': string, 'type': _type}); @@ -2117,7 +2142,7 @@ const Template< templateInvalidAssignmentError = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""A value of type '#type' can't be assigned to a variable of type '#type2'.""", withArguments: _withArgumentsInvalidAssignmentError); @@ -2140,7 +2165,7 @@ Message _withArgumentsInvalidAssignmentError( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidAssignmentError, - message: + problemMessage: """A value of type '${type}' can't be assigned to a variable of type '${type2}'.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2}); @@ -2153,7 +2178,7 @@ const Template< templateInvalidAssignmentErrorNullability = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""A value of type '#type' can't be assigned to a variable of type '#type2' because '#type' is nullable and '#type2' isn't.""", withArguments: _withArgumentsInvalidAssignmentErrorNullability); @@ -2176,7 +2201,7 @@ Message _withArgumentsInvalidAssignmentErrorNullability( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidAssignmentErrorNullability, - message: + problemMessage: """A value of type '${type}' can't be assigned to a variable of type '${type2}' because '${type}' is nullable and '${type2}' isn't.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2}); @@ -2186,7 +2211,7 @@ Message _withArgumentsInvalidAssignmentErrorNullability( const Template templateInvalidAssignmentErrorNullabilityNull = const Template< Message Function(DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The value 'null' can't be assigned to a variable of type '#type' because '#type' is not nullable.""", withArguments: _withArgumentsInvalidAssignmentErrorNullabilityNull); @@ -2204,7 +2229,7 @@ Message _withArgumentsInvalidAssignmentErrorNullabilityNull( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeInvalidAssignmentErrorNullabilityNull, - message: + problemMessage: """The value 'null' can't be assigned to a variable of type '${type}' because '${type}' is not nullable.""" + labeler.originMessages, arguments: {'type': _type}); @@ -2217,7 +2242,7 @@ const Template< templateInvalidAssignmentErrorNullabilityNullType = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""A value of type '#type' can't be assigned to a variable of type '#type2' because '#type2' is not nullable.""", withArguments: _withArgumentsInvalidAssignmentErrorNullabilityNullType); @@ -2240,7 +2265,7 @@ Message _withArgumentsInvalidAssignmentErrorNullabilityNullType( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidAssignmentErrorNullabilityNullType, - message: + problemMessage: """A value of type '${type}' can't be assigned to a variable of type '${type2}' because '${type2}' is not nullable.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2}); @@ -2253,7 +2278,7 @@ const Template< templateInvalidAssignmentErrorPartNullability = const Template< Message Function(DartType _type, DartType _type2, DartType _type3, DartType _type4, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""A value of type '#type' can't be assigned to a variable of type '#type2' because '#type3' is nullable and '#type4' isn't.""", withArguments: _withArgumentsInvalidAssignmentErrorPartNullability); @@ -2284,7 +2309,7 @@ Message _withArgumentsInvalidAssignmentErrorPartNullability( String type3 = type3Parts.join(); String type4 = type4Parts.join(); return new Message(codeInvalidAssignmentErrorPartNullability, - message: + problemMessage: """A value of type '${type}' can't be assigned to a variable of type '${type2}' because '${type3}' is nullable and '${type4}' isn't.""" + labeler.originMessages, arguments: { @@ -2302,11 +2327,11 @@ const Template< DartType _type2, bool isNonNullableByDefault)> templateInvalidCastFunctionExpr = const Template< - Message Function( - DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + Message Function(DartType _type, DartType _type2, + bool isNonNullableByDefault)>( + problemMessageTemplate: r"""The function expression type '#type' isn't of expected type '#type2'.""", - tipTemplate: + correctionMessageTemplate: r"""Change the type of the function expression or the context in which it is used.""", withArguments: _withArgumentsInvalidCastFunctionExpr); @@ -2329,10 +2354,10 @@ Message _withArgumentsInvalidCastFunctionExpr( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidCastFunctionExpr, - message: + problemMessage: """The function expression type '${type}' isn't of expected type '${type2}'.""" + labeler.originMessages, - tip: """Change the type of the function expression or the context in which it is used.""", + correctionMessage: """Change the type of the function expression or the context in which it is used.""", arguments: {'type': _type, 'type2': _type2}); } @@ -2343,14 +2368,11 @@ const Template< DartType _type2, bool isNonNullableByDefault)> templateInvalidCastLiteralList = const Template< - Message Function( - DartType _type, - DartType _type2, - bool - isNonNullableByDefault)>( - messageTemplate: + Message Function(DartType _type, DartType _type2, + bool isNonNullableByDefault)>( + problemMessageTemplate: r"""The list literal type '#type' isn't of expected type '#type2'.""", - tipTemplate: + correctionMessageTemplate: r"""Change the type of the list literal or the context in which it is used.""", withArguments: _withArgumentsInvalidCastLiteralList); @@ -2373,10 +2395,10 @@ Message _withArgumentsInvalidCastLiteralList( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidCastLiteralList, - message: + problemMessage: """The list literal type '${type}' isn't of expected type '${type2}'.""" + labeler.originMessages, - tip: """Change the type of the list literal or the context in which it is used.""", + correctionMessage: """Change the type of the list literal or the context in which it is used.""", arguments: {'type': _type, 'type2': _type2}); } @@ -2387,14 +2409,11 @@ const Template< DartType _type2, bool isNonNullableByDefault)> templateInvalidCastLiteralMap = const Template< - Message Function( - DartType _type, - DartType _type2, - bool - isNonNullableByDefault)>( - messageTemplate: + Message Function(DartType _type, DartType _type2, + bool isNonNullableByDefault)>( + problemMessageTemplate: r"""The map literal type '#type' isn't of expected type '#type2'.""", - tipTemplate: + correctionMessageTemplate: r"""Change the type of the map literal or the context in which it is used.""", withArguments: _withArgumentsInvalidCastLiteralMap); @@ -2417,10 +2436,10 @@ Message _withArgumentsInvalidCastLiteralMap( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidCastLiteralMap, - message: + problemMessage: """The map literal type '${type}' isn't of expected type '${type2}'.""" + labeler.originMessages, - tip: """Change the type of the map literal or the context in which it is used.""", + correctionMessage: """Change the type of the map literal or the context in which it is used.""", arguments: {'type': _type, 'type2': _type2}); } @@ -2431,14 +2450,11 @@ const Template< DartType _type2, bool isNonNullableByDefault)> templateInvalidCastLiteralSet = const Template< - Message Function( - DartType _type, - DartType _type2, - bool - isNonNullableByDefault)>( - messageTemplate: + Message Function(DartType _type, DartType _type2, + bool isNonNullableByDefault)>( + problemMessageTemplate: r"""The set literal type '#type' isn't of expected type '#type2'.""", - tipTemplate: + correctionMessageTemplate: r"""Change the type of the set literal or the context in which it is used.""", withArguments: _withArgumentsInvalidCastLiteralSet); @@ -2461,10 +2477,10 @@ Message _withArgumentsInvalidCastLiteralSet( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidCastLiteralSet, - message: + problemMessage: """The set literal type '${type}' isn't of expected type '${type2}'.""" + labeler.originMessages, - tip: """Change the type of the set literal or the context in which it is used.""", + correctionMessage: """Change the type of the set literal or the context in which it is used.""", arguments: {'type': _type, 'type2': _type2}); } @@ -2475,14 +2491,11 @@ const Template< DartType _type2, bool isNonNullableByDefault)> templateInvalidCastLocalFunction = const Template< - Message Function( - DartType _type, - DartType _type2, - bool - isNonNullableByDefault)>( - messageTemplate: + Message Function(DartType _type, DartType _type2, + bool isNonNullableByDefault)>( + problemMessageTemplate: r"""The local function has type '#type' that isn't of expected type '#type2'.""", - tipTemplate: + correctionMessageTemplate: r"""Change the type of the function or the context in which it is used.""", withArguments: _withArgumentsInvalidCastLocalFunction); @@ -2505,10 +2518,10 @@ Message _withArgumentsInvalidCastLocalFunction( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidCastLocalFunction, - message: + problemMessage: """The local function has type '${type}' that isn't of expected type '${type2}'.""" + labeler.originMessages, - tip: """Change the type of the function or the context in which it is used.""", + correctionMessage: """Change the type of the function or the context in which it is used.""", arguments: {'type': _type, 'type2': _type2}); } @@ -2519,14 +2532,11 @@ const Template< DartType _type2, bool isNonNullableByDefault)> templateInvalidCastNewExpr = const Template< - Message Function( - DartType _type, - DartType _type2, - bool - isNonNullableByDefault)>( - messageTemplate: + Message Function(DartType _type, DartType _type2, + bool isNonNullableByDefault)>( + problemMessageTemplate: r"""The constructor returns type '#type' that isn't of expected type '#type2'.""", - tipTemplate: + correctionMessageTemplate: r"""Change the type of the object being constructed or the context in which it is used.""", withArguments: _withArgumentsInvalidCastNewExpr); @@ -2549,10 +2559,10 @@ Message _withArgumentsInvalidCastNewExpr( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidCastNewExpr, - message: + problemMessage: """The constructor returns type '${type}' that isn't of expected type '${type2}'.""" + labeler.originMessages, - tip: """Change the type of the object being constructed or the context in which it is used.""", + correctionMessage: """Change the type of the object being constructed or the context in which it is used.""", arguments: {'type': _type, 'type2': _type2}); } @@ -2563,11 +2573,11 @@ const Template< DartType _type2, bool isNonNullableByDefault)> templateInvalidCastStaticMethod = const Template< - Message Function( - DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + Message Function(DartType _type, DartType _type2, + bool isNonNullableByDefault)>( + problemMessageTemplate: r"""The static method has type '#type' that isn't of expected type '#type2'.""", - tipTemplate: + correctionMessageTemplate: r"""Change the type of the method or the context in which it is used.""", withArguments: _withArgumentsInvalidCastStaticMethod); @@ -2590,10 +2600,10 @@ Message _withArgumentsInvalidCastStaticMethod( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidCastStaticMethod, - message: + problemMessage: """The static method has type '${type}' that isn't of expected type '${type2}'.""" + labeler.originMessages, - tip: """Change the type of the method or the context in which it is used.""", + correctionMessage: """Change the type of the method or the context in which it is used.""", arguments: {'type': _type, 'type2': _type2}); } @@ -2604,9 +2614,9 @@ const Template< templateInvalidCastTopLevelFunction = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The top level function has type '#type' that isn't of expected type '#type2'.""", - tipTemplate: + correctionMessageTemplate: r"""Change the type of the function or the context in which it is used.""", withArguments: _withArgumentsInvalidCastTopLevelFunction); @@ -2629,10 +2639,10 @@ Message _withArgumentsInvalidCastTopLevelFunction( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidCastTopLevelFunction, - message: + problemMessage: """The top level function has type '${type}' that isn't of expected type '${type2}'.""" + labeler.originMessages, - tip: """Change the type of the function or the context in which it is used.""", + correctionMessage: """Change the type of the function or the context in which it is used.""", arguments: {'type': _type, 'type2': _type2}); } @@ -2643,7 +2653,7 @@ const Template< templateInvalidGetterSetterType = const Template< Message Function(DartType _type, String name, DartType _type2, String name2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The type '#type' of the getter '#name' is not a subtype of the type '#type2' of the setter '#name2'.""", withArguments: _withArgumentsInvalidGetterSetterType); @@ -2669,7 +2679,7 @@ Message _withArgumentsInvalidGetterSetterType(DartType _type, String name, String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidGetterSetterType, - message: + problemMessage: """The type '${type}' of the getter '${name}' is not a subtype of the type '${type2}' of the setter '${name2}'.""" + labeler.originMessages, arguments: { @@ -2687,7 +2697,7 @@ const Template< templateInvalidGetterSetterTypeBothInheritedField = const Template< Message Function(DartType _type, String name, DartType _type2, String name2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The type '#type' of the inherited field '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'.""", withArguments: _withArgumentsInvalidGetterSetterTypeBothInheritedField); @@ -2714,7 +2724,7 @@ Message _withArgumentsInvalidGetterSetterTypeBothInheritedField(DartType _type, String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidGetterSetterTypeBothInheritedField, - message: + problemMessage: """The type '${type}' of the inherited field '${name}' is not a subtype of the type '${type2}' of the inherited setter '${name2}'.""" + labeler.originMessages, arguments: { @@ -2732,7 +2742,7 @@ const Template< templateInvalidGetterSetterTypeBothInheritedFieldLegacy = const Template< Message Function(DartType _type, String name, DartType _type2, String name2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The type '#type' of the inherited field '#name' is not assignable to the type '#type2' of the inherited setter '#name2'.""", withArguments: _withArgumentsInvalidGetterSetterTypeBothInheritedFieldLegacy); @@ -2764,7 +2774,7 @@ Message _withArgumentsInvalidGetterSetterTypeBothInheritedFieldLegacy( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidGetterSetterTypeBothInheritedFieldLegacy, - message: + problemMessage: """The type '${type}' of the inherited field '${name}' is not assignable to the type '${type2}' of the inherited setter '${name2}'.""" + labeler.originMessages, arguments: { @@ -2782,7 +2792,7 @@ const Template< templateInvalidGetterSetterTypeBothInheritedGetter = const Template< Message Function(DartType _type, String name, DartType _type2, String name2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The type '#type' of the inherited getter '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'.""", withArguments: _withArgumentsInvalidGetterSetterTypeBothInheritedGetter); @@ -2810,7 +2820,7 @@ Message _withArgumentsInvalidGetterSetterTypeBothInheritedGetter(DartType _type, String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidGetterSetterTypeBothInheritedGetter, - message: + problemMessage: """The type '${type}' of the inherited getter '${name}' is not a subtype of the type '${type2}' of the inherited setter '${name2}'.""" + labeler.originMessages, arguments: { @@ -2828,7 +2838,7 @@ const Template< templateInvalidGetterSetterTypeBothInheritedGetterLegacy = const Template< Message Function(DartType _type, String name, DartType _type2, String name2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The type '#type' of the inherited getter '#name' is not assignable to the type '#type2' of the inherited setter '#name2'.""", withArguments: _withArgumentsInvalidGetterSetterTypeBothInheritedGetterLegacy); @@ -2860,7 +2870,7 @@ Message _withArgumentsInvalidGetterSetterTypeBothInheritedGetterLegacy( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidGetterSetterTypeBothInheritedGetterLegacy, - message: + problemMessage: """The type '${type}' of the inherited getter '${name}' is not assignable to the type '${type2}' of the inherited setter '${name2}'.""" + labeler.originMessages, arguments: { @@ -2878,7 +2888,7 @@ const Template< templateInvalidGetterSetterTypeFieldInherited = const Template< Message Function(DartType _type, String name, DartType _type2, String name2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The type '#type' of the inherited field '#name' is not a subtype of the type '#type2' of the setter '#name2'.""", withArguments: _withArgumentsInvalidGetterSetterTypeFieldInherited); @@ -2905,7 +2915,7 @@ Message _withArgumentsInvalidGetterSetterTypeFieldInherited(DartType _type, String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidGetterSetterTypeFieldInherited, - message: + problemMessage: """The type '${type}' of the inherited field '${name}' is not a subtype of the type '${type2}' of the setter '${name2}'.""" + labeler.originMessages, arguments: { @@ -2923,7 +2933,7 @@ const Template< templateInvalidGetterSetterTypeFieldInheritedLegacy = const Template< Message Function(DartType _type, String name, DartType _type2, String name2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The type '#type' of the inherited field '#name' is not assignable to the type '#type2' of the setter '#name2'.""", withArguments: _withArgumentsInvalidGetterSetterTypeFieldInheritedLegacy); @@ -2955,7 +2965,7 @@ Message _withArgumentsInvalidGetterSetterTypeFieldInheritedLegacy( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidGetterSetterTypeFieldInheritedLegacy, - message: + problemMessage: """The type '${type}' of the inherited field '${name}' is not assignable to the type '${type2}' of the setter '${name2}'.""" + labeler.originMessages, arguments: { @@ -2973,7 +2983,7 @@ const Template< templateInvalidGetterSetterTypeGetterInherited = const Template< Message Function(DartType _type, String name, DartType _type2, String name2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The type '#type' of the inherited getter '#name' is not a subtype of the type '#type2' of the setter '#name2'.""", withArguments: _withArgumentsInvalidGetterSetterTypeGetterInherited); @@ -3000,7 +3010,7 @@ Message _withArgumentsInvalidGetterSetterTypeGetterInherited(DartType _type, String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidGetterSetterTypeGetterInherited, - message: + problemMessage: """The type '${type}' of the inherited getter '${name}' is not a subtype of the type '${type2}' of the setter '${name2}'.""" + labeler.originMessages, arguments: { @@ -3018,7 +3028,7 @@ const Template< templateInvalidGetterSetterTypeGetterInheritedLegacy = const Template< Message Function(DartType _type, String name, DartType _type2, String name2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The type '#type' of the inherited getter '#name' is not assignable to the type '#type2' of the setter '#name2'.""", withArguments: _withArgumentsInvalidGetterSetterTypeGetterInheritedLegacy); @@ -3050,7 +3060,7 @@ Message _withArgumentsInvalidGetterSetterTypeGetterInheritedLegacy( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidGetterSetterTypeGetterInheritedLegacy, - message: + problemMessage: """The type '${type}' of the inherited getter '${name}' is not assignable to the type '${type2}' of the setter '${name2}'.""" + labeler.originMessages, arguments: { @@ -3068,7 +3078,7 @@ const Template< templateInvalidGetterSetterTypeLegacy = const Template< Message Function(DartType _type, String name, DartType _type2, String name2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The type '#type' of the getter '#name' is not assignable to the type '#type2' of the setter '#name2'.""", withArguments: _withArgumentsInvalidGetterSetterTypeLegacy); @@ -3095,7 +3105,7 @@ Message _withArgumentsInvalidGetterSetterTypeLegacy(DartType _type, String name, String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidGetterSetterTypeLegacy, - message: + problemMessage: """The type '${type}' of the getter '${name}' is not assignable to the type '${type2}' of the setter '${name2}'.""" + labeler.originMessages, arguments: { @@ -3113,7 +3123,7 @@ const Template< templateInvalidGetterSetterTypeSetterInheritedField = const Template< Message Function(DartType _type, String name, DartType _type2, String name2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The type '#type' of the field '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'.""", withArguments: _withArgumentsInvalidGetterSetterTypeSetterInheritedField); @@ -3145,7 +3155,7 @@ Message _withArgumentsInvalidGetterSetterTypeSetterInheritedField( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidGetterSetterTypeSetterInheritedField, - message: + problemMessage: """The type '${type}' of the field '${name}' is not a subtype of the type '${type2}' of the inherited setter '${name2}'.""" + labeler.originMessages, arguments: { @@ -3163,7 +3173,7 @@ const Template< templateInvalidGetterSetterTypeSetterInheritedFieldLegacy = const Template< Message Function(DartType _type, String name, DartType _type2, String name2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The type '#type' of the field '#name' is not assignable to the type '#type2' of the inherited setter '#name2'.""", withArguments: _withArgumentsInvalidGetterSetterTypeSetterInheritedFieldLegacy); @@ -3195,7 +3205,7 @@ Message _withArgumentsInvalidGetterSetterTypeSetterInheritedFieldLegacy( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidGetterSetterTypeSetterInheritedFieldLegacy, - message: + problemMessage: """The type '${type}' of the field '${name}' is not assignable to the type '${type2}' of the inherited setter '${name2}'.""" + labeler.originMessages, arguments: { @@ -3213,7 +3223,7 @@ const Template< templateInvalidGetterSetterTypeSetterInheritedGetter = const Template< Message Function(DartType _type, String name, DartType _type2, String name2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The type '#type' of the getter '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'.""", withArguments: _withArgumentsInvalidGetterSetterTypeSetterInheritedGetter); @@ -3245,7 +3255,7 @@ Message _withArgumentsInvalidGetterSetterTypeSetterInheritedGetter( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidGetterSetterTypeSetterInheritedGetter, - message: + problemMessage: """The type '${type}' of the getter '${name}' is not a subtype of the type '${type2}' of the inherited setter '${name2}'.""" + labeler.originMessages, arguments: { @@ -3263,7 +3273,7 @@ const Template< templateInvalidGetterSetterTypeSetterInheritedGetterLegacy = const Template< Message Function(DartType _type, String name, DartType _type2, String name2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The type '#type' of the getter '#name' is not assignable to the type '#type2' of the inherited setter '#name2'.""", withArguments: _withArgumentsInvalidGetterSetterTypeSetterInheritedGetterLegacy); @@ -3295,7 +3305,7 @@ Message _withArgumentsInvalidGetterSetterTypeSetterInheritedGetterLegacy( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidGetterSetterTypeSetterInheritedGetterLegacy, - message: + problemMessage: """The type '${type}' of the getter '${name}' is not assignable to the type '${type2}' of the inherited setter '${name2}'.""" + labeler.originMessages, arguments: { @@ -3315,7 +3325,7 @@ const Template< isNonNullableByDefault)> templateInvalidReturn = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""A value of type '#type' can't be returned from a function with return type '#type2'.""", withArguments: _withArgumentsInvalidReturn); @@ -3338,7 +3348,7 @@ Message _withArgumentsInvalidReturn( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidReturn, - message: + problemMessage: """A value of type '${type}' can't be returned from a function with return type '${type2}'.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2}); @@ -3353,7 +3363,7 @@ const Template< isNonNullableByDefault)> templateInvalidReturnAsync = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""A value of type '#type' can't be returned from an async function with return type '#type2'.""", withArguments: _withArgumentsInvalidReturnAsync); @@ -3376,7 +3386,7 @@ Message _withArgumentsInvalidReturnAsync( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidReturnAsync, - message: + problemMessage: """A value of type '${type}' can't be returned from an async function with return type '${type2}'.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2}); @@ -3389,7 +3399,7 @@ const Template< templateInvalidReturnAsyncNullability = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""A value of type '#type' can't be returned from an async function with return type '#type2' because '#type' is nullable and '#type2' isn't.""", withArguments: _withArgumentsInvalidReturnAsyncNullability); @@ -3412,7 +3422,7 @@ Message _withArgumentsInvalidReturnAsyncNullability( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidReturnAsyncNullability, - message: + problemMessage: """A value of type '${type}' can't be returned from an async function with return type '${type2}' because '${type}' is nullable and '${type2}' isn't.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2}); @@ -3422,7 +3432,7 @@ Message _withArgumentsInvalidReturnAsyncNullability( const Template templateInvalidReturnAsyncNullabilityNull = const Template< Message Function(DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The value 'null' can't be returned from an async function with return type '#type' because '#type' is not nullable.""", withArguments: _withArgumentsInvalidReturnAsyncNullabilityNull); @@ -3440,7 +3450,7 @@ Message _withArgumentsInvalidReturnAsyncNullabilityNull( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeInvalidReturnAsyncNullabilityNull, - message: + problemMessage: """The value 'null' can't be returned from an async function with return type '${type}' because '${type}' is not nullable.""" + labeler.originMessages, arguments: {'type': _type}); @@ -3453,7 +3463,7 @@ const Template< templateInvalidReturnAsyncNullabilityNullType = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""A value of type '#type' can't be returned from an async function with return type '#type2' because '#type2' is not nullable.""", withArguments: _withArgumentsInvalidReturnAsyncNullabilityNullType); @@ -3476,7 +3486,7 @@ Message _withArgumentsInvalidReturnAsyncNullabilityNullType( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidReturnAsyncNullabilityNullType, - message: + problemMessage: """A value of type '${type}' can't be returned from an async function with return type '${type2}' because '${type2}' is not nullable.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2}); @@ -3489,7 +3499,7 @@ const Template< templateInvalidReturnAsyncPartNullability = const Template< Message Function(DartType _type, DartType _type2, DartType _type3, DartType _type4, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""A value of type '#type' can't be returned from an async function with return type '#type2' because '#type3' is nullable and '#type4' isn't.""", withArguments: _withArgumentsInvalidReturnAsyncPartNullability); @@ -3520,7 +3530,7 @@ Message _withArgumentsInvalidReturnAsyncPartNullability( String type3 = type3Parts.join(); String type4 = type4Parts.join(); return new Message(codeInvalidReturnAsyncPartNullability, - message: + problemMessage: """A value of type '${type}' can't be returned from an async function with return type '${type2}' because '${type3}' is nullable and '${type4}' isn't.""" + labeler.originMessages, arguments: { @@ -3538,7 +3548,7 @@ const Template< templateInvalidReturnNullability = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""A value of type '#type' can't be returned from a function with return type '#type2' because '#type' is nullable and '#type2' isn't.""", withArguments: _withArgumentsInvalidReturnNullability); @@ -3561,7 +3571,7 @@ Message _withArgumentsInvalidReturnNullability( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidReturnNullability, - message: + problemMessage: """A value of type '${type}' can't be returned from a function with return type '${type2}' because '${type}' is nullable and '${type2}' isn't.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2}); @@ -3571,7 +3581,7 @@ Message _withArgumentsInvalidReturnNullability( const Template templateInvalidReturnNullabilityNull = const Template< Message Function(DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The value 'null' can't be returned from a function with return type '#type' because '#type' is not nullable.""", withArguments: _withArgumentsInvalidReturnNullabilityNull); @@ -3589,7 +3599,7 @@ Message _withArgumentsInvalidReturnNullabilityNull( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeInvalidReturnNullabilityNull, - message: + problemMessage: """The value 'null' can't be returned from a function with return type '${type}' because '${type}' is not nullable.""" + labeler.originMessages, arguments: {'type': _type}); @@ -3602,7 +3612,7 @@ const Template< templateInvalidReturnNullabilityNullType = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""A value of type '#type' can't be returned from a function with return type '#type2' because '#type2' is not nullable.""", withArguments: _withArgumentsInvalidReturnNullabilityNullType); @@ -3625,7 +3635,7 @@ Message _withArgumentsInvalidReturnNullabilityNullType( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeInvalidReturnNullabilityNullType, - message: + problemMessage: """A value of type '${type}' can't be returned from a function with return type '${type2}' because '${type2}' is not nullable.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2}); @@ -3638,7 +3648,7 @@ const Template< templateInvalidReturnPartNullability = const Template< Message Function(DartType _type, DartType _type2, DartType _type3, DartType _type4, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""A value of type '#type' can't be returned from a function with return type '#type2' because '#type3' is nullable and '#type4' isn't.""", withArguments: _withArgumentsInvalidReturnPartNullability); @@ -3669,7 +3679,7 @@ Message _withArgumentsInvalidReturnPartNullability( String type3 = type3Parts.join(); String type4 = type4Parts.join(); return new Message(codeInvalidReturnPartNullability, - message: + problemMessage: """A value of type '${type}' can't be returned from a function with return type '${type2}' because '${type3}' is nullable and '${type4}' isn't.""" + labeler.originMessages, arguments: { @@ -3687,7 +3697,7 @@ const Template< templateMainWrongParameterType = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The type '#type' of the first parameter of the 'main' method is not a supertype of '#type2'.""", withArguments: _withArgumentsMainWrongParameterType); @@ -3710,7 +3720,7 @@ Message _withArgumentsMainWrongParameterType( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeMainWrongParameterType, - message: + problemMessage: """The type '${type}' of the first parameter of the 'main' method is not a supertype of '${type2}'.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2}); @@ -3723,7 +3733,7 @@ const Template< templateMainWrongParameterTypeExported = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The type '#type' of the first parameter of the exported 'main' method is not a supertype of '#type2'.""", withArguments: _withArgumentsMainWrongParameterTypeExported); @@ -3746,7 +3756,7 @@ Message _withArgumentsMainWrongParameterTypeExported( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeMainWrongParameterTypeExported, - message: + problemMessage: """The type '${type}' of the first parameter of the exported 'main' method is not a supertype of '${type2}'.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2}); @@ -3759,7 +3769,7 @@ const Template< templateMixinApplicationIncompatibleSupertype = const Template< Message Function(DartType _type, DartType _type2, DartType _type3, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""'#type' doesn't implement '#type2' so it can't be used with '#type3'.""", withArguments: _withArgumentsMixinApplicationIncompatibleSupertype); @@ -3784,7 +3794,7 @@ Message _withArgumentsMixinApplicationIncompatibleSupertype(DartType _type, String type2 = type2Parts.join(); String type3 = type3Parts.join(); return new Message(codeMixinApplicationIncompatibleSupertype, - message: + problemMessage: """'${type}' doesn't implement '${type2}' so it can't be used with '${type3}'.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2, 'type3': _type3}); @@ -3794,11 +3804,10 @@ Message _withArgumentsMixinApplicationIncompatibleSupertype(DartType _type, const Template< Message Function(String name, String name2, DartType _type, bool isNonNullableByDefault)> - templateMixinInferenceNoMatchingClass = - const Template< + templateMixinInferenceNoMatchingClass = const Template< Message Function(String name, String name2, DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Type parameters couldn't be inferred for the mixin '#name' because '#name2' does not implement the mixin's supertype constraint '#type'.""", withArguments: _withArgumentsMixinInferenceNoMatchingClass); @@ -3822,7 +3831,7 @@ Message _withArgumentsMixinInferenceNoMatchingClass( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeMixinInferenceNoMatchingClass, - message: + problemMessage: """Type parameters couldn't be inferred for the mixin '${name}' because '${name2}' does not implement the mixin's supertype constraint '${type}'.""" + labeler.originMessages, arguments: {'name': name, 'name2': name2, 'type': _type}); @@ -3832,7 +3841,8 @@ Message _withArgumentsMixinInferenceNoMatchingClass( const Template templateNonNullAwareSpreadIsNull = const Template< Message Function(DartType _type, bool isNonNullableByDefault)>( - messageTemplate: r"""Can't spread a value with static type '#type'.""", + problemMessageTemplate: + r"""Can't spread a value with static type '#type'.""", withArguments: _withArgumentsNonNullAwareSpreadIsNull); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -3849,7 +3859,7 @@ Message _withArgumentsNonNullAwareSpreadIsNull( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeNonNullAwareSpreadIsNull, - message: """Can't spread a value with static type '${type}'.""" + + problemMessage: """Can't spread a value with static type '${type}'.""" + labeler.originMessages, arguments: {'type': _type}); } @@ -3861,7 +3871,7 @@ const Template< templateNonNullableInNullAware = const Template< Message Function( String name, DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Operand of null-aware operation '#name' has type '#type' which excludes null.""", withArguments: _withArgumentsNonNullableInNullAware); @@ -3884,7 +3894,7 @@ Message _withArgumentsNonNullableInNullAware( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeNonNullableInNullAware, - message: + problemMessage: """Operand of null-aware operation '${name}' has type '${type}' which excludes null.""" + labeler.originMessages, arguments: {'name': name, 'type': _type}); @@ -3894,9 +3904,9 @@ Message _withArgumentsNonNullableInNullAware( const Template templateNullableExpressionCallError = const Template< Message Function(DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Can't use an expression of type '#type' as a function because it's potentially null.""", - tipTemplate: r"""Try calling using ?.call instead.""", + correctionMessageTemplate: r"""Try calling using ?.call instead.""", withArguments: _withArgumentsNullableExpressionCallError); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -3913,10 +3923,10 @@ Message _withArgumentsNullableExpressionCallError( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeNullableExpressionCallError, - message: + problemMessage: """Can't use an expression of type '${type}' as a function because it's potentially null.""" + labeler.originMessages, - tip: """Try calling using ?.call instead.""", + correctionMessage: """Try calling using ?.call instead.""", arguments: {'type': _type}); } @@ -3927,9 +3937,9 @@ const Template< templateNullableMethodCallError = const Template< Message Function( String name, DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Method '#name' cannot be called on '#type' because it is potentially null.""", - tipTemplate: r"""Try calling using ?. instead.""", + correctionMessageTemplate: r"""Try calling using ?. instead.""", withArguments: _withArgumentsNullableMethodCallError); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -3949,10 +3959,10 @@ Message _withArgumentsNullableMethodCallError( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeNullableMethodCallError, - message: + problemMessage: """Method '${name}' cannot be called on '${type}' because it is potentially null.""" + labeler.originMessages, - tip: """Try calling using ?. instead.""", + correctionMessage: """Try calling using ?. instead.""", arguments: {'name': name, 'type': _type}); } @@ -3963,7 +3973,7 @@ const Template< templateNullableOperatorCallError = const Template< Message Function( String name, DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Operator '#name' cannot be called on '#type' because it is potentially null.""", withArguments: _withArgumentsNullableOperatorCallError); @@ -3986,7 +3996,7 @@ Message _withArgumentsNullableOperatorCallError( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeNullableOperatorCallError, - message: + problemMessage: """Operator '${name}' cannot be called on '${type}' because it is potentially null.""" + labeler.originMessages, arguments: {'name': name, 'type': _type}); @@ -3999,9 +4009,9 @@ const Template< templateNullablePropertyAccessError = const Template< Message Function( String name, DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Property '#name' cannot be accessed on '#type' because it is potentially null.""", - tipTemplate: r"""Try accessing using ?. instead.""", + correctionMessageTemplate: r"""Try accessing using ?. instead.""", withArguments: _withArgumentsNullablePropertyAccessError); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -4023,10 +4033,10 @@ Message _withArgumentsNullablePropertyAccessError( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeNullablePropertyAccessError, - message: + problemMessage: """Property '${name}' cannot be accessed on '${type}' because it is potentially null.""" + labeler.originMessages, - tip: """Try accessing using ?. instead.""", + correctionMessage: """Try accessing using ?. instead.""", arguments: {'name': name, 'type': _type}); } @@ -4037,9 +4047,9 @@ const Template< templateOptionalNonNullableWithoutInitializerError = const Template< Message Function( String name, DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The parameter '#name' can't have a value of 'null' because of its type '#type', but the implicit default value is 'null'.""", - tipTemplate: + correctionMessageTemplate: r"""Try adding either an explicit non-'null' default value or the 'required' modifier.""", withArguments: _withArgumentsOptionalNonNullableWithoutInitializerError); @@ -4063,10 +4073,10 @@ Message _withArgumentsOptionalNonNullableWithoutInitializerError( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeOptionalNonNullableWithoutInitializerError, - message: + problemMessage: """The parameter '${name}' can't have a value of 'null' because of its type '${type}', but the implicit default value is 'null'.""" + labeler.originMessages, - tip: """Try adding either an explicit non-'null' default value or the 'required' modifier.""", + correctionMessage: """Try adding either an explicit non-'null' default value or the 'required' modifier.""", arguments: {'name': name, 'type': _type}); } @@ -4077,9 +4087,9 @@ const Template< templateOverrideTypeMismatchParameter = const Template< Message Function(String name, String name2, DartType _type, DartType _type2, String name3, bool isNonNullableByDefault)>( - messageTemplate: + 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'.""", - tipTemplate: + correctionMessageTemplate: r"""Change to a supertype of '#type2', or, for a covariant parameter, a subtype.""", withArguments: _withArgumentsOverrideTypeMismatchParameter); @@ -4117,10 +4127,10 @@ Message _withArgumentsOverrideTypeMismatchParameter( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeOverrideTypeMismatchParameter, - message: + problemMessage: """The parameter '${name}' of the method '${name2}' has type '${type}', which does not match the corresponding type, '${type2}', in the overridden method, '${name3}'.""" + labeler.originMessages, - tip: """Change to a supertype of '${type2}', or, for a covariant parameter, a subtype.""", + correctionMessage: """Change to a supertype of '${type2}', or, for a covariant parameter, a subtype.""", arguments: { 'name': name, 'name2': name2, @@ -4137,9 +4147,9 @@ const Template< templateOverrideTypeMismatchReturnType = const Template< Message Function(String name, DartType _type, DartType _type2, String name2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The return type of the method '#name' is '#type', which does not match the return type, '#type2', of the overridden method, '#name2'.""", - tipTemplate: r"""Change to a subtype of '#type2'.""", + correctionMessageTemplate: r"""Change to a subtype of '#type2'.""", withArguments: _withArgumentsOverrideTypeMismatchReturnType); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -4172,10 +4182,10 @@ Message _withArgumentsOverrideTypeMismatchReturnType( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeOverrideTypeMismatchReturnType, - message: + problemMessage: """The return type of the method '${name}' is '${type}', which does not match the return type, '${type2}', of the overridden method, '${name2}'.""" + labeler.originMessages, - tip: """Change to a subtype of '${type2}'.""", + correctionMessage: """Change to a subtype of '${type2}'.""", arguments: { 'name': name, 'type': _type, @@ -4191,7 +4201,7 @@ const Template< templateOverrideTypeMismatchSetter = const Template< Message Function(String name, DartType _type, DartType _type2, String name2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The field '#name' has type '#type', which does not match the corresponding type, '#type2', in the overridden setter, '#name2'.""", withArguments: _withArgumentsOverrideTypeMismatchSetter); @@ -4221,7 +4231,7 @@ Message _withArgumentsOverrideTypeMismatchSetter(String name, DartType _type, String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeOverrideTypeMismatchSetter, - message: + problemMessage: """The field '${name}' has type '${type}', which does not match the corresponding type, '${type2}', in the overridden setter, '${name2}'.""" + labeler.originMessages, arguments: { @@ -4239,7 +4249,7 @@ const Template< templateOverrideTypeVariablesBoundMismatch = const Template< Message Function(DartType _type, String name, String name2, DartType _type2, String name3, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Declared bound '#type' of type variable '#name' of '#name2' doesn't match the bound '#type2' on overridden method '#name3'.""", withArguments: _withArgumentsOverrideTypeVariablesBoundMismatch); @@ -4273,7 +4283,7 @@ Message _withArgumentsOverrideTypeVariablesBoundMismatch( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeOverrideTypeVariablesBoundMismatch, - message: + problemMessage: """Declared bound '${type}' of type variable '${name}' of '${name2}' doesn't match the bound '${type2}' on overridden method '${name3}'.""" + labeler.originMessages, arguments: { @@ -4292,8 +4302,10 @@ const Template< templateRedirectingFactoryIncompatibleTypeArgument = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: r"""The type '#type' doesn't extend '#type2'.""", - tipTemplate: r"""Try using a different type as argument.""", + problemMessageTemplate: + r"""The type '#type' doesn't extend '#type2'.""", + correctionMessageTemplate: + r"""Try using a different type as argument.""", withArguments: _withArgumentsRedirectingFactoryIncompatibleTypeArgument); @@ -4316,9 +4328,9 @@ Message _withArgumentsRedirectingFactoryIncompatibleTypeArgument( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeRedirectingFactoryIncompatibleTypeArgument, - message: """The type '${type}' doesn't extend '${type2}'.""" + + problemMessage: """The type '${type}' doesn't extend '${type2}'.""" + labeler.originMessages, - tip: """Try using a different type as argument.""", + correctionMessage: """Try using a different type as argument.""", arguments: {'type': _type, 'type2': _type2}); } @@ -4329,7 +4341,7 @@ const Template< templateSpreadElementTypeMismatch = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Can't assign spread elements of type '#type' to collection elements of type '#type2'.""", withArguments: _withArgumentsSpreadElementTypeMismatch); @@ -4352,7 +4364,7 @@ Message _withArgumentsSpreadElementTypeMismatch( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeSpreadElementTypeMismatch, - message: + problemMessage: """Can't assign spread elements of type '${type}' to collection elements of type '${type2}'.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2}); @@ -4365,7 +4377,7 @@ const Template< templateSpreadElementTypeMismatchNullability = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Can't assign spread elements of type '#type' to collection elements of type '#type2' because '#type' is nullable and '#type2' isn't.""", withArguments: _withArgumentsSpreadElementTypeMismatchNullability); @@ -4388,7 +4400,7 @@ Message _withArgumentsSpreadElementTypeMismatchNullability( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeSpreadElementTypeMismatchNullability, - message: + problemMessage: """Can't assign spread elements of type '${type}' to collection elements of type '${type2}' because '${type}' is nullable and '${type2}' isn't.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2}); @@ -4401,7 +4413,7 @@ const Template< templateSpreadElementTypeMismatchPartNullability = const Template< Message Function(DartType _type, DartType _type2, DartType _type3, DartType _type4, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Can't assign spread elements of type '#type' to collection elements of type '#type2' because '#type3' is nullable and '#type4' isn't.""", withArguments: _withArgumentsSpreadElementTypeMismatchPartNullability); @@ -4432,7 +4444,7 @@ Message _withArgumentsSpreadElementTypeMismatchPartNullability( String type3 = type3Parts.join(); String type4 = type4Parts.join(); return new Message(codeSpreadElementTypeMismatchPartNullability, - message: + problemMessage: """Can't assign spread elements of type '${type}' to collection elements of type '${type2}' because '${type3}' is nullable and '${type4}' isn't.""" + labeler.originMessages, arguments: { @@ -4450,7 +4462,7 @@ const Template< templateSpreadMapEntryElementKeyTypeMismatch = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Can't assign spread entry keys of type '#type' to map entry keys of type '#type2'.""", withArguments: _withArgumentsSpreadMapEntryElementKeyTypeMismatch); @@ -4473,7 +4485,7 @@ Message _withArgumentsSpreadMapEntryElementKeyTypeMismatch( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeSpreadMapEntryElementKeyTypeMismatch, - message: + problemMessage: """Can't assign spread entry keys of type '${type}' to map entry keys of type '${type2}'.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2}); @@ -4486,7 +4498,7 @@ const Template< templateSpreadMapEntryElementKeyTypeMismatchNullability = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Can't assign spread entry keys of type '#type' to map entry keys of type '#type2' because '#type' is nullable and '#type2' isn't.""", withArguments: _withArgumentsSpreadMapEntryElementKeyTypeMismatchNullability); @@ -4510,7 +4522,7 @@ Message _withArgumentsSpreadMapEntryElementKeyTypeMismatchNullability( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeSpreadMapEntryElementKeyTypeMismatchNullability, - message: + problemMessage: """Can't assign spread entry keys of type '${type}' to map entry keys of type '${type2}' because '${type}' is nullable and '${type2}' isn't.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2}); @@ -4524,7 +4536,7 @@ const Template< const Template< Message Function(DartType _type, DartType _type2, DartType _type3, DartType _type4, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Can't assign spread entry keys of type '#type' to map entry keys of type '#type2' because '#type3' is nullable and '#type4' isn't.""", withArguments: _withArgumentsSpreadMapEntryElementKeyTypeMismatchPartNullability); @@ -4556,7 +4568,7 @@ Message _withArgumentsSpreadMapEntryElementKeyTypeMismatchPartNullability( String type3 = type3Parts.join(); String type4 = type4Parts.join(); return new Message(codeSpreadMapEntryElementKeyTypeMismatchPartNullability, - message: + problemMessage: """Can't assign spread entry keys of type '${type}' to map entry keys of type '${type2}' because '${type3}' is nullable and '${type4}' isn't.""" + labeler.originMessages, arguments: { @@ -4574,7 +4586,7 @@ const Template< templateSpreadMapEntryElementValueTypeMismatch = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Can't assign spread entry values of type '#type' to map entry values of type '#type2'.""", withArguments: _withArgumentsSpreadMapEntryElementValueTypeMismatch); @@ -4597,7 +4609,7 @@ Message _withArgumentsSpreadMapEntryElementValueTypeMismatch( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeSpreadMapEntryElementValueTypeMismatch, - message: + problemMessage: """Can't assign spread entry values of type '${type}' to map entry values of type '${type2}'.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2}); @@ -4610,7 +4622,7 @@ const Template< templateSpreadMapEntryElementValueTypeMismatchNullability = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Can't assign spread entry values of type '#type' to map entry values of type '#type2' because '#type' is nullable and '#type2' isn't.""", withArguments: _withArgumentsSpreadMapEntryElementValueTypeMismatchNullability); @@ -4634,7 +4646,7 @@ Message _withArgumentsSpreadMapEntryElementValueTypeMismatchNullability( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeSpreadMapEntryElementValueTypeMismatchNullability, - message: + problemMessage: """Can't assign spread entry values of type '${type}' to map entry values of type '${type2}' because '${type}' is nullable and '${type2}' isn't.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2}); @@ -4648,7 +4660,7 @@ const Template< const Template< Message Function(DartType _type, DartType _type2, DartType _type3, DartType _type4, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Can't assign spread entry values of type '#type' to map entry values of type '#type2' because '#type3' is nullable and '#type4' isn't.""", withArguments: _withArgumentsSpreadMapEntryElementValueTypeMismatchPartNullability); @@ -4680,7 +4692,7 @@ Message _withArgumentsSpreadMapEntryElementValueTypeMismatchPartNullability( String type3 = type3Parts.join(); String type4 = type4Parts.join(); return new Message(codeSpreadMapEntryElementValueTypeMismatchPartNullability, - message: + problemMessage: """Can't assign spread entry values of type '${type}' to map entry values of type '${type2}' because '${type3}' is nullable and '${type4}' isn't.""" + labeler.originMessages, arguments: { @@ -4695,7 +4707,7 @@ Message _withArgumentsSpreadMapEntryElementValueTypeMismatchPartNullability( const Template templateSpreadMapEntryTypeMismatch = const Template< Message Function(DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Unexpected type '#type' of a map spread entry. Expected 'dynamic' or a Map.""", withArguments: _withArgumentsSpreadMapEntryTypeMismatch); @@ -4713,7 +4725,7 @@ Message _withArgumentsSpreadMapEntryTypeMismatch( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeSpreadMapEntryTypeMismatch, - message: + problemMessage: """Unexpected type '${type}' of a map spread entry. Expected 'dynamic' or a Map.""" + labeler.originMessages, arguments: {'type': _type}); @@ -4726,7 +4738,7 @@ const Template< bool isNonNullableByDefault)> templateSpreadTypeMismatch = const Template< Message Function(DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Unexpected type '#type' of a spread. Expected 'dynamic' or an Iterable.""", withArguments: _withArgumentsSpreadTypeMismatch); @@ -4744,7 +4756,7 @@ Message _withArgumentsSpreadTypeMismatch( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeSpreadTypeMismatch, - message: + problemMessage: """Unexpected type '${type}' of a spread. Expected 'dynamic' or an Iterable.""" + labeler.originMessages, arguments: {'type': _type}); @@ -4759,7 +4771,7 @@ const Template< isNonNullableByDefault)> templateSuperBoundedHint = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + 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.""", withArguments: _withArgumentsSuperBoundedHint); @@ -4782,7 +4794,7 @@ Message _withArgumentsSuperBoundedHint( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeSuperBoundedHint, - message: + problemMessage: """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.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2}); @@ -4795,7 +4807,7 @@ const Template< templateSupertypeIsIllegalAliased = const Template< Message Function( String name, DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The type '#name' which is an alias of '#type' can't be used as supertype.""", withArguments: _withArgumentsSupertypeIsIllegalAliased); @@ -4818,7 +4830,7 @@ Message _withArgumentsSupertypeIsIllegalAliased( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeSupertypeIsIllegalAliased, - message: + problemMessage: """The type '${name}' which is an alias of '${type}' can't be used as supertype.""" + labeler.originMessages, arguments: {'name': name, 'type': _type}); @@ -4831,7 +4843,7 @@ const Template< templateSupertypeIsNullableAliased = const Template< Message Function( String name, DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The type '#name' which is an alias of '#type' can't be used as supertype because it is nullable.""", withArguments: _withArgumentsSupertypeIsNullableAliased); @@ -4854,7 +4866,7 @@ Message _withArgumentsSupertypeIsNullableAliased( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeSupertypeIsNullableAliased, - message: + problemMessage: """The type '${name}' which is an alias of '${type}' can't be used as supertype because it is nullable.""" + labeler.originMessages, arguments: {'name': name, 'type': _type}); @@ -4867,7 +4879,7 @@ const Template< templateSwitchExpressionNotAssignable = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Type '#type' of the switch expression isn't assignable to the type '#type2' of this case expression.""", withArguments: _withArgumentsSwitchExpressionNotAssignable); @@ -4890,7 +4902,7 @@ Message _withArgumentsSwitchExpressionNotAssignable( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeSwitchExpressionNotAssignable, - message: + problemMessage: """Type '${type}' of the switch expression isn't assignable to the type '${type2}' of this case expression.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2}); @@ -4903,7 +4915,7 @@ const Template< templateSwitchExpressionNotSubtype = const Template< Message Function( DartType _type, DartType _type2, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Type '#type' of the case expression is not a subtype of type '#type2' of this switch expression.""", withArguments: _withArgumentsSwitchExpressionNotSubtype); @@ -4926,7 +4938,7 @@ Message _withArgumentsSwitchExpressionNotSubtype( String type = typeParts.join(); String type2 = type2Parts.join(); return new Message(codeSwitchExpressionNotSubtype, - message: + problemMessage: """Type '${type}' of the case expression is not a subtype of type '${type2}' of this switch expression.""" + labeler.originMessages, arguments: {'type': _type, 'type2': _type2}); @@ -4936,7 +4948,7 @@ Message _withArgumentsSwitchExpressionNotSubtype( const Template templateThrowingNotAssignableToObjectError = const Template< Message Function(DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""Can't throw a value of '#type' since it is neither dynamic nor non-nullable.""", withArguments: _withArgumentsThrowingNotAssignableToObjectError); @@ -4954,7 +4966,7 @@ Message _withArgumentsThrowingNotAssignableToObjectError( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeThrowingNotAssignableToObjectError, - message: + problemMessage: """Can't throw a value of '${type}' since it is neither dynamic nor non-nullable.""" + labeler.originMessages, arguments: {'type': _type}); @@ -4967,9 +4979,9 @@ const Template< templateUndefinedExtensionGetter = const Template< Message Function( String name, DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The getter '#name' isn't defined for the extension '#type'.""", - tipTemplate: + correctionMessageTemplate: r"""Try correcting the name to the name of an existing getter, or defining a getter or field named '#name'.""", withArguments: _withArgumentsUndefinedExtensionGetter); @@ -4990,10 +5002,10 @@ Message _withArgumentsUndefinedExtensionGetter( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeUndefinedExtensionGetter, - message: + problemMessage: """The getter '${name}' isn't defined for the extension '${type}'.""" + labeler.originMessages, - tip: """Try correcting the name to the name of an existing getter, or defining a getter or field named '${name}'.""", + correctionMessage: """Try correcting the name to the name of an existing getter, or defining a getter or field named '${name}'.""", arguments: {'name': name, 'type': _type}); } @@ -5004,9 +5016,9 @@ const Template< templateUndefinedExtensionMethod = const Template< Message Function( String name, DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The method '#name' isn't defined for the extension '#type'.""", - tipTemplate: + correctionMessageTemplate: r"""Try correcting the name to the name of an existing method, or defining a method name '#name'.""", withArguments: _withArgumentsUndefinedExtensionMethod); @@ -5027,10 +5039,10 @@ Message _withArgumentsUndefinedExtensionMethod( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeUndefinedExtensionMethod, - message: + problemMessage: """The method '${name}' isn't defined for the extension '${type}'.""" + labeler.originMessages, - tip: """Try correcting the name to the name of an existing method, or defining a method name '${name}'.""", + correctionMessage: """Try correcting the name to the name of an existing method, or defining a method name '${name}'.""", arguments: {'name': name, 'type': _type}); } @@ -5041,9 +5053,9 @@ const Template< templateUndefinedExtensionOperator = const Template< Message Function( String name, DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The operator '#name' isn't defined for the extension '#type'.""", - tipTemplate: + correctionMessageTemplate: r"""Try correcting the operator to an existing operator, or defining a '#name' operator.""", withArguments: _withArgumentsUndefinedExtensionOperator); @@ -5066,10 +5078,10 @@ Message _withArgumentsUndefinedExtensionOperator( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeUndefinedExtensionOperator, - message: + problemMessage: """The operator '${name}' isn't defined for the extension '${type}'.""" + labeler.originMessages, - tip: """Try correcting the operator to an existing operator, or defining a '${name}' operator.""", + correctionMessage: """Try correcting the operator to an existing operator, or defining a '${name}' operator.""", arguments: {'name': name, 'type': _type}); } @@ -5080,9 +5092,9 @@ const Template< templateUndefinedExtensionSetter = const Template< Message Function( String name, DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The setter '#name' isn't defined for the extension '#type'.""", - tipTemplate: + correctionMessageTemplate: r"""Try correcting the name to the name of an existing setter, or defining a setter or field named '#name'.""", withArguments: _withArgumentsUndefinedExtensionSetter); @@ -5103,10 +5115,10 @@ Message _withArgumentsUndefinedExtensionSetter( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeUndefinedExtensionSetter, - message: + problemMessage: """The setter '${name}' isn't defined for the extension '${type}'.""" + labeler.originMessages, - tip: """Try correcting the name to the name of an existing setter, or defining a setter or field named '${name}'.""", + correctionMessage: """Try correcting the name to the name of an existing setter, or defining a setter or field named '${name}'.""", arguments: {'name': name, 'type': _type}); } @@ -5119,9 +5131,9 @@ const Template< isNonNullableByDefault)> templateUndefinedGetter = const Template< Message Function( String name, DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The getter '#name' isn't defined for the class '#type'.""", - tipTemplate: + correctionMessageTemplate: r"""Try correcting the name to the name of an existing getter, or defining a getter or field named '#name'.""", withArguments: _withArgumentsUndefinedGetter); @@ -5144,10 +5156,10 @@ Message _withArgumentsUndefinedGetter( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeUndefinedGetter, - message: + problemMessage: """The getter '${name}' isn't defined for the class '${type}'.""" + labeler.originMessages, - tip: + correctionMessage: """Try correcting the name to the name of an existing getter, or defining a getter or field named '${name}'.""", arguments: {'name': name, 'type': _type}); } @@ -5161,9 +5173,9 @@ const Template< isNonNullableByDefault)> templateUndefinedMethod = const Template< Message Function( String name, DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The method '#name' isn't defined for the class '#type'.""", - tipTemplate: + correctionMessageTemplate: r"""Try correcting the name to the name of an existing method, or defining a method named '#name'.""", withArguments: _withArgumentsUndefinedMethod); @@ -5186,10 +5198,10 @@ Message _withArgumentsUndefinedMethod( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeUndefinedMethod, - message: + problemMessage: """The method '${name}' isn't defined for the class '${type}'.""" + labeler.originMessages, - tip: + correctionMessage: """Try correcting the name to the name of an existing method, or defining a method named '${name}'.""", arguments: {'name': name, 'type': _type}); } @@ -5201,11 +5213,11 @@ const Template< DartType _type, bool isNonNullableByDefault)> templateUndefinedOperator = const Template< - Message Function(String name, DartType _type, - bool isNonNullableByDefault)>( - messageTemplate: + Message Function( + String name, DartType _type, bool isNonNullableByDefault)>( + problemMessageTemplate: r"""The operator '#name' isn't defined for the class '#type'.""", - tipTemplate: + correctionMessageTemplate: r"""Try correcting the operator to an existing operator, or defining a '#name' operator.""", withArguments: _withArgumentsUndefinedOperator); @@ -5228,10 +5240,10 @@ Message _withArgumentsUndefinedOperator( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeUndefinedOperator, - message: + problemMessage: """The operator '${name}' isn't defined for the class '${type}'.""" + labeler.originMessages, - tip: + correctionMessage: """Try correcting the operator to an existing operator, or defining a '${name}' operator.""", arguments: {'name': name, 'type': _type}); } @@ -5245,9 +5257,9 @@ const Template< isNonNullableByDefault)> templateUndefinedSetter = const Template< Message Function( String name, DartType _type, bool isNonNullableByDefault)>( - messageTemplate: + problemMessageTemplate: r"""The setter '#name' isn't defined for the class '#type'.""", - tipTemplate: + correctionMessageTemplate: r"""Try correcting the name to the name of an existing setter, or defining a setter or field named '#name'.""", withArguments: _withArgumentsUndefinedSetter); @@ -5270,10 +5282,10 @@ Message _withArgumentsUndefinedSetter( List typeParts = labeler.labelType(_type); String type = typeParts.join(); return new Message(codeUndefinedSetter, - message: + problemMessage: """The setter '${name}' isn't defined for the class '${type}'.""" + labeler.originMessages, - tip: + correctionMessage: """Try correcting the name to the name of an existing setter, or defining a setter or field named '${name}'.""", arguments: {'name': name, 'type': _type}); } diff --git a/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart b/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart index 13f9eadeafc..67b6929f38c 100644 --- a/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart +++ b/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart @@ -1066,7 +1066,7 @@ class ConstantEvaluator implements ExpressionVisitor { errorReporter.report(locatedMessageActualError); } return new UnevaluatedConstant( - new InvalidExpression(result.message.message)); + new InvalidExpression(result.message.problemMessage)); } if (result is _AbortDueToThrowConstant) { final Object value = result.throwValue; @@ -1090,7 +1090,8 @@ class ConstantEvaluator implements ExpressionVisitor { createLocatedMessage(node, messageConstEvalStartingPoint); errorReporter.report(locatedMessage, contextMessages); } - return new UnevaluatedConstant(new InvalidExpression(message.message)); + return new UnevaluatedConstant( + new InvalidExpression(message.problemMessage)); } if (result is _AbortDueToInvalidExpressionConstant) { return new UnevaluatedConstant( @@ -4534,7 +4535,7 @@ class SimpleErrorReporter implements ErrorReporter { } void _report(LocatedMessage message) { - reportMessage(message.uri, message.charOffset, message.message); + reportMessage(message.uri, message.charOffset, message.problemMessage); } void reportMessage(Uri? uri, int offset, String message) { diff --git a/pkg/front_end/lib/src/fasta/kernel/type_labeler.dart b/pkg/front_end/lib/src/fasta/kernel/type_labeler.dart index 4ebcb035333..79badb9ea8e 100644 --- a/pkg/front_end/lib/src/fasta/kernel/type_labeler.dart +++ b/pkg/front_end/lib/src/fasta/kernel/type_labeler.dart @@ -525,6 +525,6 @@ class LabeledNode { ? templateTypeOrigin.withArguments(toString(), importUri) : templateTypeOriginWithFileUri.withArguments( toString(), importUri, fileUri); - return "\n - " + message.message; + return "\n - " + message.problemMessage; } } diff --git a/pkg/front_end/lib/src/fasta/problems.dart b/pkg/front_end/lib/src/fasta/problems.dart index eea59f1b63f..e275e78f659 100644 --- a/pkg/front_end/lib/src/fasta/problems.dart +++ b/pkg/front_end/lib/src/fasta/problems.dart @@ -35,7 +35,7 @@ class DebugAbort { .withoutLocation(); @override - String toString() => "DebugAbort: ${message.message}"; + String toString() => "DebugAbort: ${message.problemMessage}"; } /// Used to report an internal error. diff --git a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart index 9c6d6bb7a7b..b046570d530 100644 --- a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart +++ b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart @@ -1334,7 +1334,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl { default: if (member is InvalidTypeDeclarationBuilder) { unserializableExports ??= {}; - unserializableExports![name] = member.message.message; + unserializableExports![name] = member.message.problemMessage; } else { // Eventually (in #buildBuilder) members aren't added to the // library if the have 'next' pointers, so don't add them as diff --git a/pkg/front_end/lib/src/fasta/source/source_loader.dart b/pkg/front_end/lib/src/fasta/source/source_loader.dart index 29e57b3371f..4c38811e13c 100644 --- a/pkg/front_end/lib/src/fasta/source/source_loader.dart +++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart @@ -401,7 +401,7 @@ class SourceLoader extends Loader { double ms = elapsed.inMicroseconds / Duration.microsecondsPerMillisecond; Message message = template.withArguments( libraryCount, byteCount, ms, byteCount / ms, ms / libraryCount); - print("$sinceStart: ${message.message}"); + print("$sinceStart: ${message.problemMessage}"); }); } @@ -442,7 +442,7 @@ class SourceLoader extends Loader { severity ??= message.code.severity; if (severity == Severity.ignored) return null; String trace = """ -message: ${message.message} +message: ${message.problemMessage} charOffset: $charOffset fileUri: $fileUri severity: $severity @@ -661,7 +661,8 @@ severity: $severity return utf8.encode(defaultDartTypedDataSource); default: - return utf8.encode(message == null ? "" : "/* ${message.message} */"); + return utf8 + .encode(message == null ? "" : "/* ${message.problemMessage} */"); } } diff --git a/pkg/front_end/lib/src/fasta/source/source_type_alias_builder.dart b/pkg/front_end/lib/src/fasta/source/source_type_alias_builder.dart index 70a6813d2c1..bde992e0482 100644 --- a/pkg/front_end/lib/src/fasta/source/source_type_alias_builder.dart +++ b/pkg/front_end/lib/src/fasta/source/source_type_alias_builder.dart @@ -237,7 +237,7 @@ class SourceTypeAliasBuilder extends TypeAliasBuilderImpl { return unhandled( templateTypeArgumentMismatch .withArguments(typeVariablesCount) - .message, + .problemMessage, "buildTypeArguments", -1, null); diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart index 888eeafa4e4..20e47d95e67 100644 --- a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart +++ b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart @@ -272,8 +272,9 @@ class TypeInferrerImpl implements TypeInferrer { Arguments arguments; // ignore: unnecessary_null_comparison if (errorMessage != null) { - arguments = new Arguments( - [new StringLiteral(errorMessage.message)..fileOffset = fileOffset]) + arguments = new Arguments([ + new StringLiteral(errorMessage.problemMessage)..fileOffset = fileOffset + ]) ..fileOffset = fileOffset; } else { arguments = new Arguments([])..fileOffset = fileOffset; diff --git a/pkg/front_end/lib/src/testing/id_testing_utils.dart b/pkg/front_end/lib/src/testing/id_testing_utils.dart index 9aad4b2b85b..f9729d334dc 100644 --- a/pkg/front_end/lib/src/testing/id_testing_utils.dart +++ b/pkg/front_end/lib/src/testing/id_testing_utils.dart @@ -734,7 +734,7 @@ String errorsToText(List errors, {bool useCodes: false}) { if (useCodes) { return errors.map((m) => m.code).join(','); } else { - return errors.map((m) => m.message).join(','); + return errors.map((m) => m.problemMessage).join(','); } } diff --git a/pkg/front_end/test/extensions/extensions_test.dart b/pkg/front_end/test/extensions/extensions_test.dart index 266647675b8..5765b21f98c 100644 --- a/pkg/front_end/test/extensions/extensions_test.dart +++ b/pkg/front_end/test/extensions/extensions_test.dart @@ -89,11 +89,11 @@ class ExtensionsDataComputer extends DataComputer { Id id, List errors) { Features features = new Features(); for (FormattedMessage error in errors) { - if (error.message.contains(',')) { + if (error.problemMessage.contains(',')) { // TODO(johnniwinther): Support escaping of , in Features. features.addElement(Tags.errors, error.code); } else { - features.addElement(Tags.errors, error.message); + features.addElement(Tags.errors, error.problemMessage); } } return features; diff --git a/pkg/front_end/test/fasta/tool_git_test.dart b/pkg/front_end/test/fasta/tool_git_test.dart index fde2e4e4bd8..3755f1870bc 100644 --- a/pkg/front_end/test/fasta/tool_git_test.dart +++ b/pkg/front_end/test/fasta/tool_git_test.dart @@ -54,7 +54,7 @@ void main() { } Set testedSubtools = new Set.from(subtools) .difference(new Set.from(unsafeTools)); - String usage = messageFastaUsageShort.message; + String usage = messageFastaUsageShort.problemMessage; Map expectations = { "abcompile": { "exitCode": 1, diff --git a/pkg/front_end/test/kernel_generator_test.dart b/pkg/front_end/test/kernel_generator_test.dart index cf8ce12bf9c..275df00154e 100644 --- a/pkg/front_end/test/kernel_generator_test.dart +++ b/pkg/front_end/test/kernel_generator_test.dart @@ -20,9 +20,10 @@ import 'package:test/test.dart' test; import 'package:front_end/src/api_prototype/front_end.dart' - show CompilerOptions; + show CompilerOptions, DiagnosticMessage; -import 'package:front_end/src/fasta/fasta_codes.dart' show messageMissingMain; +import 'package:front_end/src/fasta/fasta_codes.dart' + show FormattedMessage, messageMissingMain; import 'package:front_end/src/fasta/kernel/utils.dart' show serializeComponent; @@ -84,10 +85,11 @@ void main() { }); test('compiler requires a main method', () async { - var errors = []; + var errors = []; var options = new CompilerOptions()..onDiagnostic = errors.add; await compileScript('a() => print("hi");', options: options); - expect(errors.first.message, messageMissingMain.message); + expect((errors.first as FormattedMessage).problemMessage, + messageMissingMain.problemMessage); }); test('generated program contains source-info', () async { diff --git a/pkg/front_end/test/messages_json_test.dart b/pkg/front_end/test/messages_json_test.dart index dff07bded9f..8df76981884 100644 --- a/pkg/front_end/test/messages_json_test.dart +++ b/pkg/front_end/test/messages_json_test.dart @@ -23,7 +23,7 @@ void main() { for (int i = 0; i < Severity.values.length; i++) { Severity severity = Severity.values[i]; Code code = new Code("MyCodeName"); - Message message = new Message(code, message: ''); + Message message = new Message(code, problemMessage: ''); LocatedMessage locatedMessage1 = new LocatedMessage(Uri.parse("what:ever/fun_1.dart"), 117, 2, message); FormattedMessage formattedMessage2 = new FormattedMessage( diff --git a/pkg/front_end/test/parser_suite.dart b/pkg/front_end/test/parser_suite.dart index cdb9645b9e0..cb247552189 100644 --- a/pkg/front_end/test/parser_suite.dart +++ b/pkg/front_end/test/parser_suite.dart @@ -526,9 +526,9 @@ class ParserTestListenerWithMessageFormatting extends ParserTestListener { location, length, shortName, - message.message)); + message.problemMessage)); } else { - errors.add(message.message); + errors.add(message.problemMessage); } super.handleRecoverableError(message, startToken, endToken); diff --git a/pkg/front_end/test/src/base/processed_options_test.dart b/pkg/front_end/test/src/base/processed_options_test.dart index b771f32fa7a..00c3a759c5d 100644 --- a/pkg/front_end/test/src/base/processed_options_test.dart +++ b/pkg/front_end/test/src/base/processed_options_test.dart @@ -323,7 +323,7 @@ class ProcessedOptionsTest { } Future test_getUriTranslator_noPackages() async { - var errors = []; + var errors = []; // .packages file should be ignored. fileSystem .entityForUri(Uri.parse('org-dartlang-test:///.packages')) @@ -335,7 +335,7 @@ class ProcessedOptionsTest { var processed = new ProcessedOptions(options: raw); var uriTranslator = await processed.getUriTranslator(); expect(uriTranslator.packages.packages, isEmpty); - expect(errors.single.message, + expect((errors.single as FormattedMessage).problemMessage, startsWith(_stringPrefixOf(templateCantReadFile))); } @@ -343,13 +343,14 @@ class ProcessedOptionsTest { fileSystem .entityForUri(Uri.parse('org-dartlang-test:///foo.dart')) .writeAsStringSync('main(){}\n'); - var errors = []; + var errors = []; var raw = new CompilerOptions() ..fileSystem = fileSystem ..onDiagnostic = errors.add; var options = new ProcessedOptions(options: raw); var result = await options.validateOptions(); - expect(errors.single.message, messageMissingInput.message); + expect((errors.single as FormattedMessage).problemMessage, + messageMissingInput.problemMessage); expect(result, isFalse); } @@ -397,7 +398,7 @@ class ProcessedOptionsTest { .entityForUri(Uri.parse('org-dartlang-test:///foo.dart')) .writeAsStringSync('main(){}\n'); var sdkRoot = Uri.parse('org-dartlang-test:///sdk/root'); - var errors = []; + var errors = []; var raw = new CompilerOptions() ..sdkRoot = sdkRoot ..fileSystem = fileSystem @@ -405,7 +406,7 @@ class ProcessedOptionsTest { var options = new ProcessedOptions(options: raw, inputs: [Uri.parse('foo.dart')]); expect(await options.validateOptions(), isFalse); - expect(errors.first.message, + expect((errors.first as FormattedMessage).problemMessage, startsWith(_stringPrefixOf(templateSdkRootNotFound))); } @@ -433,7 +434,7 @@ class ProcessedOptionsTest { .entityForUri(Uri.parse('org-dartlang-test:///foo.dart')) .writeAsStringSync('main(){}\n'); var sdkSummary = Uri.parse('org-dartlang-test:///sdk/root/outline.dill'); - var errors = []; + var errors = []; var raw = new CompilerOptions() ..sdkSummary = sdkSummary ..fileSystem = fileSystem @@ -441,7 +442,7 @@ class ProcessedOptionsTest { var options = new ProcessedOptions(options: raw, inputs: [Uri.parse('foo.dart')]); expect(await options.validateOptions(), isFalse); - expect(errors.single.message, + expect((errors.single as FormattedMessage).problemMessage, startsWith(_stringPrefixOf(templateSdkSummaryNotFound))); } @@ -474,7 +475,7 @@ class ProcessedOptionsTest { fileSystem .entityForUri(Uri.parse('org-dartlang-test:///foo.dart')) .writeAsStringSync('main(){}\n'); - var errors = []; + var errors = []; var raw = new CompilerOptions() ..sdkSummary = sdkSummary ..fileSystem = fileSystem @@ -482,14 +483,14 @@ class ProcessedOptionsTest { var options = new ProcessedOptions(options: raw, inputs: [Uri.parse('foo.dart')]); expect(await options.validateOptions(), isFalse); - expect(errors.single.message, + expect((errors.single as FormattedMessage).problemMessage, startsWith(_stringPrefixOf(templateSdkSummaryNotFound))); } /// Returns the longest prefix of the text in a message template that doesn't /// mention a template argument. String _stringPrefixOf(Template template) { - var messageTemplate = template.messageTemplate; + var messageTemplate = template.problemMessageTemplate; var index = messageTemplate.indexOf('#'); var prefix = messageTemplate.substring(0, index - 1); diff --git a/pkg/front_end/test/static_types/analysis_helper.dart b/pkg/front_end/test/static_types/analysis_helper.dart index cdfdfccd880..2e57c0e3c75 100644 --- a/pkg/front_end/test/static_types/analysis_helper.dart +++ b/pkg/front_end/test/static_types/analysis_helper.dart @@ -210,7 +210,7 @@ class DynamicVisitor extends StaticTypeVisitorBase { // add ' (allowed)' to an existing message! LocatedMessage locatedMessage = message.locatedMessage; String newMessageText = - '${locatedMessage.messageObject.message} (allowed)'; + '${locatedMessage.messageObject.problemMessage} (allowed)'; message = locatedMessage.withFormatting( format( new LocatedMessage( @@ -218,8 +218,9 @@ class DynamicVisitor extends StaticTypeVisitorBase { locatedMessage.charOffset, locatedMessage.length, new Message(locatedMessage.messageObject.code, - message: newMessageText, - tip: locatedMessage.messageObject.tip, + problemMessage: newMessageText, + correctionMessage: + locatedMessage.messageObject.correctionMessage, arguments: locatedMessage.messageObject.arguments)), Severity.warning, location: diff --git a/pkg/front_end/tool/_fasta/additional_targets_test.dart b/pkg/front_end/tool/_fasta/additional_targets_test.dart index e5b3b503e07..dabba4c42c8 100644 --- a/pkg/front_end/tool/_fasta/additional_targets_test.dart +++ b/pkg/front_end/tool/_fasta/additional_targets_test.dart @@ -18,7 +18,7 @@ void main() { String expected = " ${Flags.target}=${(targets.keys.toList()..sort()).join('|')}"; MessageCode code = messageFastaUsageLong; - if (!code.message.contains(expected)) { + if (!code.problemMessage.contains(expected)) { throw "Error: ${code.name} in pkg/front_end/messages.yaml doesn't contain" " '$expected'."; } diff --git a/pkg/front_end/tool/_fasta/command_line.dart b/pkg/front_end/tool/_fasta/command_line.dart index d8a5ab1c2dc..0c8312e6e67 100644 --- a/pkg/front_end/tool/_fasta/command_line.dart +++ b/pkg/front_end/tool/_fasta/command_line.dart @@ -107,7 +107,7 @@ ProcessedOptions analyzeCommandLine(String programName, final bool verbose = Options.verbose.read(parsedOptions); if (help) { - print(computeUsage(programName, verbose).message); + print(computeUsage(programName, verbose).problemMessage); exit(0); } @@ -335,7 +335,7 @@ Future withGlobalOptions( return CompilerContext.runWithOptions(options, (CompilerContext c) { if (problem != null) { - print(computeUsage(programName, options.verbose).message); + print(computeUsage(programName, options.verbose).problemMessage); PlainAndColorizedString formatted = c.format(problem.message.withoutLocation(), Severity.error); String formattedText; @@ -355,9 +355,10 @@ Future withGlobalOptions( Message computeUsage(String programName, bool verbose) { String basicUsage = "Usage: $programName [options] dartfile\n"; String? summary; - String options = - (verbose ? messageFastaUsageLong.message : messageFastaUsageShort.message) - .trim(); + String options = (verbose + ? messageFastaUsageLong.problemMessage + : messageFastaUsageShort.problemMessage) + .trim(); switch (programName) { case "outline": summary = @@ -398,7 +399,7 @@ Future runProtectedFromAbort(Future Function() action, try { return await action(); } on DebugAbort catch (e) { - print(e.message.message); + print(e.message.problemMessage); // DebugAbort should never happen in production code, so we want test.py to // treat this as a crash which is signalled by exiting with 255. diff --git a/pkg/front_end/tool/_fasta/generate_messages.dart b/pkg/front_end/tool/_fasta/generate_messages.dart index 55d233aa1ef..f75d37ed846 100644 --- a/pkg/front_end/tool/_fasta/generate_messages.dart +++ b/pkg/front_end/tool/_fasta/generate_messages.dart @@ -430,10 +430,10 @@ Template compileTemplate(String name, int? index, String? problemMessage, if (parameters.isEmpty && conversions.isEmpty && arguments.isEmpty) { // ignore: unnecessary_null_comparison if (problemMessage != null) { - codeArguments.add('message: r"""$problemMessage"""'); + codeArguments.add('problemMessage: r"""$problemMessage"""'); } if (correctionMessage != null) { - codeArguments.add('tip: r"""$correctionMessage"""'); + codeArguments.add('correctionMessage: r"""$correctionMessage"""'); } return new Template(""" @@ -449,10 +449,11 @@ const MessageCode message$name = List templateArguments = []; // ignore: unnecessary_null_comparison if (problemMessage != null) { - templateArguments.add('messageTemplate: r"""$problemMessage"""'); + templateArguments.add('problemMessageTemplate: r"""$problemMessage"""'); } if (correctionMessage != null) { - templateArguments.add('tipTemplate: r"""$correctionMessage"""'); + templateArguments + .add('correctionMessageTemplate: r"""$correctionMessage"""'); } templateArguments.add("withArguments: _withArguments$name"); @@ -462,9 +463,10 @@ const MessageCode message$name = if (hasLabeler) { message += " + labeler.originMessages"; } - messageArguments.add("message: ${message}"); + messageArguments.add("problemMessage: ${message}"); if (correctionMessage != null) { - messageArguments.add("tip: ${interpolate(correctionMessage)}"); + messageArguments + .add("correctionMessage: ${interpolate(correctionMessage)}"); } messageArguments.add("arguments: { ${arguments.join(', ')} }"); diff --git a/pkg/front_end/tool/dart_doctest_impl.dart b/pkg/front_end/tool/dart_doctest_impl.dart index 37f4d7aeea9..3ef774c6471 100644 --- a/pkg/front_end/tool/dart_doctest_impl.dart +++ b/pkg/front_end/tool/dart_doctest_impl.dart @@ -653,7 +653,7 @@ String _createParseErrorMessage(kernel.Source source, int position, location, endToken.charEnd - startToken.charOffset, source.importUri!.toString(), - message.message); + message.problemMessage); } CommentString extractComments(CommentToken comment, String rawString) {