Version 2.15.0-180.0.dev
Merge commit '81839ddcc1be4f9011eb2114511f809d0d79d166' into 'dev'
diff --git a/pkg/_fe_analyzer_shared/lib/src/messages/codes.dart b/pkg/_fe_analyzer_shared/lib/src/messages/codes.dart
index ca0f816..5866409 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 Message {
final Code<dynamic> code;
- final String message;
+ final String problemMessage;
- final String? tip;
+ final String? correctionMessage;
final Map<String, dynamic> 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 @@
}
String toString() {
- return "Message[$code, $message, $tip, $arguments]";
+ return "Message[$code, $problemMessage, $correctionMessage, $arguments]";
}
}
class MessageCode extends Code<Null> implements Message {
- final String message;
+ final String problemMessage;
- final String? tip;
+ final String? correctionMessage;
const MessageCode(String name,
{int index: -1,
List<String>? 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 Template<T> {
- 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 @@
Code<dynamic> 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<String, dynamic> get arguments => messageObject.arguments;
@@ -128,7 +130,7 @@
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 @@
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<String, dynamic> 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 f170c1f..0563d92 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 @@
// 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<Message Function(String name)>
templateAbstractClassInstantiation =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""The class '#name' is abstract and can't be instantiated.""",
withArguments: _withArgumentsAbstractClassInstantiation);
@@ -38,7 +38,8 @@
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 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 @@
// 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<Null> codeAbstractExternalField = messageAbstractExternalField;
@@ -69,8 +71,10 @@
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<Null> codeAbstractFieldConstructorInitializer =
@@ -79,8 +83,8 @@
// 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 @@
// 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<Null> codeAbstractLateField = messageAbstractLateField;
@@ -99,8 +104,8 @@
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<Null> codeAbstractNotSync = messageAbstractNotSync;
@@ -108,7 +113,8 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageAbstractNotSync = const MessageCode("AbstractNotSync",
analyzerCodes: <String>["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 @@
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 @@
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 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<Message Function(String name)> templateAccessError =
const Template<Message Function(String name)>(
- 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 @@
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 @@
// 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 @@
// 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 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<Null> codeAnnotationOnFunctionTypeTypeVariable =
@@ -203,7 +210,7 @@
// 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 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 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageAnonymousBreakTargetOutsideFunction =
- const MessageCode("AnonymousBreakTargetOutsideFunction",
+ const MessageCode(
+ "AnonymousBreakTargetOutsideFunction",
analyzerCodes: <String>["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<Null> codeAnonymousContinueTargetOutsideFunction =
@@ -232,9 +241,11 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageAnonymousContinueTargetOutsideFunction =
- const MessageCode("AnonymousContinueTargetOutsideFunction",
+ const MessageCode(
+ "AnonymousContinueTargetOutsideFunction",
analyzerCodes: <String>["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 @@
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 @@
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 @@
// 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<Null> codeAssertExtraneousArgument = messageAssertExtraneousArgument;
@@ -275,7 +286,7 @@
// 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<Null> codeAwaitAsIdentifier = messageAwaitAsIdentifier;
@@ -284,7 +295,7 @@
const MessageCode messageAwaitAsIdentifier = const MessageCode(
"AwaitAsIdentifier",
analyzerCodes: <String>["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 MessageCode messageAwaitForNotAsync = const MessageCode(
"AwaitForNotAsync",
analyzerCodes: <String>["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 @@
// 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 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageAwaitNotAsync = const MessageCode("AwaitNotAsync",
analyzerCodes: <String>["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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
const Template<Message Function(String name)>
templateBoundIssueViaRawTypeWithNonSimpleBounds =
const Template<Message Function(String name)>(
- 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 @@
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 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<Message Function(String name)>
templateBreakTargetOutsideFunction =
const Template<Message Function(String name)>(
- 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 @@
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<Message Function(Token token)> templateBuiltInIdentifierAsType =
const Template<Message Function(Token token)>(
- messageTemplate:
+ problemMessageTemplate:
r"""The built-in identifier '#lexeme' can't be used as a type.""",
withArguments: _withArgumentsBuiltInIdentifierAsType);
@@ -484,7 +499,7 @@
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 @@
const Template<Message Function(Token token)>
templateBuiltInIdentifierInDeclaration =
const Template<Message Function(Token token)>(
- 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 @@
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 @@
// 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<Message Function(String name)>
templateCandidateFoundIsDefaultConstructor =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""The class '#name' has a constructor that takes no arguments.""",
withArguments: _withArgumentsCandidateFoundIsDefaultConstructor);
@@ -537,16 +553,17 @@
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<Message Function(String name)>
- templateCannotAssignToConstVariable =
+const Template<
+ Message Function(String name)> templateCannotAssignToConstVariable =
const Template<Message Function(String name)>(
- 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 @@
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 @@
// 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<Message Function(String name)>
- templateCannotAssignToFinalVariable =
+const Template<
+ Message Function(String name)> templateCannotAssignToFinalVariable =
const Template<Message Function(String name)>(
- 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 @@
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 MessageCode messageCannotAssignToParenthesizedExpression =
const MessageCode("CannotAssignToParenthesizedExpression",
analyzerCodes: <String>["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<Null> codeCannotAssignToSuper = messageCannotAssignToSuper;
@@ -612,7 +630,7 @@
const MessageCode messageCannotAssignToSuper = const MessageCode(
"CannotAssignToSuper",
analyzerCodes: <String>["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<Null> codeCannotAssignToTypeLiteral =
@@ -621,13 +639,13 @@
// 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<Message Function(String string)>
templateCannotReadSdkSpecification =
const Template<Message Function(String string)>(
- messageTemplate:
+ problemMessageTemplate:
r"""Unable to read the 'libraries.json' specification file:
#string.""",
withArguments: _withArgumentsCannotReadSdkSpecification);
@@ -642,7 +660,7 @@
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 @@
// 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 @@
// 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 @@
// 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<Null> codeCantInferPackagesFromPackageUri =
@@ -685,16 +705,18 @@
// 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<Message Function(String name)>
templateCantInferReturnTypeDueToNoCombinedSignature =
const Template<Message Function(String name)>(
- 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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<Message Function(Uri uri_, String string)> templateCantReadFile =
const Template<Message Function(Uri uri_, String string)>(
- 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 @@
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 @@
const Template<Message Function(Token token)>
templateCantUseControlFlowOrSpreadAsConstant =
const Template<Message Function(Token token)>(
- messageTemplate:
+ problemMessageTemplate:
r"""'#lexeme' is not supported in constant expressions.""",
withArguments: _withArgumentsCantUseControlFlowOrSpreadAsConstant);
@@ -845,7 +867,8 @@
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 @@
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 @@
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 MessageCode messageCantUsePrefixAsExpression = const MessageCode(
"CantUsePrefixAsExpression",
analyzerCodes: <String>["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<Null> codeCantUsePrefixWithNullAware =
@@ -896,8 +919,8 @@
const MessageCode messageCantUsePrefixWithNullAware = const MessageCode(
"CantUsePrefixWithNullAware",
analyzerCodes: <String>["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<Null> codeCatchSyntax = messageCatchSyntax;
@@ -905,9 +928,9 @@
// 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 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 @@
// 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<Message Function(String name)> templateClassInNullAwareReceiver =
const Template<Message Function(String name)>(
- 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 @@
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 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 @@
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 @@
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 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<Null> codeCompilingWithoutSoundNullSafety =
@@ -1014,7 +1038,7 @@
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 @@
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 @@
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<Message Function(String name)> templateConflictsWithConstructor =
const Template<Message Function(String name)>(
- 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 @@
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<Message Function(String name)> templateConflictsWithFactory =
const Template<Message Function(String name)>(
- 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 @@
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 @@
const Template<Message Function(String name)>
templateConflictsWithImplicitSetter =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""Conflicts with the implicit setter of the field '#name'.""",
withArguments: _withArgumentsConflictsWithImplicitSetter);
@@ -1105,14 +1129,15 @@
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<Message Function(String name)> templateConflictsWithMember =
const Template<Message Function(String name)>(
- 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 @@
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<Message Function(String name)> templateConflictsWithSetter =
const Template<Message Function(String name)>(
- 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 @@
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 @@
const Template<Message Function(String name)>
templateConflictsWithTypeVariable =
const Template<Message Function(String name)>(
- 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 @@
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 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<Null> codeConstAndFinal = messageConstAndFinal;
@@ -1186,8 +1211,10 @@
// 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<Null> codeConstClass = messageConstClass;
@@ -1195,8 +1222,8 @@
// 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 @@
// 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<Null> codeConstConstructorLateFinalFieldError =
@@ -1215,7 +1243,7 @@
// 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 MessageCode messageConstConstructorNonFinalField = const MessageCode(
"ConstConstructorNonFinalField",
analyzerCodes: <String>["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<Null> codeConstConstructorNonFinalFieldCause =
@@ -1236,7 +1265,7 @@
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<Null> codeConstConstructorRedirectionToNonConst =
@@ -1245,7 +1274,7 @@
// 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 MessageCode messageConstConstructorWithBody = const MessageCode(
"ConstConstructorWithBody",
analyzerCodes: <String>["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<Null> codeConstConstructorWithNonConstSuper =
@@ -1266,7 +1296,7 @@
const MessageCode messageConstConstructorWithNonConstSuper = const MessageCode(
"ConstConstructorWithNonConstSuper",
analyzerCodes: <String>["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 MessageCode messageConstEvalCircularity = const MessageCode(
"ConstEvalCircularity",
analyzerCodes: <String>["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<Null> 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 @@
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 @@
// 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 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<Message Function(String string)> templateConstEvalError =
const Template<Message Function(String string)>(
- 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 @@
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 MessageCode messageConstEvalExtension = const MessageCode(
"ConstEvalExtension",
analyzerCodes: <String>["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 @@
// 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 @@
// 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 MessageCode messageConstEvalFailedAssertion = const MessageCode(
"ConstEvalFailedAssertion",
analyzerCodes: <String>["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<Message Function(String stringOKEmpty)>
templateConstEvalFailedAssertionWithMessage =
const Template<Message Function(String stringOKEmpty)>(
- messageTemplate:
+ problemMessageTemplate:
r"""This assertion failed with message: #stringOKEmpty""",
withArguments: _withArgumentsConstEvalFailedAssertionWithMessage);
@@ -1396,7 +1428,8 @@
// 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 @@
const Template<Message Function(String nameOKEmpty)>
templateConstEvalGetterNotFound =
const Template<Message Function(String nameOKEmpty)>(
- 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 @@
// 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 @@
const Template<Message Function(String nameOKEmpty)>
templateConstEvalInvalidStaticInvocation =
const Template<Message Function(String nameOKEmpty)>(
- messageTemplate:
+ problemMessageTemplate:
r"""The invocation of '#nameOKEmpty' is not allowed in a constant expression.""",
withArguments: _withArgumentsConstEvalInvalidStaticInvocation);
@@ -1442,7 +1475,7 @@
// 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 @@
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 @@
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 @@
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 @@
// 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 @@
// 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<Null> codeConstEvalNotListOrSetInSpread =
@@ -1521,7 +1554,7 @@
const MessageCode messageConstEvalNotListOrSetInSpread = const MessageCode(
"ConstEvalNotListOrSetInSpread",
analyzerCodes: <String>["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 MessageCode messageConstEvalNotMapInSpread = const MessageCode(
"ConstEvalNotMapInSpread",
analyzerCodes: <String>["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<Null> codeConstEvalNullValue = messageConstEvalNullValue;
@@ -1540,7 +1573,7 @@
const MessageCode messageConstEvalNullValue = const MessageCode(
"ConstEvalNullValue",
analyzerCodes: <String>["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<Null> codeConstEvalStartingPoint = messageConstEvalStartingPoint;
@@ -1548,7 +1581,7 @@
// 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 @@
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 @@
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 @@
// 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<Message Function(String stringOKEmpty)>
templateConstEvalUnhandledCoreException =
const Template<Message Function(String stringOKEmpty)>(
- 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 @@
// 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 @@
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 @@
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 @@
// 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 MessageCode messageConstFactoryRedirectionToNonConst = const MessageCode(
"ConstFactoryRedirectionToNonConst",
analyzerCodes: <String>["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 @@
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 @@
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 MessageCode messageConstInstanceField = const MessageCode(
"ConstInstanceField",
analyzerCodes: <String>["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 @@
// 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<Null> codeConstructorCyclic = messageConstructorCyclic;
@@ -1715,15 +1750,15 @@
const MessageCode messageConstructorCyclic = const MessageCode(
"ConstructorCyclic",
analyzerCodes: <String>["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<Message Function(String name)>
templateConstructorInitializeSameInstanceVariableSeveralTimes =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""'#name' was already initialized by this constructor.""",
withArguments:
_withArgumentsConstructorInitializeSameInstanceVariableSeveralTimes);
@@ -1741,14 +1776,15 @@
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<Message Function(String name)> templateConstructorNotFound =
const Template<Message Function(String name)>(
- 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 @@
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 MessageCode messageConstructorNotSync = const MessageCode(
"ConstructorNotSync",
analyzerCodes: <String>["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 @@
// 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 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<Null> codeConstructorWithTypeArguments =
@@ -1806,9 +1842,9 @@
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 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<Null> codeConstructorWithWrongName = messageConstructorWithWrongName;
@@ -1829,14 +1865,15 @@
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<Message Function(String name)>
templateConstructorWithWrongNameContext =
const Template<Message Function(String name)>(
- 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 @@
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 MessageCode messageContinueLabelNotTarget = const MessageCode(
"ContinueLabelNotTarget",
analyzerCodes: <String>["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<Null> codeContinueOutsideOfLoop = messageContinueOutsideOfLoop;
@@ -1869,15 +1906,15 @@
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<Message Function(String name)>
templateContinueTargetOutsideFunction =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""Can't continue at '#name' in a different function.""",
withArguments: _withArgumentsContinueTargetOutsideFunction);
@@ -1891,7 +1928,8 @@
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 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<Message Function(String string, String string2)>
templateCouldNotParseUri =
const Template<Message Function(String string, String string2)>(
- 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 @@
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 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<Null> codeCovariantMember = messageCovariantMember;
@@ -1948,21 +1987,19 @@
// 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<Message Function(String name, String string)>
+ templateCycleInTypeVariables =
+ const Template<Message Function(String name, String string)>(
+ 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<Message Function(String name, String string)>
@@ -1977,8 +2014,9 @@
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 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<Message Function(String name)> templateCyclicClassHierarchy =
const Template<Message Function(String name)>(
- 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 @@
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 @@
const Template<Message Function(String name)>
templateCyclicRedirectingFactoryConstructors =
const Template<Message Function(String name)>(
- 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 @@
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<Message Function(String name)> templateCyclicTypedef =
const Template<Message Function(String name)>(
- 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 @@
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 @@
const Template<Message Function(String name, String string)>
templateDebugTrace =
const Template<Message Function(String name, String string)>(
- 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 @@
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 MessageCode messageDeclaredMemberConflictsWithInheritedMember =
const MessageCode("DeclaredMemberConflictsWithInheritedMember",
analyzerCodes: <String>["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 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<Null> codeDeclaredMemberConflictsWithOverriddenMembersCause =
@@ -2096,7 +2135,7 @@
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<Null> codeDefaultListConstructorError =
@@ -2105,16 +2144,16 @@
// 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<Message Function(String name)>
templateDefaultValueInRedirectingFactoryConstructor =
const Template<Message Function(String name)>(
- 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 @@
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 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 @@
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 @@
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 @@
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 @@
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 @@
const Template<Message Function(String name)>
templateDeferredPrefixDuplicatedCause =
const Template<Message Function(String name)>(
- 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 @@
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 @@
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 @@
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 @@
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 @@
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 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<Null> codeDuplicateDeferred = messageDuplicateDeferred;
@@ -2318,16 +2360,18 @@
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<Message Function(String name)>
templateDuplicateLabelInSwitchStatement =
const Template<Message Function(String name)>(
- 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 @@
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 @@
// 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<Message Function(String name)> templateDuplicatedDeclaration =
const Template<Message Function(String name)>(
- 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 @@
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 @@
const Template<Message Function(String name)>
templateDuplicatedDeclarationCause =
const Template<Message Function(String name)>(
- 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 @@
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 @@
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 @@
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 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<Message Function(String name)> templateDuplicatedDeclarationUse =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""Can't use '#name' because it is declared more than once.""",
withArguments: _withArgumentsDuplicatedDeclarationUse);
@@ -2441,7 +2487,8 @@
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 @@
const Template<Message Function(String name, Uri uri_, Uri uri2_)>
templateDuplicatedExport =
const Template<Message Function(String name, Uri uri_, Uri uri2_)>(
- messageTemplate:
+ problemMessageTemplate:
r"""'#name' is exported from both '#uri' and '#uri2'.""",
withArguments: _withArgumentsDuplicatedExport);
@@ -2467,7 +2514,8 @@
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 @@
const Template<Message Function(String name, Uri uri_, Uri uri2_)>
templateDuplicatedExportInType =
const Template<Message Function(String name, Uri uri_, Uri uri2_)>(
- messageTemplate:
+ problemMessageTemplate:
r"""'#name' is exported from both '#uri' and '#uri2'.""",
withArguments: _withArgumentsDuplicatedExportInType);
@@ -2493,7 +2541,8 @@
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 @@
const Template<Message Function(String name, Uri uri_, Uri uri2_)>
templateDuplicatedImportInType =
const Template<Message Function(String name, Uri uri_, Uri uri2_)>(
- messageTemplate:
+ problemMessageTemplate:
r"""'#name' is imported from both '#uri' and '#uri2'.""",
withArguments: _withArgumentsDuplicatedImportInType);
@@ -2519,15 +2568,17 @@
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<Message Function(Token token)> templateDuplicatedModifier =
const Template<Message Function(Token token)>(
- 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 @@
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 @@
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 @@
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 @@
const Template<Message Function(String name)>
templateDuplicatedNamePreviouslyUsedCause =
const Template<Message Function(String name)>(
- 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 @@
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<Message Function(String name)> templateDuplicatedNamedArgument =
const Template<Message Function(String name)>(
- 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 @@
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<Message Function(String name)> templateDuplicatedParameterName =
const Template<Message Function(String name)>(
- 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 @@
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 @@
const Template<Message Function(String name)>
templateDuplicatedParameterNameCause =
const Template<Message Function(String name)>(
- 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 @@
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 MessageCode messageEmptyNamedParameterList = const MessageCode(
"EmptyNamedParameterList",
analyzerCodes: <String>["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<Null> codeEmptyOptionalParameterList =
@@ -2670,15 +2723,15 @@
const MessageCode messageEmptyOptionalParameterList = const MessageCode(
"EmptyOptionalParameterList",
analyzerCodes: <String>["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<Null> 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 @@
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 @@
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 MessageCode messageEnumDeclarationEmpty = const MessageCode(
"EnumDeclarationEmpty",
analyzerCodes: <String>["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<Null> codeEnumInClass = messageEnumInClass;
@@ -2720,8 +2773,8 @@
// 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<Null> codeEnumInstantiation = messageEnumInstantiation;
@@ -2730,7 +2783,7 @@
const MessageCode messageEnumInstantiation = const MessageCode(
"EnumInstantiation",
analyzerCodes: <String>["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<Null> codeEqualityCannotBeEqualityOperand =
@@ -2740,15 +2793,16 @@
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<Message Function(Uri uri_, String string)>
templateExceptionReadingFile =
const Template<Message Function(Uri uri_, String string)>(
- 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 @@
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<Message Function(String string)> templateExpectedAfterButGot =
const Template<Message Function(String string)>(
- 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 @@
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 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<Null> codeExpectedBlock = messageExpectedBlock;
@@ -2800,8 +2854,8 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageExpectedBlock = const MessageCode("ExpectedBlock",
analyzerCodes: <String>["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<Null> codeExpectedBlockToSkip = messageExpectedBlockToSkip;
@@ -2810,8 +2864,8 @@
const MessageCode messageExpectedBlockToSkip = const MessageCode(
"ExpectedBlockToSkip",
analyzerCodes: <String>["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<Null> codeExpectedBody = messageExpectedBody;
@@ -2819,13 +2873,13 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageExpectedBody = const MessageCode("ExpectedBody",
analyzerCodes: <String>["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<Message Function(String string)> templateExpectedButGot =
const Template<Message Function(String string)>(
- 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 @@
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<Message Function(Token token)> templateExpectedClassMember =
const Template<Message Function(Token token)>(
- 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 @@
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 @@
const Template<Message Function(String string)>
templateExpectedClassOrMixinBody =
const Template<Message Function(String string)>(
- 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 @@
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<Message Function(Token token)> templateExpectedDeclaration =
const Template<Message Function(Token token)>(
- 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 @@
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 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 @@
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 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<Message Function(Token token)> templateExpectedFunctionBody =
const Template<Message Function(Token token)>(
- 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 @@
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 MessageCode messageExpectedHexDigit = const MessageCode(
"ExpectedHexDigit",
analyzerCodes: <String>["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<Message Function(Token token)> templateExpectedIdentifier =
const Template<Message Function(Token token)>(
- 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 @@
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 @@
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 @@
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<Message Function(String string)> templateExpectedInstead =
const Template<Message Function(String string)>(
- 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 @@
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 MessageCode messageExpectedNamedArgument = const MessageCode(
"ExpectedNamedArgument",
analyzerCodes: <String>["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<Null> codeExpectedOneExpression = messageExpectedOneExpression;
@@ -3045,14 +3103,16 @@
// 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<Null> 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<Null> codeExpectedStatement = messageExpectedStatement;
@@ -3061,12 +3121,12 @@
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<Message Function(Token token)> templateExpectedString =
const Template<Message Function(Token token)>(
- 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 @@
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<Message Function(String string)> templateExpectedToken =
const Template<Message Function(String string)>(
- 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 @@
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<Message Function(Token token)> templateExpectedType =
const Template<Message Function(Token token)>(
- 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 @@
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 @@
// 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 @@
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 @@
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 @@
const Template<Message Function(String string2)>
templateExperimentDisabledInvalidLanguageVersion =
const Template<Message Function(String string2)>(
- messageTemplate:
+ problemMessageTemplate:
r"""This requires the null safety language feature, which requires language version of #string2 or higher.""",
withArguments: _withArgumentsExperimentDisabledInvalidLanguageVersion);
@@ -3174,7 +3234,7 @@
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 @@
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 @@
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 MessageCode messageExperimentNotEnabledNoFlag = const MessageCode(
"ExperimentNotEnabledNoFlag",
analyzerCodes: <String>["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<Message Function(String string2)>
templateExperimentNotEnabledNoFlagInvalidLanguageVersion =
const Template<Message Function(String string2)>(
- 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 @@
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 @@
// 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 @@
// 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 @@
// 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 @@
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 @@
// 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 @@
// 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<Null> codeExportOptOutFromOptIn = messageExportOptOutFromOptIn;
@@ -3329,7 +3390,7 @@
// 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 @@
// 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<Null> codeExpressionNotMetadata = messageExpressionNotMetadata;
@@ -3346,7 +3407,7 @@
// 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 @@
// 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<Message Function(String name)> templateExtendingEnum =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""'#name' is an enum and can't be extended or implemented.""",
withArguments: _withArgumentsExtendingEnum);
@@ -3375,14 +3437,15 @@
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<Message Function(String name)> templateExtendingRestricted =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""'#name' is restricted and can't be extended or implemented.""",
withArguments: _withArgumentsExtendingRestricted);
@@ -3396,7 +3459,7 @@
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 @@
// 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<Null> 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<Null> 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<Null> codeExtensionDeclaresAbstractMember =
@@ -3430,8 +3496,8 @@
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<Null> codeExtensionDeclaresConstructor =
@@ -3441,8 +3507,8 @@
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<Null> codeExtensionDeclaresInstanceField =
@@ -3452,14 +3518,15 @@
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<Message Function(String name)>
templateExtensionMemberConflictsWithObjectMember =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""This extension member conflicts with Object member '#name'.""",
withArguments: _withArgumentsExtensionMemberConflictsWithObjectMember);
@@ -3475,7 +3542,7 @@
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 @@
// 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<Null> codeExternalConstructorWithBody =
@@ -3497,8 +3564,8 @@
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 MessageCode messageExternalConstructorWithFieldInitializers =
const MessageCode("ExternalConstructorWithFieldInitializers",
analyzerCodes: <String>["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 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<Null> codeExternalEnum = messageExternalEnum;
@@ -3529,8 +3597,8 @@
// 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<Null> codeExternalFactoryRedirection =
@@ -3540,8 +3608,8 @@
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<Null> codeExternalFactoryWithBody = messageExternalFactoryWithBody;
@@ -3550,8 +3618,8 @@
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 @@
// 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 @@
// 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 @@
// 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<Null> codeExternalLateField = messageExternalLateField;
@@ -3591,8 +3660,8 @@
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<Null> codeExternalMethodWithBody = messageExternalMethodWithBody;
@@ -3601,7 +3670,7 @@
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<Null> codeExternalTypedef = messageExternalTypedef;
@@ -3609,14 +3678,14 @@
// 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<Message Function(Token token)> templateExtraneousModifier =
const Template<Message Function(Token token)>(
- 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 @@
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 @@
const Template<Message Function(Token token)>
templateExtraneousModifierInExtension =
const Template<Message Function(Token token)>(
- 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 @@
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 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageFactoryNotSync = const MessageCode("FactoryNotSync",
analyzerCodes: <String>["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<Null> codeFactoryTopLevelDeclaration =
@@ -3670,13 +3741,14 @@
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<Message Function(String name)> templateFastaCLIArgumentRequired =
const Template<Message Function(String name)>(
- 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 @@
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 @@
// 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 <file>, --output=<file>
Generate the output into <file>.
@@ -3789,8 +3861,8 @@
const Code<Null> 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 <file> Generate the output into <file>.
-h Display this message (add -v for information about all options).""");
@@ -3802,7 +3874,7 @@
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 @@
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 @@
// 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<Null> codeFfiExpectedConstant = messageFfiExpectedConstant;
@@ -3837,12 +3909,12 @@
// 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<Message Function(String name)> templateFfiExpectedConstantArg =
const Template<Message Function(String name)>(
- 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 @@
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 @@
const Template<Message Function(String name)>
templateFfiExtendsOrImplementsSealedClass =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""Class '#name' cannot be extended or implemented.""",
withArguments: _withArgumentsFfiExtendsOrImplementsSealedClass);
@@ -3880,7 +3952,7 @@
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 @@
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 @@
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 @@
Message Function(String string, String name, List<String> _names)>
templateFfiFieldCyclic = const Template<
Message Function(String string, String name, List<String> _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<Message Function(String string, String name, List<String> _names)>
@@ -3932,7 +4006,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
// 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<Null> codeFfiLeafCallMustNotTakeHandle =
@@ -4029,7 +4103,7 @@
// 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<Null> codeFfiNativeAnnotationMustAnnotateStatic =
@@ -4038,14 +4112,14 @@
// 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 @@
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 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<Message Function(String name)> templateFfiPackedAnnotation =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""Struct '#name' must have at most one 'Packed' annotation.""",
withArguments: _withArgumentsFfiPackedAnnotation);
@@ -4083,7 +4157,7 @@
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 @@
// 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 @@
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 @@
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 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<Message Function(String name)> templateFfiSizeAnnotation =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""Field '#name' must have exactly one 'Array' annotation.""",
withArguments: _withArgumentsFfiSizeAnnotation);
@@ -4145,7 +4220,8 @@
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 @@
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 @@
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 @@
const Template<Message Function(String string, String name)>
templateFfiStructGeneric =
const Template<Message Function(String string, String name)>(
- 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 @@
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 @@
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 @@
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 @@
const Template<Message Function(String name)>
templateFieldAlreadyInitializedAtDeclarationCause =
const Template<Message Function(String name)>(
- 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 @@
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 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 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<Message Function(String name, String string)>
templateFieldNotPromoted =
const Template<Message Function(String name, String string)>(
- 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 @@
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 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<Null> codeFinalAndCovariantLateWithInitializer =
@@ -4318,9 +4398,9 @@
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 @@
// 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
// 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<Null> codeForInLoopNotAssignable = messageForInLoopNotAssignable;
@@ -4481,7 +4565,7 @@
// 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 MessageCode messageForInLoopWithConstVariable = const MessageCode(
"ForInLoopWithConstVariable",
analyzerCodes: <String>["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<Null> codeFunctionAsTypeParameter = messageFunctionAsTypeParameter;
@@ -4501,7 +4585,7 @@
// 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 MessageCode messageFunctionTypeDefaultValue = const MessageCode(
"FunctionTypeDefaultValue",
analyzerCodes: <String>["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<Null> codeFunctionTypedParameterVar =
@@ -4521,15 +4605,15 @@
const MessageCode messageFunctionTypedParameterVar = const MessageCode(
"FunctionTypedParameterVar",
analyzerCodes: <String>["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 @@
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 MessageCode messageGeneratorReturnsValue = const MessageCode(
"GeneratorReturnsValue",
analyzerCodes: <String>["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<Null> codeGenericFunctionTypeInBound =
@@ -4566,7 +4650,7 @@
const MessageCode messageGenericFunctionTypeInBound = const MessageCode(
"GenericFunctionTypeInBound",
analyzerCodes: <String>["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 MessageCode messageGenericFunctionTypeUsedAsActualTypeArgument =
const MessageCode("GenericFunctionTypeUsedAsActualTypeArgument",
analyzerCodes: <String>["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<Null> codeGetterConstructor = messageGetterConstructor;
@@ -4588,13 +4672,13 @@
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<Message Function(String name)> templateGetterNotFound =
const Template<Message Function(String name)>(
- 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 @@
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 MessageCode messageGetterWithFormals = const MessageCode(
"GetterWithFormals",
analyzerCodes: <String>["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<Null> codeIllegalAssignmentToNonAssignable =
@@ -4628,7 +4713,7 @@
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<Null> codeIllegalAsyncGeneratorReturnType =
@@ -4638,7 +4723,7 @@
const MessageCode messageIllegalAsyncGeneratorReturnType = const MessageCode(
"IllegalAsyncGeneratorReturnType",
analyzerCodes: <String>["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 @@
// 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 MessageCode messageIllegalAsyncReturnType = const MessageCode(
"IllegalAsyncReturnType",
analyzerCodes: <String>["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<Message Function(String name)> templateIllegalMixin =
const Template<Message Function(String name)>(
- 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 @@
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 @@
const Template<Message Function(String name)>
templateIllegalMixinDueToConstructors =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""Can't use '#name' as a mixin because it has constructors.""",
withArguments: _withArgumentsIllegalMixinDueToConstructors);
@@ -4699,7 +4784,7 @@
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 @@
const Template<Message Function(String name)>
templateIllegalMixinDueToConstructorsCause =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""This constructor prevents using '#name' as a mixin.""",
withArguments: _withArgumentsIllegalMixinDueToConstructorsCause);
@@ -4724,7 +4809,8 @@
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 MessageCode messageIllegalSyncGeneratorReturnType = const MessageCode(
"IllegalSyncGeneratorReturnType",
analyzerCodes: <String>["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 @@
// 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<Null> codeImplementFunction = messageImplementFunction;
@@ -4755,8 +4842,9 @@
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<Null> codeImplementsBeforeExtends = messageImplementsBeforeExtends;
@@ -4765,8 +4853,10 @@
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<Null> codeImplementsBeforeOn = messageImplementsBeforeOn;
@@ -4775,8 +4865,9 @@
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<Null> codeImplementsBeforeWith = messageImplementsBeforeWith;
@@ -4785,8 +4876,10 @@
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<Null> codeImplementsFutureOr = messageImplementsFutureOr;
@@ -4794,7 +4887,7 @@
// 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 @@
// 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<Message Function(String name, int count)>
templateImplementsRepeated =
const Template<Message Function(String name, int count)>(
- 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 @@
// 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 @@
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 @@
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 @@
// 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 @@
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 @@
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 @@
// 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<Null> codeIncorrectTypeArgumentVariable =
@@ -4914,7 +5011,8 @@
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 @@
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 @@
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 @@
const Template<Message Function(String string)>
templateIncrementalCompilerIllegalTypeParameter =
const Template<Message Function(String string)>(
- messageTemplate:
+ problemMessageTemplate:
r"""Illegal type parameter name '#string' found during expression compilation.""",
withArguments: _withArgumentsIncrementalCompilerIllegalTypeParameter);
@@ -4961,7 +5059,7 @@
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 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<Message Function(Uri uri_)> templateInferredPackageUri =
const Template<Message Function(Uri uri_)>(
- 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 @@
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 MessageCode messageInheritedMembersConflict = const MessageCode(
"InheritedMembersConflict",
analyzerCodes: <String>["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<Null> codeInheritedMembersConflictCause1 =
@@ -5002,7 +5102,7 @@
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<Null> codeInheritedMembersConflictCause2 =
@@ -5012,7 +5112,7 @@
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 @@
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 @@
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 @@
const Template<Message Function(String string)>
templateInitializeFromDillNotSelfContainedNoDump =
const Template<Message Function(String string)>(
- 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 @@
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 @@
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 @@
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 @@
const Template<Message Function(String string, String string2, String string3)>
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 @@
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 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<Message Function(String name)>
templateInitializerForStaticField =
const Template<Message Function(String name)>(
- 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 @@
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 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<Message Function(Uri uri_)> templateInputFileNotFound =
const Template<Message Function(Uri uri_)>(
- 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 @@
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<Message Function(int count, int count2)>
templateInstantiationTooFewArguments =
const Template<Message Function(int count, int count2)>(
- 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 @@
// 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 @@
const Template<Message Function(int count, int count2)>
templateInstantiationTooManyArguments =
const Template<Message Function(int count, int count2)>(
- 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 @@
// 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 @@
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 @@
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 @@
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 @@
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 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<Null> codeInternalProblemBodyOnAbstractMethod =
@@ -5367,13 +5473,13 @@
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<Message Function(String name, Uri uri_)>
templateInternalProblemConstructorNotFound =
const Template<Message Function(String name, Uri uri_)>(
- 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 @@
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 @@
const Template<Message Function(String string)>
templateInternalProblemContextSeverity =
const Template<Message Function(String string)>(
- messageTemplate:
+ problemMessageTemplate:
r"""Non-context message has context severity: #string""",
withArguments: _withArgumentsInternalProblemContextSeverity);
@@ -5412,7 +5518,7 @@
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 @@
const Template<Message Function(String name, String string)>
templateInternalProblemDebugAbort =
const Template<Message Function(String name, String string)>(
- 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 @@
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 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<Null> codeInternalProblemLabelUsageInVariablesDeclaration =
@@ -5458,7 +5564,7 @@
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 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<Message Function(String name)> templateInternalProblemNotFound =
const Template<Message Function(String name)>(
- 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 @@
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<Message Function(String name, String name2)>
templateInternalProblemNotFoundIn =
const Template<Message Function(String name, String name2)>(
- 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 @@
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 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<Message Function(String name)>
templateInternalProblemPrivateConstructorAccess =
const Template<Message Function(String name)>(
- 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 @@
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 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<Message Function(String name, String string)>
templateInternalProblemStackNotEmpty =
const Template<Message Function(String name, String string)>(
- 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 @@
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 @@
const Template<Message Function(String string, String string2)>
templateInternalProblemUnexpected =
const Template<Message Function(String string, String string2)>(
- 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 @@
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 @@
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 @@
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 @@
const Template<Message Function(String string, String string2)>
templateInternalProblemUnhandled =
const Template<Message Function(String string, String string2)>(
- 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 @@
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 @@
const Template<Message Function(String string)>
templateInternalProblemUnimplemented =
const Template<Message Function(String string)>(
- 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 @@
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<Message Function(String name)>
templateInternalProblemUnsupported =
const Template<Message Function(String name)>(
- 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 @@
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 @@
const Template<Message Function(Uri uri_)>
templateInternalProblemUriMissingScheme =
const Template<Message Function(Uri uri_)>(
- 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 @@
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<Message Function(String string)>
templateInternalProblemVerificationError =
const Template<Message Function(String string)>(
- 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<Message Function(String string)>
@@ -5738,7 +5850,7 @@
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 MessageCode messageInterpolationInUri = const MessageCode(
"InterpolationInUri",
analyzerCodes: <String>["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<Null> codeInvalidAwaitFor = messageInvalidAwaitFor;
@@ -5757,14 +5869,15 @@
// 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<Message Function(String name)> templateInvalidBreakTarget =
const Template<Message Function(String name)>(
- 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 @@
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 MessageCode messageInvalidCatchArguments = const MessageCode(
"InvalidCatchArguments",
analyzerCodes: <String>["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<Null> codeInvalidCodePoint = messageInvalidCodePoint;
@@ -5797,13 +5911,13 @@
const MessageCode messageInvalidCodePoint = const MessageCode(
"InvalidCodePoint",
analyzerCodes: <String>["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<Message Function(String name)> templateInvalidContinueTarget =
const Template<Message Function(String name)>(
- 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 @@
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<Message Function(String name)>
templateInvalidGetterSetterTypeFieldContext =
const Template<Message Function(String name)>(
- 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 @@
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 @@
const Template<Message Function(String name)>
templateInvalidGetterSetterTypeGetterContext =
const Template<Message Function(String name)>(
- 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 @@
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 @@
const Template<Message Function(String name)>
templateInvalidGetterSetterTypeSetterContext =
const Template<Message Function(String name)>(
- 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 @@
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 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 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<Null> codeInvalidInlineFunctionType =
@@ -5917,9 +6036,9 @@
const MessageCode messageInvalidInlineFunctionType = const MessageCode(
"InvalidInlineFunctionType",
analyzerCodes: <String>["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 @@
// 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<Message Function(Token token)> templateInvalidOperator =
const Template<Message Function(Token token)>(
- messageTemplate:
+ problemMessageTemplate:
r"""The string '#lexeme' isn't a user-definable operator.""",
withArguments: _withArgumentsInvalidOperator);
@@ -5945,7 +6064,8 @@
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 @@
const Template<Message Function(Uri uri_, String string)>
templateInvalidPackageUri =
const Template<Message Function(Uri uri_, String string)>(
- 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 @@
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 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 MessageCode messageInvalidSyncModifier = const MessageCode(
"InvalidSyncModifier",
analyzerCodes: <String>["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<Null> codeInvalidThisInInitializer = messageInvalidThisInInitializer;
@@ -5999,7 +6119,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
const Template<Message Function(String string, String name, String string2)>
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 @@
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 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 MessageCode messageInvalidUseOfNullAwareAccess = const MessageCode(
"InvalidUseOfNullAwareAccess",
analyzerCodes: <String>["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<Null> codeInvalidVoid = messageInvalidVoid;
@@ -6165,14 +6286,14 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageInvalidVoid = const MessageCode("InvalidVoid",
analyzerCodes: <String>["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<Message Function(String name)> templateInvokeNonFunction =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""'#name' isn't a function or method and can't be invoked.""",
withArguments: _withArgumentsInvokeNonFunction);
@@ -6186,7 +6307,8 @@
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 @@
// 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 @@
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 @@
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 @@
// 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<Null> codeJsInteropEnclosingClassJSAnnotationContext =
@@ -6255,7 +6379,7 @@
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<Null> codeJsInteropExternalExtensionMemberOnTypeInvalid =
@@ -6264,9 +6388,9 @@
// 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 @@
// 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 @@
// 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 @@
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 @@
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 @@
// 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 @@
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 @@
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 @@
// 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<Null> codeJsInteropNonExternalMember =
@@ -6390,16 +6516,16 @@
// 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 @@
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 @@
// 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 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<Null> codeLanguageVersionMismatchInPart =
@@ -6446,7 +6572,7 @@
// 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 @@
// 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 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<Null> codeLanguageVersionPatchContext =
@@ -6477,7 +6603,7 @@
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 @@
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 @@
// 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 @@
const Template<Message Function(String name)>
templateLateDefinitelyAssignedError =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""Late final variable '#name' definitely assigned.""",
withArguments: _withArgumentsLateDefinitelyAssignedError);
@@ -6527,7 +6653,7 @@
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 @@
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 @@
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 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<Null> codeListLiteralTooManyTypeArguments =
@@ -6576,15 +6703,15 @@
const MessageCode messageListLiteralTooManyTypeArguments = const MessageCode(
"ListLiteralTooManyTypeArguments",
analyzerCodes: <String>["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<Message Function(String string, Token token)>
templateLiteralWithClass =
const Template<Message Function(String string, Token token)>(
- 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 @@
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<Message Function(String string, Token token)>
+const Template<
+ Message Function(String string, Token token)>
templateLiteralWithClassAndNew =
const Template<Message Function(String string, Token token)>(
- 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 @@
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 @@
// 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<Null> codeLoadLibraryTakesNoArguments =
@@ -6645,7 +6775,7 @@
const MessageCode messageLoadLibraryTakesNoArguments = const MessageCode(
"LoadLibraryTakesNoArguments",
analyzerCodes: <String>["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<Null> codeMainNotFunctionDeclaration =
@@ -6654,7 +6784,8 @@
// 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<Null> codeMainNotFunctionDeclarationExported =
@@ -6663,7 +6794,7 @@
// 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 @@
// 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<Null> codeMainRequiredNamedParametersExported =
@@ -6682,7 +6814,7 @@
// 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 @@
// 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<Null> codeMainTooManyRequiredParametersExported =
@@ -6701,7 +6834,7 @@
// 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 MessageCode messageMapLiteralTypeArgumentMismatch = const MessageCode(
"MapLiteralTypeArgumentMismatch",
analyzerCodes: <String>["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<Message Function(String name)> templateMemberNotFound =
const Template<Message Function(String name)>(
- 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 @@
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 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<Null> codeMetadataTypeArguments = messageMetadataTypeArguments;
@@ -6752,7 +6886,7 @@
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<Null> codeMetadataTypeArgumentsUninstantiated =
@@ -6762,13 +6896,13 @@
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<Message Function(String name)> templateMethodNotFound =
const Template<Message Function(String name)>(
- 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 @@
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 @@
// 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<Null> codeMissingAssignableSelector =
@@ -6800,8 +6935,8 @@
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<Null> codeMissingAssignmentInInitializer =
@@ -6811,8 +6946,9 @@
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<Null> codeMissingConstFinalVarOrType =
@@ -6822,9 +6958,9 @@
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 MessageCode messageMissingExplicitConst = const MessageCode(
"MissingExplicitConst",
analyzerCodes: <String>["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<Null> codeMissingExponent = messageMissingExponent;
@@ -6843,9 +6979,9 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageMissingExponent = const MessageCode("MissingExponent",
analyzerCodes: <String>["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 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 MessageCode messageMissingFunctionParameters = const MessageCode(
"MissingFunctionParameters",
analyzerCodes: <String>["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<Message Function(String name)>
templateMissingImplementationCause =
const Template<Message Function(String name)>(
- 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 @@
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 @@
List<String>
_names)> templateMissingImplementationNotAbstract = const Template<
Message Function(String name, List<String> _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 @@
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 @@
// 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<Null> 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<Null> codeMissingMethodParameters = messageMissingMethodParameters;
@@ -6958,8 +7097,10 @@
const MessageCode messageMissingMethodParameters = const MessageCode(
"MissingMethodParameters",
analyzerCodes: <String>["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<Null> codeMissingOperatorKeyword = messageMissingOperatorKeyword;
@@ -6968,15 +7109,15 @@
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 @@
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 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<Null> codeMissingTypedefParameters = messageMissingTypedefParameters;
@@ -7012,8 +7154,8 @@
const MessageCode messageMissingTypedefParameters = const MessageCode(
"MissingTypedefParameters",
analyzerCodes: <String>["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<Null> codeMixinDeclaresConstructor = messageMixinDeclaresConstructor;
@@ -7022,7 +7164,7 @@
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<Null> codeMixinFunction = messageMixinFunction;
@@ -7030,8 +7172,8 @@
// 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 @@
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 @@
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 MessageCode messageMoreThanOneSuperInitializer = const MessageCode(
"MoreThanOneSuperInitializer",
analyzerCodes: <String>["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<Null> codeMultipleExtends = messageMultipleExtends;
@@ -7079,8 +7221,9 @@
// 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 MessageCode messageMultipleImplements = const MessageCode(
"MultipleImplements",
analyzerCodes: <String>["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 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<Null> codeMultipleOnClauses = messageMultipleOnClauses;
@@ -7113,8 +7258,10 @@
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<Null> codeMultipleVarianceModifiers =
@@ -7124,8 +7271,10 @@
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<Null> codeMultipleWith = messageMultipleWith;
@@ -7133,13 +7282,15 @@
// 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<Message Function(String name)> templateNameNotFound =
const Template<Message Function(String name)>(
- 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 @@
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 MessageCode messageNamedFunctionExpression = const MessageCode(
"NamedFunctionExpression",
analyzerCodes: <String>["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 @@
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 @@
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 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 @@
// 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 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 @@
// 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 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 @@
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 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<Message Function(String name)> templateNoSuchNamedParameter =
const Template<Message Function(String name)>(
- 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 @@
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 @@
// 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<Null> codeNonAgnosticConstant = messageNonAgnosticConstant;
@@ -7303,7 +7456,7 @@
// 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 @@
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 @@
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 @@
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 @@
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 MessageCode messageNonConstConstructor = const MessageCode(
"NonConstConstructor",
analyzerCodes: <String>["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<Null> codeNonConstFactory = messageNonConstFactory;
@@ -7379,9 +7533,10 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageNonConstFactory = const MessageCode("NonConstFactory",
analyzerCodes: <String>["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<Null> codeNonInstanceTypeVariableUse =
@@ -7391,7 +7546,7 @@
const MessageCode messageNonInstanceTypeVariableUse = const MessageCode(
"NonInstanceTypeVariableUse",
analyzerCodes: <String>["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 @@
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 @@
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 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 @@
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 @@
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 @@
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 @@
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 MessageCode messageNonPartOfDirectiveInPart = const MessageCode(
"NonPartOfDirectiveInPart",
analyzerCodes: <String>["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 @@
// 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<Message Function(String name)>
templateNonSimpleBoundViaReference =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""Bound of this variable references raw type '#name'.""",
withArguments: _withArgumentsNonSimpleBoundViaReference);
@@ -7521,7 +7679,8 @@
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 @@
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 @@
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 MessageCode messageNonVoidReturnOperator = const MessageCode(
"NonVoidReturnOperator",
analyzerCodes: <String>["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<Null> codeNonVoidReturnSetter = messageNonVoidReturnSetter;
@@ -7567,8 +7726,9 @@
const MessageCode messageNonVoidReturnSetter = const MessageCode(
"NonVoidReturnSetter",
analyzerCodes: <String>["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 MessageCode messageNotAConstantExpression = const MessageCode(
"NotAConstantExpression",
analyzerCodes: <String>["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 @@
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 @@
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 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<Message Function(String name)> templateNotAType =
const Template<Message Function(String name)>(
- 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 @@
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 @@
// 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<Null> codeNotAnLvalue = messageNotAnLvalue;
@@ -7642,12 +7802,12 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageNotAnLvalue = const MessageCode("NotAnLvalue",
analyzerCodes: <String>["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<Message Function(Token token)> templateNotBinaryOperator =
const Template<Message Function(Token token)>(
- 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 @@
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<Message Function(String string)> templateNotConstantExpression =
const Template<Message Function(String string)>(
- 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 @@
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 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<Message Function(String name)> templateNullableInterfaceError =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""Can't implement '#name' because it's marked with '?'.""",
withArguments: _withArgumentsNullableInterfaceError);
@@ -7714,14 +7874,15 @@
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<Message Function(String name)> templateNullableMixinError =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""Can't mix '#name' in because it's marked with '?'.""",
withArguments: _withArgumentsNullableMixinError);
@@ -7736,7 +7897,8 @@
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 @@
// 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<Message Function(String name)> templateNullableSuperclassError =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""Can't extend '#name' because it's marked with '?'.""",
withArguments: _withArgumentsNullableSuperclassError);
@@ -7767,14 +7929,15 @@
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<Message Function(String name)> templateNullableTearoffError =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""Can't tear off method '#name' from a potentially null value.""",
withArguments: _withArgumentsNullableTearoffError);
@@ -7789,7 +7952,7 @@
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 @@
// 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<Null> codeObjectImplements = messageObjectImplements;
@@ -7807,14 +7970,14 @@
// 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<Null> 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<Null> codeOnlyTry = messageOnlyTry;
@@ -7822,9 +7985,9 @@
// 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 @@
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 @@
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 @@
const Template<Message Function(String name)>
templateOperatorParameterMismatch0 =
const Template<Message Function(String name)>(
- 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 @@
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 @@
const Template<Message Function(String name)>
templateOperatorParameterMismatch1 =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""Operator '#name' should have exactly one parameter.""",
withArguments: _withArgumentsOperatorParameterMismatch1);
@@ -7896,7 +8062,8 @@
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 @@
const Template<Message Function(String name)>
templateOperatorParameterMismatch2 =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""Operator '#name' should have exactly two parameters.""",
withArguments: _withArgumentsOperatorParameterMismatch2);
@@ -7918,7 +8085,8 @@
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 @@
// 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<Null> codeOperatorWithTypeParameters =
@@ -7939,13 +8107,14 @@
const MessageCode messageOperatorWithTypeParameters = const MessageCode(
"OperatorWithTypeParameters",
analyzerCodes: <String>["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<Message Function(String name)> templateOverriddenMethodCause =
const Template<Message Function(String name)>(
- 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
const Template<Message Function(String name, String name2, String name3)>
templateOverrideMismatchRequiredNamedParameter =
const Template<Message Function(String name, String name2, String name3)>(
- messageTemplate:
+ problemMessageTemplate:
r"""The required named parameter '#name' in method '#name2' is not required in overridden method '#name3'.""",
withArguments: _withArgumentsOverrideMismatchRequiredNamedParameter);
@@ -8082,7 +8251,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
const Template<Message Function(String name, Uri uri_)>
templatePackageNotFound =
const Template<Message Function(String name, Uri uri_)>(
- 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 @@
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<Message Function(String string)> templatePackagesFileFormat =
const Template<Message Function(String string)>(
- 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 @@
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 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messagePartExport = const MessageCode("PartExport",
analyzerCodes: <String>["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 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<Null> codePartInPart = messagePartInPart;
@@ -8214,8 +8385,10 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messagePartInPart = const MessageCode("PartInPart",
analyzerCodes: <String>["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<Null> codePartInPartLibraryContext = messagePartInPartLibraryContext;
@@ -8224,15 +8397,15 @@
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 @@
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 @@
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 @@
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 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messagePartOfSelf = const MessageCode("PartOfSelf",
analyzerCodes: <String>["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<Null> codePartOfTwice = messagePartOfTwice;
@@ -8299,8 +8472,10 @@
// 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<Null> codePartOfTwoLibraries = messagePartOfTwoLibraries;
@@ -8309,8 +8484,8 @@
const MessageCode messagePartOfTwoLibraries = const MessageCode(
"PartOfTwoLibraries",
analyzerCodes: <String>["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 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 @@
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 @@
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 @@
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 @@
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 @@
// 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<Message Function(Uri uri_)> templatePartTwice =
const Template<Message Function(Uri uri_)>(
- 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 @@
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 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<Null> codePatchClassTypeVariablesMismatch =
@@ -8430,7 +8606,7 @@
// 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 @@
// 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<Null> codePatchDeclarationOrigin = messagePatchDeclarationOrigin;
@@ -8448,14 +8624,14 @@
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<Message Function(String name, Uri uri_)>
templatePatchInjectionFailed =
const Template<Message Function(String name, Uri uri_)>(
- 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 @@
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 @@
// 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<Null> codePlatformPrivateLibraryAccess =
@@ -8493,7 +8669,7 @@
const MessageCode messagePlatformPrivateLibraryAccess = const MessageCode(
"PlatformPrivateLibraryAccess",
analyzerCodes: <String>["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<Null> codePositionalAfterNamedArgument =
@@ -8503,8 +8679,8 @@
const MessageCode messagePositionalAfterNamedArgument = const MessageCode(
"PositionalAfterNamedArgument",
analyzerCodes: <String>["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 MessageCode messagePositionalParameterWithEquals = const MessageCode(
"PositionalParameterWithEquals",
analyzerCodes: <String>["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<Null> codePrefixAfterCombinator = messagePrefixAfterCombinator;
@@ -8526,9 +8702,9 @@
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<Null> codePrivateNamedParameter = messagePrivateNamedParameter;
@@ -8537,7 +8713,7 @@
const MessageCode messagePrivateNamedParameter = const MessageCode(
"PrivateNamedParameter",
analyzerCodes: <String>["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<Null> codeRedirectingConstructorWithAnotherInitializer =
@@ -8547,7 +8723,7 @@
const MessageCode messageRedirectingConstructorWithAnotherInitializer =
const MessageCode("RedirectingConstructorWithAnotherInitializer",
analyzerCodes: <String>["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 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 @@
messageRedirectingConstructorWithMultipleRedirectInitializers =
const MessageCode("RedirectingConstructorWithMultipleRedirectInitializers",
analyzerCodes: <String>["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 MessageCode messageRedirectingConstructorWithSuperInitializer =
const MessageCode("RedirectingConstructorWithSuperInitializer",
analyzerCodes: <String>["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 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<Message Function(String name)>
templateRedirectionTargetNotFound =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""Redirection constructor target not found: '#name'""",
withArguments: _withArgumentsRedirectionTargetNotFound);
@@ -8614,7 +8791,7 @@
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 @@
const Template<Message Function(String name)>
templateRequiredNamedParameterHasDefaultValueError =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""Named parameter '#name' is required and can't have a default value.""",
withArguments:
_withArgumentsRequiredNamedParameterHasDefaultValueError);
@@ -8639,7 +8816,7 @@
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 MessageCode messageRequiredParameterWithDefault = const MessageCode(
"RequiredParameterWithDefault",
analyzerCodes: <String>["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 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageRethrowNotCatch = const MessageCode("RethrowNotCatch",
analyzerCodes: <String>["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<Null> codeReturnFromVoidFunction = messageReturnFromVoidFunction;
@@ -8671,7 +8848,7 @@
const MessageCode messageReturnFromVoidFunction = const MessageCode(
"ReturnFromVoidFunction",
analyzerCodes: <String>["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<Null> codeReturnTypeFunctionExpression =
@@ -8680,7 +8857,7 @@
// 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<Null> codeReturnWithoutExpression = messageReturnWithoutExpression;
@@ -8690,7 +8867,8 @@
"ReturnWithoutExpression",
analyzerCodes: <String>["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<Null> codeReturnWithoutExpressionAsync =
@@ -8699,7 +8877,7 @@
// 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 @@
// 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<Message Function(Uri uri_)> templateSdkRootNotFound =
const Template<Message Function(Uri uri_)>(
- 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 @@
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 @@
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 @@
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 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<Message Function(Uri uri_)> templateSdkSummaryNotFound =
const Template<Message Function(Uri uri_)>(
- 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 @@
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 @@
// 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<Null> codeSetOrMapLiteralTooManyTypeArguments =
@@ -8794,7 +8973,7 @@
// 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 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<Message Function(String name)> templateSetterNotFound =
const Template<Message Function(String name)>(
- 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 @@
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 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageSetterNotSync = const MessageCode("SetterNotSync",
analyzerCodes: <String>["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<Null> codeSetterWithWrongNumberOfFormals =
@@ -8842,7 +9022,7 @@
const MessageCode messageSetterWithWrongNumberOfFormals = const MessageCode(
"SetterWithWrongNumberOfFormals",
analyzerCodes: <String>["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 @@
_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 @@
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 @@
_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 @@
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 @@
// 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<Null> codeSpreadMapElement = messageSpreadMapElement;
@@ -8968,7 +9148,7 @@
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<Null> codeStackOverflow = messageStackOverflow;
@@ -8976,8 +9156,9 @@
// 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<Null> codeStaticAndInstanceConflict =
@@ -8987,7 +9168,8 @@
const MessageCode messageStaticAndInstanceConflict = const MessageCode(
"StaticAndInstanceConflict",
analyzerCodes: <String>["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<Null> codeStaticAndInstanceConflictCause =
@@ -8997,7 +9179,7 @@
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<Null> codeStaticConstructor = messageStaticConstructor;
@@ -9006,8 +9188,8 @@
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<Null> codeStaticOperator = messageStaticOperator;
@@ -9015,8 +9197,8 @@
// 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<Null> codeStaticTearOffFromInstantiatedClass =
@@ -9025,9 +9207,9 @@
// 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 @@
// 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 @@
List<String>
_names)> templateStrongModeNNBDPackageOptOut = const Template<
Message Function(List<String> _names)>(
- messageTemplate:
+ problemMessageTemplate:
r"""Cannot run with sound null safety, because the following dependencies
don't support null safety:
@@ -9066,7 +9248,7 @@
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 @@
// 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 MessageCode messageSuperAsExpression = const MessageCode(
"SuperAsExpression",
analyzerCodes: <String>["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 MessageCode messageSuperAsIdentifier = const MessageCode(
"SuperAsIdentifier",
analyzerCodes: <String>["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<Null> codeSuperInitializerNotLast = messageSuperInitializerNotLast;
@@ -9113,7 +9295,7 @@
const MessageCode messageSuperInitializerNotLast = const MessageCode(
"SuperInitializerNotLast",
analyzerCodes: <String>["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<Null> codeSuperNullAware = messageSuperNullAware;
@@ -9121,15 +9303,16 @@
// 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<Message Function(String name)>
templateSuperclassHasNoConstructor =
const Template<Message Function(String name)>(
- 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 @@
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 @@
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 @@
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 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<Message Function(String name)> templateSuperclassHasNoGetter =
const Template<Message Function(String name)>(
- 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 @@
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<Message Function(String name)> templateSuperclassHasNoMember =
const Template<Message Function(String name)>(
- 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 @@
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<Message Function(String name)> templateSuperclassHasNoMethod =
const Template<Message Function(String name)>(
- 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 @@
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<Message Function(String name)> templateSuperclassHasNoSetter =
const Template<Message Function(String name)>(
- 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 @@
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 @@
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 @@
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 @@
// 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<Message Function(String name)> templateSupertypeIsIllegal =
const Template<Message Function(String name)>(
- 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 @@
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<Message Function(String name)> templateSupertypeIsTypeVariable =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""The type variable '#name' can't be used as supertype.""",
withArguments: _withArgumentsSupertypeIsTypeVariable);
@@ -9327,7 +9511,8 @@
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 MessageCode messageSwitchCaseFallThrough = const MessageCode(
"SwitchCaseFallThrough",
analyzerCodes: <String>["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<Null> codeSwitchExpressionNotAssignableCause =
@@ -9348,7 +9533,7 @@
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<Null> codeSwitchHasCaseAfterDefault =
@@ -9358,9 +9543,10 @@
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<Null> codeSwitchHasMultipleDefaults =
@@ -9370,21 +9556,21 @@
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<Null> 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<Message Function(String name)>
templateThisAccessInFieldInitializer =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""Can't access 'this' in a field initializer to read '#name'.""",
withArguments: _withArgumentsThisAccessInFieldInitializer);
@@ -9398,7 +9584,7 @@
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 MessageCode messageThisAsIdentifier = const MessageCode(
"ThisAsIdentifier",
analyzerCodes: <String>["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<Null> codeThisInNullAwareReceiver = messageThisInNullAwareReceiver;
@@ -9419,14 +9605,14 @@
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<Message Function(String string)> templateThisNotPromoted =
const Template<Message Function(String string)>(
- 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 @@
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 @@
const Template<Message Function(String string)>
templateThisOrSuperAccessInFieldInitializer =
const Template<Message Function(String string)>(
- 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 @@
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 @@
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 @@
// 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 @@
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 @@
// 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 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 @@
// 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<Message Function(int count)> templateTypeArgumentMismatch =
const Template<Message Function(int count)>(
- 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 @@
// 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 @@
const Template<Message Function(String name)>
templateTypeArgumentsOnTypeVariable =
const Template<Message Function(String name)>(
- 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 @@
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 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<Message Function(String name)> templateTypeNotFound =
const Template<Message Function(String name)>(
- 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 @@
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<Message Function(String name, Uri uri_)> templateTypeOrigin =
const Template<Message Function(String name, Uri uri_)>(
- 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 @@
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 @@
const Template<Message Function(String name, Uri uri_, Uri uri2_)>
templateTypeOriginWithFileUri =
const Template<Message Function(String name, Uri uri_, Uri uri2_)>(
- 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 @@
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 MessageCode messageTypeVariableDuplicatedName = const MessageCode(
"TypeVariableDuplicatedName",
analyzerCodes: <String>["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<Message Function(String name)>
templateTypeVariableDuplicatedNameCause =
const Template<Message Function(String name)>(
- 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 @@
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 MessageCode messageTypeVariableInConstantContext = const MessageCode(
"TypeVariableInConstantContext",
analyzerCodes: <String>["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<Null> codeTypeVariableInStaticContext =
@@ -9714,7 +9906,7 @@
const MessageCode messageTypeVariableInStaticContext = const MessageCode(
"TypeVariableInStaticContext",
analyzerCodes: <String>["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<Null> codeTypeVariableSameNameAsEnclosing =
@@ -9724,7 +9916,7 @@
const MessageCode messageTypeVariableSameNameAsEnclosing = const MessageCode(
"TypeVariableSameNameAsEnclosing",
analyzerCodes: <String>["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 @@
// 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<Null> codeTypedefInClass = messageTypedefInClass;
@@ -9741,8 +9933,8 @@
// 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<Null> codeTypedefNotFunction = messageTypedefNotFunction;
@@ -9751,7 +9943,7 @@
const MessageCode messageTypedefNotFunction = const MessageCode(
"TypedefNotFunction",
analyzerCodes: <String>["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<Null> codeTypedefNotType = messageTypedefNotType;
@@ -9759,7 +9951,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageTypedefNotType = const MessageCode("TypedefNotType",
analyzerCodes: <String>["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<Null> codeTypedefNullableType = messageTypedefNullableType;
@@ -9767,7 +9959,7 @@
// 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<Null> codeTypedefTypeVariableNotConstructor =
@@ -9776,7 +9968,7 @@
// 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 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<Null> codeTypedefUnaliasedTypeCause =
@@ -9797,7 +9989,7 @@
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<Null> codeUnexpectedDollarInString = messageUnexpectedDollarInString;
@@ -9806,9 +9998,9 @@
const MessageCode messageUnexpectedDollarInString = const MessageCode(
"UnexpectedDollarInString",
analyzerCodes: <String>["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 @@
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 @@
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 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<Message Function(Token token)> templateUnexpectedToken =
const Template<Message Function(Token token)>(
- 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 @@
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 @@
const Template<Message Function(String string, Token token)>
templateUnmatchedToken =
const Template<Message Function(String string, Token token)>(
- 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 @@
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 @@
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 @@
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 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<Message Function(String string)> templateUnspecified =
const Template<Message Function(String string)>(
- messageTemplate: r"""#string""",
+ problemMessageTemplate: r"""#string""",
withArguments: _withArgumentsUnspecified);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -9921,7 +10113,7 @@
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 @@
// 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<Message Function(Token token)> templateUnsupportedOperator =
const Template<Message Function(Token token)>(
- 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 @@
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 MessageCode messageUnsupportedPrefixPlus = const MessageCode(
"UnsupportedPrefixPlus",
analyzerCodes: <String>["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<Null> codeUnterminatedComment = messageUnterminatedComment;
@@ -9970,13 +10162,14 @@
const MessageCode messageUnterminatedComment = const MessageCode(
"UnterminatedComment",
analyzerCodes: <String>["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<Message Function(String string, String string2)>
+const Template<
+ Message Function(String string, String string2)>
templateUnterminatedString =
const Template<Message Function(String string, String string2)>(
- messageTemplate:
+ problemMessageTemplate:
r"""String starting with #string must end with #string2.""",
withArguments: _withArgumentsUnterminatedString);
@@ -9992,7 +10185,8 @@
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 @@
const Code<Null> 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<Message Function(Uri uri_)> templateUntranslatableUri =
const Template<Message Function(Uri uri_)>(
- 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 @@
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<Message Function(String name)>
templateValueForRequiredParameterNotProvidedError =
const Template<Message Function(String name)>(
- messageTemplate:
+ problemMessageTemplate:
r"""Required named parameter '#name' must be provided.""",
withArguments: _withArgumentsValueForRequiredParameterNotProvidedError);
@@ -10041,7 +10236,8 @@
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 @@
// 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<Null> codeVarReturnType = messageVarReturnType;
@@ -10058,8 +10255,8 @@
// 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 @@
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 @@
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 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<Null> codeVoidExpression = messageVoidExpression;
@@ -10112,7 +10310,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageVoidExpression = const MessageCode("VoidExpression",
analyzerCodes: <String>["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<Null> codeVoidWithTypeArguments = messageVoidWithTypeArguments;
@@ -10121,8 +10319,8 @@
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<Null> codeWeakWithStrongDillLibrary =
@@ -10131,7 +10329,7 @@
// 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 @@
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 @@
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 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<Null> codeYieldAsIdentifier = messageYieldAsIdentifier;
@@ -10183,7 +10382,7 @@
const MessageCode messageYieldAsIdentifier = const MessageCode(
"YieldAsIdentifier",
analyzerCodes: <String>["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 MessageCode messageYieldNotGenerator = const MessageCode(
"YieldNotGenerator",
analyzerCodes: <String>["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 14540d9..983ebb4 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 @@
/// 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 8c46c13..16d647e 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 @@
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 208db61..1d103e5 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 @@
// If offset is available report and internal problem to show the
// parsed code in the output.
throw internalProblem(
- new Message(const Code<String>('Internal error'), message: message),
+ new Message(const Code<String>('Internal error'),
+ problemMessage: message),
token.charOffset,
uri);
} else {
@@ -198,7 +199,8 @@
// If offset is available report and internal problem to show the
// parsed code in the output.
throw internalProblem(
- new Message(const Code<String>('Internal error'), message: message),
+ new Message(const Code<String>('Internal error'),
+ problemMessage: message),
token.charOffset,
uri);
} else {
@@ -480,7 +482,7 @@
@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 9b39e96..35b4652 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 @@
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 7837865..17c3c01 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 @@
CommandLineProblem.deprecated(String message)
: this(templateUnspecified.withArguments(message));
- String toString() => message.message;
+ String toString() => message.problemMessage;
}
class ParsedOptions {
diff --git a/pkg/analysis_server/test/verify_sorted_test.dart b/pkg/analysis_server/test/verify_sorted_test.dart
index dc12ccc..9033b16 100644
--- a/pkg/analysis_server/test/verify_sorted_test.dart
+++ b/pkg/analysis_server/test/verify_sorted_test.dart
@@ -85,7 +85,6 @@
packagePath: 'analyzer',
excludedPaths: [
'lib/src/context/packages.dart',
- 'lib/src/dart/error/syntactic_errors.g.dart',
'lib/src/summary/format.dart',
'test/generated/test_all.dart',
],
diff --git a/pkg/analyzer/lib/src/dart/error/syntactic_errors.analyzer.g.dart b/pkg/analyzer/lib/src/dart/error/syntactic_errors.analyzer.g.dart
index 88cb1ff..9da2117 100644
--- a/pkg/analyzer/lib/src/dart/error/syntactic_errors.analyzer.g.dart
+++ b/pkg/analyzer/lib/src/dart/error/syntactic_errors.analyzer.g.dart
@@ -9,14 +9,139 @@
import "package:analyzer/error/error.dart";
-part "syntactic_errors.g.dart";
-
// It is hard to visually separate each code's _doc comment_ from its published
// _documentation comment_ when each is written as an end-of-line comment.
// ignore_for_file: slash_for_doc_comments
+final fastaAnalyzerErrorCodes = <ErrorCode?>[
+ null,
+ ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND,
+ ParserErrorCode.CONTINUE_OUTSIDE_OF_LOOP,
+ ParserErrorCode.EXTERNAL_CLASS,
+ ParserErrorCode.STATIC_CONSTRUCTOR,
+ ParserErrorCode.EXTERNAL_ENUM,
+ ParserErrorCode.PREFIX_AFTER_COMBINATOR,
+ ParserErrorCode.TYPEDEF_IN_CLASS,
+ ParserErrorCode.EXPECTED_BODY,
+ ParserErrorCode.INVALID_AWAIT_IN_FOR,
+ ParserErrorCode.IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE,
+ ParserErrorCode.WITH_BEFORE_EXTENDS,
+ ParserErrorCode.VAR_RETURN_TYPE,
+ ParserErrorCode.TYPE_ARGUMENTS_ON_TYPE_VARIABLE,
+ ParserErrorCode.TOP_LEVEL_OPERATOR,
+ ParserErrorCode.SWITCH_HAS_MULTIPLE_DEFAULT_CASES,
+ ParserErrorCode.SWITCH_HAS_CASE_AFTER_DEFAULT_CASE,
+ ParserErrorCode.STATIC_OPERATOR,
+ ParserErrorCode.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER,
+ ParserErrorCode.STACK_OVERFLOW,
+ ParserErrorCode.MISSING_CATCH_OR_FINALLY,
+ ParserErrorCode.REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR,
+ ParserErrorCode.REDIRECTING_CONSTRUCTOR_WITH_BODY,
+ ParserErrorCode.NATIVE_CLAUSE_SHOULD_BE_ANNOTATION,
+ ParserErrorCode.MULTIPLE_WITH_CLAUSES,
+ ParserErrorCode.MULTIPLE_PART_OF_DIRECTIVES,
+ ParserErrorCode.MULTIPLE_ON_CLAUSES,
+ ParserErrorCode.MULTIPLE_LIBRARY_DIRECTIVES,
+ ParserErrorCode.MULTIPLE_EXTENDS_CLAUSES,
+ ParserErrorCode.MISSING_STATEMENT,
+ ParserErrorCode.MISSING_PREFIX_IN_DEFERRED_IMPORT,
+ ParserErrorCode.MISSING_KEYWORD_OPERATOR,
+ ParserErrorCode.MISSING_EXPRESSION_IN_THROW,
+ ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE,
+ ParserErrorCode.MISSING_ASSIGNMENT_IN_INITIALIZER,
+ ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR,
+ ParserErrorCode.MISSING_INITIALIZER,
+ ParserErrorCode.LIBRARY_DIRECTIVE_NOT_FIRST,
+ ParserErrorCode.INVALID_UNICODE_ESCAPE,
+ ParserErrorCode.INVALID_OPERATOR,
+ ParserErrorCode.INVALID_HEX_ESCAPE,
+ ParserErrorCode.EXPECTED_INSTEAD,
+ ParserErrorCode.IMPLEMENTS_BEFORE_WITH,
+ ParserErrorCode.IMPLEMENTS_BEFORE_ON,
+ ParserErrorCode.IMPLEMENTS_BEFORE_EXTENDS,
+ ParserErrorCode.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE,
+ ParserErrorCode.EXPECTED_ELSE_OR_COMMA,
+ ParserErrorCode.INVALID_SUPER_IN_INITIALIZER,
+ ParserErrorCode.EXPERIMENT_NOT_ENABLED,
+ ParserErrorCode.EXTERNAL_METHOD_WITH_BODY,
+ ParserErrorCode.EXTERNAL_FIELD,
+ ParserErrorCode.ABSTRACT_CLASS_MEMBER,
+ ParserErrorCode.BREAK_OUTSIDE_OF_LOOP,
+ ParserErrorCode.CLASS_IN_CLASS,
+ ParserErrorCode.COLON_IN_PLACE_OF_IN,
+ ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE,
+ ParserErrorCode.MODIFIER_OUT_OF_ORDER,
+ ParserErrorCode.TYPE_BEFORE_FACTORY,
+ ParserErrorCode.CONST_AND_FINAL,
+ ParserErrorCode.CONFLICTING_MODIFIERS,
+ ParserErrorCode.CONST_CLASS,
+ ParserErrorCode.VAR_AS_TYPE_NAME,
+ ParserErrorCode.CONST_FACTORY,
+ ParserErrorCode.CONST_METHOD,
+ ParserErrorCode.CONTINUE_WITHOUT_LABEL_IN_CASE,
+ ParserErrorCode.INVALID_THIS_IN_INITIALIZER,
+ ParserErrorCode.COVARIANT_AND_STATIC,
+ ParserErrorCode.COVARIANT_MEMBER,
+ ParserErrorCode.DEFERRED_AFTER_PREFIX,
+ ParserErrorCode.DIRECTIVE_AFTER_DECLARATION,
+ ParserErrorCode.DUPLICATED_MODIFIER,
+ ParserErrorCode.DUPLICATE_DEFERRED,
+ ParserErrorCode.DUPLICATE_LABEL_IN_SWITCH_STATEMENT,
+ ParserErrorCode.DUPLICATE_PREFIX,
+ ParserErrorCode.ENUM_IN_CLASS,
+ ParserErrorCode.EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE,
+ ParserErrorCode.EXTERNAL_TYPEDEF,
+ ParserErrorCode.EXTRANEOUS_MODIFIER,
+ ParserErrorCode.FACTORY_TOP_LEVEL_DECLARATION,
+ ParserErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR,
+ ParserErrorCode.FINAL_AND_COVARIANT,
+ ParserErrorCode.FINAL_AND_VAR,
+ ParserErrorCode.INITIALIZED_VARIABLE_IN_FOR_EACH,
+ ParserErrorCode.CATCH_SYNTAX_EXTRA_PARAMETERS,
+ ParserErrorCode.CATCH_SYNTAX,
+ ParserErrorCode.EXTERNAL_FACTORY_REDIRECTION,
+ ParserErrorCode.EXTERNAL_FACTORY_WITH_BODY,
+ ParserErrorCode.EXTERNAL_CONSTRUCTOR_WITH_BODY,
+ ParserErrorCode.FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS,
+ ParserErrorCode.VAR_AND_TYPE,
+ ParserErrorCode.INVALID_INITIALIZER,
+ ParserErrorCode.ANNOTATION_WITH_TYPE_ARGUMENTS,
+ ParserErrorCode.EXTENSION_DECLARES_CONSTRUCTOR,
+ ParserErrorCode.EXTENSION_DECLARES_INSTANCE_FIELD,
+ ParserErrorCode.EXTENSION_DECLARES_ABSTRACT_MEMBER,
+ ParserErrorCode.MIXIN_DECLARES_CONSTRUCTOR,
+ ParserErrorCode.NULL_AWARE_CASCADE_OUT_OF_ORDER,
+ ParserErrorCode.MULTIPLE_VARIANCE_MODIFIERS,
+ ParserErrorCode.INVALID_USE_OF_COVARIANT_IN_EXTENSION,
+ ParserErrorCode.TYPE_PARAMETER_ON_CONSTRUCTOR,
+ ParserErrorCode.VOID_WITH_TYPE_ARGUMENTS,
+ ParserErrorCode.FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER,
+ ParserErrorCode.INVALID_CONSTRUCTOR_NAME,
+ ParserErrorCode.GETTER_CONSTRUCTOR,
+ ParserErrorCode.SETTER_CONSTRUCTOR,
+ ParserErrorCode.MEMBER_WITH_CLASS_NAME,
+ ParserErrorCode.EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER,
+ ParserErrorCode.ABSTRACT_STATIC_FIELD,
+ ParserErrorCode.ABSTRACT_LATE_FIELD,
+ ParserErrorCode.EXTERNAL_LATE_FIELD,
+ ParserErrorCode.ABSTRACT_EXTERNAL_FIELD,
+ ParserErrorCode.ANNOTATION_ON_TYPE_ARGUMENT,
+ ParserErrorCode.BINARY_OPERATOR_WRITTEN_OUT,
+ ParserErrorCode.EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD,
+ ParserErrorCode.ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED,
+ ParserErrorCode.LITERAL_WITH_CLASS_AND_NEW,
+ ParserErrorCode.LITERAL_WITH_CLASS,
+ ParserErrorCode.LITERAL_WITH_NEW,
+ ParserErrorCode.CONSTRUCTOR_WITH_TYPE_ARGUMENTS,
+];
+
class ParserErrorCode extends ErrorCode {
- static const ParserErrorCode ABSTRACT_CLASS_MEMBER = _ABSTRACT_CLASS_MEMBER;
+ static const ParserErrorCode ABSTRACT_CLASS_MEMBER = ParserErrorCode(
+ 'ABSTRACT_CLASS_MEMBER',
+ "Members of classes can't be declared to be 'abstract'.",
+ correction:
+ "Try removing the 'abstract' keyword. You can add the 'abstract' keyword before the class declaration.",
+ );
static const ParserErrorCode ABSTRACT_ENUM = ParserErrorCode(
'ABSTRACT_ENUM',
@@ -24,12 +149,23 @@
correction: "Try removing the keyword 'abstract'.",
);
- static const ParserErrorCode ABSTRACT_EXTERNAL_FIELD =
- _ABSTRACT_EXTERNAL_FIELD;
+ static const ParserErrorCode ABSTRACT_EXTERNAL_FIELD = ParserErrorCode(
+ 'ABSTRACT_EXTERNAL_FIELD',
+ "Fields can't be declared both 'abstract' and 'external'.",
+ correction: "Try removing the 'abstract' or 'external' keyword.",
+ );
- static const ParserErrorCode ABSTRACT_LATE_FIELD = _ABSTRACT_LATE_FIELD;
+ static const ParserErrorCode ABSTRACT_LATE_FIELD = ParserErrorCode(
+ 'ABSTRACT_LATE_FIELD',
+ "Abstract fields cannot be late.",
+ correction: "Try removing the 'abstract' or 'late' keyword.",
+ );
- static const ParserErrorCode ABSTRACT_STATIC_FIELD = _ABSTRACT_STATIC_FIELD;
+ static const ParserErrorCode ABSTRACT_STATIC_FIELD = ParserErrorCode(
+ 'ABSTRACT_STATIC_FIELD',
+ "Static fields can't be declared 'abstract'.",
+ correction: "Try removing the 'abstract' or 'static' keyword.",
+ );
static const ParserErrorCode ABSTRACT_STATIC_METHOD = ParserErrorCode(
'ABSTRACT_STATIC_METHOD',
@@ -55,14 +191,21 @@
correction: "Try removing the keyword 'abstract'.",
);
- static const ParserErrorCode ANNOTATION_ON_TYPE_ARGUMENT =
- _ANNOTATION_ON_TYPE_ARGUMENT;
+ static const ParserErrorCode ANNOTATION_ON_TYPE_ARGUMENT = ParserErrorCode(
+ 'ANNOTATION_ON_TYPE_ARGUMENT',
+ "Type arguments can't have annotations because they aren't declarations.",
+ );
- static const ParserErrorCode ANNOTATION_WITH_TYPE_ARGUMENTS =
- _ANNOTATION_WITH_TYPE_ARGUMENTS;
+ static const ParserErrorCode ANNOTATION_WITH_TYPE_ARGUMENTS = ParserErrorCode(
+ 'ANNOTATION_WITH_TYPE_ARGUMENTS',
+ "An annotation can't use type arguments.",
+ );
static const ParserErrorCode ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED =
- _ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED;
+ ParserErrorCode(
+ 'ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED',
+ "An annotation with type arguments must be followed by an argument list.",
+ );
/**
* 16.32 Identifier Reference: It is a compile-time error if any of the
@@ -75,31 +218,76 @@
"The keywords 'await' and 'yield' can't be used as identifiers in an asynchronous or generator function.",
);
- static const ParserErrorCode BINARY_OPERATOR_WRITTEN_OUT =
- _BINARY_OPERATOR_WRITTEN_OUT;
+ static const ParserErrorCode BINARY_OPERATOR_WRITTEN_OUT = ParserErrorCode(
+ 'BINARY_OPERATOR_WRITTEN_OUT',
+ "Binary operator '{0}' is written as '{1}' instead of the written out word.",
+ correction: "Try replacing '{0}' with '{1}'.",
+ );
- static const ParserErrorCode BREAK_OUTSIDE_OF_LOOP = _BREAK_OUTSIDE_OF_LOOP;
+ static const ParserErrorCode BREAK_OUTSIDE_OF_LOOP = ParserErrorCode(
+ 'BREAK_OUTSIDE_OF_LOOP',
+ "A break statement can't be used outside of a loop or switch statement.",
+ correction: "Try removing the break statement.",
+ );
- static const ParserErrorCode CATCH_SYNTAX = _CATCH_SYNTAX;
+ static const ParserErrorCode CATCH_SYNTAX = ParserErrorCode(
+ 'CATCH_SYNTAX',
+ "'catch' must be followed by '(identifier)' or '(identifier, identifier)'.",
+ correction:
+ "No types are needed, the first is given by 'on', the second is always 'StackTrace'.",
+ );
- static const ParserErrorCode CATCH_SYNTAX_EXTRA_PARAMETERS =
- _CATCH_SYNTAX_EXTRA_PARAMETERS;
+ static const ParserErrorCode CATCH_SYNTAX_EXTRA_PARAMETERS = ParserErrorCode(
+ 'CATCH_SYNTAX_EXTRA_PARAMETERS',
+ "'catch' must be followed by '(identifier)' or '(identifier, identifier)'.",
+ correction:
+ "No types are needed, the first is given by 'on', the second is always 'StackTrace'.",
+ );
- static const ParserErrorCode CLASS_IN_CLASS = _CLASS_IN_CLASS;
+ static const ParserErrorCode CLASS_IN_CLASS = ParserErrorCode(
+ 'CLASS_IN_CLASS',
+ "Classes can't be declared inside other classes.",
+ correction: "Try moving the class to the top-level.",
+ );
- static const ParserErrorCode COLON_IN_PLACE_OF_IN = _COLON_IN_PLACE_OF_IN;
+ static const ParserErrorCode COLON_IN_PLACE_OF_IN = ParserErrorCode(
+ 'COLON_IN_PLACE_OF_IN',
+ "For-in loops use 'in' rather than a colon.",
+ correction: "Try replacing the colon with the keyword 'in'.",
+ );
- static const ParserErrorCode CONFLICTING_MODIFIERS = _CONFLICTING_MODIFIERS;
+ static const ParserErrorCode CONFLICTING_MODIFIERS = ParserErrorCode(
+ 'CONFLICTING_MODIFIERS',
+ "Members can't be declared to be both '{0}' and '{1}'.",
+ correction: "Try removing one of the keywords.",
+ );
- static const ParserErrorCode CONSTRUCTOR_WITH_RETURN_TYPE =
- _CONSTRUCTOR_WITH_RETURN_TYPE;
+ static const ParserErrorCode CONSTRUCTOR_WITH_RETURN_TYPE = ParserErrorCode(
+ 'CONSTRUCTOR_WITH_RETURN_TYPE',
+ "Constructors can't have a return type.",
+ correction: "Try removing the return type.",
+ );
static const ParserErrorCode CONSTRUCTOR_WITH_TYPE_ARGUMENTS =
- _CONSTRUCTOR_WITH_TYPE_ARGUMENTS;
+ ParserErrorCode(
+ 'CONSTRUCTOR_WITH_TYPE_ARGUMENTS',
+ "A constructor invocation can't have type arguments after the constructor name.",
+ correction:
+ "Try removing the type arguments or placing them after the class name.",
+ );
- static const ParserErrorCode CONST_AND_FINAL = _CONST_AND_FINAL;
+ static const ParserErrorCode CONST_AND_FINAL = ParserErrorCode(
+ 'CONST_AND_FINAL',
+ "Members can't be declared to be both 'const' and 'final'.",
+ correction: "Try removing either the 'const' or 'final' keyword.",
+ );
- static const ParserErrorCode CONST_CLASS = _CONST_CLASS;
+ static const ParserErrorCode CONST_CLASS = ParserErrorCode(
+ 'CONST_CLASS',
+ "Classes can't be declared to be 'const'.",
+ correction:
+ "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).",
+ );
static const ParserErrorCode CONST_CONSTRUCTOR_WITH_BODY = ParserErrorCode(
'CONST_CONSTRUCTOR_WITH_BODY',
@@ -113,9 +301,18 @@
correction: "Try removing the 'const' keyword.",
);
- static const ParserErrorCode CONST_FACTORY = _CONST_FACTORY;
+ static const ParserErrorCode CONST_FACTORY = ParserErrorCode(
+ 'CONST_FACTORY',
+ "Only redirecting factory constructors can be declared to be 'const'.",
+ correction:
+ "Try removing the 'const' keyword, or replacing the body with '=' followed by a valid target.",
+ );
- static const ParserErrorCode CONST_METHOD = _CONST_METHOD;
+ static const ParserErrorCode CONST_METHOD = ParserErrorCode(
+ 'CONST_METHOD',
+ "Getters, setters and methods can't be declared to be 'const'.",
+ correction: "Try removing the 'const' keyword.",
+ );
static const ParserErrorCode CONST_TYPEDEF = ParserErrorCode(
'CONST_TYPEDEF',
@@ -123,13 +320,24 @@
correction: "Try removing the 'const' keyword.",
);
- static const ParserErrorCode CONTINUE_OUTSIDE_OF_LOOP =
- _CONTINUE_OUTSIDE_OF_LOOP;
+ static const ParserErrorCode CONTINUE_OUTSIDE_OF_LOOP = ParserErrorCode(
+ 'CONTINUE_OUTSIDE_OF_LOOP',
+ "A continue statement can't be used outside of a loop or switch statement.",
+ correction: "Try removing the continue statement.",
+ );
- static const ParserErrorCode CONTINUE_WITHOUT_LABEL_IN_CASE =
- _CONTINUE_WITHOUT_LABEL_IN_CASE;
+ static const ParserErrorCode CONTINUE_WITHOUT_LABEL_IN_CASE = ParserErrorCode(
+ 'CONTINUE_WITHOUT_LABEL_IN_CASE',
+ "A continue statement in a switch statement must have a label as a target.",
+ correction:
+ "Try adding a label associated with one of the case clauses to the continue statement.",
+ );
- static const ParserErrorCode COVARIANT_AND_STATIC = _COVARIANT_AND_STATIC;
+ static const ParserErrorCode COVARIANT_AND_STATIC = ParserErrorCode(
+ 'COVARIANT_AND_STATIC',
+ "Members can't be declared to be both 'covariant' and 'static'.",
+ correction: "Try removing either the 'covariant' or 'static' keyword.",
+ );
static const ParserErrorCode COVARIANT_CONSTRUCTOR = ParserErrorCode(
'COVARIANT_CONSTRUCTOR',
@@ -137,7 +345,11 @@
correction: "Try removing the keyword 'covariant'.",
);
- static const ParserErrorCode COVARIANT_MEMBER = _COVARIANT_MEMBER;
+ static const ParserErrorCode COVARIANT_MEMBER = ParserErrorCode(
+ 'COVARIANT_MEMBER',
+ "Getters, setters and methods can't be declared to be 'covariant'.",
+ correction: "Try removing the 'covariant' keyword.",
+ );
static const ParserErrorCode COVARIANT_TOP_LEVEL_DECLARATION =
ParserErrorCode(
@@ -181,27 +393,50 @@
hasPublishedDocs: true,
);
- static const ParserErrorCode DEFERRED_AFTER_PREFIX = _DEFERRED_AFTER_PREFIX;
+ static const ParserErrorCode DEFERRED_AFTER_PREFIX = ParserErrorCode(
+ 'DEFERRED_AFTER_PREFIX',
+ "The deferred keyword should come immediately before the prefix ('as' clause).",
+ correction: "Try moving the deferred keyword before the prefix.",
+ );
- static const ParserErrorCode DIRECTIVE_AFTER_DECLARATION =
- _DIRECTIVE_AFTER_DECLARATION;
+ static const ParserErrorCode DIRECTIVE_AFTER_DECLARATION = ParserErrorCode(
+ 'DIRECTIVE_AFTER_DECLARATION',
+ "Directives must appear before any declarations.",
+ correction: "Try moving the directive before any declarations.",
+ );
/**
* Parameters:
* 0: the modifier that was duplicated
*/
- static const ParserErrorCode DUPLICATED_MODIFIER = _DUPLICATED_MODIFIER;
+ static const ParserErrorCode DUPLICATED_MODIFIER = ParserErrorCode(
+ 'DUPLICATED_MODIFIER',
+ "The modifier '{0}' was already specified.",
+ correction: "Try removing all but one occurrence of the modifier.",
+ );
- static const ParserErrorCode DUPLICATE_DEFERRED = _DUPLICATE_DEFERRED;
+ static const ParserErrorCode DUPLICATE_DEFERRED = ParserErrorCode(
+ 'DUPLICATE_DEFERRED',
+ "An import directive can only have one 'deferred' keyword.",
+ correction: "Try removing all but one 'deferred' keyword.",
+ );
/**
* Parameters:
* 0: the label that was duplicated
*/
static const ParserErrorCode DUPLICATE_LABEL_IN_SWITCH_STATEMENT =
- _DUPLICATE_LABEL_IN_SWITCH_STATEMENT;
+ ParserErrorCode(
+ 'DUPLICATE_LABEL_IN_SWITCH_STATEMENT',
+ "The label '{0}' was already used in this switch statement.",
+ correction: "Try choosing a different name for this label.",
+ );
- static const ParserErrorCode DUPLICATE_PREFIX = _DUPLICATE_PREFIX;
+ static const ParserErrorCode DUPLICATE_PREFIX = ParserErrorCode(
+ 'DUPLICATE_PREFIX',
+ "An import directive can only have one prefix ('as' clause).",
+ correction: "Try removing all but one prefix.",
+ );
static const ParserErrorCode EMPTY_ENUM_BODY = ParserErrorCode(
'EMPTY_ENUM_BODY',
@@ -209,12 +444,24 @@
correction: "Try declaring a constant.",
);
- static const ParserErrorCode ENUM_IN_CLASS = _ENUM_IN_CLASS;
+ static const ParserErrorCode ENUM_IN_CLASS = ParserErrorCode(
+ 'ENUM_IN_CLASS',
+ "Enums can't be declared inside classes.",
+ correction: "Try moving the enum to the top-level.",
+ );
static const ParserErrorCode EQUALITY_CANNOT_BE_EQUALITY_OPERAND =
- _EQUALITY_CANNOT_BE_EQUALITY_OPERAND;
+ ParserErrorCode(
+ 'EQUALITY_CANNOT_BE_EQUALITY_OPERAND',
+ "A comparison expression can't be an operand of another comparison expression.",
+ correction: "Try putting parentheses around one of the comparisons.",
+ );
- static const ParserErrorCode EXPECTED_BODY = _EXPECTED_BODY;
+ static const ParserErrorCode EXPECTED_BODY = ParserErrorCode(
+ 'EXPECTED_BODY',
+ "A {0} must have a body, even if it is empty.",
+ correction: "Try adding an empty body.",
+ );
static const ParserErrorCode EXPECTED_CASE_OR_DEFAULT = ParserErrorCode(
'EXPECTED_CASE_OR_DEFAULT',
@@ -228,7 +475,10 @@
correction: "Try placing this code inside a class member.",
);
- static const ParserErrorCode EXPECTED_ELSE_OR_COMMA = _EXPECTED_ELSE_OR_COMMA;
+ static const ParserErrorCode EXPECTED_ELSE_OR_COMMA = ParserErrorCode(
+ 'EXPECTED_ELSE_OR_COMMA',
+ "Expected 'else' or comma.",
+ );
static const ParserErrorCode EXPECTED_EXECUTABLE = ParserErrorCode(
'EXPECTED_EXECUTABLE',
@@ -238,9 +488,16 @@
);
static const ParserErrorCode EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD =
- _EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD;
+ ParserErrorCode(
+ 'EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD',
+ "'{0}' can't be used as an identifier because it's a keyword.",
+ correction: "Try renaming this to be an identifier that isn't a keyword.",
+ );
- static const ParserErrorCode EXPECTED_INSTEAD = _EXPECTED_INSTEAD;
+ static const ParserErrorCode EXPECTED_INSTEAD = ParserErrorCode(
+ 'EXPECTED_INSTEAD',
+ "Expected '{0}' instead of this.",
+ );
static const ParserErrorCode EXPECTED_LIST_OR_MAP_LITERAL = ParserErrorCode(
'EXPECTED_LIST_OR_MAP_LITERAL',
@@ -268,10 +525,19 @@
"Expected a type name.",
);
- static const ParserErrorCode EXPERIMENT_NOT_ENABLED = _EXPERIMENT_NOT_ENABLED;
+ static const ParserErrorCode EXPERIMENT_NOT_ENABLED = ParserErrorCode(
+ 'EXPERIMENT_NOT_ENABLED',
+ "This requires the '{0}' language feature to be enabled.",
+ correction:
+ "Try updating your pubspec.yaml to set the minimum SDK constraint to {1} or higher, and running 'pub get'.",
+ );
static const ParserErrorCode EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE =
- _EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE;
+ ParserErrorCode(
+ 'EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE',
+ "Export directives must precede part directives.",
+ correction: "Try moving the export directives before the part directives.",
+ );
/**
* No parameters.
@@ -296,7 +562,12 @@
//
// Either provide an implementation for the member or remove it.
static const ParserErrorCode EXTENSION_DECLARES_ABSTRACT_MEMBER =
- _EXTENSION_DECLARES_ABSTRACT_MEMBER;
+ ParserErrorCode(
+ 'EXTENSION_DECLARES_ABSTRACT_MEMBER',
+ "Extensions can't declare abstract members.",
+ correction: "Try providing an implementation for the member.",
+ hasPublishedDocs: true,
+ );
/**
* No parameters.
@@ -322,8 +593,12 @@
// #### Common fixes
//
// Remove the constructor or replace it with a static method.
- static const ParserErrorCode EXTENSION_DECLARES_CONSTRUCTOR =
- _EXTENSION_DECLARES_CONSTRUCTOR;
+ static const ParserErrorCode EXTENSION_DECLARES_CONSTRUCTOR = ParserErrorCode(
+ 'EXTENSION_DECLARES_CONSTRUCTOR',
+ "Extensions can't declare constructors.",
+ correction: "Try removing the constructor declaration.",
+ hasPublishedDocs: true,
+ );
/**
* No parameters.
@@ -351,25 +626,58 @@
// Remove the field, make it a static field, or convert it to be a getter,
// setter, or method.
static const ParserErrorCode EXTENSION_DECLARES_INSTANCE_FIELD =
- _EXTENSION_DECLARES_INSTANCE_FIELD;
+ ParserErrorCode(
+ 'EXTENSION_DECLARES_INSTANCE_FIELD',
+ "Extensions can't declare instance fields",
+ correction:
+ "Try removing the field declaration or making it a static field",
+ hasPublishedDocs: true,
+ );
- static const ParserErrorCode EXTERNAL_CLASS = _EXTERNAL_CLASS;
+ static const ParserErrorCode EXTERNAL_CLASS = ParserErrorCode(
+ 'EXTERNAL_CLASS',
+ "Classes can't be declared to be 'external'.",
+ correction: "Try removing the keyword 'external'.",
+ );
- static const ParserErrorCode EXTERNAL_CONSTRUCTOR_WITH_BODY =
- _EXTERNAL_CONSTRUCTOR_WITH_BODY;
+ static const ParserErrorCode EXTERNAL_CONSTRUCTOR_WITH_BODY = ParserErrorCode(
+ 'EXTERNAL_CONSTRUCTOR_WITH_BODY',
+ "External constructors can't have a body.",
+ correction:
+ "Try removing the body of the constructor, or removing the keyword 'external'.",
+ );
static const ParserErrorCode EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER =
- _EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER;
+ ParserErrorCode(
+ 'EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER',
+ "An external constructor can't have any initializers.",
+ );
- static const ParserErrorCode EXTERNAL_ENUM = _EXTERNAL_ENUM;
+ static const ParserErrorCode EXTERNAL_ENUM = ParserErrorCode(
+ 'EXTERNAL_ENUM',
+ "Enums can't be declared to be 'external'.",
+ correction: "Try removing the keyword 'external'.",
+ );
- static const ParserErrorCode EXTERNAL_FACTORY_REDIRECTION =
- _EXTERNAL_FACTORY_REDIRECTION;
+ static const ParserErrorCode EXTERNAL_FACTORY_REDIRECTION = ParserErrorCode(
+ 'EXTERNAL_FACTORY_REDIRECTION',
+ "A redirecting factory can't be external.",
+ correction: "Try removing the 'external' modifier.",
+ );
- static const ParserErrorCode EXTERNAL_FACTORY_WITH_BODY =
- _EXTERNAL_FACTORY_WITH_BODY;
+ static const ParserErrorCode EXTERNAL_FACTORY_WITH_BODY = ParserErrorCode(
+ 'EXTERNAL_FACTORY_WITH_BODY',
+ "External factories can't have a body.",
+ correction:
+ "Try removing the body of the factory, or removing the keyword 'external'.",
+ );
- static const ParserErrorCode EXTERNAL_FIELD = _EXTERNAL_FIELD;
+ static const ParserErrorCode EXTERNAL_FIELD = ParserErrorCode(
+ 'EXTERNAL_FIELD',
+ "Fields can't be declared to be 'external'.",
+ correction:
+ "Try removing the keyword 'external', or replacing the field by an external getter and/or setter.",
+ );
static const ParserErrorCode EXTERNAL_GETTER_WITH_BODY = ParserErrorCode(
'EXTERNAL_GETTER_WITH_BODY',
@@ -378,10 +686,16 @@
"Try removing the body of the getter, or removing the keyword 'external'.",
);
- static const ParserErrorCode EXTERNAL_LATE_FIELD = _EXTERNAL_LATE_FIELD;
+ static const ParserErrorCode EXTERNAL_LATE_FIELD = ParserErrorCode(
+ 'EXTERNAL_LATE_FIELD',
+ "External fields cannot be late.",
+ correction: "Try removing the 'external' or 'late' keyword.",
+ );
- static const ParserErrorCode EXTERNAL_METHOD_WITH_BODY =
- _EXTERNAL_METHOD_WITH_BODY;
+ static const ParserErrorCode EXTERNAL_METHOD_WITH_BODY = ParserErrorCode(
+ 'EXTERNAL_METHOD_WITH_BODY',
+ "An external or native method can't have a body.",
+ );
static const ParserErrorCode EXTERNAL_OPERATOR_WITH_BODY = ParserErrorCode(
'EXTERNAL_OPERATOR_WITH_BODY',
@@ -397,12 +711,23 @@
"Try removing the body of the setter, or removing the keyword 'external'.",
);
- static const ParserErrorCode EXTERNAL_TYPEDEF = _EXTERNAL_TYPEDEF;
+ static const ParserErrorCode EXTERNAL_TYPEDEF = ParserErrorCode(
+ 'EXTERNAL_TYPEDEF',
+ "Typedefs can't be declared to be 'external'.",
+ correction: "Try removing the keyword 'external'.",
+ );
- static const ParserErrorCode EXTRANEOUS_MODIFIER = _EXTRANEOUS_MODIFIER;
+ static const ParserErrorCode EXTRANEOUS_MODIFIER = ParserErrorCode(
+ 'EXTRANEOUS_MODIFIER',
+ "Can't have modifier '{0}' here.",
+ correction: "Try removing '{0}'.",
+ );
- static const ParserErrorCode FACTORY_TOP_LEVEL_DECLARATION =
- _FACTORY_TOP_LEVEL_DECLARATION;
+ static const ParserErrorCode FACTORY_TOP_LEVEL_DECLARATION = ParserErrorCode(
+ 'FACTORY_TOP_LEVEL_DECLARATION',
+ "Top-level declarations can't be declared to be 'factory'.",
+ correction: "Try removing the keyword 'factory'.",
+ );
static const ParserErrorCode FACTORY_WITHOUT_BODY = ParserErrorCode(
'FACTORY_WITHOUT_BODY',
@@ -418,17 +743,39 @@
);
static const ParserErrorCode FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS =
- _FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS;
+ ParserErrorCode(
+ 'FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS',
+ "A field can only be initialized in its declaring class",
+ correction:
+ "Try passing a value into the superclass constructor, or moving the initialization into the constructor body.",
+ );
static const ParserErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR =
- _FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR;
+ ParserErrorCode(
+ 'FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR',
+ "Field formal parameters can only be used in a constructor.",
+ correction: "Try removing 'this.'.",
+ );
- static const ParserErrorCode FINAL_AND_COVARIANT = _FINAL_AND_COVARIANT;
+ static const ParserErrorCode FINAL_AND_COVARIANT = ParserErrorCode(
+ 'FINAL_AND_COVARIANT',
+ "Members can't be declared to be both 'final' and 'covariant'.",
+ correction: "Try removing either the 'final' or 'covariant' keyword.",
+ );
static const ParserErrorCode FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER =
- _FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER;
+ ParserErrorCode(
+ 'FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER',
+ "Members marked 'late' with an initializer can't be declared to be both 'final' and 'covariant'.",
+ correction:
+ "Try removing either the 'final' or 'covariant' keyword, or removing the initializer.",
+ );
- static const ParserErrorCode FINAL_AND_VAR = _FINAL_AND_VAR;
+ static const ParserErrorCode FINAL_AND_VAR = ParserErrorCode(
+ 'FINAL_AND_VAR',
+ "Members can't be declared to be both 'final' and 'var'.",
+ correction: "Try removing the keyword 'var'.",
+ );
static const ParserErrorCode FINAL_CLASS = ParserErrorCode(
'FINAL_CLASS',
@@ -466,7 +813,11 @@
correction: "Try replacing the keyword with a return type.",
);
- static const ParserErrorCode GETTER_CONSTRUCTOR = _GETTER_CONSTRUCTOR;
+ static const ParserErrorCode GETTER_CONSTRUCTOR = ParserErrorCode(
+ 'GETTER_CONSTRUCTOR',
+ "Constructors can't be a getter.",
+ correction: "Try removing 'get'.",
+ );
static const ParserErrorCode GETTER_IN_FUNCTION = ParserErrorCode(
'GETTER_IN_FUNCTION',
@@ -483,22 +834,49 @@
);
static const ParserErrorCode ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE =
- _ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE;
+ ParserErrorCode(
+ 'ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE',
+ "Illegal assignment to non-assignable expression.",
+ );
- static const ParserErrorCode IMPLEMENTS_BEFORE_EXTENDS =
- _IMPLEMENTS_BEFORE_EXTENDS;
+ static const ParserErrorCode IMPLEMENTS_BEFORE_EXTENDS = ParserErrorCode(
+ 'IMPLEMENTS_BEFORE_EXTENDS',
+ "The extends clause must be before the implements clause.",
+ correction: "Try moving the extends clause before the implements clause.",
+ );
- static const ParserErrorCode IMPLEMENTS_BEFORE_ON = _IMPLEMENTS_BEFORE_ON;
+ static const ParserErrorCode IMPLEMENTS_BEFORE_ON = ParserErrorCode(
+ 'IMPLEMENTS_BEFORE_ON',
+ "The on clause must be before the implements clause.",
+ correction: "Try moving the on clause before the implements clause.",
+ );
- static const ParserErrorCode IMPLEMENTS_BEFORE_WITH = _IMPLEMENTS_BEFORE_WITH;
+ static const ParserErrorCode IMPLEMENTS_BEFORE_WITH = ParserErrorCode(
+ 'IMPLEMENTS_BEFORE_WITH',
+ "The with clause must be before the implements clause.",
+ correction: "Try moving the with clause before the implements clause.",
+ );
static const ParserErrorCode IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE =
- _IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE;
+ ParserErrorCode(
+ 'IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE',
+ "Import directives must precede part directives.",
+ correction: "Try moving the import directives before the part directives.",
+ );
static const ParserErrorCode INITIALIZED_VARIABLE_IN_FOR_EACH =
- _INITIALIZED_VARIABLE_IN_FOR_EACH;
+ ParserErrorCode(
+ 'INITIALIZED_VARIABLE_IN_FOR_EACH',
+ "The loop variable in a for-each loop can't be initialized.",
+ correction:
+ "Try removing the initializer, or using a different kind of loop.",
+ );
- static const ParserErrorCode INVALID_AWAIT_IN_FOR = _INVALID_AWAIT_IN_FOR;
+ static const ParserErrorCode INVALID_AWAIT_IN_FOR = ParserErrorCode(
+ 'INVALID_AWAIT_IN_FOR',
+ "The keyword 'await' isn't allowed for a normal 'for' statement.",
+ correction: "Try removing the keyword, or use a for-each statement.",
+ );
/**
* Parameters:
@@ -514,8 +892,10 @@
"Comment references should contain a possibly prefixed identifier and can start with 'new', but shouldn't contain anything else.",
);
- static const ParserErrorCode INVALID_CONSTRUCTOR_NAME =
- _INVALID_CONSTRUCTOR_NAME;
+ static const ParserErrorCode INVALID_CONSTRUCTOR_NAME = ParserErrorCode(
+ 'INVALID_CONSTRUCTOR_NAME',
+ "The name of a constructor must match the name of the enclosing class.",
+ );
static const ParserErrorCode INVALID_GENERIC_FUNCTION_TYPE = ParserErrorCode(
'INVALID_GENERIC_FUNCTION_TYPE',
@@ -524,9 +904,16 @@
"Try using a generic function type (returnType 'Function(' parameters ')').",
);
- static const ParserErrorCode INVALID_HEX_ESCAPE = _INVALID_HEX_ESCAPE;
+ static const ParserErrorCode INVALID_HEX_ESCAPE = ParserErrorCode(
+ 'INVALID_HEX_ESCAPE',
+ "An escape sequence starting with '\\x' must be followed by 2 hexadecimal digits.",
+ );
- static const ParserErrorCode INVALID_INITIALIZER = _INVALID_INITIALIZER;
+ static const ParserErrorCode INVALID_INITIALIZER = ParserErrorCode(
+ 'INVALID_INITIALIZER',
+ "Not a valid initializer.",
+ correction: "To initialize a field, use the syntax 'name = value'.",
+ );
static const ParserErrorCode INVALID_LITERAL_IN_CONFIGURATION =
ParserErrorCode(
@@ -539,7 +926,10 @@
* Parameters:
* 0: the operator that is invalid
*/
- static const ParserErrorCode INVALID_OPERATOR = _INVALID_OPERATOR;
+ static const ParserErrorCode INVALID_OPERATOR = ParserErrorCode(
+ 'INVALID_OPERATOR',
+ "The string '{0}' isn't a user-definable operator.",
+ );
/**
* Parameters:
@@ -554,7 +944,11 @@
);
static const ParserErrorCode INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER =
- _INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER;
+ ParserErrorCode(
+ 'INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER',
+ "The operator '?.' cannot be used with 'super' because 'super' cannot be null.",
+ correction: "Try replacing '?.' with '.'",
+ );
static const ParserErrorCode INVALID_STAR_AFTER_ASYNC = ParserErrorCode(
'INVALID_STAR_AFTER_ASYNC',
@@ -562,8 +956,10 @@
correction: "Try converting the body to a block.",
);
- static const ParserErrorCode INVALID_SUPER_IN_INITIALIZER =
- _INVALID_SUPER_IN_INITIALIZER;
+ static const ParserErrorCode INVALID_SUPER_IN_INITIALIZER = ParserErrorCode(
+ 'INVALID_SUPER_IN_INITIALIZER',
+ "Can only use 'super' in an initializer for calling the superclass constructor (e.g. 'super()' or 'super.namedConstructor()')",
+ );
static const ParserErrorCode INVALID_SYNC = ParserErrorCode(
'INVALID_SYNC',
@@ -571,10 +967,15 @@
correction: "Try converting the body to a block.",
);
- static const ParserErrorCode INVALID_THIS_IN_INITIALIZER =
- _INVALID_THIS_IN_INITIALIZER;
+ static const ParserErrorCode INVALID_THIS_IN_INITIALIZER = ParserErrorCode(
+ 'INVALID_THIS_IN_INITIALIZER',
+ "Can only use 'this' in an initializer for field initialization (e.g. 'this.x = something') and constructor redirection (e.g. 'this()' or 'this.namedConstructor())",
+ );
- static const ParserErrorCode INVALID_UNICODE_ESCAPE = _INVALID_UNICODE_ESCAPE;
+ static const ParserErrorCode INVALID_UNICODE_ESCAPE = ParserErrorCode(
+ 'INVALID_UNICODE_ESCAPE',
+ "An escape sequence starting with '\\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'.",
+ );
/**
* No parameters.
@@ -607,17 +1008,36 @@
// }
// ```
static const ParserErrorCode INVALID_USE_OF_COVARIANT_IN_EXTENSION =
- _INVALID_USE_OF_COVARIANT_IN_EXTENSION;
+ ParserErrorCode(
+ 'INVALID_USE_OF_COVARIANT_IN_EXTENSION',
+ "Can't have modifier '{0}' in an extension.",
+ correction: "Try removing '{0}'.",
+ hasPublishedDocs: true,
+ );
- static const ParserErrorCode LIBRARY_DIRECTIVE_NOT_FIRST =
- _LIBRARY_DIRECTIVE_NOT_FIRST;
+ static const ParserErrorCode LIBRARY_DIRECTIVE_NOT_FIRST = ParserErrorCode(
+ 'LIBRARY_DIRECTIVE_NOT_FIRST',
+ "The library directive must appear before all other directives.",
+ correction: "Try moving the library directive before any other directives.",
+ );
- static const ParserErrorCode LITERAL_WITH_CLASS = _LITERAL_WITH_CLASS;
+ static const ParserErrorCode LITERAL_WITH_CLASS = ParserErrorCode(
+ 'LITERAL_WITH_CLASS',
+ "A {0} literal can't be prefixed by '{1}'.",
+ correction: "Try removing '{1}'",
+ );
- static const ParserErrorCode LITERAL_WITH_CLASS_AND_NEW =
- _LITERAL_WITH_CLASS_AND_NEW;
+ static const ParserErrorCode LITERAL_WITH_CLASS_AND_NEW = ParserErrorCode(
+ 'LITERAL_WITH_CLASS_AND_NEW',
+ "A {0} literal can't be prefixed by 'new {1}'.",
+ correction: "Try removing 'new' and '{1}'",
+ );
- static const ParserErrorCode LITERAL_WITH_NEW = _LITERAL_WITH_NEW;
+ static const ParserErrorCode LITERAL_WITH_NEW = ParserErrorCode(
+ 'LITERAL_WITH_NEW',
+ "A literal can't be prefixed by 'new'.",
+ correction: "Try removing 'new'",
+ );
static const ParserErrorCode LOCAL_FUNCTION_DECLARATION_MODIFIER =
ParserErrorCode(
@@ -626,16 +1046,31 @@
correction: "Try removing the modifier.",
);
- static const ParserErrorCode MEMBER_WITH_CLASS_NAME = _MEMBER_WITH_CLASS_NAME;
+ static const ParserErrorCode MEMBER_WITH_CLASS_NAME = ParserErrorCode(
+ 'MEMBER_WITH_CLASS_NAME',
+ "A class member can't have the same name as the enclosing class.",
+ correction: "Try renaming the member.",
+ );
- static const ParserErrorCode MISSING_ASSIGNABLE_SELECTOR =
- _MISSING_ASSIGNABLE_SELECTOR;
+ static const ParserErrorCode MISSING_ASSIGNABLE_SELECTOR = ParserErrorCode(
+ 'MISSING_ASSIGNABLE_SELECTOR',
+ "Missing selector such as '.identifier' or '[0]'.",
+ correction: "Try adding a selector.",
+ );
static const ParserErrorCode MISSING_ASSIGNMENT_IN_INITIALIZER =
- _MISSING_ASSIGNMENT_IN_INITIALIZER;
+ ParserErrorCode(
+ 'MISSING_ASSIGNMENT_IN_INITIALIZER',
+ "Expected an assignment after the field name.",
+ correction: "To initialize a field, use the syntax 'name = value'.",
+ );
- static const ParserErrorCode MISSING_CATCH_OR_FINALLY =
- _MISSING_CATCH_OR_FINALLY;
+ static const ParserErrorCode MISSING_CATCH_OR_FINALLY = ParserErrorCode(
+ 'MISSING_CATCH_OR_FINALLY',
+ "A try block must be followed by an 'on', 'catch', or 'finally' clause.",
+ correction:
+ "Try adding either a catch or finally clause, or remove the try statement.",
+ );
static const ParserErrorCode MISSING_CLOSING_PARENTHESIS = ParserErrorCode(
'MISSING_CLOSING_PARENTHESIS',
@@ -644,7 +1079,12 @@
);
static const ParserErrorCode MISSING_CONST_FINAL_VAR_OR_TYPE =
- _MISSING_CONST_FINAL_VAR_OR_TYPE;
+ ParserErrorCode(
+ 'MISSING_CONST_FINAL_VAR_OR_TYPE',
+ "Variables must be declared using the keywords 'const', 'final', 'var' or a type name.",
+ correction:
+ "Try adding the name of the type of the variable or the keyword 'var'.",
+ );
static const ParserErrorCode MISSING_ENUM_BODY = ParserErrorCode(
'MISSING_ENUM_BODY',
@@ -660,8 +1100,12 @@
"Try adding the value to be assigned, or remove the assignment operator.",
);
- static const ParserErrorCode MISSING_EXPRESSION_IN_THROW =
- _MISSING_EXPRESSION_IN_THROW;
+ static const ParserErrorCode MISSING_EXPRESSION_IN_THROW = ParserErrorCode(
+ 'MISSING_EXPRESSION_IN_THROW',
+ "Missing expression after 'throw'.",
+ correction:
+ "Add an expression after 'throw' or use 'rethrow' to throw a caught exception",
+ );
static const ParserErrorCode MISSING_FUNCTION_BODY = ParserErrorCode(
'MISSING_FUNCTION_BODY',
@@ -692,10 +1136,16 @@
"Expected an identifier.",
);
- static const ParserErrorCode MISSING_INITIALIZER = _MISSING_INITIALIZER;
+ static const ParserErrorCode MISSING_INITIALIZER = ParserErrorCode(
+ 'MISSING_INITIALIZER',
+ "Expected an initializer.",
+ );
- static const ParserErrorCode MISSING_KEYWORD_OPERATOR =
- _MISSING_KEYWORD_OPERATOR;
+ static const ParserErrorCode MISSING_KEYWORD_OPERATOR = ParserErrorCode(
+ 'MISSING_KEYWORD_OPERATOR',
+ "Operator declarations must be preceded by the keyword 'operator'.",
+ correction: "Try adding the keyword 'operator'.",
+ );
static const ParserErrorCode MISSING_METHOD_PARAMETERS = ParserErrorCode(
'MISSING_METHOD_PARAMETERS',
@@ -727,7 +1177,11 @@
);
static const ParserErrorCode MISSING_PREFIX_IN_DEFERRED_IMPORT =
- _MISSING_PREFIX_IN_DEFERRED_IMPORT;
+ ParserErrorCode(
+ 'MISSING_PREFIX_IN_DEFERRED_IMPORT',
+ "Deferred imports should have a prefix.",
+ correction: "Try adding a prefix to the import by adding an 'as' clause.",
+ );
static const ParserErrorCode MISSING_STAR_AFTER_SYNC = ParserErrorCode(
'MISSING_STAR_AFTER_SYNC',
@@ -735,7 +1189,10 @@
correction: "Try removing the modifier, or add a star.",
);
- static const ParserErrorCode MISSING_STATEMENT = _MISSING_STATEMENT;
+ static const ParserErrorCode MISSING_STATEMENT = ParserErrorCode(
+ 'MISSING_STATEMENT',
+ "Expected a statement.",
+ );
/**
* Parameters:
@@ -766,13 +1223,23 @@
correction: "Try choosing a single style of optional parameters.",
);
- static const ParserErrorCode MIXIN_DECLARES_CONSTRUCTOR =
- _MIXIN_DECLARES_CONSTRUCTOR;
+ static const ParserErrorCode MIXIN_DECLARES_CONSTRUCTOR = ParserErrorCode(
+ 'MIXIN_DECLARES_CONSTRUCTOR',
+ "Mixins can't declare constructors.",
+ );
- static const ParserErrorCode MODIFIER_OUT_OF_ORDER = _MODIFIER_OUT_OF_ORDER;
+ static const ParserErrorCode MODIFIER_OUT_OF_ORDER = ParserErrorCode(
+ 'MODIFIER_OUT_OF_ORDER',
+ "The modifier '{0}' should be before the modifier '{1}'.",
+ correction: "Try re-ordering the modifiers.",
+ );
- static const ParserErrorCode MULTIPLE_EXTENDS_CLAUSES =
- _MULTIPLE_EXTENDS_CLAUSES;
+ static const ParserErrorCode MULTIPLE_EXTENDS_CLAUSES = ParserErrorCode(
+ 'MULTIPLE_EXTENDS_CLAUSES',
+ "Each class definition can have at most one extends clause.",
+ correction:
+ "Try choosing one superclass and define your class to implement (or mix in) the others.",
+ );
static const ParserErrorCode MULTIPLE_IMPLEMENTS_CLAUSES = ParserErrorCode(
'MULTIPLE_IMPLEMENTS_CLAUSES',
@@ -781,8 +1248,11 @@
"Try combining all of the implements clauses into a single clause.",
);
- static const ParserErrorCode MULTIPLE_LIBRARY_DIRECTIVES =
- _MULTIPLE_LIBRARY_DIRECTIVES;
+ static const ParserErrorCode MULTIPLE_LIBRARY_DIRECTIVES = ParserErrorCode(
+ 'MULTIPLE_LIBRARY_DIRECTIVES',
+ "Only one library directive may be declared in a file.",
+ correction: "Try removing all but one of the library directives.",
+ );
static const ParserErrorCode MULTIPLE_NAMED_PARAMETER_GROUPS =
ParserErrorCode(
@@ -791,10 +1261,17 @@
correction: "Try combining all of the groups into a single group.",
);
- static const ParserErrorCode MULTIPLE_ON_CLAUSES = _MULTIPLE_ON_CLAUSES;
+ static const ParserErrorCode MULTIPLE_ON_CLAUSES = ParserErrorCode(
+ 'MULTIPLE_ON_CLAUSES',
+ "Each mixin definition can have at most one on clause.",
+ correction: "Try combining all of the on clauses into a single clause.",
+ );
- static const ParserErrorCode MULTIPLE_PART_OF_DIRECTIVES =
- _MULTIPLE_PART_OF_DIRECTIVES;
+ static const ParserErrorCode MULTIPLE_PART_OF_DIRECTIVES = ParserErrorCode(
+ 'MULTIPLE_PART_OF_DIRECTIVES',
+ "Only one part-of directive may be declared in a file.",
+ correction: "Try removing all but one of the part-of directives.",
+ );
static const ParserErrorCode MULTIPLE_POSITIONAL_PARAMETER_GROUPS =
ParserErrorCode(
@@ -814,10 +1291,17 @@
"Try moving all but one of the declarations inside the loop body.",
);
- static const ParserErrorCode MULTIPLE_VARIANCE_MODIFIERS =
- _MULTIPLE_VARIANCE_MODIFIERS;
+ static const ParserErrorCode MULTIPLE_VARIANCE_MODIFIERS = ParserErrorCode(
+ 'MULTIPLE_VARIANCE_MODIFIERS',
+ "Each type parameter can have at most one variance modifier.",
+ correction: "Use at most one of the 'in', 'out', or 'inout' modifiers.",
+ );
- static const ParserErrorCode MULTIPLE_WITH_CLAUSES = _MULTIPLE_WITH_CLAUSES;
+ static const ParserErrorCode MULTIPLE_WITH_CLAUSES = ParserErrorCode(
+ 'MULTIPLE_WITH_CLAUSES',
+ "Each class definition can have at most one with clause.",
+ correction: "Try combining all of the with clauses into a single clause.",
+ );
static const ParserErrorCode NAMED_FUNCTION_EXPRESSION = ParserErrorCode(
'NAMED_FUNCTION_EXPRESSION',
@@ -845,7 +1329,12 @@
);
static const ParserErrorCode NATIVE_CLAUSE_SHOULD_BE_ANNOTATION =
- _NATIVE_CLAUSE_SHOULD_BE_ANNOTATION;
+ ParserErrorCode(
+ 'NATIVE_CLAUSE_SHOULD_BE_ANNOTATION',
+ "Native clause in this form is deprecated.",
+ correction:
+ "Try removing this native clause and adding @native() or @native('native-name') before the declaration.",
+ );
static const ParserErrorCode NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE =
ParserErrorCode(
@@ -897,7 +1386,12 @@
);
static const ParserErrorCode NULL_AWARE_CASCADE_OUT_OF_ORDER =
- _NULL_AWARE_CASCADE_OUT_OF_ORDER;
+ ParserErrorCode(
+ 'NULL_AWARE_CASCADE_OUT_OF_ORDER',
+ "The '?..' cascade operator must be first in the cascade sequence.",
+ correction:
+ "Try moving the '?..' operator to be the first cascade operator in the sequence.",
+ );
static const ParserErrorCode POSITIONAL_AFTER_NAMED_ARGUMENT =
ParserErrorCode(
@@ -914,16 +1408,33 @@
correction: "Try surrounding the positional parameters in square brackets.",
);
- static const ParserErrorCode PREFIX_AFTER_COMBINATOR =
- _PREFIX_AFTER_COMBINATOR;
+ static const ParserErrorCode PREFIX_AFTER_COMBINATOR = ParserErrorCode(
+ 'PREFIX_AFTER_COMBINATOR',
+ "The prefix ('as' clause) should come before any show/hide combinators.",
+ correction: "Try moving the prefix before the combinators.",
+ );
static const ParserErrorCode REDIRECTING_CONSTRUCTOR_WITH_BODY =
- _REDIRECTING_CONSTRUCTOR_WITH_BODY;
+ ParserErrorCode(
+ 'REDIRECTING_CONSTRUCTOR_WITH_BODY',
+ "Redirecting constructors can't have a body.",
+ correction:
+ "Try removing the body, or not making this a redirecting constructor.",
+ );
static const ParserErrorCode REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR =
- _REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR;
+ ParserErrorCode(
+ 'REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR',
+ "Only factory constructor can specify '=' redirection.",
+ correction:
+ "Try making this a factory constructor, or remove the redirection.",
+ );
- static const ParserErrorCode SETTER_CONSTRUCTOR = _SETTER_CONSTRUCTOR;
+ static const ParserErrorCode SETTER_CONSTRUCTOR = ParserErrorCode(
+ 'SETTER_CONSTRUCTOR',
+ "Constructors can't be a setter.",
+ correction: "Try removing 'set'.",
+ );
static const ParserErrorCode SETTER_IN_FUNCTION = ParserErrorCode(
'SETTER_IN_FUNCTION',
@@ -931,9 +1442,17 @@
correction: "Try moving the setter outside the method or function.",
);
- static const ParserErrorCode STACK_OVERFLOW = _STACK_OVERFLOW;
+ static const ParserErrorCode STACK_OVERFLOW = ParserErrorCode(
+ 'STACK_OVERFLOW',
+ "The file has too many nested expressions or statements.",
+ correction: "Try simplifying the code.",
+ );
- static const ParserErrorCode STATIC_CONSTRUCTOR = _STATIC_CONSTRUCTOR;
+ static const ParserErrorCode STATIC_CONSTRUCTOR = ParserErrorCode(
+ 'STATIC_CONSTRUCTOR',
+ "Constructors can't be static.",
+ correction: "Try removing the keyword 'static'.",
+ );
static const ParserErrorCode STATIC_GETTER_WITHOUT_BODY = ParserErrorCode(
'STATIC_GETTER_WITHOUT_BODY',
@@ -942,7 +1461,11 @@
"Try adding a body to the getter, or removing the keyword 'static'.",
);
- static const ParserErrorCode STATIC_OPERATOR = _STATIC_OPERATOR;
+ static const ParserErrorCode STATIC_OPERATOR = ParserErrorCode(
+ 'STATIC_OPERATOR',
+ "Operators can't be static.",
+ correction: "Try removing the keyword 'static'.",
+ );
static const ParserErrorCode STATIC_SETTER_WITHOUT_BODY = ParserErrorCode(
'STATIC_SETTER_WITHOUT_BODY',
@@ -958,22 +1481,50 @@
);
static const ParserErrorCode SWITCH_HAS_CASE_AFTER_DEFAULT_CASE =
- _SWITCH_HAS_CASE_AFTER_DEFAULT_CASE;
+ ParserErrorCode(
+ 'SWITCH_HAS_CASE_AFTER_DEFAULT_CASE',
+ "The default case should be the last case in a switch statement.",
+ correction: "Try moving the default case after the other case clauses.",
+ );
static const ParserErrorCode SWITCH_HAS_MULTIPLE_DEFAULT_CASES =
- _SWITCH_HAS_MULTIPLE_DEFAULT_CASES;
+ ParserErrorCode(
+ 'SWITCH_HAS_MULTIPLE_DEFAULT_CASES',
+ "The 'default' case can only be declared once.",
+ correction: "Try removing all but one default case.",
+ );
- static const ParserErrorCode TOP_LEVEL_OPERATOR = _TOP_LEVEL_OPERATOR;
+ static const ParserErrorCode TOP_LEVEL_OPERATOR = ParserErrorCode(
+ 'TOP_LEVEL_OPERATOR',
+ "Operators must be declared within a class.",
+ correction:
+ "Try removing the operator, moving it to a class, or converting it to be a function.",
+ );
- static const ParserErrorCode TYPEDEF_IN_CLASS = _TYPEDEF_IN_CLASS;
+ static const ParserErrorCode TYPEDEF_IN_CLASS = ParserErrorCode(
+ 'TYPEDEF_IN_CLASS',
+ "Typedefs can't be declared inside classes.",
+ correction: "Try moving the typedef to the top-level.",
+ );
static const ParserErrorCode TYPE_ARGUMENTS_ON_TYPE_VARIABLE =
- _TYPE_ARGUMENTS_ON_TYPE_VARIABLE;
+ ParserErrorCode(
+ 'TYPE_ARGUMENTS_ON_TYPE_VARIABLE',
+ "Can't use type arguments with type variable '{0}'.",
+ correction: "Try removing the type arguments.",
+ );
- static const ParserErrorCode TYPE_BEFORE_FACTORY = _TYPE_BEFORE_FACTORY;
+ static const ParserErrorCode TYPE_BEFORE_FACTORY = ParserErrorCode(
+ 'TYPE_BEFORE_FACTORY',
+ "Factory constructors cannot have a return type.",
+ correction: "Try removing the type appearing before 'factory'.",
+ );
- static const ParserErrorCode TYPE_PARAMETER_ON_CONSTRUCTOR =
- _TYPE_PARAMETER_ON_CONSTRUCTOR;
+ static const ParserErrorCode TYPE_PARAMETER_ON_CONSTRUCTOR = ParserErrorCode(
+ 'TYPE_PARAMETER_ON_CONSTRUCTOR',
+ "Constructors can't have type parameters.",
+ correction: "Try removing the type parameters.",
+ );
/**
* 7.1.1 Operators: Type parameters are not syntactically supported on an
@@ -1006,9 +1557,16 @@
correction: "Try removing the text.",
);
- static const ParserErrorCode VAR_AND_TYPE = _VAR_AND_TYPE;
+ static const ParserErrorCode VAR_AND_TYPE = ParserErrorCode(
+ 'VAR_AND_TYPE',
+ "Variables can't be declared using both 'var' and a type name.",
+ correction: "Try removing 'var.'",
+ );
- static const ParserErrorCode VAR_AS_TYPE_NAME = _VAR_AS_TYPE_NAME;
+ static const ParserErrorCode VAR_AS_TYPE_NAME = ParserErrorCode(
+ 'VAR_AS_TYPE_NAME',
+ "The keyword 'var' can't be used as a type name.",
+ );
static const ParserErrorCode VAR_CLASS = ParserErrorCode(
'VAR_CLASS',
@@ -1022,7 +1580,12 @@
correction: "Try removing the keyword 'var'.",
);
- static const ParserErrorCode VAR_RETURN_TYPE = _VAR_RETURN_TYPE;
+ static const ParserErrorCode VAR_RETURN_TYPE = ParserErrorCode(
+ 'VAR_RETURN_TYPE',
+ "The return type can't be 'var'.",
+ correction:
+ "Try removing the keyword 'var', or replacing it with the name of the return type.",
+ );
static const ParserErrorCode VAR_TYPEDEF = ParserErrorCode(
'VAR_TYPEDEF',
@@ -1031,10 +1594,17 @@
"Try removing the keyword 'var', or replacing it with the name of the return type.",
);
- static const ParserErrorCode VOID_WITH_TYPE_ARGUMENTS =
- _VOID_WITH_TYPE_ARGUMENTS;
+ static const ParserErrorCode VOID_WITH_TYPE_ARGUMENTS = ParserErrorCode(
+ 'VOID_WITH_TYPE_ARGUMENTS',
+ "Type 'void' can't have type arguments.",
+ correction: "Try removing the type arguments.",
+ );
- static const ParserErrorCode WITH_BEFORE_EXTENDS = _WITH_BEFORE_EXTENDS;
+ static const ParserErrorCode WITH_BEFORE_EXTENDS = ParserErrorCode(
+ 'WITH_BEFORE_EXTENDS',
+ "The extends clause must be before the with clause.",
+ correction: "Try moving the extends clause before the with clause.",
+ );
static const ParserErrorCode WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER =
ParserErrorCode(
diff --git a/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart b/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart
deleted file mode 100644
index 4db09fe..0000000
--- a/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart
+++ /dev/null
@@ -1,851 +0,0 @@
-//
-// THIS FILE IS GENERATED. DO NOT EDIT.
-//
-// Instead modify 'pkg/front_end/messages.yaml' and run
-// 'dart pkg/analyzer/tool/messages/generate.dart' to update.
-
-part of 'syntactic_errors.analyzer.g.dart';
-
-final fastaAnalyzerErrorCodes = <ErrorCode?>[
- null,
- _EQUALITY_CANNOT_BE_EQUALITY_OPERAND,
- _CONTINUE_OUTSIDE_OF_LOOP,
- _EXTERNAL_CLASS,
- _STATIC_CONSTRUCTOR,
- _EXTERNAL_ENUM,
- _PREFIX_AFTER_COMBINATOR,
- _TYPEDEF_IN_CLASS,
- _EXPECTED_BODY,
- _INVALID_AWAIT_IN_FOR,
- _IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE,
- _WITH_BEFORE_EXTENDS,
- _VAR_RETURN_TYPE,
- _TYPE_ARGUMENTS_ON_TYPE_VARIABLE,
- _TOP_LEVEL_OPERATOR,
- _SWITCH_HAS_MULTIPLE_DEFAULT_CASES,
- _SWITCH_HAS_CASE_AFTER_DEFAULT_CASE,
- _STATIC_OPERATOR,
- _INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER,
- _STACK_OVERFLOW,
- _MISSING_CATCH_OR_FINALLY,
- _REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR,
- _REDIRECTING_CONSTRUCTOR_WITH_BODY,
- _NATIVE_CLAUSE_SHOULD_BE_ANNOTATION,
- _MULTIPLE_WITH_CLAUSES,
- _MULTIPLE_PART_OF_DIRECTIVES,
- _MULTIPLE_ON_CLAUSES,
- _MULTIPLE_LIBRARY_DIRECTIVES,
- _MULTIPLE_EXTENDS_CLAUSES,
- _MISSING_STATEMENT,
- _MISSING_PREFIX_IN_DEFERRED_IMPORT,
- _MISSING_KEYWORD_OPERATOR,
- _MISSING_EXPRESSION_IN_THROW,
- _MISSING_CONST_FINAL_VAR_OR_TYPE,
- _MISSING_ASSIGNMENT_IN_INITIALIZER,
- _MISSING_ASSIGNABLE_SELECTOR,
- _MISSING_INITIALIZER,
- _LIBRARY_DIRECTIVE_NOT_FIRST,
- _INVALID_UNICODE_ESCAPE,
- _INVALID_OPERATOR,
- _INVALID_HEX_ESCAPE,
- _EXPECTED_INSTEAD,
- _IMPLEMENTS_BEFORE_WITH,
- _IMPLEMENTS_BEFORE_ON,
- _IMPLEMENTS_BEFORE_EXTENDS,
- _ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE,
- _EXPECTED_ELSE_OR_COMMA,
- _INVALID_SUPER_IN_INITIALIZER,
- _EXPERIMENT_NOT_ENABLED,
- _EXTERNAL_METHOD_WITH_BODY,
- _EXTERNAL_FIELD,
- _ABSTRACT_CLASS_MEMBER,
- _BREAK_OUTSIDE_OF_LOOP,
- _CLASS_IN_CLASS,
- _COLON_IN_PLACE_OF_IN,
- _CONSTRUCTOR_WITH_RETURN_TYPE,
- _MODIFIER_OUT_OF_ORDER,
- _TYPE_BEFORE_FACTORY,
- _CONST_AND_FINAL,
- _CONFLICTING_MODIFIERS,
- _CONST_CLASS,
- _VAR_AS_TYPE_NAME,
- _CONST_FACTORY,
- _CONST_METHOD,
- _CONTINUE_WITHOUT_LABEL_IN_CASE,
- _INVALID_THIS_IN_INITIALIZER,
- _COVARIANT_AND_STATIC,
- _COVARIANT_MEMBER,
- _DEFERRED_AFTER_PREFIX,
- _DIRECTIVE_AFTER_DECLARATION,
- _DUPLICATED_MODIFIER,
- _DUPLICATE_DEFERRED,
- _DUPLICATE_LABEL_IN_SWITCH_STATEMENT,
- _DUPLICATE_PREFIX,
- _ENUM_IN_CLASS,
- _EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE,
- _EXTERNAL_TYPEDEF,
- _EXTRANEOUS_MODIFIER,
- _FACTORY_TOP_LEVEL_DECLARATION,
- _FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR,
- _FINAL_AND_COVARIANT,
- _FINAL_AND_VAR,
- _INITIALIZED_VARIABLE_IN_FOR_EACH,
- _CATCH_SYNTAX_EXTRA_PARAMETERS,
- _CATCH_SYNTAX,
- _EXTERNAL_FACTORY_REDIRECTION,
- _EXTERNAL_FACTORY_WITH_BODY,
- _EXTERNAL_CONSTRUCTOR_WITH_BODY,
- _FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS,
- _VAR_AND_TYPE,
- _INVALID_INITIALIZER,
- _ANNOTATION_WITH_TYPE_ARGUMENTS,
- _EXTENSION_DECLARES_CONSTRUCTOR,
- _EXTENSION_DECLARES_INSTANCE_FIELD,
- _EXTENSION_DECLARES_ABSTRACT_MEMBER,
- _MIXIN_DECLARES_CONSTRUCTOR,
- _NULL_AWARE_CASCADE_OUT_OF_ORDER,
- _MULTIPLE_VARIANCE_MODIFIERS,
- _INVALID_USE_OF_COVARIANT_IN_EXTENSION,
- _TYPE_PARAMETER_ON_CONSTRUCTOR,
- _VOID_WITH_TYPE_ARGUMENTS,
- _FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER,
- _INVALID_CONSTRUCTOR_NAME,
- _GETTER_CONSTRUCTOR,
- _SETTER_CONSTRUCTOR,
- _MEMBER_WITH_CLASS_NAME,
- _EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER,
- _ABSTRACT_STATIC_FIELD,
- _ABSTRACT_LATE_FIELD,
- _EXTERNAL_LATE_FIELD,
- _ABSTRACT_EXTERNAL_FIELD,
- _ANNOTATION_ON_TYPE_ARGUMENT,
- _BINARY_OPERATOR_WRITTEN_OUT,
- _EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD,
- _ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED,
- _LITERAL_WITH_CLASS_AND_NEW,
- _LITERAL_WITH_CLASS,
- _LITERAL_WITH_NEW,
- _CONSTRUCTOR_WITH_TYPE_ARGUMENTS,
-];
-
-const ParserErrorCode _ABSTRACT_CLASS_MEMBER = ParserErrorCode(
- 'ABSTRACT_CLASS_MEMBER',
- "Members of classes can't be declared to be 'abstract'.",
- correction:
- "Try removing the 'abstract' keyword. You can add the 'abstract' keyword before the class declaration.",
-);
-
-const ParserErrorCode _ABSTRACT_EXTERNAL_FIELD = ParserErrorCode(
- 'ABSTRACT_EXTERNAL_FIELD',
- "Fields can't be declared both 'abstract' and 'external'.",
- correction: "Try removing the 'abstract' or 'external' keyword.",
-);
-
-const ParserErrorCode _ABSTRACT_LATE_FIELD = ParserErrorCode(
- 'ABSTRACT_LATE_FIELD',
- "Abstract fields cannot be late.",
- correction: "Try removing the 'abstract' or 'late' keyword.",
-);
-
-const ParserErrorCode _ABSTRACT_STATIC_FIELD = ParserErrorCode(
- 'ABSTRACT_STATIC_FIELD',
- "Static fields can't be declared 'abstract'.",
- correction: "Try removing the 'abstract' or 'static' keyword.",
-);
-
-const ParserErrorCode _ANNOTATION_ON_TYPE_ARGUMENT = ParserErrorCode(
- 'ANNOTATION_ON_TYPE_ARGUMENT',
- "Type arguments can't have annotations because they aren't declarations.",
-);
-
-const ParserErrorCode _ANNOTATION_WITH_TYPE_ARGUMENTS = ParserErrorCode(
- 'ANNOTATION_WITH_TYPE_ARGUMENTS',
- "An annotation can't use type arguments.",
-);
-
-const ParserErrorCode _ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED =
- ParserErrorCode(
- 'ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED',
- "An annotation with type arguments must be followed by an argument list.",
-);
-
-const ParserErrorCode _BINARY_OPERATOR_WRITTEN_OUT = ParserErrorCode(
- 'BINARY_OPERATOR_WRITTEN_OUT',
- "Binary operator '{0}' is written as '{1}' instead of the written out word.",
- correction: "Try replacing '{0}' with '{1}'.",
-);
-
-const ParserErrorCode _BREAK_OUTSIDE_OF_LOOP = ParserErrorCode(
- 'BREAK_OUTSIDE_OF_LOOP',
- "A break statement can't be used outside of a loop or switch statement.",
- correction: "Try removing the break statement.",
-);
-
-const ParserErrorCode _CATCH_SYNTAX = ParserErrorCode(
- 'CATCH_SYNTAX',
- "'catch' must be followed by '(identifier)' or '(identifier, identifier)'.",
- correction:
- "No types are needed, the first is given by 'on', the second is always 'StackTrace'.",
-);
-
-const ParserErrorCode _CATCH_SYNTAX_EXTRA_PARAMETERS = ParserErrorCode(
- 'CATCH_SYNTAX_EXTRA_PARAMETERS',
- "'catch' must be followed by '(identifier)' or '(identifier, identifier)'.",
- correction:
- "No types are needed, the first is given by 'on', the second is always 'StackTrace'.",
-);
-
-const ParserErrorCode _CLASS_IN_CLASS = ParserErrorCode(
- 'CLASS_IN_CLASS',
- "Classes can't be declared inside other classes.",
- correction: "Try moving the class to the top-level.",
-);
-
-const ParserErrorCode _COLON_IN_PLACE_OF_IN = ParserErrorCode(
- 'COLON_IN_PLACE_OF_IN',
- "For-in loops use 'in' rather than a colon.",
- correction: "Try replacing the colon with the keyword 'in'.",
-);
-
-const ParserErrorCode _CONFLICTING_MODIFIERS = ParserErrorCode(
- 'CONFLICTING_MODIFIERS',
- "Members can't be declared to be both '{0}' and '{1}'.",
- correction: "Try removing one of the keywords.",
-);
-
-const ParserErrorCode _CONSTRUCTOR_WITH_RETURN_TYPE = ParserErrorCode(
- 'CONSTRUCTOR_WITH_RETURN_TYPE',
- "Constructors can't have a return type.",
- correction: "Try removing the return type.",
-);
-
-const ParserErrorCode _CONSTRUCTOR_WITH_TYPE_ARGUMENTS = ParserErrorCode(
- 'CONSTRUCTOR_WITH_TYPE_ARGUMENTS',
- "A constructor invocation can't have type arguments after the constructor name.",
- correction:
- "Try removing the type arguments or placing them after the class name.",
-);
-
-const ParserErrorCode _CONST_AND_FINAL = ParserErrorCode(
- 'CONST_AND_FINAL',
- "Members can't be declared to be both 'const' and 'final'.",
- correction: "Try removing either the 'const' or 'final' keyword.",
-);
-
-const ParserErrorCode _CONST_CLASS = ParserErrorCode(
- 'CONST_CLASS',
- "Classes can't be declared to be 'const'.",
- correction:
- "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).",
-);
-
-const ParserErrorCode _CONST_FACTORY = ParserErrorCode(
- 'CONST_FACTORY',
- "Only redirecting factory constructors can be declared to be 'const'.",
- correction:
- "Try removing the 'const' keyword, or replacing the body with '=' followed by a valid target.",
-);
-
-const ParserErrorCode _CONST_METHOD = ParserErrorCode(
- 'CONST_METHOD',
- "Getters, setters and methods can't be declared to be 'const'.",
- correction: "Try removing the 'const' keyword.",
-);
-
-const ParserErrorCode _CONTINUE_OUTSIDE_OF_LOOP = ParserErrorCode(
- 'CONTINUE_OUTSIDE_OF_LOOP',
- "A continue statement can't be used outside of a loop or switch statement.",
- correction: "Try removing the continue statement.",
-);
-
-const ParserErrorCode _CONTINUE_WITHOUT_LABEL_IN_CASE = ParserErrorCode(
- 'CONTINUE_WITHOUT_LABEL_IN_CASE',
- "A continue statement in a switch statement must have a label as a target.",
- correction:
- "Try adding a label associated with one of the case clauses to the continue statement.",
-);
-
-const ParserErrorCode _COVARIANT_AND_STATIC = ParserErrorCode(
- 'COVARIANT_AND_STATIC',
- "Members can't be declared to be both 'covariant' and 'static'.",
- correction: "Try removing either the 'covariant' or 'static' keyword.",
-);
-
-const ParserErrorCode _COVARIANT_MEMBER = ParserErrorCode(
- 'COVARIANT_MEMBER',
- "Getters, setters and methods can't be declared to be 'covariant'.",
- correction: "Try removing the 'covariant' keyword.",
-);
-
-const ParserErrorCode _DEFERRED_AFTER_PREFIX = ParserErrorCode(
- 'DEFERRED_AFTER_PREFIX',
- "The deferred keyword should come immediately before the prefix ('as' clause).",
- correction: "Try moving the deferred keyword before the prefix.",
-);
-
-const ParserErrorCode _DIRECTIVE_AFTER_DECLARATION = ParserErrorCode(
- 'DIRECTIVE_AFTER_DECLARATION',
- "Directives must appear before any declarations.",
- correction: "Try moving the directive before any declarations.",
-);
-
-const ParserErrorCode _DUPLICATED_MODIFIER = ParserErrorCode(
- 'DUPLICATED_MODIFIER',
- "The modifier '{0}' was already specified.",
- correction: "Try removing all but one occurrence of the modifier.",
-);
-
-const ParserErrorCode _DUPLICATE_DEFERRED = ParserErrorCode(
- 'DUPLICATE_DEFERRED',
- "An import directive can only have one 'deferred' keyword.",
- correction: "Try removing all but one 'deferred' keyword.",
-);
-
-const ParserErrorCode _DUPLICATE_LABEL_IN_SWITCH_STATEMENT = ParserErrorCode(
- 'DUPLICATE_LABEL_IN_SWITCH_STATEMENT',
- "The label '{0}' was already used in this switch statement.",
- correction: "Try choosing a different name for this label.",
-);
-
-const ParserErrorCode _DUPLICATE_PREFIX = ParserErrorCode(
- 'DUPLICATE_PREFIX',
- "An import directive can only have one prefix ('as' clause).",
- correction: "Try removing all but one prefix.",
-);
-
-const ParserErrorCode _ENUM_IN_CLASS = ParserErrorCode(
- 'ENUM_IN_CLASS',
- "Enums can't be declared inside classes.",
- correction: "Try moving the enum to the top-level.",
-);
-
-const ParserErrorCode _EQUALITY_CANNOT_BE_EQUALITY_OPERAND = ParserErrorCode(
- 'EQUALITY_CANNOT_BE_EQUALITY_OPERAND',
- "A comparison expression can't be an operand of another comparison expression.",
- correction: "Try putting parentheses around one of the comparisons.",
-);
-
-const ParserErrorCode _EXPECTED_BODY = ParserErrorCode(
- 'EXPECTED_BODY',
- "A {0} must have a body, even if it is empty.",
- correction: "Try adding an empty body.",
-);
-
-const ParserErrorCode _EXPECTED_ELSE_OR_COMMA = ParserErrorCode(
- 'EXPECTED_ELSE_OR_COMMA',
- "Expected 'else' or comma.",
-);
-
-const ParserErrorCode _EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD = ParserErrorCode(
- 'EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD',
- "'{0}' can't be used as an identifier because it's a keyword.",
- correction: "Try renaming this to be an identifier that isn't a keyword.",
-);
-
-const ParserErrorCode _EXPECTED_INSTEAD = ParserErrorCode(
- 'EXPECTED_INSTEAD',
- "Expected '{0}' instead of this.",
-);
-
-const ParserErrorCode _EXPERIMENT_NOT_ENABLED = ParserErrorCode(
- 'EXPERIMENT_NOT_ENABLED',
- "This requires the '{0}' language feature to be enabled.",
- correction:
- "Try updating your pubspec.yaml to set the minimum SDK constraint to {1} or higher, and running 'pub get'.",
-);
-
-const ParserErrorCode _EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE = ParserErrorCode(
- 'EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE',
- "Export directives must precede part directives.",
- correction: "Try moving the export directives before the part directives.",
-);
-
-const ParserErrorCode _EXTENSION_DECLARES_ABSTRACT_MEMBER = ParserErrorCode(
- 'EXTENSION_DECLARES_ABSTRACT_MEMBER',
- "Extensions can't declare abstract members.",
- correction: "Try providing an implementation for the member.",
- hasPublishedDocs: true,
-);
-
-const ParserErrorCode _EXTENSION_DECLARES_CONSTRUCTOR = ParserErrorCode(
- 'EXTENSION_DECLARES_CONSTRUCTOR',
- "Extensions can't declare constructors.",
- correction: "Try removing the constructor declaration.",
- hasPublishedDocs: true,
-);
-
-const ParserErrorCode _EXTENSION_DECLARES_INSTANCE_FIELD = ParserErrorCode(
- 'EXTENSION_DECLARES_INSTANCE_FIELD',
- "Extensions can't declare instance fields",
- correction: "Try removing the field declaration or making it a static field",
- hasPublishedDocs: true,
-);
-
-const ParserErrorCode _EXTERNAL_CLASS = ParserErrorCode(
- 'EXTERNAL_CLASS',
- "Classes can't be declared to be 'external'.",
- correction: "Try removing the keyword 'external'.",
-);
-
-const ParserErrorCode _EXTERNAL_CONSTRUCTOR_WITH_BODY = ParserErrorCode(
- 'EXTERNAL_CONSTRUCTOR_WITH_BODY',
- "External constructors can't have a body.",
- correction:
- "Try removing the body of the constructor, or removing the keyword 'external'.",
-);
-
-const ParserErrorCode _EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER = ParserErrorCode(
- 'EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER',
- "An external constructor can't have any initializers.",
-);
-
-const ParserErrorCode _EXTERNAL_ENUM = ParserErrorCode(
- 'EXTERNAL_ENUM',
- "Enums can't be declared to be 'external'.",
- correction: "Try removing the keyword 'external'.",
-);
-
-const ParserErrorCode _EXTERNAL_FACTORY_REDIRECTION = ParserErrorCode(
- 'EXTERNAL_FACTORY_REDIRECTION',
- "A redirecting factory can't be external.",
- correction: "Try removing the 'external' modifier.",
-);
-
-const ParserErrorCode _EXTERNAL_FACTORY_WITH_BODY = ParserErrorCode(
- 'EXTERNAL_FACTORY_WITH_BODY',
- "External factories can't have a body.",
- correction:
- "Try removing the body of the factory, or removing the keyword 'external'.",
-);
-
-const ParserErrorCode _EXTERNAL_FIELD = ParserErrorCode(
- 'EXTERNAL_FIELD',
- "Fields can't be declared to be 'external'.",
- correction:
- "Try removing the keyword 'external', or replacing the field by an external getter and/or setter.",
-);
-
-const ParserErrorCode _EXTERNAL_LATE_FIELD = ParserErrorCode(
- 'EXTERNAL_LATE_FIELD',
- "External fields cannot be late.",
- correction: "Try removing the 'external' or 'late' keyword.",
-);
-
-const ParserErrorCode _EXTERNAL_METHOD_WITH_BODY = ParserErrorCode(
- 'EXTERNAL_METHOD_WITH_BODY',
- "An external or native method can't have a body.",
-);
-
-const ParserErrorCode _EXTERNAL_TYPEDEF = ParserErrorCode(
- 'EXTERNAL_TYPEDEF',
- "Typedefs can't be declared to be 'external'.",
- correction: "Try removing the keyword 'external'.",
-);
-
-const ParserErrorCode _EXTRANEOUS_MODIFIER = ParserErrorCode(
- 'EXTRANEOUS_MODIFIER',
- "Can't have modifier '{0}' here.",
- correction: "Try removing '{0}'.",
-);
-
-const ParserErrorCode _FACTORY_TOP_LEVEL_DECLARATION = ParserErrorCode(
- 'FACTORY_TOP_LEVEL_DECLARATION',
- "Top-level declarations can't be declared to be 'factory'.",
- correction: "Try removing the keyword 'factory'.",
-);
-
-const ParserErrorCode _FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS =
- ParserErrorCode(
- 'FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS',
- "A field can only be initialized in its declaring class",
- correction:
- "Try passing a value into the superclass constructor, or moving the initialization into the constructor body.",
-);
-
-const ParserErrorCode _FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = ParserErrorCode(
- 'FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR',
- "Field formal parameters can only be used in a constructor.",
- correction: "Try removing 'this.'.",
-);
-
-const ParserErrorCode _FINAL_AND_COVARIANT = ParserErrorCode(
- 'FINAL_AND_COVARIANT',
- "Members can't be declared to be both 'final' and 'covariant'.",
- correction: "Try removing either the 'final' or 'covariant' keyword.",
-);
-
-const ParserErrorCode _FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER =
- ParserErrorCode(
- 'FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER',
- "Members marked 'late' with an initializer can't be declared to be both 'final' and 'covariant'.",
- correction:
- "Try removing either the 'final' or 'covariant' keyword, or removing the initializer.",
-);
-
-const ParserErrorCode _FINAL_AND_VAR = ParserErrorCode(
- 'FINAL_AND_VAR',
- "Members can't be declared to be both 'final' and 'var'.",
- correction: "Try removing the keyword 'var'.",
-);
-
-const ParserErrorCode _GETTER_CONSTRUCTOR = ParserErrorCode(
- 'GETTER_CONSTRUCTOR',
- "Constructors can't be a getter.",
- correction: "Try removing 'get'.",
-);
-
-const ParserErrorCode _ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE = ParserErrorCode(
- 'ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE',
- "Illegal assignment to non-assignable expression.",
-);
-
-const ParserErrorCode _IMPLEMENTS_BEFORE_EXTENDS = ParserErrorCode(
- 'IMPLEMENTS_BEFORE_EXTENDS',
- "The extends clause must be before the implements clause.",
- correction: "Try moving the extends clause before the implements clause.",
-);
-
-const ParserErrorCode _IMPLEMENTS_BEFORE_ON = ParserErrorCode(
- 'IMPLEMENTS_BEFORE_ON',
- "The on clause must be before the implements clause.",
- correction: "Try moving the on clause before the implements clause.",
-);
-
-const ParserErrorCode _IMPLEMENTS_BEFORE_WITH = ParserErrorCode(
- 'IMPLEMENTS_BEFORE_WITH',
- "The with clause must be before the implements clause.",
- correction: "Try moving the with clause before the implements clause.",
-);
-
-const ParserErrorCode _IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE = ParserErrorCode(
- 'IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE',
- "Import directives must precede part directives.",
- correction: "Try moving the import directives before the part directives.",
-);
-
-const ParserErrorCode _INITIALIZED_VARIABLE_IN_FOR_EACH = ParserErrorCode(
- 'INITIALIZED_VARIABLE_IN_FOR_EACH',
- "The loop variable in a for-each loop can't be initialized.",
- correction:
- "Try removing the initializer, or using a different kind of loop.",
-);
-
-const ParserErrorCode _INVALID_AWAIT_IN_FOR = ParserErrorCode(
- 'INVALID_AWAIT_IN_FOR',
- "The keyword 'await' isn't allowed for a normal 'for' statement.",
- correction: "Try removing the keyword, or use a for-each statement.",
-);
-
-const ParserErrorCode _INVALID_CONSTRUCTOR_NAME = ParserErrorCode(
- 'INVALID_CONSTRUCTOR_NAME',
- "The name of a constructor must match the name of the enclosing class.",
-);
-
-const ParserErrorCode _INVALID_HEX_ESCAPE = ParserErrorCode(
- 'INVALID_HEX_ESCAPE',
- "An escape sequence starting with '\\x' must be followed by 2 hexadecimal digits.",
-);
-
-const ParserErrorCode _INVALID_INITIALIZER = ParserErrorCode(
- 'INVALID_INITIALIZER',
- "Not a valid initializer.",
- correction: "To initialize a field, use the syntax 'name = value'.",
-);
-
-const ParserErrorCode _INVALID_OPERATOR = ParserErrorCode(
- 'INVALID_OPERATOR',
- "The string '{0}' isn't a user-definable operator.",
-);
-
-const ParserErrorCode _INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER =
- ParserErrorCode(
- 'INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER',
- "The operator '?.' cannot be used with 'super' because 'super' cannot be null.",
- correction: "Try replacing '?.' with '.'",
-);
-
-const ParserErrorCode _INVALID_SUPER_IN_INITIALIZER = ParserErrorCode(
- 'INVALID_SUPER_IN_INITIALIZER',
- "Can only use 'super' in an initializer for calling the superclass constructor (e.g. 'super()' or 'super.namedConstructor()')",
-);
-
-const ParserErrorCode _INVALID_THIS_IN_INITIALIZER = ParserErrorCode(
- 'INVALID_THIS_IN_INITIALIZER',
- "Can only use 'this' in an initializer for field initialization (e.g. 'this.x = something') and constructor redirection (e.g. 'this()' or 'this.namedConstructor())",
-);
-
-const ParserErrorCode _INVALID_UNICODE_ESCAPE = ParserErrorCode(
- 'INVALID_UNICODE_ESCAPE',
- "An escape sequence starting with '\\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'.",
-);
-
-const ParserErrorCode _INVALID_USE_OF_COVARIANT_IN_EXTENSION = ParserErrorCode(
- 'INVALID_USE_OF_COVARIANT_IN_EXTENSION',
- "Can't have modifier '{0}' in an extension.",
- correction: "Try removing '{0}'.",
- hasPublishedDocs: true,
-);
-
-const ParserErrorCode _LIBRARY_DIRECTIVE_NOT_FIRST = ParserErrorCode(
- 'LIBRARY_DIRECTIVE_NOT_FIRST',
- "The library directive must appear before all other directives.",
- correction: "Try moving the library directive before any other directives.",
-);
-
-const ParserErrorCode _LITERAL_WITH_CLASS = ParserErrorCode(
- 'LITERAL_WITH_CLASS',
- "A {0} literal can't be prefixed by '{1}'.",
- correction: "Try removing '{1}'",
-);
-
-const ParserErrorCode _LITERAL_WITH_CLASS_AND_NEW = ParserErrorCode(
- 'LITERAL_WITH_CLASS_AND_NEW',
- "A {0} literal can't be prefixed by 'new {1}'.",
- correction: "Try removing 'new' and '{1}'",
-);
-
-const ParserErrorCode _LITERAL_WITH_NEW = ParserErrorCode(
- 'LITERAL_WITH_NEW',
- "A literal can't be prefixed by 'new'.",
- correction: "Try removing 'new'",
-);
-
-const ParserErrorCode _MEMBER_WITH_CLASS_NAME = ParserErrorCode(
- 'MEMBER_WITH_CLASS_NAME',
- "A class member can't have the same name as the enclosing class.",
- correction: "Try renaming the member.",
-);
-
-const ParserErrorCode _MISSING_ASSIGNABLE_SELECTOR = ParserErrorCode(
- 'MISSING_ASSIGNABLE_SELECTOR',
- "Missing selector such as '.identifier' or '[0]'.",
- correction: "Try adding a selector.",
-);
-
-const ParserErrorCode _MISSING_ASSIGNMENT_IN_INITIALIZER = ParserErrorCode(
- 'MISSING_ASSIGNMENT_IN_INITIALIZER',
- "Expected an assignment after the field name.",
- correction: "To initialize a field, use the syntax 'name = value'.",
-);
-
-const ParserErrorCode _MISSING_CATCH_OR_FINALLY = ParserErrorCode(
- 'MISSING_CATCH_OR_FINALLY',
- "A try block must be followed by an 'on', 'catch', or 'finally' clause.",
- correction:
- "Try adding either a catch or finally clause, or remove the try statement.",
-);
-
-const ParserErrorCode _MISSING_CONST_FINAL_VAR_OR_TYPE = ParserErrorCode(
- 'MISSING_CONST_FINAL_VAR_OR_TYPE',
- "Variables must be declared using the keywords 'const', 'final', 'var' or a type name.",
- correction:
- "Try adding the name of the type of the variable or the keyword 'var'.",
-);
-
-const ParserErrorCode _MISSING_EXPRESSION_IN_THROW = ParserErrorCode(
- 'MISSING_EXPRESSION_IN_THROW',
- "Missing expression after 'throw'.",
- correction:
- "Add an expression after 'throw' or use 'rethrow' to throw a caught exception",
-);
-
-const ParserErrorCode _MISSING_INITIALIZER = ParserErrorCode(
- 'MISSING_INITIALIZER',
- "Expected an initializer.",
-);
-
-const ParserErrorCode _MISSING_KEYWORD_OPERATOR = ParserErrorCode(
- 'MISSING_KEYWORD_OPERATOR',
- "Operator declarations must be preceded by the keyword 'operator'.",
- correction: "Try adding the keyword 'operator'.",
-);
-
-const ParserErrorCode _MISSING_PREFIX_IN_DEFERRED_IMPORT = ParserErrorCode(
- 'MISSING_PREFIX_IN_DEFERRED_IMPORT',
- "Deferred imports should have a prefix.",
- correction: "Try adding a prefix to the import by adding an 'as' clause.",
-);
-
-const ParserErrorCode _MISSING_STATEMENT = ParserErrorCode(
- 'MISSING_STATEMENT',
- "Expected a statement.",
-);
-
-const ParserErrorCode _MIXIN_DECLARES_CONSTRUCTOR = ParserErrorCode(
- 'MIXIN_DECLARES_CONSTRUCTOR',
- "Mixins can't declare constructors.",
-);
-
-const ParserErrorCode _MODIFIER_OUT_OF_ORDER = ParserErrorCode(
- 'MODIFIER_OUT_OF_ORDER',
- "The modifier '{0}' should be before the modifier '{1}'.",
- correction: "Try re-ordering the modifiers.",
-);
-
-const ParserErrorCode _MULTIPLE_EXTENDS_CLAUSES = ParserErrorCode(
- 'MULTIPLE_EXTENDS_CLAUSES',
- "Each class definition can have at most one extends clause.",
- correction:
- "Try choosing one superclass and define your class to implement (or mix in) the others.",
-);
-
-const ParserErrorCode _MULTIPLE_LIBRARY_DIRECTIVES = ParserErrorCode(
- 'MULTIPLE_LIBRARY_DIRECTIVES',
- "Only one library directive may be declared in a file.",
- correction: "Try removing all but one of the library directives.",
-);
-
-const ParserErrorCode _MULTIPLE_ON_CLAUSES = ParserErrorCode(
- 'MULTIPLE_ON_CLAUSES',
- "Each mixin definition can have at most one on clause.",
- correction: "Try combining all of the on clauses into a single clause.",
-);
-
-const ParserErrorCode _MULTIPLE_PART_OF_DIRECTIVES = ParserErrorCode(
- 'MULTIPLE_PART_OF_DIRECTIVES',
- "Only one part-of directive may be declared in a file.",
- correction: "Try removing all but one of the part-of directives.",
-);
-
-const ParserErrorCode _MULTIPLE_VARIANCE_MODIFIERS = ParserErrorCode(
- 'MULTIPLE_VARIANCE_MODIFIERS',
- "Each type parameter can have at most one variance modifier.",
- correction: "Use at most one of the 'in', 'out', or 'inout' modifiers.",
-);
-
-const ParserErrorCode _MULTIPLE_WITH_CLAUSES = ParserErrorCode(
- 'MULTIPLE_WITH_CLAUSES',
- "Each class definition can have at most one with clause.",
- correction: "Try combining all of the with clauses into a single clause.",
-);
-
-const ParserErrorCode _NATIVE_CLAUSE_SHOULD_BE_ANNOTATION = ParserErrorCode(
- 'NATIVE_CLAUSE_SHOULD_BE_ANNOTATION',
- "Native clause in this form is deprecated.",
- correction:
- "Try removing this native clause and adding @native() or @native('native-name') before the declaration.",
-);
-
-const ParserErrorCode _NULL_AWARE_CASCADE_OUT_OF_ORDER = ParserErrorCode(
- 'NULL_AWARE_CASCADE_OUT_OF_ORDER',
- "The '?..' cascade operator must be first in the cascade sequence.",
- correction:
- "Try moving the '?..' operator to be the first cascade operator in the sequence.",
-);
-
-const ParserErrorCode _PREFIX_AFTER_COMBINATOR = ParserErrorCode(
- 'PREFIX_AFTER_COMBINATOR',
- "The prefix ('as' clause) should come before any show/hide combinators.",
- correction: "Try moving the prefix before the combinators.",
-);
-
-const ParserErrorCode _REDIRECTING_CONSTRUCTOR_WITH_BODY = ParserErrorCode(
- 'REDIRECTING_CONSTRUCTOR_WITH_BODY',
- "Redirecting constructors can't have a body.",
- correction:
- "Try removing the body, or not making this a redirecting constructor.",
-);
-
-const ParserErrorCode _REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR = ParserErrorCode(
- 'REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR',
- "Only factory constructor can specify '=' redirection.",
- correction:
- "Try making this a factory constructor, or remove the redirection.",
-);
-
-const ParserErrorCode _SETTER_CONSTRUCTOR = ParserErrorCode(
- 'SETTER_CONSTRUCTOR',
- "Constructors can't be a setter.",
- correction: "Try removing 'set'.",
-);
-
-const ParserErrorCode _STACK_OVERFLOW = ParserErrorCode(
- 'STACK_OVERFLOW',
- "The file has too many nested expressions or statements.",
- correction: "Try simplifying the code.",
-);
-
-const ParserErrorCode _STATIC_CONSTRUCTOR = ParserErrorCode(
- 'STATIC_CONSTRUCTOR',
- "Constructors can't be static.",
- correction: "Try removing the keyword 'static'.",
-);
-
-const ParserErrorCode _STATIC_OPERATOR = ParserErrorCode(
- 'STATIC_OPERATOR',
- "Operators can't be static.",
- correction: "Try removing the keyword 'static'.",
-);
-
-const ParserErrorCode _SWITCH_HAS_CASE_AFTER_DEFAULT_CASE = ParserErrorCode(
- 'SWITCH_HAS_CASE_AFTER_DEFAULT_CASE',
- "The default case should be the last case in a switch statement.",
- correction: "Try moving the default case after the other case clauses.",
-);
-
-const ParserErrorCode _SWITCH_HAS_MULTIPLE_DEFAULT_CASES = ParserErrorCode(
- 'SWITCH_HAS_MULTIPLE_DEFAULT_CASES',
- "The 'default' case can only be declared once.",
- correction: "Try removing all but one default case.",
-);
-
-const ParserErrorCode _TOP_LEVEL_OPERATOR = ParserErrorCode(
- 'TOP_LEVEL_OPERATOR',
- "Operators must be declared within a class.",
- correction:
- "Try removing the operator, moving it to a class, or converting it to be a function.",
-);
-
-const ParserErrorCode _TYPEDEF_IN_CLASS = ParserErrorCode(
- 'TYPEDEF_IN_CLASS',
- "Typedefs can't be declared inside classes.",
- correction: "Try moving the typedef to the top-level.",
-);
-
-const ParserErrorCode _TYPE_ARGUMENTS_ON_TYPE_VARIABLE = ParserErrorCode(
- 'TYPE_ARGUMENTS_ON_TYPE_VARIABLE',
- "Can't use type arguments with type variable '{0}'.",
- correction: "Try removing the type arguments.",
-);
-
-const ParserErrorCode _TYPE_BEFORE_FACTORY = ParserErrorCode(
- 'TYPE_BEFORE_FACTORY',
- "Factory constructors cannot have a return type.",
- correction: "Try removing the type appearing before 'factory'.",
-);
-
-const ParserErrorCode _TYPE_PARAMETER_ON_CONSTRUCTOR = ParserErrorCode(
- 'TYPE_PARAMETER_ON_CONSTRUCTOR',
- "Constructors can't have type parameters.",
- correction: "Try removing the type parameters.",
-);
-
-const ParserErrorCode _VAR_AND_TYPE = ParserErrorCode(
- 'VAR_AND_TYPE',
- "Variables can't be declared using both 'var' and a type name.",
- correction: "Try removing 'var.'",
-);
-
-const ParserErrorCode _VAR_AS_TYPE_NAME = ParserErrorCode(
- 'VAR_AS_TYPE_NAME',
- "The keyword 'var' can't be used as a type name.",
-);
-
-const ParserErrorCode _VAR_RETURN_TYPE = ParserErrorCode(
- 'VAR_RETURN_TYPE',
- "The return type can't be 'var'.",
- correction:
- "Try removing the keyword 'var', or replacing it with the name of the return type.",
-);
-
-const ParserErrorCode _VOID_WITH_TYPE_ARGUMENTS = ParserErrorCode(
- 'VOID_WITH_TYPE_ARGUMENTS',
- "Type 'void' can't have type arguments.",
- correction: "Try removing the type arguments.",
-);
-
-const ParserErrorCode _WITH_BEFORE_EXTENDS = ParserErrorCode(
- 'WITH_BEFORE_EXTENDS',
- "The extends clause must be before the with clause.",
- correction: "Try moving the extends clause before the with clause.",
-);
diff --git a/pkg/analyzer/lib/src/fasta/ast_builder.dart b/pkg/analyzer/lib/src/fasta/ast_builder.dart
index 9abd454..6f77e5f 100644
--- a/pkg/analyzer/lib/src/fasta/ast_builder.dart
+++ b/pkg/analyzer/lib/src/fasta/ast_builder.dart
@@ -3416,7 +3416,7 @@
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 @@
@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/messages.yaml b/pkg/analyzer/messages.yaml
index f5cd801..d9effde 100644
--- a/pkg/analyzer/messages.yaml
+++ b/pkg/analyzer/messages.yaml
@@ -17335,17 +17335,9 @@
A code indicating that a specified hardware feature is not supported on
Chrome OS.
ParserErrorCode:
- ABSTRACT_CLASS_MEMBER:
- copyFromCfe: true
ABSTRACT_ENUM:
problemMessage: "Enums can't be declared to be 'abstract'."
correctionMessage: "Try removing the keyword 'abstract'."
- ABSTRACT_EXTERNAL_FIELD:
- copyFromCfe: true
- ABSTRACT_LATE_FIELD:
- copyFromCfe: true
- ABSTRACT_STATIC_FIELD:
- copyFromCfe: true
ABSTRACT_STATIC_METHOD:
problemMessage: "Static methods can't be declared to be 'abstract'."
correctionMessage: "Try removing the keyword 'abstract'."
@@ -17358,64 +17350,24 @@
ABSTRACT_TYPEDEF:
problemMessage: "Typedefs can't be declared to be 'abstract'."
correctionMessage: "Try removing the keyword 'abstract'."
- ANNOTATION_ON_TYPE_ARGUMENT:
- copyFromCfe: true
- ANNOTATION_WITH_TYPE_ARGUMENTS:
- copyFromCfe: true
- ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED:
- copyFromCfe: true
ASYNC_KEYWORD_USED_AS_IDENTIFIER:
problemMessage: "The keywords 'await' and 'yield' can't be used as identifiers in an asynchronous or generator function."
comment: |-
16.32 Identifier Reference: It is a compile-time error if any of the
identifiers async, await, or yield is used as an identifier in a function
body marked with either async, async, or sync.
- BINARY_OPERATOR_WRITTEN_OUT:
- copyFromCfe: true
- BREAK_OUTSIDE_OF_LOOP:
- copyFromCfe: true
- CATCH_SYNTAX:
- copyFromCfe: true
- CATCH_SYNTAX_EXTRA_PARAMETERS:
- copyFromCfe: true
- CLASS_IN_CLASS:
- copyFromCfe: true
- COLON_IN_PLACE_OF_IN:
- copyFromCfe: true
- CONFLICTING_MODIFIERS:
- copyFromCfe: true
- CONSTRUCTOR_WITH_RETURN_TYPE:
- copyFromCfe: true
- CONSTRUCTOR_WITH_TYPE_ARGUMENTS:
- copyFromCfe: true
- CONST_AND_FINAL:
- copyFromCfe: true
- CONST_CLASS:
- copyFromCfe: true
CONST_CONSTRUCTOR_WITH_BODY:
problemMessage: "Const constructors can't have a body."
correctionMessage: "Try removing either the 'const' keyword or the body."
CONST_ENUM:
problemMessage: "Enums can't be declared to be 'const'."
correctionMessage: "Try removing the 'const' keyword."
- CONST_FACTORY:
- copyFromCfe: true
- CONST_METHOD:
- copyFromCfe: true
CONST_TYPEDEF:
problemMessage: "Type aliases can't be declared to be 'const'."
correctionMessage: "Try removing the 'const' keyword."
- CONTINUE_OUTSIDE_OF_LOOP:
- copyFromCfe: true
- CONTINUE_WITHOUT_LABEL_IN_CASE:
- copyFromCfe: true
- COVARIANT_AND_STATIC:
- copyFromCfe: true
COVARIANT_CONSTRUCTOR:
problemMessage: "A constructor can't be declared to be 'covariant'."
correctionMessage: "Try removing the keyword 'covariant'."
- COVARIANT_MEMBER:
- copyFromCfe: true
COVARIANT_TOP_LEVEL_DECLARATION:
problemMessage: "Top-level declarations can't be declared to be covariant."
correctionMessage: "Try removing the keyword 'covariant'."
@@ -17450,48 +17402,18 @@
void f(void Function([int p]) g) {
}
```
- DEFERRED_AFTER_PREFIX:
- copyFromCfe: true
- DIRECTIVE_AFTER_DECLARATION:
- copyFromCfe: true
- DUPLICATED_MODIFIER:
- copyFromCfe: true
- comment: |-
- Parameters:
- 0: the modifier that was duplicated
- DUPLICATE_DEFERRED:
- copyFromCfe: true
- DUPLICATE_LABEL_IN_SWITCH_STATEMENT:
- copyFromCfe: true
- comment: |-
- Parameters:
- 0: the label that was duplicated
- DUPLICATE_PREFIX:
- copyFromCfe: true
EMPTY_ENUM_BODY:
problemMessage: An enum must declare at least one constant name.
correctionMessage: Try declaring a constant.
- ENUM_IN_CLASS:
- copyFromCfe: true
- EQUALITY_CANNOT_BE_EQUALITY_OPERAND:
- copyFromCfe: true
- EXPECTED_BODY:
- copyFromCfe: true
EXPECTED_CASE_OR_DEFAULT:
problemMessage: "Expected 'case' or 'default'."
correctionMessage: Try placing this code inside a case clause.
EXPECTED_CLASS_MEMBER:
problemMessage: Expected a class member.
correctionMessage: Try placing this code inside a class member.
- EXPECTED_ELSE_OR_COMMA:
- copyFromCfe: true
EXPECTED_EXECUTABLE:
problemMessage: Expected a method, getter, setter or operator declaration.
correctionMessage: This appears to be incomplete code. Try removing it or completing it.
- EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD:
- copyFromCfe: true
- EXPECTED_INSTEAD:
- copyFromCfe: true
EXPECTED_LIST_OR_MAP_LITERAL:
problemMessage: Expected a list or map literal.
correctionMessage: Try inserting a list or map literal, or remove the type arguments.
@@ -17504,133 +17426,21 @@
0: the token that was expected but not found
EXPECTED_TYPE_NAME:
problemMessage: Expected a type name.
- EXPERIMENT_NOT_ENABLED:
- copyFromCfe: true
- EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE:
- copyFromCfe: true
- EXTENSION_DECLARES_ABSTRACT_MEMBER:
- copyFromCfe: true
- comment: No parameters.
- documentation: |-
- #### Description
-
- The analyzer produces this diagnostic when an abstract declaration is
- declared in an extension. Extensions can declare only concrete members.
-
- #### Examples
-
- The following code produces this diagnostic because the method `a` doesn't
- have a body:
-
- ```dart
- extension E on String {
- int [!a!]();
- }
- ```
-
- #### Common fixes
-
- Either provide an implementation for the member or remove it.
- EXTENSION_DECLARES_CONSTRUCTOR:
- copyFromCfe: true
- comment: No parameters.
- documentation: |-
- #### Description
-
- The analyzer produces this diagnostic when a constructor declaration is
- found in an extension. It isn't valid to define a constructor because
- extensions aren't classes, and it isn't possible to create an instance of
- an extension.
-
- #### Examples
-
- The following code produces this diagnostic because there is a constructor
- declaration in `E`:
-
- ```dart
- extension E on String {
- [!E!]() : super();
- }
- ```
-
- #### Common fixes
-
- Remove the constructor or replace it with a static method.
- EXTENSION_DECLARES_INSTANCE_FIELD:
- copyFromCfe: true
- comment: No parameters.
- documentation: |-
- #### Description
-
- The analyzer produces this diagnostic when an instance field declaration is
- found in an extension. It isn't valid to define an instance field because
- extensions can only add behavior, not state.
-
- #### Examples
-
- The following code produces this diagnostic because `s` is an instance
- field:
-
- ```dart
- %language=2.9
- extension E on String {
- String [!s!];
- }
- ```
-
- #### Common fixes
-
- Remove the field, make it a static field, or convert it to be a getter,
- setter, or method.
- EXTERNAL_CLASS:
- copyFromCfe: true
- EXTERNAL_CONSTRUCTOR_WITH_BODY:
- copyFromCfe: true
- EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER:
- copyFromCfe: true
- EXTERNAL_ENUM:
- copyFromCfe: true
- EXTERNAL_FACTORY_REDIRECTION:
- copyFromCfe: true
- EXTERNAL_FACTORY_WITH_BODY:
- copyFromCfe: true
- EXTERNAL_FIELD:
- copyFromCfe: true
EXTERNAL_GETTER_WITH_BODY:
problemMessage: "External getters can't have a body."
correctionMessage: "Try removing the body of the getter, or removing the keyword 'external'."
- EXTERNAL_LATE_FIELD:
- copyFromCfe: true
- EXTERNAL_METHOD_WITH_BODY:
- copyFromCfe: true
EXTERNAL_OPERATOR_WITH_BODY:
problemMessage: "External operators can't have a body."
correctionMessage: "Try removing the body of the operator, or removing the keyword 'external'."
EXTERNAL_SETTER_WITH_BODY:
problemMessage: "External setters can't have a body."
correctionMessage: "Try removing the body of the setter, or removing the keyword 'external'."
- EXTERNAL_TYPEDEF:
- copyFromCfe: true
- EXTRANEOUS_MODIFIER:
- copyFromCfe: true
- FACTORY_TOP_LEVEL_DECLARATION:
- copyFromCfe: true
FACTORY_WITHOUT_BODY:
problemMessage: "A non-redirecting 'factory' constructor must have a body."
correctionMessage: Try adding a body to the constructor.
FACTORY_WITH_INITIALIZERS:
problemMessage: "A 'factory' constructor can't have initializers."
correctionMessage: "Try removing the 'factory' keyword to make this a generative constructor, or removing the initializers."
- FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS:
- copyFromCfe: true
- FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR:
- copyFromCfe: true
- FINAL_AND_COVARIANT:
- copyFromCfe: true
- FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER:
- copyFromCfe: true
- FINAL_AND_VAR:
- copyFromCfe: true
FINAL_CLASS:
problemMessage: "Classes can't be declared to be 'final'."
correctionMessage: "Try removing the keyword 'final'."
@@ -17649,28 +17459,12 @@
FUNCTION_TYPED_PARAMETER_VAR:
problemMessage: "Function-typed parameters can't specify 'const', 'final' or 'var' in place of a return type."
correctionMessage: Try replacing the keyword with a return type.
- GETTER_CONSTRUCTOR:
- copyFromCfe: true
GETTER_IN_FUNCTION:
problemMessage: "Getters can't be defined within methods or functions."
correctionMessage: Try moving the getter outside the method or function, or converting the getter to a function.
GETTER_WITH_PARAMETERS:
problemMessage: Getters must be declared without a parameter list.
correctionMessage: "Try removing the parameter list, or removing the keyword 'get' to define a method rather than a getter."
- ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE:
- copyFromCfe: true
- IMPLEMENTS_BEFORE_EXTENDS:
- copyFromCfe: true
- IMPLEMENTS_BEFORE_ON:
- copyFromCfe: true
- IMPLEMENTS_BEFORE_WITH:
- copyFromCfe: true
- IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE:
- copyFromCfe: true
- INITIALIZED_VARIABLE_IN_FOR_EACH:
- copyFromCfe: true
- INVALID_AWAIT_IN_FOR:
- copyFromCfe: true
INVALID_CODE_POINT:
problemMessage: "The escape sequence '{0}' isn't a valid code point."
comment: |-
@@ -17678,23 +17472,12 @@
0: the invalid escape sequence
INVALID_COMMENT_REFERENCE:
problemMessage: "Comment references should contain a possibly prefixed identifier and can start with 'new', but shouldn't contain anything else."
- INVALID_CONSTRUCTOR_NAME:
- copyFromCfe: true
INVALID_GENERIC_FUNCTION_TYPE:
problemMessage: Invalid generic function type.
correctionMessage: "Try using a generic function type (returnType 'Function(' parameters ')')."
- INVALID_HEX_ESCAPE:
- copyFromCfe: true
- INVALID_INITIALIZER:
- copyFromCfe: true
INVALID_LITERAL_IN_CONFIGURATION:
problemMessage: "The literal in a configuration can't contain interpolation."
correctionMessage: Try removing the interpolation expressions.
- INVALID_OPERATOR:
- copyFromCfe: true
- comment: |-
- Parameters:
- 0: the operator that is invalid
INVALID_OPERATOR_FOR_SUPER:
problemMessage: "The operator '{0}' can't be used with 'super'."
comment: |-
@@ -17703,83 +17486,24 @@
Only generated by the old parser.
Replaced by INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER.
- INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER:
- copyFromCfe: true
INVALID_STAR_AFTER_ASYNC:
problemMessage: "The modifier 'async*' isn't allowed for an expression function body."
correctionMessage: Try converting the body to a block.
- INVALID_SUPER_IN_INITIALIZER:
- copyFromCfe: true
INVALID_SYNC:
problemMessage: "The modifier 'sync' isn't allowed for an expression function body."
correctionMessage: Try converting the body to a block.
- INVALID_THIS_IN_INITIALIZER:
- copyFromCfe: true
- INVALID_UNICODE_ESCAPE:
- copyFromCfe: true
- INVALID_USE_OF_COVARIANT_IN_EXTENSION:
- copyFromCfe: true
- comment: No parameters.
- documentation: |-
- #### Description
-
- The analyzer produces this diagnostic when a member declared inside an
- extension uses the keyword `covariant` in the declaration of a parameter.
- Extensions aren't classes and don't have subclasses, so the keyword serves
- no purpose.
-
- #### Examples
-
- The following code produces this diagnostic because `i` is marked as being
- covariant:
-
- ```dart
- extension E on String {
- void a([!covariant!] int i) {}
- }
- ```
-
- #### Common fixes
-
- Remove the `covariant` keyword:
-
- ```dart
- extension E on String {
- void a(int i) {}
- }
- ```
- LIBRARY_DIRECTIVE_NOT_FIRST:
- copyFromCfe: true
- LITERAL_WITH_CLASS:
- copyFromCfe: true
- LITERAL_WITH_CLASS_AND_NEW:
- copyFromCfe: true
- LITERAL_WITH_NEW:
- copyFromCfe: true
LOCAL_FUNCTION_DECLARATION_MODIFIER:
problemMessage: "Local function declarations can't specify any modifiers."
correctionMessage: Try removing the modifier.
- MEMBER_WITH_CLASS_NAME:
- copyFromCfe: true
- MISSING_ASSIGNABLE_SELECTOR:
- copyFromCfe: true
- MISSING_ASSIGNMENT_IN_INITIALIZER:
- copyFromCfe: true
- MISSING_CATCH_OR_FINALLY:
- copyFromCfe: true
MISSING_CLOSING_PARENTHESIS:
problemMessage: The closing parenthesis is missing.
correctionMessage: Try adding the closing parenthesis.
- MISSING_CONST_FINAL_VAR_OR_TYPE:
- copyFromCfe: true
MISSING_ENUM_BODY:
problemMessage: An enum definition must have a body with at least one constant name.
correctionMessage: Try adding a body and defining at least one constant.
MISSING_EXPRESSION_IN_INITIALIZER:
problemMessage: Expected an expression after the assignment operator.
correctionMessage: Try adding the value to be assigned, or remove the assignment operator.
- MISSING_EXPRESSION_IN_THROW:
- copyFromCfe: true
MISSING_FUNCTION_BODY:
problemMessage: A function body must be provided.
correctionMessage: Try adding a function body.
@@ -17794,10 +17518,6 @@
correctionMessage: "Try adding the keyword 'get'."
MISSING_IDENTIFIER:
problemMessage: Expected an identifier.
- MISSING_INITIALIZER:
- copyFromCfe: true
- MISSING_KEYWORD_OPERATOR:
- copyFromCfe: true
MISSING_METHOD_PARAMETERS:
problemMessage: Methods must have an explicit list of parameters.
correctionMessage: Try adding a parameter list.
@@ -17810,13 +17530,9 @@
MISSING_NAME_IN_PART_OF_DIRECTIVE:
problemMessage: Part-of directives must include a library name.
correctionMessage: "Try adding a library name after the 'of'."
- MISSING_PREFIX_IN_DEFERRED_IMPORT:
- copyFromCfe: true
MISSING_STAR_AFTER_SYNC:
problemMessage: "The modifier 'sync' must be followed by a star ('*')."
correctionMessage: Try removing the modifier, or add a star.
- MISSING_STATEMENT:
- copyFromCfe: true
MISSING_TERMINATOR_FOR_PARAMETER_GROUP:
problemMessage: "There is no '{0}' to close the parameter group."
correctionMessage: "Try inserting a '{0}' at the end of the group."
@@ -17832,24 +17548,12 @@
MIXED_PARAMETER_GROUPS:
problemMessage: "Can't have both positional and named parameters in a single parameter list."
correctionMessage: Try choosing a single style of optional parameters.
- MIXIN_DECLARES_CONSTRUCTOR:
- copyFromCfe: true
- MODIFIER_OUT_OF_ORDER:
- copyFromCfe: true
- MULTIPLE_EXTENDS_CLAUSES:
- copyFromCfe: true
MULTIPLE_IMPLEMENTS_CLAUSES:
problemMessage: Each class or mixin definition can have at most one implements clause.
correctionMessage: Try combining all of the implements clauses into a single clause.
- MULTIPLE_LIBRARY_DIRECTIVES:
- copyFromCfe: true
MULTIPLE_NAMED_PARAMETER_GROUPS:
problemMessage: "Can't have multiple groups of named parameters in a single parameter list."
correctionMessage: Try combining all of the groups into a single group.
- MULTIPLE_ON_CLAUSES:
- copyFromCfe: true
- MULTIPLE_PART_OF_DIRECTIVES:
- copyFromCfe: true
MULTIPLE_POSITIONAL_PARAMETER_GROUPS:
problemMessage: "Can't have multiple groups of positional parameters in a single parameter list."
correctionMessage: Try combining all of the groups into a single group.
@@ -17859,10 +17563,6 @@
comment: |-
Parameters:
0: the number of variables being declared
- MULTIPLE_VARIANCE_MODIFIERS:
- copyFromCfe: true
- MULTIPLE_WITH_CLAUSES:
- copyFromCfe: true
NAMED_FUNCTION_EXPRESSION:
problemMessage: "Function expressions can't be named."
correctionMessage: Try removing the name, or moving the function expression to a function declaration statement.
@@ -17875,8 +17575,6 @@
NATIVE_CLAUSE_IN_NON_SDK_CODE:
problemMessage: Native clause can only be used in the SDK and code that is loaded through native extensions.
correctionMessage: Try removing the native clause.
- NATIVE_CLAUSE_SHOULD_BE_ANNOTATION:
- copyFromCfe: true
NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE:
problemMessage: Native functions can only be declared in the SDK and code that is loaded through native extensions.
correctionMessage: "Try removing the word 'native'."
@@ -17900,54 +17598,24 @@
NORMAL_BEFORE_OPTIONAL_PARAMETERS:
problemMessage: Normal parameters must occur before optional parameters.
correctionMessage: Try moving all of the normal parameters before the optional parameters.
- NULL_AWARE_CASCADE_OUT_OF_ORDER:
- copyFromCfe: true
POSITIONAL_AFTER_NAMED_ARGUMENT:
problemMessage: Positional arguments must occur before named arguments.
correctionMessage: Try moving all of the positional arguments before the named arguments.
POSITIONAL_PARAMETER_OUTSIDE_GROUP:
problemMessage: "Positional parameters must be enclosed in square brackets ('[' and ']')."
correctionMessage: Try surrounding the positional parameters in square brackets.
- PREFIX_AFTER_COMBINATOR:
- copyFromCfe: true
- REDIRECTING_CONSTRUCTOR_WITH_BODY:
- copyFromCfe: true
- REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR:
- copyFromCfe: true
- SETTER_CONSTRUCTOR:
- copyFromCfe: true
SETTER_IN_FUNCTION:
problemMessage: "Setters can't be defined within methods or functions."
correctionMessage: Try moving the setter outside the method or function.
- STACK_OVERFLOW:
- copyFromCfe: true
- STATIC_CONSTRUCTOR:
- copyFromCfe: true
STATIC_GETTER_WITHOUT_BODY:
problemMessage: "A 'static' getter must have a body."
correctionMessage: "Try adding a body to the getter, or removing the keyword 'static'."
- STATIC_OPERATOR:
- copyFromCfe: true
STATIC_SETTER_WITHOUT_BODY:
problemMessage: "A 'static' setter must have a body."
correctionMessage: "Try adding a body to the setter, or removing the keyword 'static'."
STATIC_TOP_LEVEL_DECLARATION:
problemMessage: "Top-level declarations can't be declared to be static."
correctionMessage: "Try removing the keyword 'static'."
- SWITCH_HAS_CASE_AFTER_DEFAULT_CASE:
- copyFromCfe: true
- SWITCH_HAS_MULTIPLE_DEFAULT_CASES:
- copyFromCfe: true
- TOP_LEVEL_OPERATOR:
- copyFromCfe: true
- TYPEDEF_IN_CLASS:
- copyFromCfe: true
- TYPE_ARGUMENTS_ON_TYPE_VARIABLE:
- copyFromCfe: true
- TYPE_BEFORE_FACTORY:
- copyFromCfe: true
- TYPE_PARAMETER_ON_CONSTRUCTOR:
- copyFromCfe: true
TYPE_PARAMETER_ON_OPERATOR:
problemMessage: "Types parameters aren't allowed when defining an operator."
correctionMessage: Try removing the type parameters.
@@ -17966,25 +17634,15 @@
comment: |-
Parameters:
0: the unexpected text that was found
- VAR_AND_TYPE:
- copyFromCfe: true
- VAR_AS_TYPE_NAME:
- copyFromCfe: true
VAR_CLASS:
problemMessage: "Classes can't be declared to be 'var'."
correctionMessage: "Try removing the keyword 'var'."
VAR_ENUM:
problemMessage: "Enums can't be declared to be 'var'."
correctionMessage: "Try removing the keyword 'var'."
- VAR_RETURN_TYPE:
- copyFromCfe: true
VAR_TYPEDEF:
problemMessage: "Typedefs can't be declared to be 'var'."
correctionMessage: "Try removing the keyword 'var', or replacing it with the name of the return type."
- VOID_WITH_TYPE_ARGUMENTS:
- copyFromCfe: true
- WITH_BEFORE_EXTENDS:
- copyFromCfe: true
WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER:
problemMessage: "The default value of a positional parameter should be preceded by '='."
correctionMessage: "Try replacing the ':' with '='."
diff --git a/pkg/analyzer/tool/diagnostics/generate.dart b/pkg/analyzer/tool/diagnostics/generate.dart
index 30b25bc..acc861c 100644
--- a/pkg/analyzer/tool/diagnostics/generate.dart
+++ b/pkg/analyzer/tool/diagnostics/generate.dart
@@ -43,7 +43,7 @@
[analyzerPath, 'lib', 'src', 'pubspec', 'pubspec_warning_code.g.dart'],
], [
null,
- [analyzerPath, 'lib', 'src', 'dart', 'error', 'syntactic_errors.g.dart'],
+ null,
null,
null,
]);
diff --git a/pkg/analyzer/tool/messages/error_code_info.dart b/pkg/analyzer/tool/messages/error_code_info.dart
index bc63b2b..83a511e 100644
--- a/pkg/analyzer/tool/messages/error_code_info.dart
+++ b/pkg/analyzer/tool/messages/error_code_info.dart
@@ -128,13 +128,6 @@
/// error in code generated output.
final String? comment;
- /// `true` if this error should be copied from an error in the CFE. The
- /// purpose of this field is so that the documentation for the error can exist
- /// in the analyzer's messages.yaml file but the error text can come from the
- /// CFE's messages.yaml file. TODO(paulberry): add support for documentation
- /// to the CFE's messages.yaml file so that this isn't necessary.
- final bool copyFromCfe;
-
/// If the error code has an associated correctionMessage, the template for
/// it.
final String? correctionMessage;
@@ -153,9 +146,8 @@
/// Indicates whether this error is caused by an unresolved identifier.
final bool isUnresolvedIdentifier;
- /// The problemMessage for the error code, or `null` if [copyFromCfe] is
- /// `true`.
- final String? problemMessage;
+ /// The problemMessage for the error code.
+ final String problemMessage;
/// If present, indicates that this error code has a special name for
/// presentation to the user, that is potentially shared with other error
@@ -165,40 +157,26 @@
ErrorCodeInfo(
{this.analyzerCode = const [],
this.comment,
- this.copyFromCfe = false,
this.documentation,
this.hasPublishedDocs = false,
this.index,
this.isUnresolvedIdentifier = false,
this.sharedName,
- this.problemMessage,
- this.correctionMessage}) {
- if (copyFromCfe) {
- if (problemMessage != null) {
- throw "Error codes marked `copyFromCfe: true` can't have a "
- "problemMessage.";
- }
- } else {
- if (problemMessage == null) {
- throw 'Error codes must have a problemMessage unless they are marked '
- '`copyFromCfe: true`.';
- }
- }
- }
+ required this.problemMessage,
+ this.correctionMessage});
/// Decodes an [ErrorCodeInfo] object from its YAML representation.
ErrorCodeInfo.fromYaml(Map<Object?, Object?> yaml)
: this(
analyzerCode: _decodeAnalyzerCode(yaml['analyzerCode']),
comment: yaml['comment'] as String?,
- copyFromCfe: yaml['copyFromCfe'] as bool? ?? false,
correctionMessage: yaml['correctionMessage'] as String?,
documentation: yaml['documentation'] as String?,
hasPublishedDocs: yaml['hasPublishedDocs'] as bool? ?? false,
index: yaml['index'] as int?,
isUnresolvedIdentifier:
yaml['isUnresolvedIdentifier'] as bool? ?? false,
- problemMessage: yaml['problemMessage'] as String?,
+ problemMessage: yaml['problemMessage'] as String,
sharedName: yaml['sharedName'] as String?);
/// Generates a dart declaration for this error code, suitable for inclusion
@@ -210,7 +188,7 @@
out.writeln("'${sharedName ?? errorCode}',");
final placeholderToIndexMap = _computePlaceholderToIndexMap();
out.writeln(
- json.encode(_convertTemplate(placeholderToIndexMap, problemMessage!)) +
+ json.encode(_convertTemplate(placeholderToIndexMap, problemMessage)) +
',');
final correctionMessage = this.correctionMessage;
if (correctionMessage is String) {
@@ -254,11 +232,10 @@
/// Encodes this object into a YAML representation.
Map<Object?, Object?> toYaml() => {
- if (copyFromCfe) 'copyFromCfe': true,
if (sharedName != null) 'sharedName': sharedName,
if (analyzerCode.isNotEmpty)
'analyzerCode': _encodeAnalyzerCode(analyzerCode),
- if (problemMessage != null) 'problemMessage': problemMessage,
+ 'problemMessage': problemMessage,
if (correctionMessage != null) 'correctionMessage': correctionMessage,
if (isUnresolvedIdentifier) 'isUnresolvedIdentifier': true,
if (hasPublishedDocs) 'hasPublishedDocs': true,
diff --git a/pkg/analyzer/tool/messages/extract_errors_to_yaml.dart b/pkg/analyzer/tool/messages/extract_errors_to_yaml.dart
index 4834120..b1374d2 100644
--- a/pkg/analyzer/tool/messages/extract_errors_to_yaml.dart
+++ b/pkg/analyzer/tool/messages/extract_errors_to_yaml.dart
@@ -10,7 +10,6 @@
// TODO(paulberry): once code generation is in place, remove this script.
import 'dart:convert';
-import 'dart:io';
import 'package:analyzer/dart/analysis/features.dart';
import 'package:analyzer/dart/analysis/utilities.dart';
@@ -27,29 +26,14 @@
main() {
var errorDeclarations = _findErrorDeclarations();
- var generatedAnalyzerCodes = _computeGeneratedAnalyzerCodes();
var errorCodesByClass = _findErrorCodesByClass();
- _generateYaml(errorCodesByClass, errorDeclarations, generatedAnalyzerCodes);
+ _generateYaml(errorCodesByClass, errorDeclarations);
}
/// The path to the `analyzer` package.
final String _analyzerPkgPath =
normalize(join(pkg_root.packageRoot, 'analyzer'));
-/// The path to the `analyzer` package.
-final String _frontEndPkgPath =
- normalize(join(pkg_root.packageRoot, 'front_end'));
-
-/// Computes the set of `ParserErrorCode`s that are generated based on
-/// `pkg/front_end/messages.yaml`.
-Set<String> _computeGeneratedAnalyzerCodes() {
- Map<dynamic, dynamic> messagesYaml = loadYaml(
- File(join(_frontEndPkgPath, 'messages.yaml')).readAsStringSync());
- var messages = decodeCfeMessagesYaml(messagesYaml);
- var tables = CfeToAnalyzerErrorCodeTables(messages);
- return tables.infoToAnalyzerCode.values.toSet();
-}
-
/// Encodes [yaml] into a string parseable as YAML.
///
/// YAML is complex and we are just trying to do a good enough job for a one
@@ -205,10 +189,8 @@
/// [_findErrorCodesByClass]) and [errorDeclarations] (obtained from
/// [_findErrorDeclarations]) into a YAML representation of the errors, and
/// prints the resulting YAML.
-void _generateYaml(
- Map<String, List<ErrorCode>> errorCodesByClass,
- Map<String, Map<String, VariableDeclaration>> errorDeclarations,
- Set<String> generatedAnalyzerCodes) {
+void _generateYaml(Map<String, List<ErrorCode>> errorCodesByClass,
+ Map<String, Map<String, VariableDeclaration>> errorDeclarations) {
var yaml = <String, Map<String, Object?>>{};
for (var entry in errorCodesByClass.entries) {
var yamlCodes = <String, Object?>{};
@@ -239,27 +221,15 @@
var commentInfo = _extractCommentInfo(fieldDeclaration);
var documentationComment = commentInfo.documentationComment;
var otherComment = commentInfo.otherComment;
- ErrorCodeInfo errorCodeInfo;
- if (className == 'ParserErrorCode' &&
- generatedAnalyzerCodes.contains(name)) {
- if (uniqueNameSuffix != name) {
- throw "Auto-generated parser error codes can't be aliased";
- }
- errorCodeInfo = ErrorCodeInfo(
- copyFromCfe: true,
- comment: documentationComment,
- documentation: otherComment);
- } else {
- errorCodeInfo = ErrorCodeInfo(
- sharedName: uniqueNameSuffix == name ? null : name,
- problemMessage: code.message,
- correctionMessage: code.correction,
- isUnresolvedIdentifier: code.isUnresolvedIdentifier,
- hasPublishedDocs: code.hasPublishedDocs,
- comment: documentationComment,
- documentation: otherComment);
- }
- yamlCodes[uniqueNameSuffix] = errorCodeInfo.toYaml();
+ yamlCodes[uniqueNameSuffix] = ErrorCodeInfo(
+ sharedName: uniqueNameSuffix == name ? null : name,
+ problemMessage: code.message,
+ correctionMessage: code.correction,
+ isUnresolvedIdentifier: code.isUnresolvedIdentifier,
+ hasPublishedDocs: code.hasPublishedDocs,
+ comment: documentationComment,
+ documentation: otherComment)
+ .toYaml();
}
}
String encodedYaml = _encodeYaml(yaml);
diff --git a/pkg/analyzer/tool/messages/generate.dart b/pkg/analyzer/tool/messages/generate.dart
index 15c7f35..ac733b9 100644
--- a/pkg/analyzer/tool/messages/generate.dart
+++ b/pkg/analyzer/tool/messages/generate.dart
@@ -29,7 +29,6 @@
await GeneratedContent.generateAll(analyzerPkgPath, allTargets);
_SyntacticErrorGenerator()
- ..generateFormatCode()
..checkForManualChanges()
..printSummary();
}
@@ -82,7 +81,7 @@
type: 'HINT',
extraImports: ['package:analyzer/src/error/analyzer_error_code.dart']),
_ErrorClassInfo(
- // TODO(paulberry): merge with `syntactic_errors.g.dart`.
+ // TODO(paulberry): rename to `syntactic_errors.g.dart`.
filePath: 'lib/src/dart/error/syntactic_errors.analyzer.g.dart',
name: 'ParserErrorCode',
type: 'SYNTACTIC_ERROR',
@@ -101,16 +100,7 @@
];
/// A list of all targets generated by this code generator.
-final List<GeneratedContent> allTargets = <GeneratedContent>[
- GeneratedFile('lib/src/dart/error/syntactic_errors.g.dart',
- (String pkgPath) async {
- final codeGenerator = _SyntacticErrorGenerator();
-
- codeGenerator.generateFormatCode();
- return codeGenerator.out.toString();
- }),
- ..._analyzerGeneratedFiles(),
-];
+final List<GeneratedContent> allTargets = _analyzerGeneratedFiles();
/// The path to the `analyzer` package.
final String analyzerPkgPath =
@@ -124,6 +114,9 @@
final Map<String, Map<String, ErrorCodeInfo>> _analyzerMessages =
_loadAnalyzerMessages();
+/// Decoded messages from the front end's `messages.yaml` file.
+final Map<String, ErrorCodeInfo> _frontEndMessages = _loadFrontEndMessages();
+
/// Generates a list of [GeneratedContent] objects describing all the analyzer
/// files that need to be generated.
List<GeneratedContent> _analyzerGeneratedFiles() {
@@ -148,9 +141,18 @@
return decodeAnalyzerMessagesYaml(messagesYaml);
}
+/// Loads front end messages from the front end's `messages.yaml` file.
+Map<String, ErrorCodeInfo> _loadFrontEndMessages() {
+ Map<dynamic, dynamic> messagesYaml =
+ loadYaml(File(join(frontEndPkgPath, 'messages.yaml')).readAsStringSync());
+ return decodeCfeMessagesYaml(messagesYaml);
+}
+
/// Code generator for analyzer error classes.
class _AnalyzerErrorGenerator {
final List<_ErrorClassInfo> errorClasses;
+ final CfeToAnalyzerErrorCodeTables tables =
+ CfeToAnalyzerErrorCodeTables(_frontEndMessages);
final out = StringBuffer('''
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@@ -166,45 +168,42 @@
void generate() {
var imports = {'package:analyzer/error/error.dart'};
- var parts = <String>{};
+ bool shouldGenerateFastaAnalyzerErrorCodes = false;
for (var errorClass in errorClasses) {
imports.addAll(errorClass.extraImports);
if (errorClass.includeCfeMessages) {
- parts.add('syntactic_errors.g.dart');
+ shouldGenerateFastaAnalyzerErrorCodes = true;
}
}
out.writeln();
for (var importPath in imports.toList()..sort()) {
out.writeln("import ${json.encode(importPath)};");
}
- if (parts.isNotEmpty) {
- out.writeln();
- for (var partPath in parts.toList()..sort()) {
- out.writeln("part ${json.encode(partPath)};");
- }
- }
out.writeln();
out.writeln("// It is hard to visually separate each code's _doc comment_ "
"from its published");
out.writeln('// _documentation comment_ when each is written as an '
'end-of-line comment.');
out.writeln('// ignore_for_file: slash_for_doc_comments');
+ if (shouldGenerateFastaAnalyzerErrorCodes) {
+ out.writeln();
+ _generateFastaAnalyzerErrorCodeList();
+ }
for (var errorClass in errorClasses.toList()
..sort((a, b) => a.name.compareTo(b.name))) {
out.writeln();
out.write('class ${errorClass.name} extends ${errorClass.superclass} {');
- for (var entry in _analyzerMessages[errorClass.name]!.entries.toList()
- ..sort((a, b) => a.key.compareTo(b.key))) {
+ var entries = [
+ ..._analyzerMessages[errorClass.name]!.entries,
+ if (errorClass.includeCfeMessages) ...tables.analyzerCodeToInfo.entries
+ ];
+ for (var entry in entries..sort((a, b) => a.key.compareTo(b.key))) {
var errorName = entry.key;
var errorCodeInfo = entry.value;
out.writeln();
out.write(errorCodeInfo.toAnalyzerComments(indent: ' '));
out.writeln(' static const ${errorClass.name} $errorName =');
- if (errorCodeInfo.copyFromCfe) {
- out.writeln(' _$errorName;');
- } else {
- out.writeln(errorCodeInfo.toAnalyzerCode(errorClass.name, errorName));
- }
+ out.writeln(errorCodeInfo.toAnalyzerCode(errorClass.name, errorName));
}
out.writeln();
out.writeln('/// Initialize a newly created error code to have the given '
@@ -232,6 +231,15 @@
out.writeln('}');
}
}
+
+ void _generateFastaAnalyzerErrorCodeList() {
+ out.writeln('final fastaAnalyzerErrorCodes = <ErrorCode?>[');
+ for (var entry in tables.indexToInfo) {
+ var name = tables.infoToAnalyzerCode[entry];
+ out.writeln('${name == null ? 'null' : 'ParserErrorCode.$name'},');
+ }
+ out.writeln('];');
+ }
}
class _ErrorClassInfo {
@@ -276,16 +284,6 @@
final Map<String, Map<String, ErrorCodeInfo>> analyzerMessages;
final String errorConverterSource;
final String parserSource;
- final out = StringBuffer('''
-//
-// THIS FILE IS GENERATED. DO NOT EDIT.
-//
-// Instead modify 'pkg/front_end/messages.yaml' and run
-// 'dart pkg/analyzer/tool/messages/generate.dart' to update.
-
-part of 'syntactic_errors.analyzer.g.dart';
-
-''');
factory _SyntacticErrorGenerator() {
String frontEndPkgPath = normalize(join(pkg_root.packageRoot, 'front_end'));
@@ -341,43 +339,17 @@
}
}
- void generateErrorCodes() {
- final entryMap = tables.analyzerCodeToInfo;
- for (var errorCode in entryMap.keys.toList()..sort()) {
- final entry = entryMap[errorCode]!;
- final className = 'ParserErrorCode';
- out.writeln();
- out.writeln('const $className _$errorCode =');
- out.writeln(entry.toAnalyzerCode(className, errorCode));
- }
- }
-
- void generateFastaAnalyzerErrorCodeList() {
- out.writeln('final fastaAnalyzerErrorCodes = <ErrorCode?>[');
- for (var entry in tables.indexToInfo) {
- var name = tables.infoToAnalyzerCode[entry];
- out.writeln('${name == null ? 'null' : '_$name'},');
- }
- out.writeln('];');
- }
-
- void generateFormatCode() {
- generateFastaAnalyzerErrorCodeList();
- generateErrorCodes();
- }
-
void printSummary() {
// Build a map of error message to ParserErrorCode
final messageToName = <String, String>{};
for (var entry in analyzerMessages['ParserErrorCode']!.entries) {
- if (entry.value.copyFromCfe) continue;
String message =
- entry.value.problemMessage!.replaceAll(RegExp(r'\{\d+\}'), '');
+ entry.value.problemMessage.replaceAll(RegExp(r'\{\d+\}'), '');
messageToName[message] = entry.key;
}
String messageFromEntryTemplate(ErrorCodeInfo entry) {
- String problemMessage = entry.problemMessage!;
+ String problemMessage = entry.problemMessage;
String message = problemMessage.replaceAll(RegExp(r'#\w+'), '');
return message;
}
@@ -453,7 +425,7 @@
// TODO(paulberry): handle multiple analyzer codes
if (entry.index == null && entry.analyzerCode.length == 1) {
analyzerCode = entry.analyzerCode.single;
- problemMessage = entry.problemMessage!;
+ problemMessage = entry.problemMessage;
}
}
print(' ${fastaErrorCode.padRight(30)} --> $analyzerCode'
diff --git a/pkg/analyzer/tool/summary/mini_ast.dart b/pkg/analyzer/tool/summary/mini_ast.dart
index b7ded86..ecf9036 100644
--- a/pkg/analyzer/tool/summary/mini_ast.dart
+++ b/pkg/analyzer/tool/summary/mini_ast.dart
@@ -582,7 +582,7 @@
@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 a924f16..e9df381 100644
--- a/pkg/compiler/lib/src/ir/modular.dart
+++ b/pkg/compiler/lib/src/ir/modular.dart
@@ -141,5 +141,5 @@
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 1647344..0bd2619 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 @@
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 ab7f26f..6dfea6d 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 @@
var cantReadFile =
templateCantReadFile.withArguments(entryPoint, EXCEPTION);
List<String> 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 8d195b3..fa46af3 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 @@
DiagnosticMessage _createInternalError(Uri uri, int line, int col, String msg) {
return Message(Code<String>('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/api_prototype/compiler_options.dart b/pkg/front_end/lib/src/api_prototype/compiler_options.dart
index 370f581..7f14df8 100644
--- a/pkg/front_end/lib/src/api_prototype/compiler_options.dart
+++ b/pkg/front_end/lib/src/api_prototype/compiler_options.dart
@@ -126,6 +126,8 @@
Map<ExperimentalFlag, Version>? experimentEnabledVersionForTesting;
Map<ExperimentalFlag, Version>? experimentReleasedVersionForTesting;
+ bool enableUnscheduledExperiments = false;
+
/// Environment map used when evaluating `bool.fromEnvironment`,
/// `int.fromEnvironment` and `String.fromEnvironment` during constant
/// evaluation. If the map is `null`, all environment constants will be left
@@ -357,6 +359,9 @@
if (currentSdkVersion != other.currentSdkVersion) return false;
if (emitDeps != other.emitDeps) return false;
if (!equalSets(invocationModes, other.invocationModes)) return false;
+ if (enableUnscheduledExperiments != other.enableUnscheduledExperiments) {
+ return false;
+ }
return true;
}
diff --git a/pkg/front_end/lib/src/base/command_line_options.dart b/pkg/front_end/lib/src/base/command_line_options.dart
index 46aabec..a8c7e9b 100644
--- a/pkg/front_end/lib/src/base/command_line_options.dart
+++ b/pkg/front_end/lib/src/base/command_line_options.dart
@@ -29,6 +29,8 @@
static const String compileSdk = "--compile-sdk";
static const String dumpIr = "--dump-ir";
static const String enableExperiment = "--enable-experiment";
+ static const String enableUnscheduledExperiments =
+ "--enable-unscheduled-experiments";
static const String excludeSource = "--exclude-source";
static const String omitPlatform = "--omit-platform";
static const String fatal = "--fatal";
@@ -59,6 +61,8 @@
const Option(Flags.dumpIr, const BoolValue(false));
static const Option<List<String>?> enableExperiment =
const Option(Flags.enableExperiment, const StringListValue());
+ static const Option<bool> enableUnscheduledExperiments =
+ const Option(Flags.enableUnscheduledExperiments, const BoolValue(false));
static const Option<bool> excludeSource =
const Option(Flags.excludeSource, const BoolValue(false));
static const Option<bool> omitPlatform =
diff --git a/pkg/front_end/lib/src/base/processed_options.dart b/pkg/front_end/lib/src/base/processed_options.dart
index e6a3ec0..de2886d 100644
--- a/pkg/front_end/lib/src/base/processed_options.dart
+++ b/pkg/front_end/lib/src/base/processed_options.dart
@@ -186,6 +186,8 @@
bool get warnOnReachabilityCheck => _raw.warnOnReachabilityCheck;
+ bool get enableUnscheduledExperiments => _raw.enableUnscheduledExperiments;
+
/// The entry-points provided to the compiler.
final List<Uri> inputs;
@@ -249,7 +251,7 @@
if (_raw.skipForDebugging < 0) {
print(templateDebugTrace
.withArguments("$severity", "${StackTrace.current}")
- .message);
+ .problemMessage);
} else {
throw new DebugAbort(
message.uri, message.charOffset, severity, StackTrace.current);
@@ -604,7 +606,7 @@
// 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;
}
@@ -727,7 +729,7 @@
// 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 e893019..9c90805 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 @@
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 4ac03ac..8460e59 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 @@
return unhandled(
templateTypeArgumentMismatch
.withArguments(typeVariablesCount)
- .message,
+ .problemMessage,
"buildTypeArguments",
-1,
null);
diff --git a/pkg/front_end/lib/src/fasta/builder/factory_builder.dart b/pkg/front_end/lib/src/fasta/builder/factory_builder.dart
index d19bcde..2561223 100644
--- a/pkg/front_end/lib/src/fasta/builder/factory_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/factory_builder.dart
@@ -401,7 +401,7 @@
unhandled("${targetBuilder.runtimeType}", "buildOutlineExpressions",
charOffset, fileUri);
}
- Arguments targetInvocationArguments;
+ ArgumentsImpl targetInvocationArguments;
{
List<Expression> positionalArguments = <Expression>[];
for (VariableDeclaration parameter
diff --git a/pkg/front_end/lib/src/fasta/builder/field_builder.dart b/pkg/front_end/lib/src/fasta/builder/field_builder.dart
index df0d819..57c61dd 100644
--- a/pkg/front_end/lib/src/fasta/builder/field_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/field_builder.dart
@@ -426,8 +426,14 @@
_fieldEncoding.completeSignature(coreTypes);
for (Annotatable annotatable in _fieldEncoding.annotatables) {
- MetadataBuilder.buildAnnotations(annotatable, metadata, library,
- classBuilder, this, fileUri, classBuilder?.scope ?? library.scope);
+ MetadataBuilder.buildAnnotations(
+ annotatable,
+ metadata,
+ library,
+ declarationBuilder,
+ this,
+ fileUri,
+ declarationBuilder?.scope ?? library.scope);
}
// For modular compilation we need to include initializers of all const
@@ -439,10 +445,10 @@
isClassMember &&
classBuilder!.declaresConstConstructor)) &&
_constInitializerToken != null) {
- Scope scope = classBuilder?.scope ?? library.scope;
+ Scope scope = declarationBuilder?.scope ?? library.scope;
BodyBuilder bodyBuilder = library.loader
.createBodyBuilderForOutlineExpression(
- library, classBuilder, this, scope, fileUri);
+ library, declarationBuilder, this, scope, fileUri);
bodyBuilder.constantContext =
isConst ? ConstantContext.inferred : ConstantContext.required;
Expression initializer = bodyBuilder.typeInferrer.inferFieldInitializer(
diff --git a/pkg/front_end/lib/src/fasta/builder/member_builder.dart b/pkg/front_end/lib/src/fasta/builder/member_builder.dart
index 772314b..9035466 100644
--- a/pkg/front_end/lib/src/fasta/builder/member_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/member_builder.dart
@@ -207,6 +207,11 @@
return buffer;
}
+ /// The builder for the enclosing class or extension, if any.
+ DeclarationBuilder? get declarationBuilder =>
+ parent is DeclarationBuilder ? parent as DeclarationBuilder : null;
+
+ /// The builder for the enclosing class, if any.
ClassBuilder? get classBuilder =>
parent is ClassBuilder ? parent as ClassBuilder : 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 9cb19b4..d3bf0bf 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 @@
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 @@
}
} 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 a3a99e1..5960574 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 @@
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 3598ae5..3a4bdc0 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 @@
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 @@
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 5674281..53468ab 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 @@
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 @@
List<Object> 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 @@
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 @@
List<Object> 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 @@
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 @@
List<Object> 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<
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
const Template<Message Function(DartType _type, bool isNonNullableByDefault)>
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 @@
List<Object> 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
List<Object> 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 @@
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 @@
List<Object> 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 @@
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 @@
List<Object> 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 @@
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 @@
List<Object> 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 @@
const Template<Message Function(DartType _type, bool isNonNullableByDefault)>
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 @@
List<Object> 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
List<Object> 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 @@
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 @@
List<Object> 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 @@
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 @@
List<Object> 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 @@
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 @@
List<Object> 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 @@
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 @@
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 @@
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 @@
List<Object> 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 @@
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 @@
List<Object> 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 @@
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 @@
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 @@
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 @@
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 @@
const Template<Message Function(DartType _type, bool isNonNullableByDefault)>
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 @@
List<Object> 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 @@
const Template<Message Function(DartType _type, bool isNonNullableByDefault)>
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 @@
List<Object> 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 @@
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 @@
List<Object> 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 @@
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 @@
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 @@
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 @@
List<Object> 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 @@
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 @@
List<Object> 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
const Template<Message Function(DartType _type, bool isNonNullableByDefault)>
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 @@
List<Object> 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 @@
const Template<Message Function(DartType _type, bool isNonNullableByDefault)>
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 @@
List<Object> 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 @@
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 @@
List<Object> 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 @@
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 @@
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 @@
// 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
// 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 @@
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 @@
const Template<Message Function(DartType _type, bool isNonNullableByDefault)>
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 @@
List<Object> 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 @@
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 @@
List<Object> 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 @@
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 @@
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 @@
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 @@
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 @@
const Template<Message Function(DartType _type, bool isNonNullableByDefault)>
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 @@
List<Object> 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
const Template<Message Function(DartType _type, bool isNonNullableByDefault)>
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 @@
List<Object> 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
const Template<Message Function(DartType _type, bool isNonNullableByDefault)>
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 @@
List<Object> 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
List<Object> 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 @@
const Template<Message Function(DartType _type, bool isNonNullableByDefault)>
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 @@
List<Object> 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 @@
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 @@
List<Object> 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 @@
const Template<Message Function(DartType _type, bool isNonNullableByDefault)>
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 @@
List<Object> 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 @@
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 @@
List<Object> 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 @@
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 @@
List<Object> 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 @@
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 @@
List<Object> 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 @@
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 @@
List<Object> 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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<
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 @@
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 @@
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 @@
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 @@
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 @@
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<
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 @@
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 @@
const Template<Message Function(DartType _type, bool isNonNullableByDefault)>
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 @@
List<Object> 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 @@
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 @@
List<Object> 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 @@
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 @@
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 @@
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 @@
List<Object> 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 @@
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 @@
List<Object> 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 @@
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 @@
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 @@
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 @@
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 @@
const Template<Message Function(DartType _type, bool isNonNullableByDefault)>
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 @@
List<Object> 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 @@
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 @@
List<Object> 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 @@
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 @@
List<Object> 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 @@
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 @@
List<Object> 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 @@
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 @@
List<Object> 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 @@
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 @@
List<Object> 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 @@
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 @@
List<Object> 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 @@
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 @@
List<Object> 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 @@
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 @@
List<Object> 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/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index 3bf6051..15ba274 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -451,6 +451,11 @@
return libraryBuilder.enableConstructorTearOffsInLibrary;
}
+ @override
+ bool get enableNamedArgumentsAnywhereInLibrary {
+ return libraryBuilder.enableNamedArgumentsAnywhereInLibrary;
+ }
+
void _enterLocalState({bool inLateLocalInitializer: false}) {
_localInitializerState =
_localInitializerState.prepend(inLateLocalInitializer);
@@ -1700,35 +1705,72 @@
push(new ParserRecovery(beginToken.charOffset));
return;
}
+ List<Object?>? argumentsOriginalOrder;
+ if (libraryBuilder.enableNamedArgumentsAnywhereInLibrary) {
+ argumentsOriginalOrder = new List<Object?>.from(arguments);
+ }
int firstNamedArgumentIndex = arguments.length;
+ int positionalCount = 0;
+ bool hasNamedBeforePositional = false;
for (int i = 0; i < arguments.length; i++) {
Object? node = arguments[i];
if (node is NamedExpression) {
firstNamedArgumentIndex =
i < firstNamedArgumentIndex ? i : firstNamedArgumentIndex;
} else {
+ positionalCount++;
Expression argument = toValue(node);
arguments[i] = argument;
+ argumentsOriginalOrder?[i] = argument;
if (i > firstNamedArgumentIndex) {
- arguments[i] = new NamedExpression(
- "#$i",
- buildProblem(fasta.messageExpectedNamedArgument,
- argument.fileOffset, noLength))
- ..fileOffset = beginToken.charOffset;
+ hasNamedBeforePositional = true;
+ if (!libraryBuilder.enableNamedArgumentsAnywhereInLibrary) {
+ arguments[i] = new NamedExpression(
+ "#$i",
+ buildProblem(fasta.messageExpectedNamedArgument,
+ argument.fileOffset, noLength))
+ ..fileOffset = beginToken.charOffset;
+ }
}
}
}
+ if (!hasNamedBeforePositional) {
+ argumentsOriginalOrder = null;
+ }
if (firstNamedArgumentIndex < arguments.length) {
- List<Expression> positional = new List<Expression>.from(
- arguments.getRange(0, firstNamedArgumentIndex));
- List<NamedExpression> named = new List<NamedExpression>.from(
- arguments.getRange(firstNamedArgumentIndex, arguments.length));
- push(forest.createArguments(beginToken.offset, positional, named: named));
+ List<Expression> positional;
+ List<NamedExpression> named;
+ if (libraryBuilder.enableNamedArgumentsAnywhereInLibrary) {
+ positional =
+ new List<Expression>.filled(positionalCount, dummyExpression);
+ named = new List<NamedExpression>.filled(
+ arguments.length - positionalCount, dummyNamedExpression);
+ int positionalIndex = 0;
+ int namedIndex = 0;
+ for (int i = 0; i < arguments.length; i++) {
+ if (arguments[i] is NamedExpression) {
+ named[namedIndex++] = arguments[i] as NamedExpression;
+ } else {
+ positional[positionalIndex++] = arguments[i] as Expression;
+ }
+ }
+ assert(
+ positionalIndex == positional.length && namedIndex == named.length);
+ } else {
+ positional = new List<Expression>.from(
+ arguments.getRange(0, firstNamedArgumentIndex));
+ named = new List<NamedExpression>.from(
+ arguments.getRange(firstNamedArgumentIndex, arguments.length));
+ }
+
+ push(forest.createArguments(beginToken.offset, positional,
+ named: named, argumentsOriginalOrder: argumentsOriginalOrder));
} else {
// TODO(kmillikin): Find a way to avoid allocating a second list in the
// case where there were no named arguments, which is a common one.
push(forest.createArguments(
- beginToken.offset, new List<Expression>.from(arguments)));
+ beginToken.offset, new List<Expression>.from(arguments),
+ argumentsOriginalOrder: argumentsOriginalOrder));
}
assert(checkState(beginToken, [ValueKinds.Arguments]));
}
@@ -1831,7 +1873,7 @@
} else if (arguments == null) {
push(receiver);
} else {
- push(finishSend(receiver, typeArguments, arguments as Arguments,
+ push(finishSend(receiver, typeArguments, arguments as ArgumentsImpl,
beginToken.charOffset,
isTypeArgumentsInForest: isInForest));
}
@@ -1847,8 +1889,11 @@
}
@override
- Expression_Generator_Initializer finishSend(Object receiver,
- List<UnresolvedType>? typeArguments, Arguments arguments, int charOffset,
+ Expression_Generator_Initializer finishSend(
+ Object receiver,
+ List<UnresolvedType>? typeArguments,
+ ArgumentsImpl arguments,
+ int charOffset,
{bool isTypeArgumentsInForest = false}) {
if (receiver is Generator) {
return receiver.doInvocation(charOffset, typeArguments, arguments,
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 13f9ead..67b6929 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 @@
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 @@
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 @@
}
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/constructor_tearoff_lowering.dart b/pkg/front_end/lib/src/fasta/kernel/constructor_tearoff_lowering.dart
index 4fff165..d931f8e 100644
--- a/pkg/front_end/lib/src/fasta/kernel/constructor_tearoff_lowering.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/constructor_tearoff_lowering.dart
@@ -362,7 +362,9 @@
substitution.substituteType(function.returnType);
tearOff.function.requiredParameterCount = function.requiredParameterCount;
libraryBuilder.loader.registerTypeDependency(
- tearOff, new TypeDependency(tearOff, constructor, substitution));
+ tearOff,
+ new TypeDependency(tearOff, constructor, substitution,
+ copyReturnType: true));
}
/// Creates the [Arguments] for passing the parameters from [tearOff] to its
diff --git a/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart b/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
index 04979e2..cd04351 100644
--- a/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
@@ -217,7 +217,7 @@
/// If the invocation has explicit type arguments
/// [buildTypeWithResolvedArguments] called instead.
Expression_Generator_Initializer doInvocation(
- int offset, List<UnresolvedType>? typeArguments, Arguments arguments,
+ int offset, List<UnresolvedType>? typeArguments, ArgumentsImpl arguments,
{bool isTypeArgumentsInForest = false});
Expression_Generator buildSelectorAccess(
@@ -1774,7 +1774,7 @@
@override
Expression doInvocation(
- int offset, List<UnresolvedType>? typeArguments, Arguments arguments,
+ int offset, List<UnresolvedType>? typeArguments, ArgumentsImpl arguments,
{bool isTypeArgumentsInForest = false}) {
if (invokeTarget != null) {
return _helper.buildExtensionMethodInvocation(
@@ -1789,7 +1789,8 @@
extensionTypeArguments: _createExtensionTypeArguments(),
typeArguments: arguments.types,
positionalArguments: arguments.positional,
- namedArguments: arguments.named),
+ namedArguments: arguments.named,
+ argumentsOriginalOrder: arguments.argumentsOriginalOrder),
isTearOff: false);
} else {
return _helper.forest.createExpressionInvocation(
@@ -2649,8 +2650,8 @@
Generator generator =
_createInstanceAccess(send.token, send.name, isNullAware: isNullAware);
if (send.arguments != null) {
- return generator.doInvocation(
- offsetForToken(send.token), send.typeArguments, send.arguments!,
+ return generator.doInvocation(offsetForToken(send.token),
+ send.typeArguments, send.arguments! as ArgumentsImpl,
isTypeArgumentsInForest: send.isTypeArgumentsInForest);
} else {
return generator;
@@ -2676,7 +2677,7 @@
@override
Expression_Generator_Initializer doInvocation(
- int offset, List<UnresolvedType>? typeArguments, Arguments arguments,
+ int offset, List<UnresolvedType>? typeArguments, ArgumentsImpl arguments,
{bool isTypeArgumentsInForest = false}) {
Generator generator = _createInstanceAccess(token, callName);
return generator.doInvocation(offset, typeArguments, arguments,
@@ -2935,7 +2936,7 @@
@override
Expression_Generator_Initializer doInvocation(
- int offset, List<UnresolvedType>? typeArguments, Arguments arguments,
+ int offset, List<UnresolvedType>? typeArguments, ArgumentsImpl arguments,
{bool isTypeArgumentsInForest = false}) {
Object suffix = suffixGenerator.doInvocation(
offset, typeArguments, arguments,
@@ -3126,7 +3127,7 @@
Selector send, int operatorOffset, bool isNullAware) {
int nameOffset = offsetForToken(send.token);
Name name = send.name;
- Arguments? arguments = send.arguments;
+ ArgumentsImpl? arguments = send.arguments as ArgumentsImpl?;
TypeDeclarationBuilder? declarationBuilder = declaration;
TypeAliasBuilder? aliasBuilder;
@@ -4067,8 +4068,8 @@
"'${send.name.text}' != ${send.token.lexeme}");
Object result = qualifiedLookup(send.token);
if (send is InvocationSelector) {
- result = _helper.finishSend(
- result, send.typeArguments, send.arguments, send.fileOffset,
+ result = _helper.finishSend(result, send.typeArguments,
+ send.arguments as ArgumentsImpl, send.fileOffset,
isTypeArgumentsInForest: send.isTypeArgumentsInForest);
}
if (isNullAware) {
diff --git a/pkg/front_end/lib/src/fasta/kernel/expression_generator_helper.dart b/pkg/front_end/lib/src/fasta/kernel/expression_generator_helper.dart
index 96e8b7f..9f355e5 100644
--- a/pkg/front_end/lib/src/fasta/kernel/expression_generator_helper.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/expression_generator_helper.dart
@@ -54,12 +54,14 @@
bool get enableConstructorTearOffsInLibrary;
+ bool get enableNamedArgumentsAnywhereInLibrary;
+
Expression_Generator_Builder scopeLookup(
Scope scope, String name, Token token,
{bool isQualified: false, PrefixBuilder? prefix});
Expression_Generator_Initializer finishSend(Object receiver,
- List<UnresolvedType>? typeArguments, Arguments arguments, int offset,
+ List<UnresolvedType>? typeArguments, ArgumentsImpl arguments, int offset,
{bool isTypeArgumentsInForest = false});
Initializer buildInvalidInitializer(Expression expression,
diff --git a/pkg/front_end/lib/src/fasta/kernel/forest.dart b/pkg/front_end/lib/src/fasta/kernel/forest.dart
index 4cc99a7..8e7b3b9 100644
--- a/pkg/front_end/lib/src/fasta/kernel/forest.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/forest.dart
@@ -27,19 +27,25 @@
class Forest {
const Forest();
- Arguments createArguments(int fileOffset, List<Expression> positional,
+ ArgumentsImpl createArguments(int fileOffset, List<Expression> positional,
{List<DartType>? types,
List<NamedExpression>? named,
- bool hasExplicitTypeArguments = true}) {
+ bool hasExplicitTypeArguments = true,
+ List<Object?>? argumentsOriginalOrder}) {
// ignore: unnecessary_null_comparison
assert(fileOffset != null);
if (!hasExplicitTypeArguments) {
- ArgumentsImpl arguments =
- new ArgumentsImpl(positional, types: <DartType>[], named: named);
+ ArgumentsImpl arguments = new ArgumentsImpl(positional,
+ types: <DartType>[],
+ named: named,
+ argumentsOriginalOrder: argumentsOriginalOrder);
arguments.types.addAll(types!);
return arguments;
} else {
- return new ArgumentsImpl(positional, types: types, named: named)
+ return new ArgumentsImpl(positional,
+ types: types,
+ named: named,
+ argumentsOriginalOrder: argumentsOriginalOrder)
..fileOffset = fileOffset;
}
}
@@ -53,7 +59,8 @@
int? extensionTypeArgumentOffset,
List<DartType> typeArguments = const <DartType>[],
List<Expression> positionalArguments = const <Expression>[],
- List<NamedExpression> namedArguments = const <NamedExpression>[]}) {
+ List<NamedExpression> namedArguments = const <NamedExpression>[],
+ List<Object?>? argumentsOriginalOrder}) {
// ignore: unnecessary_null_comparison
assert(fileOffset != null);
return new ArgumentsImpl.forExtensionMethod(
@@ -62,11 +69,12 @@
extensionTypeArgumentOffset: extensionTypeArgumentOffset,
typeArguments: typeArguments,
positionalArguments: positionalArguments,
- namedArguments: namedArguments)
+ namedArguments: namedArguments,
+ argumentsOriginalOrder: argumentsOriginalOrder)
..fileOffset = fileOffset;
}
- Arguments createArgumentsEmpty(int fileOffset) {
+ ArgumentsImpl createArgumentsEmpty(int fileOffset) {
// ignore: unnecessary_null_comparison
assert(fileOffset != null);
return createArguments(fileOffset, <Expression>[]);
diff --git a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
index 9956d82..ac7b321 100644
--- a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
@@ -640,8 +640,8 @@
bool hadExplicitTypeArguments = hasExplicitTypeArguments(node.arguments);
FunctionType functionType = node.target.function
.computeThisFunctionType(inferrer.library.nonNullable);
- InvocationInferenceResult result = inferrer.inferInvocation(
- typeContext, node.fileOffset, functionType, node.arguments,
+ InvocationInferenceResult result = inferrer.inferInvocation(typeContext,
+ node.fileOffset, functionType, node.arguments as ArgumentsImpl,
isConst: node.isConst, staticTarget: node.target);
if (!inferrer.isTopLevel) {
SourceLibraryBuilder library = inferrer.library;
@@ -670,8 +670,8 @@
: new FunctionType(
[], const DynamicType(), inferrer.library.nonNullable);
TypeArgumentsInfo typeArgumentsInfo = getTypeArgumentsInfo(node.arguments);
- InvocationInferenceResult result = inferrer.inferInvocation(
- typeContext, node.fileOffset, calleeType, node.arguments,
+ InvocationInferenceResult result = inferrer.inferInvocation(typeContext,
+ node.fileOffset, calleeType, node.arguments as ArgumentsImpl,
staticTarget: node.target);
StaticInvocation replacement =
new StaticInvocation(node.target, node.arguments);
@@ -932,8 +932,8 @@
FunctionType functionType = node.target.function
.computeThisFunctionType(inferrer.library.nonNullable);
- InvocationInferenceResult result = inferrer.inferInvocation(
- typeContext, node.fileOffset, functionType, node.arguments,
+ InvocationInferenceResult result = inferrer.inferInvocation(typeContext,
+ node.fileOffset, functionType, node.arguments as ArgumentsImpl,
isConst: node.isConst, staticTarget: node.target);
node.hasBeenInferred = true;
Expression resultNode = node;
@@ -963,8 +963,8 @@
.computeAliasedConstructorFunctionType(
typedef, inferrer.library.library);
calleeType = replaceReturnType(calleeType, calleeType.returnType.unalias);
- InvocationInferenceResult result = inferrer.inferInvocation(
- typeContext, node.fileOffset, calleeType, node.arguments,
+ InvocationInferenceResult result = inferrer.inferInvocation(typeContext,
+ node.fileOffset, calleeType, node.arguments as ArgumentsImpl,
isConst: node.isConst, staticTarget: node.target);
node.hasBeenInferred = true;
Expression resultNode = node;
@@ -987,8 +987,8 @@
FunctionType calleeType = node.target.function
.computeAliasedFactoryFunctionType(typedef, inferrer.library.library);
calleeType = replaceReturnType(calleeType, calleeType.returnType.unalias);
- InvocationInferenceResult result = inferrer.inferInvocation(
- typeContext, node.fileOffset, calleeType, node.arguments,
+ InvocationInferenceResult result = inferrer.inferInvocation(typeContext,
+ node.fileOffset, calleeType, node.arguments as ArgumentsImpl,
isConst: node.isConst, staticTarget: node.target);
node.hasBeenInferred = true;
Expression resultNode = node;
@@ -2827,9 +2827,16 @@
Link<NullAwareGuard> nullAwareGuards = result.nullAwareGuards;
Expression receiver = result.nullAwareAction;
DartType receiverType = result.nullAwareActionType;
- return inferrer.inferMethodInvocation(node.fileOffset, nullAwareGuards,
- receiver, receiverType, node.name, node.arguments, typeContext,
- isExpressionInvocation: false, isImplicitCall: false);
+ return inferrer.inferMethodInvocation(
+ node.fileOffset,
+ nullAwareGuards,
+ receiver,
+ receiverType,
+ node.name,
+ node.arguments as ArgumentsImpl,
+ typeContext,
+ isExpressionInvocation: false,
+ isImplicitCall: false);
}
ExpressionInferenceResult visitExpressionInvocation(
@@ -2839,9 +2846,16 @@
Link<NullAwareGuard> nullAwareGuards = result.nullAwareGuards;
Expression receiver = result.nullAwareAction;
DartType receiverType = result.nullAwareActionType;
- return inferrer.inferMethodInvocation(node.fileOffset, nullAwareGuards,
- receiver, receiverType, callName, node.arguments, typeContext,
- isExpressionInvocation: true, isImplicitCall: true);
+ return inferrer.inferMethodInvocation(
+ node.fileOffset,
+ nullAwareGuards,
+ receiver,
+ receiverType,
+ callName,
+ node.arguments as ArgumentsImpl,
+ typeContext,
+ isExpressionInvocation: true,
+ isImplicitCall: true);
}
ExpressionInferenceResult visitNamedFunctionExpressionJudgment(
@@ -5798,8 +5812,8 @@
.computeThisFunctionType(inferrer.library.nonNullable),
inferrer.coreTypes.thisInterfaceType(
node.target.enclosingClass, inferrer.library.nonNullable));
- inferrer.inferInvocation(
- const UnknownType(), node.fileOffset, functionType, node.arguments,
+ inferrer.inferInvocation(const UnknownType(), node.fileOffset, functionType,
+ node.arguments as ArgumentsImpl,
skipTypeArgumentInference: true, staticTarget: node.target);
ArgumentsImpl.removeNonInferrableArgumentTypes(
node.arguments as ArgumentsImpl);
@@ -5974,8 +5988,8 @@
: new FunctionType(
[], const DynamicType(), inferrer.library.nonNullable);
TypeArgumentsInfo typeArgumentsInfo = getTypeArgumentsInfo(node.arguments);
- InvocationInferenceResult result = inferrer.inferInvocation(
- typeContext, node.fileOffset, calleeType, node.arguments,
+ InvocationInferenceResult result = inferrer.inferInvocation(typeContext,
+ node.fileOffset, calleeType, node.arguments as ArgumentsImpl,
staticTarget: node.target);
// ignore: unnecessary_null_comparison
if (!inferrer.isTopLevel && node.target != null) {
@@ -6022,8 +6036,8 @@
.computeThisFunctionType(inferrer.library.nonNullable)
.withoutTypeParameters) as FunctionType,
inferrer.thisType!);
- inferrer.inferInvocation(
- const UnknownType(), node.fileOffset, functionType, node.arguments,
+ inferrer.inferInvocation(const UnknownType(), node.fileOffset, functionType,
+ node.arguments as ArgumentsImpl,
skipTypeArgumentInference: true, staticTarget: node.target);
}
@@ -6770,8 +6784,8 @@
if (node.arguments != null) {
FunctionType calleeType =
new FunctionType([], inferredType, inferrer.library.nonNullable);
- inferrer.inferInvocation(
- typeContext, node.fileOffset, calleeType, node.arguments!);
+ inferrer.inferInvocation(typeContext, node.fileOffset, calleeType,
+ node.arguments! as ArgumentsImpl);
}
return new ExpressionInferenceResult(inferredType, node);
}
diff --git a/pkg/front_end/lib/src/fasta/kernel/internal_ast.dart b/pkg/front_end/lib/src/fasta/kernel/internal_ast.dart
index b587d91..7560883 100644
--- a/pkg/front_end/lib/src/fasta/kernel/internal_ast.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/internal_ast.dart
@@ -491,6 +491,8 @@
int _explicitTypeArgumentCount;
+ List<Object?>? argumentsOriginalOrder;
+
ArgumentsImpl.internal(
{required List<Expression> positional,
required List<DartType>? types,
@@ -504,10 +506,13 @@
explicitExtensionTypeArgumentCount,
this._extensionTypeArgumentOffset = extensionTypeArgumentOffset,
this._explicitTypeArgumentCount = explicitTypeArgumentCount,
+ this.argumentsOriginalOrder = null,
super(positional, types: types, named: named);
ArgumentsImpl(List<Expression> positional,
- {List<DartType>? types, List<NamedExpression>? named})
+ {List<DartType>? types,
+ List<NamedExpression>? named,
+ this.argumentsOriginalOrder})
: _explicitTypeArgumentCount = types?.length ?? 0,
_extensionTypeParameterCount = 0,
_explicitExtensionTypeArgumentCount = 0,
@@ -521,7 +526,8 @@
int? extensionTypeArgumentOffset,
List<DartType> typeArguments = const <DartType>[],
List<Expression> positionalArguments = const <Expression>[],
- List<NamedExpression> namedArguments = const <NamedExpression>[]})
+ List<NamedExpression> namedArguments = const <NamedExpression>[],
+ this.argumentsOriginalOrder})
: _extensionTypeParameterCount = extensionTypeParameterCount,
_explicitExtensionTypeArgumentCount = extensionTypeArguments.length,
_explicitTypeArgumentCount = typeArguments.length,
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_helper.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_helper.dart
index bb99b32..bf49dae 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_helper.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_helper.dart
@@ -53,7 +53,7 @@
new CloneVisitorNotMembers(typeSubstitution: _typeSubstitution);
clonedParameter.initializer = cloner!
.clone(originalParameter.initializer!)
- ..parent = clonedParameter;
+ ..parent = clonedParameter;
}
}
@@ -116,8 +116,10 @@
final Member synthesized;
final Member original;
final Substitution substitution;
+ final bool copyReturnType;
- TypeDependency(this.synthesized, this.original, this.substitution);
+ TypeDependency(this.synthesized, this.original, this.substitution,
+ {required this.copyReturnType});
void copyInferred() {
for (int i = 0; i < original.function!.positionalParameters.length; i++) {
@@ -136,7 +138,9 @@
synthesizedParameter.type =
substitution.substituteType(originalParameter.type);
}
- synthesized.function!.returnType =
- substitution.substituteType(original.function!.returnType);
+ if (copyReturnType) {
+ synthesized.function!.returnType =
+ substitution.substituteType(original.function!.returnType);
+ }
}
}
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
index 296cbc5..1600030 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
@@ -13,7 +13,7 @@
show ChangedStructureNotifier;
import 'package:kernel/target/targets.dart' show DiagnosticReporter, Target;
import 'package:kernel/transformations/value_class.dart' as valueClass;
-import 'package:kernel/type_algebra.dart' show substitute;
+import 'package:kernel/type_algebra.dart' show Substitution;
import 'package:kernel/type_environment.dart' show TypeEnvironment;
import 'package:package_config/package_config.dart' hide LanguageVersion;
@@ -522,7 +522,6 @@
loader.checkTypes();
loader.checkRedirectingFactories(myClasses);
loader.checkMainMethods();
- _updateDelayedParameterTypes();
installAllComponentProblems(loader.allComponentProblems);
loader.allComponentProblems.clear();
return component;
@@ -758,17 +757,6 @@
ticker.logMs("Installed synthetic constructors");
}
- List<DelayedParameterType> _delayedParameterTypes = <DelayedParameterType>[];
-
- /// Update the type of parameters cloned from parameters with inferred
- /// parameter types.
- void _updateDelayedParameterTypes() {
- for (DelayedParameterType delayedParameterType in _delayedParameterTypes) {
- delayedParameterType.updateType();
- }
- _delayedParameterTypes.clear();
- }
-
ClassBuilder get objectClassBuilder => objectType.declaration as ClassBuilder;
Class get objectClass => objectClassBuilder.cls;
@@ -889,26 +877,29 @@
SyntheticConstructorBuilder _makeMixinApplicationConstructor(
SourceClassBuilder classBuilder,
Class mixin,
- MemberBuilderImpl memberBuilder,
+ MemberBuilderImpl superConstructorBuilder,
Map<TypeParameter, DartType> substitutionMap,
Constructor? referenceFrom) {
+ bool hasTypeDependency = false;
+ Substitution substitution = Substitution.fromMap(substitutionMap);
+
VariableDeclaration copyFormal(VariableDeclaration formal) {
VariableDeclaration copy = new VariableDeclaration(formal.name,
isFinal: formal.isFinal,
isConst: formal.isConst,
type: const UnknownType());
- if (formal.type is! UnknownType) {
- copy.type = substitute(formal.type, substitutionMap);
+ if (!hasTypeDependency && formal.type is! UnknownType) {
+ copy.type = substitution.substituteType(formal.type);
} else {
- _delayedParameterTypes
- .add(new DelayedParameterType(formal, copy, substitutionMap));
+ hasTypeDependency = true;
}
return copy;
}
Class cls = classBuilder.cls;
- Constructor constructor = memberBuilder.member as Constructor;
- bool isConst = constructor.isConst;
+ Constructor superConstructor =
+ superConstructorBuilder.member as Constructor;
+ bool isConst = superConstructor.isConst;
if (isConst && mixin.fields.isNotEmpty) {
for (Field field in mixin.fields) {
if (!field.isStatic) {
@@ -923,11 +914,12 @@
List<NamedExpression> named = <NamedExpression>[];
for (VariableDeclaration formal
- in constructor.function.positionalParameters) {
+ in superConstructor.function.positionalParameters) {
positionalParameters.add(copyFormal(formal));
positional.add(new VariableGet(positionalParameters.last));
}
- for (VariableDeclaration formal in constructor.function.namedParameters) {
+ for (VariableDeclaration formal
+ in superConstructor.function.namedParameters) {
VariableDeclaration clone = copyFormal(formal);
namedParameters.add(clone);
named.add(new NamedExpression(
@@ -936,13 +928,14 @@
FunctionNode function = new FunctionNode(new EmptyStatement(),
positionalParameters: positionalParameters,
namedParameters: namedParameters,
- requiredParameterCount: constructor.function.requiredParameterCount,
+ requiredParameterCount:
+ superConstructor.function.requiredParameterCount,
returnType: makeConstructorReturnType(cls));
SuperInitializer initializer = new SuperInitializer(
- constructor, new Arguments(positional, named: named));
+ superConstructor, new Arguments(positional, named: named));
SynthesizedFunctionNode synthesizedFunctionNode =
new SynthesizedFunctionNode(
- substitutionMap, constructor.function, function);
+ substitutionMap, superConstructor.function, function);
if (!isConst) {
// For constant constructors default values are computed and cloned part
// of the outline expression and therefore passed to the
@@ -952,23 +945,44 @@
// full compilation using [synthesizedFunctionNodes].
synthesizedFunctionNodes.add(synthesizedFunctionNode);
}
+ Constructor constructor = new Constructor(function,
+ name: superConstructor.name,
+ initializers: <Initializer>[initializer],
+ isSynthetic: true,
+ isConst: isConst,
+ reference: referenceFrom?.reference,
+ fileUri: cls.fileUri)
+ // TODO(johnniwinther): Should we add file offsets to synthesized
+ // constructors?
+ //..fileOffset = cls.fileOffset
+ //..fileEndOffset = cls.fileOffset
+ ..isNonNullableByDefault = cls.enclosingLibrary.isNonNullableByDefault;
+
+ if (hasTypeDependency) {
+ loader.registerTypeDependency(
+ constructor,
+ new TypeDependency(constructor, superConstructor, substitution,
+ copyReturnType: false));
+ }
+
+ Procedure? constructorTearOff = createConstructorTearOffProcedure(
+ superConstructor.name.text,
+ classBuilder.library,
+ cls.fileUri,
+ cls.fileOffset,
+ forAbstractClassOrEnum: classBuilder.isAbstract);
+
+ if (constructorTearOff != null) {
+ buildConstructorTearOffProcedure(constructorTearOff, constructor,
+ classBuilder.cls, classBuilder.library);
+ }
return new SyntheticConstructorBuilder(
- classBuilder,
- new Constructor(function,
- name: constructor.name,
- initializers: <Initializer>[initializer],
- isSynthetic: true,
- isConst: isConst,
- reference: referenceFrom?.reference,
- fileUri: cls.fileUri)
- ..isNonNullableByDefault =
- cls.enclosingLibrary.isNonNullableByDefault,
- null,
+ classBuilder, constructor, constructorTearOff,
// If the constructor is constant, the default values must be part of
// the outline expressions. We pass on the original constructor and
// cloned function nodes to ensure that the default values are computed
// and cloned for the outline.
- origin: isConst ? memberBuilder : null,
+ origin: isConst ? superConstructorBuilder : null,
synthesizedFunctionNode: isConst ? synthesizedFunctionNode : null);
}
@@ -992,10 +1006,13 @@
reference: referenceFrom?.reference,
fileUri: enclosingClass.fileUri)
..fileOffset = enclosingClass.fileOffset
+ // TODO(johnniwinther): Should we add file end offsets to synthesized
+ // constructors?
+ //..fileEndOffset = enclosingClass.fileOffset
..isNonNullableByDefault =
enclosingClass.enclosingLibrary.isNonNullableByDefault;
- Procedure? constructorTearOff = createConstructorTearOffProcedure(
- '', classBuilder.library, classBuilder.fileUri, constructor.fileOffset,
+ Procedure? constructorTearOff = createConstructorTearOffProcedure('',
+ classBuilder.library, enclosingClass.fileUri, enclosingClass.fileOffset,
forAbstractClassOrEnum:
enclosingClass.isAbstract || enclosingClass.isEnum);
if (constructorTearOff != null) {
@@ -1599,22 +1616,3 @@
loader.addProblem(message, charOffset, noLength, fileUri, context: context);
}
}
-
-/// Data for updating cloned parameters of parameters with inferred parameter
-/// types.
-///
-/// The type of [source] is not declared so the type of [target] needs to be
-/// updated when the type of [source] has been inferred.
-class DelayedParameterType {
- final VariableDeclaration source;
- final VariableDeclaration target;
- final Map<TypeParameter, DartType> substitutionMap;
-
- DelayedParameterType(this.source, this.target, this.substitutionMap);
-
- void updateType() {
- // ignore: unnecessary_null_comparison
- assert(source.type is! UnknownType, "No type computed for $source.");
- target.type = substitute(source.type, substitutionMap);
- }
-}
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 4ebcb03..79badb9 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 @@
? 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 eea59f1..e275e78 100644
--- a/pkg/front_end/lib/src/fasta/problems.dart
+++ b/pkg/front_end/lib/src/fasta/problems.dart
@@ -35,7 +35,7 @@
.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 dbecaaa..b046570 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
@@ -318,6 +318,7 @@
bool? _enableGenericMetadataInLibrary;
bool? _enableExtensionTypesInLibrary;
bool? _enableConstructorTearOffsInLibrary;
+ bool? _enableNamedArgumentsAnywhereInLibrary;
bool get enableConstFunctionsInLibrary => _enableConstFunctionsInLibrary ??=
loader.target.isExperimentEnabledInLibraryByVersion(
@@ -392,6 +393,10 @@
.getExperimentEnabledVersionInLibrary(
ExperimentalFlag.extensionTypes, _packageUri ?? importUri);
+ bool get enableNamedArgumentsAnywhereInLibrary =>
+ _enableNamedArgumentsAnywhereInLibrary ??=
+ loader.enableUnscheduledExperiments;
+
void _updateLibraryNNBDSettings() {
library.isNonNullableByDefault = isNonNullableByDefault;
switch (loader.nnbdMode) {
@@ -1329,7 +1334,7 @@
default:
if (member is InvalidTypeDeclarationBuilder) {
unserializableExports ??= <String, String>{};
- 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 9e34d6d..4c38811 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 @@
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 @@
severity ??= message.code.severity;
if (severity == Severity.ignored) return null;
String trace = """
-message: ${message.message}
+message: ${message.problemMessage}
charOffset: $charOffset
fileUri: $fileUri
severity: $severity
@@ -503,6 +503,9 @@
NnbdMode get nnbdMode => target.context.options.nnbdMode;
+ bool get enableUnscheduledExperiments =>
+ target.context.options.enableUnscheduledExperiments;
+
CoreTypes get coreTypes {
assert(_coreTypes != null, "CoreTypes has not been computed.");
return _coreTypes!;
@@ -658,7 +661,8 @@
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 70a6813..bde992e 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 @@
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 cf74dd7..e11a372 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 @@
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;
@@ -360,7 +361,6 @@
}
/// Ensures that the type of [member] has been computed.
- // TODO(johnniwinther): Expand this to handle lowerings.
void ensureMemberType(Member member) {
if (member is Constructor) {
inferConstructorParameterTypes(member);
@@ -2085,7 +2085,7 @@
}
InvocationInferenceResult inferInvocation(DartType typeContext, int offset,
- FunctionType calleeType, Arguments arguments,
+ FunctionType calleeType, ArgumentsImpl arguments,
{List<VariableDeclaration>? hoistedExpressions,
bool isSpecialCasedBinaryOperator: false,
bool isSpecialCasedTernaryOperator: false,
@@ -2143,7 +2143,7 @@
typeParameters: calleeType.typeParameters
.take(extensionTypeParameterCount)
.toList());
- Arguments extensionArguments = engine.forest.createArguments(
+ ArgumentsImpl extensionArguments = engine.forest.createArguments(
arguments.fileOffset, [arguments.positional.first],
types: getExplicitExtensionTypeArguments(arguments));
_inferInvocation(const UnknownType(), offset, extensionFunctionType,
@@ -2171,7 +2171,7 @@
typeParameters: targetTypeParameters);
targetFunctionType = extensionSubstitution
.substituteType(targetFunctionType) as FunctionType;
- Arguments targetArguments = engine.forest.createArguments(
+ ArgumentsImpl targetArguments = engine.forest.createArguments(
arguments.fileOffset, arguments.positional.skip(1).toList(),
named: arguments.named, types: getExplicitTypeArguments(arguments));
InvocationInferenceResult result = _inferInvocation(typeContext, offset,
@@ -2201,7 +2201,7 @@
DartType typeContext,
int offset,
FunctionType calleeType,
- Arguments arguments,
+ ArgumentsImpl arguments,
List<VariableDeclaration>? hoistedExpressions,
{bool isSpecialCasedBinaryOperator: false,
bool isSpecialCasedTernaryOperator: false,
@@ -2215,6 +2215,7 @@
// [receiverType] must be provided for special-cased operators.
assert(!isSpecialCasedBinaryOperator && !isSpecialCasedTernaryOperator ||
receiverType != null);
+
List<TypeParameter> calleeTypeParameters = calleeType.typeParameters;
if (calleeTypeParameters.isNotEmpty) {
// It's possible that one of the callee type parameters might match a type
@@ -2230,11 +2231,14 @@
calleeType = fresh.applyToFunctionType(calleeType);
calleeTypeParameters = fresh.freshTypeParameters;
}
+
List<DartType>? explicitTypeArguments = getExplicitTypeArguments(arguments);
+
bool inferenceNeeded = !skipTypeArgumentInference &&
explicitTypeArguments == null &&
calleeTypeParameters.isNotEmpty;
bool typeChecksNeeded = !isTopLevel;
+
List<DartType>? inferredTypes;
Substitution? substitution;
List<DartType>? formalTypes;
@@ -2243,6 +2247,15 @@
formalTypes = [];
actualTypes = [];
}
+
+ List<VariableDeclaration>? localHoistedExpressions;
+ if (library.enableNamedArgumentsAnywhereInLibrary &&
+ arguments.argumentsOriginalOrder != null &&
+ hoistedExpressions == null &&
+ !isTopLevel) {
+ hoistedExpressions = localHoistedExpressions = <VariableDeclaration>[];
+ }
+
if (inferenceNeeded) {
// ignore: unnecessary_null_comparison
if (isConst && typeContext != null) {
@@ -2281,60 +2294,166 @@
staticTarget == typeSchemaEnvironment.coreTypes.identicalProcedure;
// TODO(paulberry): if we are doing top level inference and type arguments
// were omitted, report an error.
- for (int position = 0; position < arguments.positional.length; position++) {
- DartType formalType = getPositionalParameterType(calleeType, position);
- DartType inferredFormalType = substitution != null
- ? substitution.substituteType(formalType)
- : formalType;
- DartType inferredType;
- if (isImplicitExtensionMember && position == 0) {
- assert(
- receiverType != null,
- "No receiver type provided for implicit extension member "
- "invocation.");
- continue;
+ List<Object?> argumentsEvaluationOrder;
+ if (library.enableNamedArgumentsAnywhereInLibrary &&
+ arguments.argumentsOriginalOrder != null) {
+ if (staticTarget?.isExtensionMember ?? false) {
+ // Add the receiver.
+ argumentsEvaluationOrder = <Object?>[
+ arguments.positional[0],
+ ...arguments.argumentsOriginalOrder!
+ ];
} else {
- if (isSpecialCasedBinaryOperator) {
- inferredFormalType =
- typeSchemaEnvironment.getContextTypeOfSpecialCasedBinaryOperator(
- typeContext, receiverType!, inferredFormalType,
- isNonNullableByDefault: isNonNullableByDefault);
- } else if (isSpecialCasedTernaryOperator) {
- inferredFormalType =
- typeSchemaEnvironment.getContextTypeOfSpecialCasedTernaryOperator(
- typeContext, receiverType!, inferredFormalType,
- isNonNullableByDefault: isNonNullableByDefault);
+ argumentsEvaluationOrder = arguments.argumentsOriginalOrder!;
+ }
+ } else {
+ argumentsEvaluationOrder = <Object?>[
+ ...arguments.positional,
+ ...arguments.named
+ ];
+ }
+ arguments.argumentsOriginalOrder = null;
+
+ // The following loop determines how many argument expressions should be
+ // hoisted to preserve the evaluation order. The computation is based on the
+ // following observation: the largest suffix of the argument vector, such
+ // that every positional argument in that suffix comes before any named
+ // argument, retains the evaluation order after the rest of the arguments
+ // are hoisted, and therefore doesn't need to be hoisted itself. The loop
+ // below finds the starting position of such suffix and stores it in the
+ // [hoistingEndIndex] variable. In case all positional arguments come
+ // before all named arguments, the suffix coincides with the entire argument
+ // vector, and none of the arguments is hoisted. That way the legacy
+ // behavior is preserved.
+ int hoistingEndIndex;
+ if (library.enableNamedArgumentsAnywhereInLibrary) {
+ hoistingEndIndex = argumentsEvaluationOrder.length - 1;
+ for (int i = argumentsEvaluationOrder.length - 2;
+ i >= 0 && hoistingEndIndex == i + 1;
+ i--) {
+ int previousWeight =
+ argumentsEvaluationOrder[i + 1] is NamedExpression ? 1 : 0;
+ int currentWeight =
+ argumentsEvaluationOrder[i] is NamedExpression ? 1 : 0;
+ if (currentWeight <= previousWeight) {
+ --hoistingEndIndex;
}
+ }
+ } else {
+ hoistingEndIndex = 0;
+ }
+
+ int positionalIndex = 0;
+ int namedIndex = 0;
+ for (int evaluationOrderIndex = 0;
+ evaluationOrderIndex < argumentsEvaluationOrder.length;
+ evaluationOrderIndex++) {
+ Object? argument = argumentsEvaluationOrder[evaluationOrderIndex];
+ assert(
+ argument is Expression || argument is NamedExpression,
+ "Expected the argument to be either an Expression "
+ "or a NamedExpression, got '${argument.runtimeType}'.");
+ if (argument is Expression) {
+ int index = positionalIndex++;
+ DartType formalType = getPositionalParameterType(calleeType, index);
+ DartType inferredFormalType = substitution != null
+ ? substitution.substituteType(formalType)
+ : formalType;
+ DartType inferredType;
+ if (isImplicitExtensionMember && index == 0) {
+ assert(
+ receiverType != null,
+ "No receiver type provided for implicit extension member "
+ "invocation.");
+ continue;
+ } else {
+ if (isSpecialCasedBinaryOperator) {
+ inferredFormalType = typeSchemaEnvironment
+ .getContextTypeOfSpecialCasedBinaryOperator(
+ typeContext, receiverType!, inferredFormalType,
+ isNonNullableByDefault: isNonNullableByDefault);
+ } else if (isSpecialCasedTernaryOperator) {
+ inferredFormalType = typeSchemaEnvironment
+ .getContextTypeOfSpecialCasedTernaryOperator(
+ typeContext, receiverType!, inferredFormalType,
+ isNonNullableByDefault: isNonNullableByDefault);
+ }
+ ExpressionInferenceResult result = inferExpression(
+ arguments.positional[index],
+ isNonNullableByDefault
+ ? inferredFormalType
+ : legacyErasure(inferredFormalType),
+ inferenceNeeded ||
+ isSpecialCasedBinaryOperator ||
+ isSpecialCasedTernaryOperator ||
+ typeChecksNeeded);
+ inferredType = identical(result.inferredType, noInferredType) ||
+ isNonNullableByDefault
+ ? result.inferredType
+ : legacyErasure(result.inferredType);
+ if (localHoistedExpressions != null &&
+ evaluationOrderIndex >= hoistingEndIndex) {
+ hoistedExpressions = null;
+ }
+ Expression expression =
+ _hoist(result.expression, inferredType, hoistedExpressions);
+ if (isIdentical && arguments.positional.length == 2) {
+ if (index == 0) {
+ flowAnalysis.equalityOp_rightBegin(expression, inferredType);
+ } else {
+ flowAnalysis.equalityOp_end(
+ arguments.parent as Expression, expression, inferredType);
+ }
+ }
+ arguments.positional[index] = expression..parent = arguments;
+ }
+ if (inferenceNeeded || typeChecksNeeded) {
+ formalTypes!.add(formalType);
+ actualTypes!.add(inferredType);
+ }
+ } else {
+ assert(argument is NamedExpression);
+ int index = namedIndex++;
+ NamedExpression namedArgument = arguments.named[index];
+ DartType formalType =
+ getNamedParameterType(calleeType, namedArgument.name);
+ DartType inferredFormalType = substitution != null
+ ? substitution.substituteType(formalType)
+ : formalType;
ExpressionInferenceResult result = inferExpression(
- arguments.positional[position],
+ namedArgument.value,
isNonNullableByDefault
? inferredFormalType
: legacyErasure(inferredFormalType),
inferenceNeeded ||
isSpecialCasedBinaryOperator ||
- isSpecialCasedTernaryOperator ||
typeChecksNeeded);
- inferredType = identical(result.inferredType, noInferredType) ||
- isNonNullableByDefault
- ? result.inferredType
- : legacyErasure(result.inferredType);
+ DartType inferredType =
+ identical(result.inferredType, noInferredType) ||
+ isNonNullableByDefault
+ ? result.inferredType
+ : legacyErasure(result.inferredType);
+ if (localHoistedExpressions != null &&
+ evaluationOrderIndex >= hoistingEndIndex) {
+ hoistedExpressions = null;
+ }
Expression expression =
_hoist(result.expression, inferredType, hoistedExpressions);
- if (isIdentical && arguments.positional.length == 2) {
- if (position == 0) {
- flowAnalysis.equalityOp_rightBegin(expression, inferredType);
- } else {
- flowAnalysis.equalityOp_end(
- arguments.parent as Expression, expression, inferredType);
- }
+ namedArgument.value = expression..parent = namedArgument;
+ if (inferenceNeeded || typeChecksNeeded) {
+ formalTypes!.add(formalType);
+ actualTypes!.add(inferredType);
}
- arguments.positional[position] = expression..parent = arguments;
- }
- if (inferenceNeeded || typeChecksNeeded) {
- formalTypes!.add(formalType);
- actualTypes!.add(inferredType);
}
}
+ assert(
+ positionalIndex == arguments.positional.length,
+ "Expected 'positionalIndex' to be ${arguments.positional.length}, "
+ "got ${positionalIndex}.");
+ assert(
+ namedIndex == arguments.named.length,
+ "Expected 'namedIndex' to be ${arguments.named.length}, "
+ "got ${namedIndex}.");
if (isSpecialCasedBinaryOperator) {
calleeType = replaceReturnType(
calleeType,
@@ -2347,30 +2466,6 @@
typeSchemaEnvironment.getTypeOfSpecialCasedTernaryOperator(
receiverType!, actualTypes![0], actualTypes[1], library.library));
}
- for (NamedExpression namedArgument in arguments.named) {
- DartType formalType =
- getNamedParameterType(calleeType, namedArgument.name);
- DartType inferredFormalType = substitution != null
- ? substitution.substituteType(formalType)
- : formalType;
- ExpressionInferenceResult result = inferExpression(
- namedArgument.value,
- isNonNullableByDefault
- ? inferredFormalType
- : legacyErasure(inferredFormalType),
- inferenceNeeded || isSpecialCasedBinaryOperator || typeChecksNeeded);
- DartType inferredType = identical(result.inferredType, noInferredType) ||
- isNonNullableByDefault
- ? result.inferredType
- : legacyErasure(result.inferredType);
- Expression expression =
- _hoist(result.expression, inferredType, hoistedExpressions);
- namedArgument.value = expression..parent = namedArgument;
- if (inferenceNeeded || typeChecksNeeded) {
- formalTypes!.add(formalType);
- actualTypes!.add(inferredType);
- }
- }
// Check for and remove duplicated named arguments.
List<NamedExpression> named = arguments.named;
@@ -2516,7 +2611,9 @@
calleeType = legacyErasure(calleeType) as FunctionType;
}
- return new SuccessfulInferenceResult(inferredType, calleeType);
+ return new SuccessfulInferenceResult(inferredType, calleeType,
+ hoistedArguments: localHoistedExpressions,
+ inferredReceiverType: receiverType);
}
FunctionType inferLocalFunction(FunctionNode function, DartType? typeContext,
@@ -2767,7 +2864,7 @@
Link<NullAwareGuard> nullAwareGuards,
Expression receiver,
Name name,
- Arguments arguments,
+ ArgumentsImpl arguments,
DartType typeContext,
List<VariableDeclaration>? hoistedExpressions,
{required bool isImplicitCall}) {
@@ -2792,7 +2889,7 @@
Expression receiver,
NeverType receiverType,
Name name,
- Arguments arguments,
+ ArgumentsImpl arguments,
DartType typeContext,
List<VariableDeclaration>? hoistedExpressions,
{required bool isImplicitCall}) {
@@ -2820,7 +2917,7 @@
DartType receiverType,
ObjectAccessTarget target,
Name name,
- Arguments arguments,
+ ArgumentsImpl arguments,
DartType typeContext,
List<VariableDeclaration>? hoistedExpressions,
{required bool isExpressionInvocation,
@@ -2854,7 +2951,7 @@
DartType receiverType,
ObjectAccessTarget target,
Name name,
- Arguments arguments,
+ ArgumentsImpl arguments,
DartType typeContext,
List<VariableDeclaration>? hoistedExpressions,
{required bool isImplicitCall}) {
@@ -2905,8 +3002,8 @@
} else {
StaticInvocation staticInvocation = transformExtensionMethodInvocation(
fileOffset, target, receiver, arguments);
- InvocationInferenceResult result = inferInvocation(
- typeContext, fileOffset, functionType, staticInvocation.arguments,
+ InvocationInferenceResult result = inferInvocation(typeContext,
+ fileOffset, functionType, staticInvocation.arguments as ArgumentsImpl,
hoistedExpressions: hoistedExpressions,
receiverType: receiverType,
isImplicitExtensionMember: true,
@@ -2969,7 +3066,7 @@
Expression receiver,
DartType receiverType,
ObjectAccessTarget target,
- Arguments arguments,
+ ArgumentsImpl arguments,
DartType typeContext,
List<VariableDeclaration>? hoistedExpressions,
{required bool isImplicitCall}) {
@@ -3122,8 +3219,8 @@
method.enclosingClass!, method.function.returnType)) {
contravariantCheck = true;
}
- InvocationInferenceResult result = inferInvocation(
- typeContext, fileOffset, declaredFunctionType, arguments,
+ InvocationInferenceResult result = inferInvocation(typeContext, fileOffset,
+ declaredFunctionType, arguments as ArgumentsImpl,
hoistedExpressions: hoistedExpressions,
receiverType: receiverType,
isImplicitCall: isImplicitCall,
@@ -3238,7 +3335,7 @@
Expression receiver,
DartType receiverType,
ObjectAccessTarget target,
- Arguments arguments,
+ ArgumentsImpl arguments,
DartType typeContext,
List<VariableDeclaration>? hoistedExpressions,
{required bool isExpressionInvocation}) {
@@ -3445,7 +3542,7 @@
Expression receiver,
DartType receiverType,
ObjectAccessTarget target,
- Arguments arguments,
+ ArgumentsImpl arguments,
DartType typeContext,
List<VariableDeclaration>? hoistedExpressions,
{required bool isExpressionInvocation}) {
@@ -3619,7 +3716,7 @@
Expression receiver,
DartType receiverType,
Name name,
- Arguments arguments,
+ ArgumentsImpl arguments,
DartType typeContext,
{required bool isExpressionInvocation,
required bool isImplicitCall,
@@ -3842,7 +3939,7 @@
: const ObjectAccessTarget.missing();
int fileOffset = expression.fileOffset;
Name methodName = expression.name;
- Arguments arguments = expression.arguments;
+ ArgumentsImpl arguments = expression.arguments as ArgumentsImpl;
DartType receiverType = thisType!;
bool isSpecialCasedBinaryOperator =
isSpecialCasedBinaryOperatorForReceiverType(target, receiverType);
@@ -4772,10 +4869,65 @@
@override
final FunctionType functionType;
- SuccessfulInferenceResult(this.inferredType, this.functionType);
+ final List<VariableDeclaration>? hoistedArguments;
+
+ final DartType? inferredReceiverType;
+
+ SuccessfulInferenceResult(this.inferredType, this.functionType,
+ {this.hoistedArguments, this.inferredReceiverType});
@override
- Expression applyResult(Expression expression) => expression;
+ Expression applyResult(Expression expression) {
+ List<VariableDeclaration>? hoistedArguments = this.hoistedArguments;
+ if (hoistedArguments == null || hoistedArguments.isEmpty) {
+ return expression;
+ } else {
+ assert(expression is InvocationExpression);
+ if (expression is FactoryConstructorInvocation) {
+ return _insertHoistedExpressions(expression, hoistedArguments);
+ } else if (expression is TypeAliasedConstructorInvocation) {
+ // Should be unaliased at this point, the code is for completeness.
+ return _insertHoistedExpressions(expression, hoistedArguments);
+ } else if (expression is TypeAliasedFactoryInvocation) {
+ // Should be unaliased at this point, the code is for completeness.
+ return expression;
+ } else if (expression is ConstructorInvocation) {
+ return _insertHoistedExpressions(expression, hoistedArguments);
+ } else if (expression is DynamicInvocation) {
+ return _insertHoistedExpressions(expression, hoistedArguments);
+ } else if (expression is FunctionInvocation) {
+ return _insertHoistedExpressions(expression, hoistedArguments);
+ } else if (expression is InstanceGetterInvocation) {
+ // The hoisting of InstanceGetterInvocation is performed elsewhere.
+ return expression;
+ } else if (expression is InstanceInvocation) {
+ VariableDeclaration receiver = createVariable(
+ expression.receiver, inferredReceiverType ?? const DynamicType());
+ expression.receiver = createVariableGet(receiver)..parent = expression;
+ return createLet(
+ receiver, _insertHoistedExpressions(expression, hoistedArguments));
+ } else if (expression is LocalFunctionInvocation) {
+ return _insertHoistedExpressions(expression, hoistedArguments);
+ } else if (expression is StaticInvocation) {
+ return _insertHoistedExpressions(expression, hoistedArguments);
+ } else if (expression is SuperMethodInvocation) {
+ return _insertHoistedExpressions(expression, hoistedArguments);
+ } else {
+ throw new StateError(
+ "Unhandled invocation kind '${expression.runtimeType}'.");
+ }
+ }
+ }
+
+ static Expression _insertHoistedExpressions(
+ Expression expression, List<VariableDeclaration> hoistedExpressions) {
+ if (hoistedExpressions.isNotEmpty) {
+ for (int index = hoistedExpressions.length - 1; index >= 0; index--) {
+ expression = createLet(hoistedExpressions[index], expression);
+ }
+ }
+ return expression;
+ }
@override
bool get isInapplicable => false;
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 9aad4b2..f9729d3 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 @@
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/messages.yaml b/pkg/front_end/messages.yaml
index d3859ab..78090a5 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -50,6 +50,12 @@
# which will be used when generating code in Analyzer for translating
# fasta error codes to Analyzer error codes.
#
+# Errors with an `index` can also optionally contain user-facing documentation
+# for the problem (documentation), which will be extracted to
+# `pkg/analyzer/tool/diagnostics/diagnostics.md`, as well as internal
+# documentation (comment), which will be included in the code generated for the
+# analyzer.
+#
# In some cases a message is internal to the frontend, and no meaningful
# analyzer code can be provided. In such cases set `frontendInternal: true`.
#
@@ -829,6 +835,9 @@
problemMessage: "The modifier '#lexeme' was already specified."
correctionMessage: "Try removing all but one occurrence of the modifier."
analyzerCode: ParserErrorCode.DUPLICATED_MODIFIER
+ comment: |-
+ Parameters:
+ 0: the modifier that was duplicated
script:
- "class C { const const m; }"
- "class C { external external f(); }"
@@ -972,6 +981,35 @@
correctionMessage: "Try removing '#lexeme'."
analyzerCode: ParserErrorCode.INVALID_USE_OF_COVARIANT_IN_EXTENSION
hasPublishedDocs: true
+ comment: No parameters.
+ documentation: |-
+ #### Description
+
+ The analyzer produces this diagnostic when a member declared inside an
+ extension uses the keyword `covariant` in the declaration of a parameter.
+ Extensions aren't classes and don't have subclasses, so the keyword serves
+ no purpose.
+
+ #### Examples
+
+ The following code produces this diagnostic because `i` is marked as being
+ covariant:
+
+ ```dart
+ extension E on String {
+ void a([!covariant!] int i) {}
+ }
+ ```
+
+ #### Common fixes
+
+ Remove the `covariant` keyword:
+
+ ```dart
+ extension E on String {
+ void a(int i) {}
+ }
+ ```
script:
- "extension on String { foo(covariant String child) {} }"
@@ -1119,6 +1157,9 @@
problemMessage: "The label '#name' was already used in this switch statement."
correctionMessage: "Try choosing a different name for this label."
analyzerCode: ParserErrorCode.DUPLICATE_LABEL_IN_SWITCH_STATEMENT
+ comment: |-
+ Parameters:
+ 0: the label that was duplicated
statement:
- "switch (0) {l1: case 0: break; l1: case 1: break;}"
@@ -2191,6 +2232,27 @@
problemMessage: "Extensions can't declare abstract members."
correctionMessage: "Try providing an implementation for the member."
analyzerCode: ParserErrorCode.EXTENSION_DECLARES_ABSTRACT_MEMBER
+ comment: No parameters.
+ documentation: |-
+ #### Description
+
+ The analyzer produces this diagnostic when an abstract declaration is
+ declared in an extension. Extensions can declare only concrete members.
+
+ #### Examples
+
+ The following code produces this diagnostic because the method `a` doesn't
+ have a body:
+
+ ```dart
+ extension E on String {
+ int [!a!]();
+ }
+ ```
+
+ #### Common fixes
+
+ Either provide an implementation for the member or remove it.
hasPublishedDocs: true
ExtensionDeclaresConstructor:
@@ -2198,6 +2260,29 @@
problemMessage: "Extensions can't declare constructors."
correctionMessage: "Try removing the constructor declaration."
analyzerCode: ParserErrorCode.EXTENSION_DECLARES_CONSTRUCTOR
+ comment: No parameters.
+ documentation: |-
+ #### Description
+
+ The analyzer produces this diagnostic when a constructor declaration is
+ found in an extension. It isn't valid to define a constructor because
+ extensions aren't classes, and it isn't possible to create an instance of
+ an extension.
+
+ #### Examples
+
+ The following code produces this diagnostic because there is a constructor
+ declaration in `E`:
+
+ ```dart
+ extension E on String {
+ [!E!]() : super();
+ }
+ ```
+
+ #### Common fixes
+
+ Remove the constructor or replace it with a static method.
hasPublishedDocs: true
ExtensionDeclaresInstanceField:
@@ -2205,6 +2290,30 @@
problemMessage: "Extensions can't declare instance fields"
correctionMessage: "Try removing the field declaration or making it a static field"
analyzerCode: ParserErrorCode.EXTENSION_DECLARES_INSTANCE_FIELD
+ comment: No parameters.
+ documentation: |-
+ #### Description
+
+ The analyzer produces this diagnostic when an instance field declaration is
+ found in an extension. It isn't valid to define an instance field because
+ extensions can only add behavior, not state.
+
+ #### Examples
+
+ The following code produces this diagnostic because `s` is an instance
+ field:
+
+ ```dart
+ %language=2.9
+ extension E on String {
+ String [!s!];
+ }
+ ```
+
+ #### Common fixes
+
+ Remove the field, make it a static field, or convert it to be a getter,
+ setter, or method.
hasPublishedDocs: true
ConflictsWithConstructor:
@@ -3019,6 +3128,9 @@
index: 39
problemMessage: "The string '#lexeme' isn't a user-definable operator."
analyzerCode: ParserErrorCode.INVALID_OPERATOR
+ comment: |-
+ Parameters:
+ 0: the operator that is invalid
script:
- "class C { void operator %=(x) {} }"
diff --git a/pkg/front_end/test/extensions/extensions_test.dart b/pkg/front_end/test/extensions/extensions_test.dart
index 2666476..5765b21 100644
--- a/pkg/front_end/test/extensions/extensions_test.dart
+++ b/pkg/front_end/test/extensions/extensions_test.dart
@@ -89,11 +89,11 @@
Id id, List<FormattedMessage> 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/messages_suite.dart b/pkg/front_end/test/fasta/messages_suite.dart
index 152fa07..99579c9 100644
--- a/pkg/front_end/test/fasta/messages_suite.dart
+++ b/pkg/front_end/test/fasta/messages_suite.dart
@@ -386,6 +386,19 @@
}
break;
+ case "documentation":
+ if (value is! String) {
+ throw new ArgumentError(
+ 'documentation should be a string: $value.');
+ }
+ break;
+
+ case "comment":
+ if (value is! String) {
+ throw new ArgumentError('comment should be a string: $value.');
+ }
+ break;
+
default:
unknownKeys.add(key);
}
diff --git a/pkg/front_end/test/fasta/testing/suite.dart b/pkg/front_end/test/fasta/testing/suite.dart
index 387f68f..4275910 100644
--- a/pkg/front_end/test/fasta/testing/suite.dart
+++ b/pkg/front_end/test/fasta/testing/suite.dart
@@ -227,6 +227,7 @@
const List<Option> folderOptionsSpecification = [
Options.enableExperiment,
+ Options.enableUnscheduledExperiments,
Options.forceLateLoweringSentinel,
overwriteCurrentSdkVersion,
Options.forceLateLowering,
@@ -261,6 +262,7 @@
/// test folders.
class FolderOptions {
final Map<ExperimentalFlag, bool> _explicitExperimentalFlags;
+ final bool? enableUnscheduledExperiments;
final int? forceLateLowerings;
final bool? forceLateLoweringSentinel;
final bool? forceStaticFieldLowering;
@@ -273,7 +275,8 @@
final String? overwriteCurrentSdkVersion;
FolderOptions(this._explicitExperimentalFlags,
- {this.forceLateLowerings,
+ {this.enableUnscheduledExperiments,
+ this.forceLateLowerings,
this.forceLateLoweringSentinel,
this.forceStaticFieldLowering,
this.forceNoExplicitGetterCalls,
@@ -441,6 +444,7 @@
FolderOptions _computeFolderOptions(Directory directory) {
FolderOptions? folderOptions = _folderOptions[directory.uri];
if (folderOptions == null) {
+ bool? enableUnscheduledExperiments;
int? forceLateLowering;
bool? forceLateLoweringSentinel;
bool? forceStaticFieldLowering;
@@ -452,6 +456,7 @@
String target = "vm";
if (directory.uri == baseUri) {
folderOptions = new FolderOptions({},
+ enableUnscheduledExperiments: enableUnscheduledExperiments,
forceLateLowerings: forceLateLowering,
forceLateLoweringSentinel: forceLateLoweringSentinel,
forceStaticFieldLowering: forceStaticFieldLowering,
@@ -473,6 +478,8 @@
Options.enableExperiment.read(parsedOptions) ?? <String>[];
String overwriteCurrentSdkVersionArgument =
overwriteCurrentSdkVersion.read(parsedOptions);
+ enableUnscheduledExperiments =
+ Options.enableUnscheduledExperiments.read(parsedOptions);
forceLateLoweringSentinel =
Options.forceLateLoweringSentinel.read(parsedOptions);
forceLateLowering = Options.forceLateLowering.read(parsedOptions);
@@ -499,6 +506,7 @@
onError: (String message) => throw new ArgumentError(message),
onWarning: (String message) =>
throw new ArgumentError(message)),
+ enableUnscheduledExperiments: enableUnscheduledExperiments,
forceLateLowerings: forceLateLowering,
forceLateLoweringSentinel: forceLateLoweringSentinel,
forceStaticFieldLowering: forceStaticFieldLowering,
@@ -541,6 +549,8 @@
}
..sdkRoot = sdk
..packagesFileUri = uriConfiguration.packageConfigUri ?? packages
+ ..enableUnscheduledExperiments =
+ folderOptions.enableUnscheduledExperiments ?? false
..environmentDefines = folderOptions.defines
..explicitExperimentalFlags = folderOptions
.computeExplicitExperimentalFlags(explicitExperimentalFlags)
@@ -1094,6 +1104,8 @@
..onDiagnostic = (DiagnosticMessage message) {
errors.add(message.plainTextFormatted);
}
+ ..enableUnscheduledExperiments =
+ folderOptions.enableUnscheduledExperiments ?? false
..environmentDefines = folderOptions.defines
..explicitExperimentalFlags = experimentalFlags
..nnbdMode = nnbdMode
diff --git a/pkg/front_end/test/fasta/tool_git_test.dart b/pkg/front_end/test/fasta/tool_git_test.dart
index fde2e4e..3755f18 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 @@
}
Set<String> testedSubtools = new Set<String>.from(subtools)
.difference(new Set<String>.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 cf8ce12..275df00 100644
--- a/pkg/front_end/test/kernel_generator_test.dart
+++ b/pkg/front_end/test/kernel_generator_test.dart
@@ -20,9 +20,10 @@
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 @@
});
test('compiler requires a main method', () async {
- var errors = [];
+ var errors = <DiagnosticMessage>[];
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 dff07bd..8df7698 100644
--- a/pkg/front_end/test/messages_json_test.dart
+++ b/pkg/front_end/test/messages_json_test.dart
@@ -23,7 +23,7 @@
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 cdb9645..cb24755 100644
--- a/pkg/front_end/test/parser_suite.dart
+++ b/pkg/front_end/test/parser_suite.dart
@@ -526,9 +526,9 @@
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/spell_checking_list_common.txt b/pkg/front_end/test/spell_checking_list_common.txt
index dd9f732..93046af 100644
--- a/pkg/front_end/test/spell_checking_list_common.txt
+++ b/pkg/front_end/test/spell_checking_list_common.txt
@@ -488,6 +488,7 @@
closures
clue
code
+coincides
coinductively
collapses
collect
@@ -1397,6 +1398,7 @@
historically
hoist
hoisted
+hoisting
hold
holder
holding
@@ -2574,6 +2576,7 @@
resynthesize
retain
retained
+retains
rethrow
rethrowing
retired
@@ -3218,6 +3221,7 @@
unresolved
unsafe
unsatisfied
+unscheduled
unserializable
unsigned
unsized
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 b771f32..00c3a75 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 @@
}
Future<void> test_getUriTranslator_noPackages() async {
- var errors = [];
+ var errors = <DiagnosticMessage>[];
// .packages file should be ignored.
fileSystem
.entityForUri(Uri.parse('org-dartlang-test:///.packages'))
@@ -335,7 +335,7 @@
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 @@
fileSystem
.entityForUri(Uri.parse('org-dartlang-test:///foo.dart'))
.writeAsStringSync('main(){}\n');
- var errors = [];
+ var errors = <DiagnosticMessage>[];
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 @@
.entityForUri(Uri.parse('org-dartlang-test:///foo.dart'))
.writeAsStringSync('main(){}\n');
var sdkRoot = Uri.parse('org-dartlang-test:///sdk/root');
- var errors = [];
+ var errors = <DiagnosticMessage>[];
var raw = new CompilerOptions()
..sdkRoot = sdkRoot
..fileSystem = fileSystem
@@ -405,7 +406,7 @@
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 @@
.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 = <DiagnosticMessage>[];
var raw = new CompilerOptions()
..sdkSummary = sdkSummary
..fileSystem = fileSystem
@@ -441,7 +442,7 @@
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 @@
fileSystem
.entityForUri(Uri.parse('org-dartlang-test:///foo.dart'))
.writeAsStringSync('main(){}\n');
- var errors = [];
+ var errors = <DiagnosticMessage>[];
var raw = new CompilerOptions()
..sdkSummary = sdkSummary
..fileSystem = fileSystem
@@ -482,14 +483,14 @@
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 cdfdfcc..2e57c0e 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 @@
// 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 @@
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/testcases/constructor_tearoffs/lowering/named_mixin_application.dart b/pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart
new file mode 100644
index 0000000..9aad96b
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart
@@ -0,0 +1,52 @@
+// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+abstract class Interface {
+ int get field;
+}
+
+class Class<T> implements Interface {
+ var field;
+
+ Class([this.field = 0]);
+ Class.named(this.field);
+ Class.redirectingGenerative(int field) : this(field);
+ factory Class.fact(int field) => new Class(field);
+ factory Class.redirectingFactory(int field) = Class;
+}
+
+mixin Mixin<S> {}
+
+class NamedMixinApplication<T, S> = Class<T> with Mixin<S>;
+
+abstract class AbstractNamedMixinApplication<T, S> = Class<T> with Mixin<S>;
+
+test() {
+ NamedMixinApplication.fact;
+ NamedMixinApplication.redirectingFactory;
+
+ AbstractNamedMixinApplication.new;
+ AbstractNamedMixinApplication.named;
+ AbstractNamedMixinApplication.redirectingGenerative;
+ AbstractNamedMixinApplication.fact;
+ AbstractNamedMixinApplication.redirectingFactory;
+}
+
+var f1 = NamedMixinApplication.new;
+var f2 = NamedMixinApplication.named;
+var f3 = NamedMixinApplication.redirectingGenerative;
+
+main() {
+ var f1 = NamedMixinApplication.new;
+ var f2 = NamedMixinApplication.named;
+ var f3 = NamedMixinApplication.redirectingGenerative;
+
+ NamedMixinApplication<int, String>.new;
+ NamedMixinApplication<int, String>.named;
+ NamedMixinApplication<int, String>.redirectingGenerative;
+
+ NamedMixinApplication<int, String> Function([int]) n1 = f1<int, String>;
+ NamedMixinApplication<int, String> Function(int) n2 = f2<int, String>;
+ NamedMixinApplication<int, String> Function(int) n3 = f3<int, String>;
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart.strong.expect
new file mode 100644
index 0000000..168005c
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart.strong.expect
@@ -0,0 +1,145 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:26:25: Error: Member not found: 'fact'.
+// NamedMixinApplication.fact;
+// ^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:27:25: Error: Member not found: 'redirectingFactory'.
+// NamedMixinApplication.redirectingFactory;
+// ^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:29:33: Error: Constructors on abstract classes can't be torn off.
+// AbstractNamedMixinApplication.new;
+// ^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:30:33: Error: Constructors on abstract classes can't be torn off.
+// AbstractNamedMixinApplication.named;
+// ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:31:33: Error: Constructors on abstract classes can't be torn off.
+// AbstractNamedMixinApplication.redirectingGenerative;
+// ^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:32:33: Error: Member not found: 'fact'.
+// AbstractNamedMixinApplication.fact;
+// ^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:33:33: Error: Member not found: 'redirectingFactory'.
+// AbstractNamedMixinApplication.redirectingFactory;
+// ^^^^^^^^^^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class Interface extends core::Object {
+ synthetic constructor •() → self::Interface
+ : super core::Object::•()
+ ;
+ abstract get field() → core::int;
+}
+class Class<T extends core::Object? = dynamic> extends core::Object implements self::Interface {
+ field core::int field;
+ static final field dynamic _redirecting# = <dynamic>[self::Class::redirectingFactory]/*isLegacy*/;
+ constructor •([core::int field = #C1]) → self::Class<self::Class::T%>
+ : self::Class::field = field, super core::Object::•()
+ ;
+ constructor named(core::int field) → self::Class<self::Class::T%>
+ : self::Class::field = field, super core::Object::•()
+ ;
+ constructor redirectingGenerative(core::int field) → self::Class<self::Class::T%>
+ : this self::Class::•(field)
+ ;
+ static method _#new#tearOff<T extends core::Object? = dynamic>([core::int field = #C1]) → self::Class<self::Class::_#new#tearOff::T%>
+ return new self::Class::•<self::Class::_#new#tearOff::T%>(field);
+ static method _#named#tearOff<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::_#named#tearOff::T%>
+ return new self::Class::named<self::Class::_#named#tearOff::T%>(field);
+ static method _#redirectingGenerative#tearOff<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::_#redirectingGenerative#tearOff::T%>
+ return new self::Class::redirectingGenerative<self::Class::_#redirectingGenerative#tearOff::T%>(field);
+ static factory fact<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::fact::T%>
+ return new self::Class::•<self::Class::fact::T%>(field);
+ static method _#fact#tearOff<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::_#fact#tearOff::T%>
+ return self::Class::fact<self::Class::_#fact#tearOff::T%>(field);
+ static factory redirectingFactory<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::redirectingFactory::T%>
+ return new self::Class::•<self::Class::redirectingFactory::T%>(field);
+ static method _#redirectingFactory#tearOff<T extends core::Object? = dynamic>(core::int field = #C1) → self::Class<self::Class::_#redirectingFactory#tearOff::T%>
+ return new self::Class::•<self::Class::_#redirectingFactory#tearOff::T%>(field);
+}
+abstract class Mixin<S extends core::Object? = dynamic> extends core::Object /*isMixinDeclaration*/ {
+}
+class NamedMixinApplication<T extends core::Object? = dynamic, S extends core::Object? = dynamic> = self::Class<self::NamedMixinApplication::T%> with self::Mixin<self::NamedMixinApplication::S%> {
+ synthetic constructor •([core::int field = #C1]) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::•(field)
+ ;
+ synthetic constructor named(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::named(field)
+ ;
+ synthetic constructor redirectingGenerative(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::redirectingGenerative(field)
+ ;
+ static method _#new#tearOff<T extends core::Object? = dynamic, S extends core::Object? = dynamic>([core::int field]) → self::NamedMixinApplication<self::NamedMixinApplication::_#new#tearOff::T%, self::NamedMixinApplication::_#new#tearOff::S%>
+ return new self::NamedMixinApplication::•<self::NamedMixinApplication::_#new#tearOff::T%, self::NamedMixinApplication::_#new#tearOff::S%>(field);
+ static method _#named#tearOff<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::_#named#tearOff::T%, self::NamedMixinApplication::_#named#tearOff::S%>
+ return new self::NamedMixinApplication::named<self::NamedMixinApplication::_#named#tearOff::T%, self::NamedMixinApplication::_#named#tearOff::S%>(field);
+ static method _#redirectingGenerative#tearOff<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::_#redirectingGenerative#tearOff::T%, self::NamedMixinApplication::_#redirectingGenerative#tearOff::S%>
+ return new self::NamedMixinApplication::redirectingGenerative<self::NamedMixinApplication::_#redirectingGenerative#tearOff::T%, self::NamedMixinApplication::_#redirectingGenerative#tearOff::S%>(field);
+}
+abstract class AbstractNamedMixinApplication<T extends core::Object? = dynamic, S extends core::Object? = dynamic> = self::Class<self::AbstractNamedMixinApplication::T%> with self::Mixin<self::AbstractNamedMixinApplication::S%> {
+ synthetic constructor •([core::int field = #C1]) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::•(field)
+ ;
+ synthetic constructor named(core::int field) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::named(field)
+ ;
+ synthetic constructor redirectingGenerative(core::int field) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::redirectingGenerative(field)
+ ;
+}
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>([core::int]) → self::NamedMixinApplication<T%, S%> f1 = #C2;
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f2 = #C3;
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f3 = #C4;
+static method test() → dynamic {
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:26:25: Error: Member not found: 'fact'.
+ NamedMixinApplication.fact;
+ ^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:27:25: Error: Member not found: 'redirectingFactory'.
+ NamedMixinApplication.redirectingFactory;
+ ^^^^^^^^^^^^^^^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:29:33: Error: Constructors on abstract classes can't be torn off.
+ AbstractNamedMixinApplication.new;
+ ^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:30:33: Error: Constructors on abstract classes can't be torn off.
+ AbstractNamedMixinApplication.named;
+ ^^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:31:33: Error: Constructors on abstract classes can't be torn off.
+ AbstractNamedMixinApplication.redirectingGenerative;
+ ^^^^^^^^^^^^^^^^^^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:32:33: Error: Member not found: 'fact'.
+ AbstractNamedMixinApplication.fact;
+ ^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:33:33: Error: Member not found: 'redirectingFactory'.
+ AbstractNamedMixinApplication.redirectingFactory;
+ ^^^^^^^^^^^^^^^^^^";
+}
+static method main() → dynamic {
+ <T extends core::Object? = dynamic, S extends core::Object? = dynamic>([core::int]) → self::NamedMixinApplication<T%, S%> f1 = #C2;
+ <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f2 = #C3;
+ <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f3 = #C4;
+ #C5;
+ #C6;
+ #C7;
+ ([core::int]) → self::NamedMixinApplication<core::int, core::String> n1 = f1<core::int, core::String>;
+ (core::int) → self::NamedMixinApplication<core::int, core::String> n2 = f2<core::int, core::String>;
+ (core::int) → self::NamedMixinApplication<core::int, core::String> n3 = f3<core::int, core::String>;
+}
+
+constants {
+ #C1 = 0
+ #C2 = static-tearoff self::NamedMixinApplication::_#new#tearOff
+ #C3 = static-tearoff self::NamedMixinApplication::_#named#tearOff
+ #C4 = static-tearoff self::NamedMixinApplication::_#redirectingGenerative#tearOff
+ #C5 = instantiation self::NamedMixinApplication::_#new#tearOff <core::int, core::String>
+ #C6 = instantiation self::NamedMixinApplication::_#named#tearOff <core::int, core::String>
+ #C7 = instantiation self::NamedMixinApplication::_#redirectingGenerative#tearOff <core::int, core::String>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart.strong.transformed.expect
new file mode 100644
index 0000000..3d96732
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart.strong.transformed.expect
@@ -0,0 +1,145 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:26:25: Error: Member not found: 'fact'.
+// NamedMixinApplication.fact;
+// ^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:27:25: Error: Member not found: 'redirectingFactory'.
+// NamedMixinApplication.redirectingFactory;
+// ^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:29:33: Error: Constructors on abstract classes can't be torn off.
+// AbstractNamedMixinApplication.new;
+// ^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:30:33: Error: Constructors on abstract classes can't be torn off.
+// AbstractNamedMixinApplication.named;
+// ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:31:33: Error: Constructors on abstract classes can't be torn off.
+// AbstractNamedMixinApplication.redirectingGenerative;
+// ^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:32:33: Error: Member not found: 'fact'.
+// AbstractNamedMixinApplication.fact;
+// ^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:33:33: Error: Member not found: 'redirectingFactory'.
+// AbstractNamedMixinApplication.redirectingFactory;
+// ^^^^^^^^^^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class Interface extends core::Object {
+ synthetic constructor •() → self::Interface
+ : super core::Object::•()
+ ;
+ abstract get field() → core::int;
+}
+class Class<T extends core::Object? = dynamic> extends core::Object implements self::Interface {
+ field core::int field;
+ static final field dynamic _redirecting# = <dynamic>[self::Class::redirectingFactory]/*isLegacy*/;
+ constructor •([core::int field = #C1]) → self::Class<self::Class::T%>
+ : self::Class::field = field, super core::Object::•()
+ ;
+ constructor named(core::int field) → self::Class<self::Class::T%>
+ : self::Class::field = field, super core::Object::•()
+ ;
+ constructor redirectingGenerative(core::int field) → self::Class<self::Class::T%>
+ : this self::Class::•(field)
+ ;
+ static method _#new#tearOff<T extends core::Object? = dynamic>([core::int field = #C1]) → self::Class<self::Class::_#new#tearOff::T%>
+ return new self::Class::•<self::Class::_#new#tearOff::T%>(field);
+ static method _#named#tearOff<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::_#named#tearOff::T%>
+ return new self::Class::named<self::Class::_#named#tearOff::T%>(field);
+ static method _#redirectingGenerative#tearOff<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::_#redirectingGenerative#tearOff::T%>
+ return new self::Class::redirectingGenerative<self::Class::_#redirectingGenerative#tearOff::T%>(field);
+ static factory fact<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::fact::T%>
+ return new self::Class::•<self::Class::fact::T%>(field);
+ static method _#fact#tearOff<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::_#fact#tearOff::T%>
+ return self::Class::fact<self::Class::_#fact#tearOff::T%>(field);
+ static factory redirectingFactory<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::redirectingFactory::T%>
+ return new self::Class::•<self::Class::redirectingFactory::T%>(field);
+ static method _#redirectingFactory#tearOff<T extends core::Object? = dynamic>(core::int field = #C1) → self::Class<self::Class::_#redirectingFactory#tearOff::T%>
+ return new self::Class::•<self::Class::_#redirectingFactory#tearOff::T%>(field);
+}
+abstract class Mixin<S extends core::Object? = dynamic> extends core::Object /*isMixinDeclaration*/ {
+}
+class NamedMixinApplication<T extends core::Object? = dynamic, S extends core::Object? = dynamic> extends self::Class<self::NamedMixinApplication::T%> implements self::Mixin<self::NamedMixinApplication::S%> /*isEliminatedMixin*/ {
+ synthetic constructor •([core::int field = #C1]) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::•(field)
+ ;
+ synthetic constructor named(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::named(field)
+ ;
+ synthetic constructor redirectingGenerative(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::redirectingGenerative(field)
+ ;
+ static method _#new#tearOff<T extends core::Object? = dynamic, S extends core::Object? = dynamic>([core::int field]) → self::NamedMixinApplication<self::NamedMixinApplication::_#new#tearOff::T%, self::NamedMixinApplication::_#new#tearOff::S%>
+ return new self::NamedMixinApplication::•<self::NamedMixinApplication::_#new#tearOff::T%, self::NamedMixinApplication::_#new#tearOff::S%>(field);
+ static method _#named#tearOff<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::_#named#tearOff::T%, self::NamedMixinApplication::_#named#tearOff::S%>
+ return new self::NamedMixinApplication::named<self::NamedMixinApplication::_#named#tearOff::T%, self::NamedMixinApplication::_#named#tearOff::S%>(field);
+ static method _#redirectingGenerative#tearOff<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::_#redirectingGenerative#tearOff::T%, self::NamedMixinApplication::_#redirectingGenerative#tearOff::S%>
+ return new self::NamedMixinApplication::redirectingGenerative<self::NamedMixinApplication::_#redirectingGenerative#tearOff::T%, self::NamedMixinApplication::_#redirectingGenerative#tearOff::S%>(field);
+}
+abstract class AbstractNamedMixinApplication<T extends core::Object? = dynamic, S extends core::Object? = dynamic> extends self::Class<self::AbstractNamedMixinApplication::T%> implements self::Mixin<self::AbstractNamedMixinApplication::S%> /*isEliminatedMixin*/ {
+ synthetic constructor •([core::int field = #C1]) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::•(field)
+ ;
+ synthetic constructor named(core::int field) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::named(field)
+ ;
+ synthetic constructor redirectingGenerative(core::int field) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::redirectingGenerative(field)
+ ;
+}
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>([core::int]) → self::NamedMixinApplication<T%, S%> f1 = #C2;
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f2 = #C3;
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f3 = #C4;
+static method test() → dynamic {
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:26:25: Error: Member not found: 'fact'.
+ NamedMixinApplication.fact;
+ ^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:27:25: Error: Member not found: 'redirectingFactory'.
+ NamedMixinApplication.redirectingFactory;
+ ^^^^^^^^^^^^^^^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:29:33: Error: Constructors on abstract classes can't be torn off.
+ AbstractNamedMixinApplication.new;
+ ^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:30:33: Error: Constructors on abstract classes can't be torn off.
+ AbstractNamedMixinApplication.named;
+ ^^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:31:33: Error: Constructors on abstract classes can't be torn off.
+ AbstractNamedMixinApplication.redirectingGenerative;
+ ^^^^^^^^^^^^^^^^^^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:32:33: Error: Member not found: 'fact'.
+ AbstractNamedMixinApplication.fact;
+ ^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:33:33: Error: Member not found: 'redirectingFactory'.
+ AbstractNamedMixinApplication.redirectingFactory;
+ ^^^^^^^^^^^^^^^^^^";
+}
+static method main() → dynamic {
+ <T extends core::Object? = dynamic, S extends core::Object? = dynamic>([core::int]) → self::NamedMixinApplication<T%, S%> f1 = #C2;
+ <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f2 = #C3;
+ <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f3 = #C4;
+ #C5;
+ #C6;
+ #C7;
+ ([core::int]) → self::NamedMixinApplication<core::int, core::String> n1 = f1<core::int, core::String>;
+ (core::int) → self::NamedMixinApplication<core::int, core::String> n2 = f2<core::int, core::String>;
+ (core::int) → self::NamedMixinApplication<core::int, core::String> n3 = f3<core::int, core::String>;
+}
+
+constants {
+ #C1 = 0
+ #C2 = static-tearoff self::NamedMixinApplication::_#new#tearOff
+ #C3 = static-tearoff self::NamedMixinApplication::_#named#tearOff
+ #C4 = static-tearoff self::NamedMixinApplication::_#redirectingGenerative#tearOff
+ #C5 = instantiation self::NamedMixinApplication::_#new#tearOff <core::int, core::String>
+ #C6 = instantiation self::NamedMixinApplication::_#named#tearOff <core::int, core::String>
+ #C7 = instantiation self::NamedMixinApplication::_#redirectingGenerative#tearOff <core::int, core::String>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart.textual_outline.expect
new file mode 100644
index 0000000..e762d95
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart.textual_outline.expect
@@ -0,0 +1,21 @@
+abstract class Interface {
+ int get field;
+}
+
+class Class<T> implements Interface {
+ var field;
+ Class([this.field = 0]);
+ Class.named(this.field);
+ Class.redirectingGenerative(int field) : this(field);
+ factory Class.fact(int field) => new Class(field);
+ factory Class.redirectingFactory(int field) = Class;
+}
+
+mixin Mixin<S> {}
+class NamedMixinApplication<T, S> = Class<T> with Mixin<S>;
+abstract class AbstractNamedMixinApplication<T, S> = Class<T> with Mixin<S>;
+test() {}
+var f1 = NamedMixinApplication.new;
+var f2 = NamedMixinApplication.named;
+var f3 = NamedMixinApplication.redirectingGenerative;
+main() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..e4743e7
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart.textual_outline_modelled.expect
@@ -0,0 +1,22 @@
+abstract class AbstractNamedMixinApplication<T, S> = Class<T> with Mixin<S>;
+
+abstract class Interface {
+ int get field;
+}
+
+class Class<T> implements Interface {
+ Class([this.field = 0]);
+ Class.named(this.field);
+ Class.redirectingGenerative(int field) : this(field);
+ factory Class.fact(int field) => new Class(field);
+ factory Class.redirectingFactory(int field) = Class;
+ var field;
+}
+
+class NamedMixinApplication<T, S> = Class<T> with Mixin<S>;
+main() {}
+mixin Mixin<S> {}
+test() {}
+var f1 = NamedMixinApplication.new;
+var f2 = NamedMixinApplication.named;
+var f3 = NamedMixinApplication.redirectingGenerative;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart.weak.expect
new file mode 100644
index 0000000..54437d8
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart.weak.expect
@@ -0,0 +1,145 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:26:25: Error: Member not found: 'fact'.
+// NamedMixinApplication.fact;
+// ^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:27:25: Error: Member not found: 'redirectingFactory'.
+// NamedMixinApplication.redirectingFactory;
+// ^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:29:33: Error: Constructors on abstract classes can't be torn off.
+// AbstractNamedMixinApplication.new;
+// ^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:30:33: Error: Constructors on abstract classes can't be torn off.
+// AbstractNamedMixinApplication.named;
+// ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:31:33: Error: Constructors on abstract classes can't be torn off.
+// AbstractNamedMixinApplication.redirectingGenerative;
+// ^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:32:33: Error: Member not found: 'fact'.
+// AbstractNamedMixinApplication.fact;
+// ^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:33:33: Error: Member not found: 'redirectingFactory'.
+// AbstractNamedMixinApplication.redirectingFactory;
+// ^^^^^^^^^^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class Interface extends core::Object {
+ synthetic constructor •() → self::Interface
+ : super core::Object::•()
+ ;
+ abstract get field() → core::int;
+}
+class Class<T extends core::Object? = dynamic> extends core::Object implements self::Interface {
+ field core::int field;
+ static final field dynamic _redirecting# = <dynamic>[self::Class::redirectingFactory]/*isLegacy*/;
+ constructor •([core::int field = #C1]) → self::Class<self::Class::T%>
+ : self::Class::field = field, super core::Object::•()
+ ;
+ constructor named(core::int field) → self::Class<self::Class::T%>
+ : self::Class::field = field, super core::Object::•()
+ ;
+ constructor redirectingGenerative(core::int field) → self::Class<self::Class::T%>
+ : this self::Class::•(field)
+ ;
+ static method _#new#tearOff<T extends core::Object? = dynamic>([core::int field = #C1]) → self::Class<self::Class::_#new#tearOff::T%>
+ return new self::Class::•<self::Class::_#new#tearOff::T%>(field);
+ static method _#named#tearOff<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::_#named#tearOff::T%>
+ return new self::Class::named<self::Class::_#named#tearOff::T%>(field);
+ static method _#redirectingGenerative#tearOff<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::_#redirectingGenerative#tearOff::T%>
+ return new self::Class::redirectingGenerative<self::Class::_#redirectingGenerative#tearOff::T%>(field);
+ static factory fact<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::fact::T%>
+ return new self::Class::•<self::Class::fact::T%>(field);
+ static method _#fact#tearOff<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::_#fact#tearOff::T%>
+ return self::Class::fact<self::Class::_#fact#tearOff::T%>(field);
+ static factory redirectingFactory<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::redirectingFactory::T%>
+ return new self::Class::•<self::Class::redirectingFactory::T%>(field);
+ static method _#redirectingFactory#tearOff<T extends core::Object? = dynamic>(core::int field = #C1) → self::Class<self::Class::_#redirectingFactory#tearOff::T%>
+ return new self::Class::•<self::Class::_#redirectingFactory#tearOff::T%>(field);
+}
+abstract class Mixin<S extends core::Object? = dynamic> extends core::Object /*isMixinDeclaration*/ {
+}
+class NamedMixinApplication<T extends core::Object? = dynamic, S extends core::Object? = dynamic> = self::Class<self::NamedMixinApplication::T%> with self::Mixin<self::NamedMixinApplication::S%> {
+ synthetic constructor •([core::int field = #C1]) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::•(field)
+ ;
+ synthetic constructor named(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::named(field)
+ ;
+ synthetic constructor redirectingGenerative(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::redirectingGenerative(field)
+ ;
+ static method _#new#tearOff<T extends core::Object? = dynamic, S extends core::Object? = dynamic>([core::int field]) → self::NamedMixinApplication<self::NamedMixinApplication::_#new#tearOff::T%, self::NamedMixinApplication::_#new#tearOff::S%>
+ return new self::NamedMixinApplication::•<self::NamedMixinApplication::_#new#tearOff::T%, self::NamedMixinApplication::_#new#tearOff::S%>(field);
+ static method _#named#tearOff<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::_#named#tearOff::T%, self::NamedMixinApplication::_#named#tearOff::S%>
+ return new self::NamedMixinApplication::named<self::NamedMixinApplication::_#named#tearOff::T%, self::NamedMixinApplication::_#named#tearOff::S%>(field);
+ static method _#redirectingGenerative#tearOff<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::_#redirectingGenerative#tearOff::T%, self::NamedMixinApplication::_#redirectingGenerative#tearOff::S%>
+ return new self::NamedMixinApplication::redirectingGenerative<self::NamedMixinApplication::_#redirectingGenerative#tearOff::T%, self::NamedMixinApplication::_#redirectingGenerative#tearOff::S%>(field);
+}
+abstract class AbstractNamedMixinApplication<T extends core::Object? = dynamic, S extends core::Object? = dynamic> = self::Class<self::AbstractNamedMixinApplication::T%> with self::Mixin<self::AbstractNamedMixinApplication::S%> {
+ synthetic constructor •([core::int field = #C1]) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::•(field)
+ ;
+ synthetic constructor named(core::int field) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::named(field)
+ ;
+ synthetic constructor redirectingGenerative(core::int field) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::redirectingGenerative(field)
+ ;
+}
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>([core::int]) → self::NamedMixinApplication<T%, S%> f1 = #C2;
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f2 = #C3;
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f3 = #C4;
+static method test() → dynamic {
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:26:25: Error: Member not found: 'fact'.
+ NamedMixinApplication.fact;
+ ^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:27:25: Error: Member not found: 'redirectingFactory'.
+ NamedMixinApplication.redirectingFactory;
+ ^^^^^^^^^^^^^^^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:29:33: Error: Constructors on abstract classes can't be torn off.
+ AbstractNamedMixinApplication.new;
+ ^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:30:33: Error: Constructors on abstract classes can't be torn off.
+ AbstractNamedMixinApplication.named;
+ ^^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:31:33: Error: Constructors on abstract classes can't be torn off.
+ AbstractNamedMixinApplication.redirectingGenerative;
+ ^^^^^^^^^^^^^^^^^^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:32:33: Error: Member not found: 'fact'.
+ AbstractNamedMixinApplication.fact;
+ ^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:33:33: Error: Member not found: 'redirectingFactory'.
+ AbstractNamedMixinApplication.redirectingFactory;
+ ^^^^^^^^^^^^^^^^^^";
+}
+static method main() → dynamic {
+ <T extends core::Object? = dynamic, S extends core::Object? = dynamic>([core::int]) → self::NamedMixinApplication<T%, S%> f1 = #C2;
+ <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f2 = #C3;
+ <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f3 = #C4;
+ #C5;
+ #C6;
+ #C7;
+ ([core::int]) → self::NamedMixinApplication<core::int, core::String> n1 = f1<core::int, core::String>;
+ (core::int) → self::NamedMixinApplication<core::int, core::String> n2 = f2<core::int, core::String>;
+ (core::int) → self::NamedMixinApplication<core::int, core::String> n3 = f3<core::int, core::String>;
+}
+
+constants {
+ #C1 = 0
+ #C2 = static-tearoff self::NamedMixinApplication::_#new#tearOff
+ #C3 = static-tearoff self::NamedMixinApplication::_#named#tearOff
+ #C4 = static-tearoff self::NamedMixinApplication::_#redirectingGenerative#tearOff
+ #C5 = instantiation self::NamedMixinApplication::_#new#tearOff <core::int*, core::String*>
+ #C6 = instantiation self::NamedMixinApplication::_#named#tearOff <core::int*, core::String*>
+ #C7 = instantiation self::NamedMixinApplication::_#redirectingGenerative#tearOff <core::int*, core::String*>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart.weak.outline.expect
new file mode 100644
index 0000000..fbdc213
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart.weak.outline.expect
@@ -0,0 +1,70 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+abstract class Interface extends core::Object {
+ synthetic constructor •() → self::Interface
+ ;
+ abstract get field() → core::int;
+}
+class Class<T extends core::Object? = dynamic> extends core::Object implements self::Interface {
+ field core::int field;
+ static final field dynamic _redirecting# = <dynamic>[self::Class::redirectingFactory]/*isLegacy*/;
+ constructor •([core::int field]) → self::Class<self::Class::T%>
+ ;
+ constructor named(core::int field) → self::Class<self::Class::T%>
+ ;
+ constructor redirectingGenerative(core::int field) → self::Class<self::Class::T%>
+ ;
+ static method _#new#tearOff<T extends core::Object? = dynamic>([core::int field]) → self::Class<self::Class::_#new#tearOff::T%>
+ return new self::Class::•<self::Class::_#new#tearOff::T%>(field);
+ static method _#named#tearOff<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::_#named#tearOff::T%>
+ return new self::Class::named<self::Class::_#named#tearOff::T%>(field);
+ static method _#redirectingGenerative#tearOff<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::_#redirectingGenerative#tearOff::T%>
+ return new self::Class::redirectingGenerative<self::Class::_#redirectingGenerative#tearOff::T%>(field);
+ static factory fact<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::fact::T%>
+ ;
+ static method _#fact#tearOff<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::_#fact#tearOff::T%>
+ return self::Class::fact<self::Class::_#fact#tearOff::T%>(field);
+ static factory redirectingFactory<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::redirectingFactory::T%>
+ return new self::Class::•<self::Class::redirectingFactory::T%>(field);
+ static method _#redirectingFactory#tearOff<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::_#redirectingFactory#tearOff::T%>
+ return new self::Class::•<self::Class::_#redirectingFactory#tearOff::T%>(field);
+}
+abstract class Mixin<S extends core::Object? = dynamic> extends core::Object /*isMixinDeclaration*/ {
+}
+class NamedMixinApplication<T extends core::Object? = dynamic, S extends core::Object? = dynamic> = self::Class<self::NamedMixinApplication::T%> with self::Mixin<self::NamedMixinApplication::S%> {
+ synthetic constructor •([core::int field]) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::•(field)
+ ;
+ synthetic constructor named(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::named(field)
+ ;
+ synthetic constructor redirectingGenerative(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::redirectingGenerative(field)
+ ;
+ static method _#new#tearOff<T extends core::Object? = dynamic, S extends core::Object? = dynamic>([core::int field]) → self::NamedMixinApplication<self::NamedMixinApplication::_#new#tearOff::T%, self::NamedMixinApplication::_#new#tearOff::S%>
+ return new self::NamedMixinApplication::•<self::NamedMixinApplication::_#new#tearOff::T%, self::NamedMixinApplication::_#new#tearOff::S%>(field);
+ static method _#named#tearOff<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::_#named#tearOff::T%, self::NamedMixinApplication::_#named#tearOff::S%>
+ return new self::NamedMixinApplication::named<self::NamedMixinApplication::_#named#tearOff::T%, self::NamedMixinApplication::_#named#tearOff::S%>(field);
+ static method _#redirectingGenerative#tearOff<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::_#redirectingGenerative#tearOff::T%, self::NamedMixinApplication::_#redirectingGenerative#tearOff::S%>
+ return new self::NamedMixinApplication::redirectingGenerative<self::NamedMixinApplication::_#redirectingGenerative#tearOff::T%, self::NamedMixinApplication::_#redirectingGenerative#tearOff::S%>(field);
+}
+abstract class AbstractNamedMixinApplication<T extends core::Object? = dynamic, S extends core::Object? = dynamic> = self::Class<self::AbstractNamedMixinApplication::T%> with self::Mixin<self::AbstractNamedMixinApplication::S%> {
+ synthetic constructor •([core::int field]) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::•(field)
+ ;
+ synthetic constructor named(core::int field) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::named(field)
+ ;
+ synthetic constructor redirectingGenerative(core::int field) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::redirectingGenerative(field)
+ ;
+}
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>([core::int]) → self::NamedMixinApplication<T%, S%> f1;
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f2;
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f3;
+static method test() → dynamic
+ ;
+static method main() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart.weak.transformed.expect
new file mode 100644
index 0000000..9786626
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart.weak.transformed.expect
@@ -0,0 +1,145 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:26:25: Error: Member not found: 'fact'.
+// NamedMixinApplication.fact;
+// ^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:27:25: Error: Member not found: 'redirectingFactory'.
+// NamedMixinApplication.redirectingFactory;
+// ^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:29:33: Error: Constructors on abstract classes can't be torn off.
+// AbstractNamedMixinApplication.new;
+// ^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:30:33: Error: Constructors on abstract classes can't be torn off.
+// AbstractNamedMixinApplication.named;
+// ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:31:33: Error: Constructors on abstract classes can't be torn off.
+// AbstractNamedMixinApplication.redirectingGenerative;
+// ^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:32:33: Error: Member not found: 'fact'.
+// AbstractNamedMixinApplication.fact;
+// ^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:33:33: Error: Member not found: 'redirectingFactory'.
+// AbstractNamedMixinApplication.redirectingFactory;
+// ^^^^^^^^^^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class Interface extends core::Object {
+ synthetic constructor •() → self::Interface
+ : super core::Object::•()
+ ;
+ abstract get field() → core::int;
+}
+class Class<T extends core::Object? = dynamic> extends core::Object implements self::Interface {
+ field core::int field;
+ static final field dynamic _redirecting# = <dynamic>[self::Class::redirectingFactory]/*isLegacy*/;
+ constructor •([core::int field = #C1]) → self::Class<self::Class::T%>
+ : self::Class::field = field, super core::Object::•()
+ ;
+ constructor named(core::int field) → self::Class<self::Class::T%>
+ : self::Class::field = field, super core::Object::•()
+ ;
+ constructor redirectingGenerative(core::int field) → self::Class<self::Class::T%>
+ : this self::Class::•(field)
+ ;
+ static method _#new#tearOff<T extends core::Object? = dynamic>([core::int field = #C1]) → self::Class<self::Class::_#new#tearOff::T%>
+ return new self::Class::•<self::Class::_#new#tearOff::T%>(field);
+ static method _#named#tearOff<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::_#named#tearOff::T%>
+ return new self::Class::named<self::Class::_#named#tearOff::T%>(field);
+ static method _#redirectingGenerative#tearOff<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::_#redirectingGenerative#tearOff::T%>
+ return new self::Class::redirectingGenerative<self::Class::_#redirectingGenerative#tearOff::T%>(field);
+ static factory fact<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::fact::T%>
+ return new self::Class::•<self::Class::fact::T%>(field);
+ static method _#fact#tearOff<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::_#fact#tearOff::T%>
+ return self::Class::fact<self::Class::_#fact#tearOff::T%>(field);
+ static factory redirectingFactory<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::redirectingFactory::T%>
+ return new self::Class::•<self::Class::redirectingFactory::T%>(field);
+ static method _#redirectingFactory#tearOff<T extends core::Object? = dynamic>(core::int field = #C1) → self::Class<self::Class::_#redirectingFactory#tearOff::T%>
+ return new self::Class::•<self::Class::_#redirectingFactory#tearOff::T%>(field);
+}
+abstract class Mixin<S extends core::Object? = dynamic> extends core::Object /*isMixinDeclaration*/ {
+}
+class NamedMixinApplication<T extends core::Object? = dynamic, S extends core::Object? = dynamic> extends self::Class<self::NamedMixinApplication::T%> implements self::Mixin<self::NamedMixinApplication::S%> /*isEliminatedMixin*/ {
+ synthetic constructor •([core::int field = #C1]) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::•(field)
+ ;
+ synthetic constructor named(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::named(field)
+ ;
+ synthetic constructor redirectingGenerative(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::redirectingGenerative(field)
+ ;
+ static method _#new#tearOff<T extends core::Object? = dynamic, S extends core::Object? = dynamic>([core::int field]) → self::NamedMixinApplication<self::NamedMixinApplication::_#new#tearOff::T%, self::NamedMixinApplication::_#new#tearOff::S%>
+ return new self::NamedMixinApplication::•<self::NamedMixinApplication::_#new#tearOff::T%, self::NamedMixinApplication::_#new#tearOff::S%>(field);
+ static method _#named#tearOff<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::_#named#tearOff::T%, self::NamedMixinApplication::_#named#tearOff::S%>
+ return new self::NamedMixinApplication::named<self::NamedMixinApplication::_#named#tearOff::T%, self::NamedMixinApplication::_#named#tearOff::S%>(field);
+ static method _#redirectingGenerative#tearOff<T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::_#redirectingGenerative#tearOff::T%, self::NamedMixinApplication::_#redirectingGenerative#tearOff::S%>
+ return new self::NamedMixinApplication::redirectingGenerative<self::NamedMixinApplication::_#redirectingGenerative#tearOff::T%, self::NamedMixinApplication::_#redirectingGenerative#tearOff::S%>(field);
+}
+abstract class AbstractNamedMixinApplication<T extends core::Object? = dynamic, S extends core::Object? = dynamic> extends self::Class<self::AbstractNamedMixinApplication::T%> implements self::Mixin<self::AbstractNamedMixinApplication::S%> /*isEliminatedMixin*/ {
+ synthetic constructor •([core::int field = #C1]) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::•(field)
+ ;
+ synthetic constructor named(core::int field) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::named(field)
+ ;
+ synthetic constructor redirectingGenerative(core::int field) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::redirectingGenerative(field)
+ ;
+}
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>([core::int]) → self::NamedMixinApplication<T%, S%> f1 = #C2;
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f2 = #C3;
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f3 = #C4;
+static method test() → dynamic {
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:26:25: Error: Member not found: 'fact'.
+ NamedMixinApplication.fact;
+ ^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:27:25: Error: Member not found: 'redirectingFactory'.
+ NamedMixinApplication.redirectingFactory;
+ ^^^^^^^^^^^^^^^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:29:33: Error: Constructors on abstract classes can't be torn off.
+ AbstractNamedMixinApplication.new;
+ ^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:30:33: Error: Constructors on abstract classes can't be torn off.
+ AbstractNamedMixinApplication.named;
+ ^^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:31:33: Error: Constructors on abstract classes can't be torn off.
+ AbstractNamedMixinApplication.redirectingGenerative;
+ ^^^^^^^^^^^^^^^^^^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:32:33: Error: Member not found: 'fact'.
+ AbstractNamedMixinApplication.fact;
+ ^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/named_mixin_application.dart:33:33: Error: Member not found: 'redirectingFactory'.
+ AbstractNamedMixinApplication.redirectingFactory;
+ ^^^^^^^^^^^^^^^^^^";
+}
+static method main() → dynamic {
+ <T extends core::Object? = dynamic, S extends core::Object? = dynamic>([core::int]) → self::NamedMixinApplication<T%, S%> f1 = #C2;
+ <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f2 = #C3;
+ <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f3 = #C4;
+ #C5;
+ #C6;
+ #C7;
+ ([core::int]) → self::NamedMixinApplication<core::int, core::String> n1 = f1<core::int, core::String>;
+ (core::int) → self::NamedMixinApplication<core::int, core::String> n2 = f2<core::int, core::String>;
+ (core::int) → self::NamedMixinApplication<core::int, core::String> n3 = f3<core::int, core::String>;
+}
+
+constants {
+ #C1 = 0
+ #C2 = static-tearoff self::NamedMixinApplication::_#new#tearOff
+ #C3 = static-tearoff self::NamedMixinApplication::_#named#tearOff
+ #C4 = static-tearoff self::NamedMixinApplication::_#redirectingGenerative#tearOff
+ #C5 = instantiation self::NamedMixinApplication::_#new#tearOff <core::int*, core::String*>
+ #C6 = instantiation self::NamedMixinApplication::_#named#tearOff <core::int*, core::String*>
+ #C7 = instantiation self::NamedMixinApplication::_#redirectingGenerative#tearOff <core::int*, core::String*>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart b/pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart
new file mode 100644
index 0000000..9aad96b
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart
@@ -0,0 +1,52 @@
+// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+abstract class Interface {
+ int get field;
+}
+
+class Class<T> implements Interface {
+ var field;
+
+ Class([this.field = 0]);
+ Class.named(this.field);
+ Class.redirectingGenerative(int field) : this(field);
+ factory Class.fact(int field) => new Class(field);
+ factory Class.redirectingFactory(int field) = Class;
+}
+
+mixin Mixin<S> {}
+
+class NamedMixinApplication<T, S> = Class<T> with Mixin<S>;
+
+abstract class AbstractNamedMixinApplication<T, S> = Class<T> with Mixin<S>;
+
+test() {
+ NamedMixinApplication.fact;
+ NamedMixinApplication.redirectingFactory;
+
+ AbstractNamedMixinApplication.new;
+ AbstractNamedMixinApplication.named;
+ AbstractNamedMixinApplication.redirectingGenerative;
+ AbstractNamedMixinApplication.fact;
+ AbstractNamedMixinApplication.redirectingFactory;
+}
+
+var f1 = NamedMixinApplication.new;
+var f2 = NamedMixinApplication.named;
+var f3 = NamedMixinApplication.redirectingGenerative;
+
+main() {
+ var f1 = NamedMixinApplication.new;
+ var f2 = NamedMixinApplication.named;
+ var f3 = NamedMixinApplication.redirectingGenerative;
+
+ NamedMixinApplication<int, String>.new;
+ NamedMixinApplication<int, String>.named;
+ NamedMixinApplication<int, String>.redirectingGenerative;
+
+ NamedMixinApplication<int, String> Function([int]) n1 = f1<int, String>;
+ NamedMixinApplication<int, String> Function(int) n2 = f2<int, String>;
+ NamedMixinApplication<int, String> Function(int) n3 = f3<int, String>;
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart.strong.expect
new file mode 100644
index 0000000..47537c5
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart.strong.expect
@@ -0,0 +1,129 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:26:25: Error: Member not found: 'fact'.
+// NamedMixinApplication.fact;
+// ^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:27:25: Error: Member not found: 'redirectingFactory'.
+// NamedMixinApplication.redirectingFactory;
+// ^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:29:33: Error: Constructors on abstract classes can't be torn off.
+// AbstractNamedMixinApplication.new;
+// ^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:30:33: Error: Constructors on abstract classes can't be torn off.
+// AbstractNamedMixinApplication.named;
+// ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:31:33: Error: Constructors on abstract classes can't be torn off.
+// AbstractNamedMixinApplication.redirectingGenerative;
+// ^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:32:33: Error: Member not found: 'fact'.
+// AbstractNamedMixinApplication.fact;
+// ^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:33:33: Error: Member not found: 'redirectingFactory'.
+// AbstractNamedMixinApplication.redirectingFactory;
+// ^^^^^^^^^^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class Interface extends core::Object {
+ synthetic constructor •() → self::Interface
+ : super core::Object::•()
+ ;
+ abstract get field() → core::int;
+}
+class Class<T extends core::Object? = dynamic> extends core::Object implements self::Interface {
+ field core::int field;
+ static final field dynamic _redirecting# = <dynamic>[self::Class::redirectingFactory]/*isLegacy*/;
+ constructor •([core::int field = #C1]) → self::Class<self::Class::T%>
+ : self::Class::field = field, super core::Object::•()
+ ;
+ constructor named(core::int field) → self::Class<self::Class::T%>
+ : self::Class::field = field, super core::Object::•()
+ ;
+ constructor redirectingGenerative(core::int field) → self::Class<self::Class::T%>
+ : this self::Class::•(field)
+ ;
+ static factory fact<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::fact::T%>
+ return new self::Class::•<self::Class::fact::T%>(field);
+ static factory redirectingFactory<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::redirectingFactory::T%>
+ return new self::Class::•<self::Class::redirectingFactory::T%>(field);
+}
+abstract class Mixin<S extends core::Object? = dynamic> extends core::Object /*isMixinDeclaration*/ {
+}
+class NamedMixinApplication<T extends core::Object? = dynamic, S extends core::Object? = dynamic> = self::Class<self::NamedMixinApplication::T%> with self::Mixin<self::NamedMixinApplication::S%> {
+ synthetic constructor •([core::int field = #C1]) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::•(field)
+ ;
+ synthetic constructor named(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::named(field)
+ ;
+ synthetic constructor redirectingGenerative(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::redirectingGenerative(field)
+ ;
+}
+abstract class AbstractNamedMixinApplication<T extends core::Object? = dynamic, S extends core::Object? = dynamic> = self::Class<self::AbstractNamedMixinApplication::T%> with self::Mixin<self::AbstractNamedMixinApplication::S%> {
+ synthetic constructor •([core::int field = #C1]) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::•(field)
+ ;
+ synthetic constructor named(core::int field) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::named(field)
+ ;
+ synthetic constructor redirectingGenerative(core::int field) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::redirectingGenerative(field)
+ ;
+}
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>([core::int]) → self::NamedMixinApplication<T%, S%> f1 = #C2;
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f2 = #C3;
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f3 = #C4;
+static method test() → dynamic {
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:26:25: Error: Member not found: 'fact'.
+ NamedMixinApplication.fact;
+ ^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:27:25: Error: Member not found: 'redirectingFactory'.
+ NamedMixinApplication.redirectingFactory;
+ ^^^^^^^^^^^^^^^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:29:33: Error: Constructors on abstract classes can't be torn off.
+ AbstractNamedMixinApplication.new;
+ ^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:30:33: Error: Constructors on abstract classes can't be torn off.
+ AbstractNamedMixinApplication.named;
+ ^^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:31:33: Error: Constructors on abstract classes can't be torn off.
+ AbstractNamedMixinApplication.redirectingGenerative;
+ ^^^^^^^^^^^^^^^^^^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:32:33: Error: Member not found: 'fact'.
+ AbstractNamedMixinApplication.fact;
+ ^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:33:33: Error: Member not found: 'redirectingFactory'.
+ AbstractNamedMixinApplication.redirectingFactory;
+ ^^^^^^^^^^^^^^^^^^";
+}
+static method main() → dynamic {
+ <T extends core::Object? = dynamic, S extends core::Object? = dynamic>([core::int]) → self::NamedMixinApplication<T%, S%> f1 = #C2;
+ <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f2 = #C3;
+ <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f3 = #C4;
+ #C5;
+ #C6;
+ #C7;
+ ([core::int]) → self::NamedMixinApplication<core::int, core::String> n1 = f1<core::int, core::String>;
+ (core::int) → self::NamedMixinApplication<core::int, core::String> n2 = f2<core::int, core::String>;
+ (core::int) → self::NamedMixinApplication<core::int, core::String> n3 = f3<core::int, core::String>;
+}
+
+constants {
+ #C1 = 0
+ #C2 = constructor-tearoff self::NamedMixinApplication::•
+ #C3 = constructor-tearoff self::NamedMixinApplication::named
+ #C4 = constructor-tearoff self::NamedMixinApplication::redirectingGenerative
+ #C5 = instantiation self::NamedMixinApplication::• <core::int, core::String>
+ #C6 = instantiation self::NamedMixinApplication::named <core::int, core::String>
+ #C7 = instantiation self::NamedMixinApplication::redirectingGenerative <core::int, core::String>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart.strong.transformed.expect
new file mode 100644
index 0000000..6e9a6ef
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart.strong.transformed.expect
@@ -0,0 +1,129 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:26:25: Error: Member not found: 'fact'.
+// NamedMixinApplication.fact;
+// ^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:27:25: Error: Member not found: 'redirectingFactory'.
+// NamedMixinApplication.redirectingFactory;
+// ^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:29:33: Error: Constructors on abstract classes can't be torn off.
+// AbstractNamedMixinApplication.new;
+// ^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:30:33: Error: Constructors on abstract classes can't be torn off.
+// AbstractNamedMixinApplication.named;
+// ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:31:33: Error: Constructors on abstract classes can't be torn off.
+// AbstractNamedMixinApplication.redirectingGenerative;
+// ^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:32:33: Error: Member not found: 'fact'.
+// AbstractNamedMixinApplication.fact;
+// ^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:33:33: Error: Member not found: 'redirectingFactory'.
+// AbstractNamedMixinApplication.redirectingFactory;
+// ^^^^^^^^^^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class Interface extends core::Object {
+ synthetic constructor •() → self::Interface
+ : super core::Object::•()
+ ;
+ abstract get field() → core::int;
+}
+class Class<T extends core::Object? = dynamic> extends core::Object implements self::Interface {
+ field core::int field;
+ static final field dynamic _redirecting# = <dynamic>[self::Class::redirectingFactory]/*isLegacy*/;
+ constructor •([core::int field = #C1]) → self::Class<self::Class::T%>
+ : self::Class::field = field, super core::Object::•()
+ ;
+ constructor named(core::int field) → self::Class<self::Class::T%>
+ : self::Class::field = field, super core::Object::•()
+ ;
+ constructor redirectingGenerative(core::int field) → self::Class<self::Class::T%>
+ : this self::Class::•(field)
+ ;
+ static factory fact<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::fact::T%>
+ return new self::Class::•<self::Class::fact::T%>(field);
+ static factory redirectingFactory<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::redirectingFactory::T%>
+ return new self::Class::•<self::Class::redirectingFactory::T%>(field);
+}
+abstract class Mixin<S extends core::Object? = dynamic> extends core::Object /*isMixinDeclaration*/ {
+}
+class NamedMixinApplication<T extends core::Object? = dynamic, S extends core::Object? = dynamic> extends self::Class<self::NamedMixinApplication::T%> implements self::Mixin<self::NamedMixinApplication::S%> /*isEliminatedMixin*/ {
+ synthetic constructor •([core::int field = #C1]) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::•(field)
+ ;
+ synthetic constructor named(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::named(field)
+ ;
+ synthetic constructor redirectingGenerative(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::redirectingGenerative(field)
+ ;
+}
+abstract class AbstractNamedMixinApplication<T extends core::Object? = dynamic, S extends core::Object? = dynamic> extends self::Class<self::AbstractNamedMixinApplication::T%> implements self::Mixin<self::AbstractNamedMixinApplication::S%> /*isEliminatedMixin*/ {
+ synthetic constructor •([core::int field = #C1]) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::•(field)
+ ;
+ synthetic constructor named(core::int field) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::named(field)
+ ;
+ synthetic constructor redirectingGenerative(core::int field) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::redirectingGenerative(field)
+ ;
+}
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>([core::int]) → self::NamedMixinApplication<T%, S%> f1 = #C2;
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f2 = #C3;
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f3 = #C4;
+static method test() → dynamic {
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:26:25: Error: Member not found: 'fact'.
+ NamedMixinApplication.fact;
+ ^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:27:25: Error: Member not found: 'redirectingFactory'.
+ NamedMixinApplication.redirectingFactory;
+ ^^^^^^^^^^^^^^^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:29:33: Error: Constructors on abstract classes can't be torn off.
+ AbstractNamedMixinApplication.new;
+ ^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:30:33: Error: Constructors on abstract classes can't be torn off.
+ AbstractNamedMixinApplication.named;
+ ^^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:31:33: Error: Constructors on abstract classes can't be torn off.
+ AbstractNamedMixinApplication.redirectingGenerative;
+ ^^^^^^^^^^^^^^^^^^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:32:33: Error: Member not found: 'fact'.
+ AbstractNamedMixinApplication.fact;
+ ^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:33:33: Error: Member not found: 'redirectingFactory'.
+ AbstractNamedMixinApplication.redirectingFactory;
+ ^^^^^^^^^^^^^^^^^^";
+}
+static method main() → dynamic {
+ <T extends core::Object? = dynamic, S extends core::Object? = dynamic>([core::int]) → self::NamedMixinApplication<T%, S%> f1 = #C2;
+ <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f2 = #C3;
+ <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f3 = #C4;
+ #C5;
+ #C6;
+ #C7;
+ ([core::int]) → self::NamedMixinApplication<core::int, core::String> n1 = f1<core::int, core::String>;
+ (core::int) → self::NamedMixinApplication<core::int, core::String> n2 = f2<core::int, core::String>;
+ (core::int) → self::NamedMixinApplication<core::int, core::String> n3 = f3<core::int, core::String>;
+}
+
+constants {
+ #C1 = 0
+ #C2 = constructor-tearoff self::NamedMixinApplication::•
+ #C3 = constructor-tearoff self::NamedMixinApplication::named
+ #C4 = constructor-tearoff self::NamedMixinApplication::redirectingGenerative
+ #C5 = instantiation self::NamedMixinApplication::• <core::int, core::String>
+ #C6 = instantiation self::NamedMixinApplication::named <core::int, core::String>
+ #C7 = instantiation self::NamedMixinApplication::redirectingGenerative <core::int, core::String>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart.textual_outline.expect
new file mode 100644
index 0000000..e762d95
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart.textual_outline.expect
@@ -0,0 +1,21 @@
+abstract class Interface {
+ int get field;
+}
+
+class Class<T> implements Interface {
+ var field;
+ Class([this.field = 0]);
+ Class.named(this.field);
+ Class.redirectingGenerative(int field) : this(field);
+ factory Class.fact(int field) => new Class(field);
+ factory Class.redirectingFactory(int field) = Class;
+}
+
+mixin Mixin<S> {}
+class NamedMixinApplication<T, S> = Class<T> with Mixin<S>;
+abstract class AbstractNamedMixinApplication<T, S> = Class<T> with Mixin<S>;
+test() {}
+var f1 = NamedMixinApplication.new;
+var f2 = NamedMixinApplication.named;
+var f3 = NamedMixinApplication.redirectingGenerative;
+main() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..e4743e7
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart.textual_outline_modelled.expect
@@ -0,0 +1,22 @@
+abstract class AbstractNamedMixinApplication<T, S> = Class<T> with Mixin<S>;
+
+abstract class Interface {
+ int get field;
+}
+
+class Class<T> implements Interface {
+ Class([this.field = 0]);
+ Class.named(this.field);
+ Class.redirectingGenerative(int field) : this(field);
+ factory Class.fact(int field) => new Class(field);
+ factory Class.redirectingFactory(int field) = Class;
+ var field;
+}
+
+class NamedMixinApplication<T, S> = Class<T> with Mixin<S>;
+main() {}
+mixin Mixin<S> {}
+test() {}
+var f1 = NamedMixinApplication.new;
+var f2 = NamedMixinApplication.named;
+var f3 = NamedMixinApplication.redirectingGenerative;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart.weak.expect
new file mode 100644
index 0000000..7db9ced
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart.weak.expect
@@ -0,0 +1,129 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:26:25: Error: Member not found: 'fact'.
+// NamedMixinApplication.fact;
+// ^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:27:25: Error: Member not found: 'redirectingFactory'.
+// NamedMixinApplication.redirectingFactory;
+// ^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:29:33: Error: Constructors on abstract classes can't be torn off.
+// AbstractNamedMixinApplication.new;
+// ^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:30:33: Error: Constructors on abstract classes can't be torn off.
+// AbstractNamedMixinApplication.named;
+// ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:31:33: Error: Constructors on abstract classes can't be torn off.
+// AbstractNamedMixinApplication.redirectingGenerative;
+// ^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:32:33: Error: Member not found: 'fact'.
+// AbstractNamedMixinApplication.fact;
+// ^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:33:33: Error: Member not found: 'redirectingFactory'.
+// AbstractNamedMixinApplication.redirectingFactory;
+// ^^^^^^^^^^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class Interface extends core::Object {
+ synthetic constructor •() → self::Interface
+ : super core::Object::•()
+ ;
+ abstract get field() → core::int;
+}
+class Class<T extends core::Object? = dynamic> extends core::Object implements self::Interface {
+ field core::int field;
+ static final field dynamic _redirecting# = <dynamic>[self::Class::redirectingFactory]/*isLegacy*/;
+ constructor •([core::int field = #C1]) → self::Class<self::Class::T%>
+ : self::Class::field = field, super core::Object::•()
+ ;
+ constructor named(core::int field) → self::Class<self::Class::T%>
+ : self::Class::field = field, super core::Object::•()
+ ;
+ constructor redirectingGenerative(core::int field) → self::Class<self::Class::T%>
+ : this self::Class::•(field)
+ ;
+ static factory fact<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::fact::T%>
+ return new self::Class::•<self::Class::fact::T%>(field);
+ static factory redirectingFactory<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::redirectingFactory::T%>
+ return new self::Class::•<self::Class::redirectingFactory::T%>(field);
+}
+abstract class Mixin<S extends core::Object? = dynamic> extends core::Object /*isMixinDeclaration*/ {
+}
+class NamedMixinApplication<T extends core::Object? = dynamic, S extends core::Object? = dynamic> = self::Class<self::NamedMixinApplication::T%> with self::Mixin<self::NamedMixinApplication::S%> {
+ synthetic constructor •([core::int field = #C1]) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::•(field)
+ ;
+ synthetic constructor named(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::named(field)
+ ;
+ synthetic constructor redirectingGenerative(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::redirectingGenerative(field)
+ ;
+}
+abstract class AbstractNamedMixinApplication<T extends core::Object? = dynamic, S extends core::Object? = dynamic> = self::Class<self::AbstractNamedMixinApplication::T%> with self::Mixin<self::AbstractNamedMixinApplication::S%> {
+ synthetic constructor •([core::int field = #C1]) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::•(field)
+ ;
+ synthetic constructor named(core::int field) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::named(field)
+ ;
+ synthetic constructor redirectingGenerative(core::int field) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::redirectingGenerative(field)
+ ;
+}
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>([core::int]) → self::NamedMixinApplication<T%, S%> f1 = #C2;
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f2 = #C3;
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f3 = #C4;
+static method test() → dynamic {
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:26:25: Error: Member not found: 'fact'.
+ NamedMixinApplication.fact;
+ ^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:27:25: Error: Member not found: 'redirectingFactory'.
+ NamedMixinApplication.redirectingFactory;
+ ^^^^^^^^^^^^^^^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:29:33: Error: Constructors on abstract classes can't be torn off.
+ AbstractNamedMixinApplication.new;
+ ^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:30:33: Error: Constructors on abstract classes can't be torn off.
+ AbstractNamedMixinApplication.named;
+ ^^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:31:33: Error: Constructors on abstract classes can't be torn off.
+ AbstractNamedMixinApplication.redirectingGenerative;
+ ^^^^^^^^^^^^^^^^^^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:32:33: Error: Member not found: 'fact'.
+ AbstractNamedMixinApplication.fact;
+ ^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:33:33: Error: Member not found: 'redirectingFactory'.
+ AbstractNamedMixinApplication.redirectingFactory;
+ ^^^^^^^^^^^^^^^^^^";
+}
+static method main() → dynamic {
+ <T extends core::Object? = dynamic, S extends core::Object? = dynamic>([core::int]) → self::NamedMixinApplication<T%, S%> f1 = #C2;
+ <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f2 = #C3;
+ <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f3 = #C4;
+ #C5;
+ #C6;
+ #C7;
+ ([core::int]) → self::NamedMixinApplication<core::int, core::String> n1 = f1<core::int, core::String>;
+ (core::int) → self::NamedMixinApplication<core::int, core::String> n2 = f2<core::int, core::String>;
+ (core::int) → self::NamedMixinApplication<core::int, core::String> n3 = f3<core::int, core::String>;
+}
+
+constants {
+ #C1 = 0
+ #C2 = constructor-tearoff self::NamedMixinApplication::•
+ #C3 = constructor-tearoff self::NamedMixinApplication::named
+ #C4 = constructor-tearoff self::NamedMixinApplication::redirectingGenerative
+ #C5 = instantiation self::NamedMixinApplication::• <core::int*, core::String*>
+ #C6 = instantiation self::NamedMixinApplication::named <core::int*, core::String*>
+ #C7 = instantiation self::NamedMixinApplication::redirectingGenerative <core::int*, core::String*>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart.weak.outline.expect
new file mode 100644
index 0000000..74af4ae
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart.weak.outline.expect
@@ -0,0 +1,54 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+abstract class Interface extends core::Object {
+ synthetic constructor •() → self::Interface
+ ;
+ abstract get field() → core::int;
+}
+class Class<T extends core::Object? = dynamic> extends core::Object implements self::Interface {
+ field core::int field;
+ static final field dynamic _redirecting# = <dynamic>[self::Class::redirectingFactory]/*isLegacy*/;
+ constructor •([core::int field]) → self::Class<self::Class::T%>
+ ;
+ constructor named(core::int field) → self::Class<self::Class::T%>
+ ;
+ constructor redirectingGenerative(core::int field) → self::Class<self::Class::T%>
+ ;
+ static factory fact<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::fact::T%>
+ ;
+ static factory redirectingFactory<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::redirectingFactory::T%>
+ return new self::Class::•<self::Class::redirectingFactory::T%>(field);
+}
+abstract class Mixin<S extends core::Object? = dynamic> extends core::Object /*isMixinDeclaration*/ {
+}
+class NamedMixinApplication<T extends core::Object? = dynamic, S extends core::Object? = dynamic> = self::Class<self::NamedMixinApplication::T%> with self::Mixin<self::NamedMixinApplication::S%> {
+ synthetic constructor •([core::int field]) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::•(field)
+ ;
+ synthetic constructor named(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::named(field)
+ ;
+ synthetic constructor redirectingGenerative(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::redirectingGenerative(field)
+ ;
+}
+abstract class AbstractNamedMixinApplication<T extends core::Object? = dynamic, S extends core::Object? = dynamic> = self::Class<self::AbstractNamedMixinApplication::T%> with self::Mixin<self::AbstractNamedMixinApplication::S%> {
+ synthetic constructor •([core::int field]) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::•(field)
+ ;
+ synthetic constructor named(core::int field) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::named(field)
+ ;
+ synthetic constructor redirectingGenerative(core::int field) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::redirectingGenerative(field)
+ ;
+}
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>([core::int]) → self::NamedMixinApplication<T%, S%> f1;
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f2;
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f3;
+static method test() → dynamic
+ ;
+static method main() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart.weak.transformed.expect
new file mode 100644
index 0000000..9b266ff
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart.weak.transformed.expect
@@ -0,0 +1,129 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:26:25: Error: Member not found: 'fact'.
+// NamedMixinApplication.fact;
+// ^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:27:25: Error: Member not found: 'redirectingFactory'.
+// NamedMixinApplication.redirectingFactory;
+// ^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:29:33: Error: Constructors on abstract classes can't be torn off.
+// AbstractNamedMixinApplication.new;
+// ^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:30:33: Error: Constructors on abstract classes can't be torn off.
+// AbstractNamedMixinApplication.named;
+// ^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:31:33: Error: Constructors on abstract classes can't be torn off.
+// AbstractNamedMixinApplication.redirectingGenerative;
+// ^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:32:33: Error: Member not found: 'fact'.
+// AbstractNamedMixinApplication.fact;
+// ^^^^
+//
+// pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:33:33: Error: Member not found: 'redirectingFactory'.
+// AbstractNamedMixinApplication.redirectingFactory;
+// ^^^^^^^^^^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class Interface extends core::Object {
+ synthetic constructor •() → self::Interface
+ : super core::Object::•()
+ ;
+ abstract get field() → core::int;
+}
+class Class<T extends core::Object? = dynamic> extends core::Object implements self::Interface {
+ field core::int field;
+ static final field dynamic _redirecting# = <dynamic>[self::Class::redirectingFactory]/*isLegacy*/;
+ constructor •([core::int field = #C1]) → self::Class<self::Class::T%>
+ : self::Class::field = field, super core::Object::•()
+ ;
+ constructor named(core::int field) → self::Class<self::Class::T%>
+ : self::Class::field = field, super core::Object::•()
+ ;
+ constructor redirectingGenerative(core::int field) → self::Class<self::Class::T%>
+ : this self::Class::•(field)
+ ;
+ static factory fact<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::fact::T%>
+ return new self::Class::•<self::Class::fact::T%>(field);
+ static factory redirectingFactory<T extends core::Object? = dynamic>(core::int field) → self::Class<self::Class::redirectingFactory::T%>
+ return new self::Class::•<self::Class::redirectingFactory::T%>(field);
+}
+abstract class Mixin<S extends core::Object? = dynamic> extends core::Object /*isMixinDeclaration*/ {
+}
+class NamedMixinApplication<T extends core::Object? = dynamic, S extends core::Object? = dynamic> extends self::Class<self::NamedMixinApplication::T%> implements self::Mixin<self::NamedMixinApplication::S%> /*isEliminatedMixin*/ {
+ synthetic constructor •([core::int field = #C1]) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::•(field)
+ ;
+ synthetic constructor named(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::named(field)
+ ;
+ synthetic constructor redirectingGenerative(core::int field) → self::NamedMixinApplication<self::NamedMixinApplication::T%, self::NamedMixinApplication::S%>
+ : super self::Class::redirectingGenerative(field)
+ ;
+}
+abstract class AbstractNamedMixinApplication<T extends core::Object? = dynamic, S extends core::Object? = dynamic> extends self::Class<self::AbstractNamedMixinApplication::T%> implements self::Mixin<self::AbstractNamedMixinApplication::S%> /*isEliminatedMixin*/ {
+ synthetic constructor •([core::int field = #C1]) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::•(field)
+ ;
+ synthetic constructor named(core::int field) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::named(field)
+ ;
+ synthetic constructor redirectingGenerative(core::int field) → self::AbstractNamedMixinApplication<self::AbstractNamedMixinApplication::T%, self::AbstractNamedMixinApplication::S%>
+ : super self::Class::redirectingGenerative(field)
+ ;
+}
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>([core::int]) → self::NamedMixinApplication<T%, S%> f1 = #C2;
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f2 = #C3;
+static field <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f3 = #C4;
+static method test() → dynamic {
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:26:25: Error: Member not found: 'fact'.
+ NamedMixinApplication.fact;
+ ^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:27:25: Error: Member not found: 'redirectingFactory'.
+ NamedMixinApplication.redirectingFactory;
+ ^^^^^^^^^^^^^^^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:29:33: Error: Constructors on abstract classes can't be torn off.
+ AbstractNamedMixinApplication.new;
+ ^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:30:33: Error: Constructors on abstract classes can't be torn off.
+ AbstractNamedMixinApplication.named;
+ ^^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:31:33: Error: Constructors on abstract classes can't be torn off.
+ AbstractNamedMixinApplication.redirectingGenerative;
+ ^^^^^^^^^^^^^^^^^^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:32:33: Error: Member not found: 'fact'.
+ AbstractNamedMixinApplication.fact;
+ ^^^^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/named_mixin_application.dart:33:33: Error: Member not found: 'redirectingFactory'.
+ AbstractNamedMixinApplication.redirectingFactory;
+ ^^^^^^^^^^^^^^^^^^";
+}
+static method main() → dynamic {
+ <T extends core::Object? = dynamic, S extends core::Object? = dynamic>([core::int]) → self::NamedMixinApplication<T%, S%> f1 = #C2;
+ <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f2 = #C3;
+ <T extends core::Object? = dynamic, S extends core::Object? = dynamic>(core::int) → self::NamedMixinApplication<T%, S%> f3 = #C4;
+ #C5;
+ #C6;
+ #C7;
+ ([core::int]) → self::NamedMixinApplication<core::int, core::String> n1 = f1<core::int, core::String>;
+ (core::int) → self::NamedMixinApplication<core::int, core::String> n2 = f2<core::int, core::String>;
+ (core::int) → self::NamedMixinApplication<core::int, core::String> n3 = f3<core::int, core::String>;
+}
+
+constants {
+ #C1 = 0
+ #C2 = constructor-tearoff self::NamedMixinApplication::•
+ #C3 = constructor-tearoff self::NamedMixinApplication::named
+ #C4 = constructor-tearoff self::NamedMixinApplication::redirectingGenerative
+ #C5 = instantiation self::NamedMixinApplication::• <core::int*, core::String*>
+ #C6 = instantiation self::NamedMixinApplication::named <core::int*, core::String*>
+ #C7 = instantiation self::NamedMixinApplication::redirectingGenerative <core::int*, core::String*>
+}
diff --git a/pkg/front_end/testcases/dartdevc/issue47313.dart b/pkg/front_end/testcases/dartdevc/issue47313.dart
new file mode 100644
index 0000000..e2eaf1e
--- /dev/null
+++ b/pkg/front_end/testcases/dartdevc/issue47313.dart
@@ -0,0 +1,13 @@
+// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class A<X> {}
+
+mixin M {}
+
+class C<X> = A<X> with M;
+
+main() {
+ C.new;
+}
diff --git a/pkg/front_end/testcases/dartdevc/issue47313.dart.strong.expect b/pkg/front_end/testcases/dartdevc/issue47313.dart.strong.expect
new file mode 100644
index 0000000..26cc49c
--- /dev/null
+++ b/pkg/front_end/testcases/dartdevc/issue47313.dart.strong.expect
@@ -0,0 +1,27 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::X%>
+ : super core::Object::•()
+ ;
+ static method _#new#tearOff<X extends core::Object? = dynamic>() → self::A<self::A::_#new#tearOff::X%>
+ return new self::A::•<self::A::_#new#tearOff::X%>();
+}
+abstract class M extends core::Object /*isMixinDeclaration*/ {
+}
+class C<X extends core::Object? = dynamic> = self::A<self::C::X%> with self::M {
+ synthetic constructor •() → self::C<self::C::X%>
+ : super self::A::•()
+ ;
+ static method _#new#tearOff<X extends core::Object? = dynamic>() → self::C<self::C::_#new#tearOff::X%>
+ return new self::C::•<self::C::_#new#tearOff::X%>();
+}
+static method main() → dynamic {
+ #C1;
+}
+
+constants {
+ #C1 = static-tearoff self::C::_#new#tearOff
+}
diff --git a/pkg/front_end/testcases/dartdevc/issue47313.dart.strong.transformed.expect b/pkg/front_end/testcases/dartdevc/issue47313.dart.strong.transformed.expect
new file mode 100644
index 0000000..26cc49c
--- /dev/null
+++ b/pkg/front_end/testcases/dartdevc/issue47313.dart.strong.transformed.expect
@@ -0,0 +1,27 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::X%>
+ : super core::Object::•()
+ ;
+ static method _#new#tearOff<X extends core::Object? = dynamic>() → self::A<self::A::_#new#tearOff::X%>
+ return new self::A::•<self::A::_#new#tearOff::X%>();
+}
+abstract class M extends core::Object /*isMixinDeclaration*/ {
+}
+class C<X extends core::Object? = dynamic> = self::A<self::C::X%> with self::M {
+ synthetic constructor •() → self::C<self::C::X%>
+ : super self::A::•()
+ ;
+ static method _#new#tearOff<X extends core::Object? = dynamic>() → self::C<self::C::_#new#tearOff::X%>
+ return new self::C::•<self::C::_#new#tearOff::X%>();
+}
+static method main() → dynamic {
+ #C1;
+}
+
+constants {
+ #C1 = static-tearoff self::C::_#new#tearOff
+}
diff --git a/pkg/front_end/testcases/dartdevc/issue47313.dart.textual_outline.expect b/pkg/front_end/testcases/dartdevc/issue47313.dart.textual_outline.expect
new file mode 100644
index 0000000..844e733
--- /dev/null
+++ b/pkg/front_end/testcases/dartdevc/issue47313.dart.textual_outline.expect
@@ -0,0 +1,5 @@
+class A<X> {}
+
+mixin M {}
+class C<X> = A<X> with M;
+main() {}
diff --git a/pkg/front_end/testcases/dartdevc/issue47313.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/dartdevc/issue47313.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..acd5db2
--- /dev/null
+++ b/pkg/front_end/testcases/dartdevc/issue47313.dart.textual_outline_modelled.expect
@@ -0,0 +1,5 @@
+class A<X> {}
+
+class C<X> = A<X> with M;
+main() {}
+mixin M {}
diff --git a/pkg/front_end/testcases/dartdevc/issue47313.dart.weak.expect b/pkg/front_end/testcases/dartdevc/issue47313.dart.weak.expect
new file mode 100644
index 0000000..26cc49c
--- /dev/null
+++ b/pkg/front_end/testcases/dartdevc/issue47313.dart.weak.expect
@@ -0,0 +1,27 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::X%>
+ : super core::Object::•()
+ ;
+ static method _#new#tearOff<X extends core::Object? = dynamic>() → self::A<self::A::_#new#tearOff::X%>
+ return new self::A::•<self::A::_#new#tearOff::X%>();
+}
+abstract class M extends core::Object /*isMixinDeclaration*/ {
+}
+class C<X extends core::Object? = dynamic> = self::A<self::C::X%> with self::M {
+ synthetic constructor •() → self::C<self::C::X%>
+ : super self::A::•()
+ ;
+ static method _#new#tearOff<X extends core::Object? = dynamic>() → self::C<self::C::_#new#tearOff::X%>
+ return new self::C::•<self::C::_#new#tearOff::X%>();
+}
+static method main() → dynamic {
+ #C1;
+}
+
+constants {
+ #C1 = static-tearoff self::C::_#new#tearOff
+}
diff --git a/pkg/front_end/testcases/dartdevc/issue47313.dart.weak.outline.expect b/pkg/front_end/testcases/dartdevc/issue47313.dart.weak.outline.expect
new file mode 100644
index 0000000..f206219
--- /dev/null
+++ b/pkg/front_end/testcases/dartdevc/issue47313.dart.weak.outline.expect
@@ -0,0 +1,21 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::X%>
+ ;
+ static method _#new#tearOff<X extends core::Object? = dynamic>() → self::A<self::A::_#new#tearOff::X%>
+ return new self::A::•<self::A::_#new#tearOff::X%>();
+}
+abstract class M extends core::Object /*isMixinDeclaration*/ {
+}
+class C<X extends core::Object? = dynamic> = self::A<self::C::X%> with self::M {
+ synthetic constructor •() → self::C<self::C::X%>
+ : super self::A::•()
+ ;
+ static method _#new#tearOff<X extends core::Object? = dynamic>() → self::C<self::C::_#new#tearOff::X%>
+ return new self::C::•<self::C::_#new#tearOff::X%>();
+}
+static method main() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/dartdevc/issue47313.dart.weak.transformed.expect b/pkg/front_end/testcases/dartdevc/issue47313.dart.weak.transformed.expect
new file mode 100644
index 0000000..26cc49c
--- /dev/null
+++ b/pkg/front_end/testcases/dartdevc/issue47313.dart.weak.transformed.expect
@@ -0,0 +1,27 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::X%>
+ : super core::Object::•()
+ ;
+ static method _#new#tearOff<X extends core::Object? = dynamic>() → self::A<self::A::_#new#tearOff::X%>
+ return new self::A::•<self::A::_#new#tearOff::X%>();
+}
+abstract class M extends core::Object /*isMixinDeclaration*/ {
+}
+class C<X extends core::Object? = dynamic> = self::A<self::C::X%> with self::M {
+ synthetic constructor •() → self::C<self::C::X%>
+ : super self::A::•()
+ ;
+ static method _#new#tearOff<X extends core::Object? = dynamic>() → self::C<self::C::_#new#tearOff::X%>
+ return new self::C::•<self::C::_#new#tearOff::X%>();
+}
+static method main() → dynamic {
+ #C1;
+}
+
+constants {
+ #C1 = static-tearoff self::C::_#new#tearOff
+}
diff --git a/pkg/front_end/testcases/extensions/annotations.dart b/pkg/front_end/testcases/extensions/annotations.dart
index 8e69899..5144d09 100644
--- a/pkg/front_end/testcases/extensions/annotations.dart
+++ b/pkg/front_end/testcases/extensions/annotations.dart
@@ -1,7 +1,9 @@
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+
// @dart=2.9
+
class Class {
@pragma('dart2js:noInline')
instanceMethod() {}
diff --git a/pkg/front_end/testcases/extensions/annotations.dart.weak.outline.expect b/pkg/front_end/testcases/extensions/annotations.dart.weak.outline.expect
index 8a6129e..1ab642c 100644
--- a/pkg/front_end/testcases/extensions/annotations.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/extensions/annotations.dart.weak.outline.expect
@@ -43,9 +43,9 @@
Extra constant evaluation status:
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///annotations.dart:6:4 -> InstanceConstant(const pragma{pragma.name: "dart2js:noInline", pragma.options: null})
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///annotations.dart:9:4 -> InstanceConstant(const pragma{pragma.name: "dart2js:noInline", pragma.options: null})
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///annotations.dart:14:4 -> InstanceConstant(const pragma{pragma.name: "dart2js:noInline", pragma.options: null})
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///annotations.dart:17:4 -> InstanceConstant(const pragma{pragma.name: "dart2js:noInline", pragma.options: null})
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///annotations.dart:21:2 -> InstanceConstant(const pragma{pragma.name: "dart2js:noInline", pragma.options: null})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///annotations.dart:8:4 -> InstanceConstant(const pragma{pragma.name: "dart2js:noInline", pragma.options: null})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///annotations.dart:11:4 -> InstanceConstant(const pragma{pragma.name: "dart2js:noInline", pragma.options: null})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///annotations.dart:16:4 -> InstanceConstant(const pragma{pragma.name: "dart2js:noInline", pragma.options: null})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///annotations.dart:19:4 -> InstanceConstant(const pragma{pragma.name: "dart2js:noInline", pragma.options: null})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///annotations.dart:23:2 -> InstanceConstant(const pragma{pragma.name: "dart2js:noInline", pragma.options: null})
Extra constant evaluation: evaluated: 8, effectively constant: 5
diff --git a/pkg/front_end/testcases/extensions/annotations_scope.dart b/pkg/front_end/testcases/extensions/annotations_scope.dart
new file mode 100644
index 0000000..55db07d
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/annotations_scope.dart
@@ -0,0 +1,25 @@
+// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test that extension member annotations can access other extension static
+// members from the same extension by simple name.
+
+extension E on int {
+ @constField
+ static const int constField = 1;
+
+ @constField2
+ static const int constField1 = 2;
+
+ @constField1
+ static const int constField2 = 3;
+
+ @constField
+ static void staticMethod() {}
+
+ @constField
+ void instanceMethod() {}
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/extensions/annotations_scope.dart.textual_outline.expect b/pkg/front_end/testcases/extensions/annotations_scope.dart.textual_outline.expect
new file mode 100644
index 0000000..1fe592b
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/annotations_scope.dart.textual_outline.expect
@@ -0,0 +1,14 @@
+extension E on int {
+ @constField
+ static const int constField = 1;
+ @constField2
+ static const int constField1 = 2;
+ @constField1
+ static const int constField2 = 3;
+ @constField
+ static void staticMethod() {}
+ @constField
+ void instanceMethod() {}
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/extensions/annotations_scope.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/extensions/annotations_scope.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..1fe592b
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/annotations_scope.dart.textual_outline_modelled.expect
@@ -0,0 +1,14 @@
+extension E on int {
+ @constField
+ static const int constField = 1;
+ @constField2
+ static const int constField1 = 2;
+ @constField1
+ static const int constField2 = 3;
+ @constField
+ static void staticMethod() {}
+ @constField
+ void instanceMethod() {}
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/extensions/annotations_scope.dart.weak.expect b/pkg/front_end/testcases/extensions/annotations_scope.dart.weak.expect
new file mode 100644
index 0000000..1fc63c7
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/annotations_scope.dart.weak.expect
@@ -0,0 +1,31 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+extension E on core::int {
+ static field constField = self::E|constField;
+ static field constField1 = self::E|constField1;
+ static field constField2 = self::E|constField2;
+ static method staticMethod = self::E|staticMethod;
+ method instanceMethod = self::E|instanceMethod;
+ tearoff instanceMethod = self::E|get#instanceMethod;
+}
+@#C1
+static const field core::int E|constField = #C1;
+@#C2
+static const field core::int E|constField1 = #C3;
+@#C3
+static const field core::int E|constField2 = #C2;
+@#C1
+static method E|staticMethod() → void {}
+@#C1
+static method E|instanceMethod(lowered final core::int #this) → void {}
+static method E|get#instanceMethod(lowered final core::int #this) → () → void
+ return () → void => self::E|instanceMethod(#this);
+static method main() → dynamic {}
+
+constants {
+ #C1 = 1
+ #C2 = 3
+ #C3 = 2
+}
diff --git a/pkg/front_end/testcases/extensions/annotations_scope.dart.weak.outline.expect b/pkg/front_end/testcases/extensions/annotations_scope.dart.weak.outline.expect
new file mode 100644
index 0000000..bb7bdbd
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/annotations_scope.dart.weak.outline.expect
@@ -0,0 +1,37 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+extension E on core::int {
+ static field constField = self::E|constField;
+ static field constField1 = self::E|constField1;
+ static field constField2 = self::E|constField2;
+ static method staticMethod = self::E|staticMethod;
+ method instanceMethod = self::E|instanceMethod;
+ tearoff instanceMethod = self::E|get#instanceMethod;
+}
+@self::E|constField
+static const field core::int E|constField = 1;
+@self::E|constField2
+static const field core::int E|constField1 = 2;
+@self::E|constField1
+static const field core::int E|constField2 = 3;
+@self::E|constField
+static method E|staticMethod() → void
+ ;
+@self::E|constField
+static method E|instanceMethod(lowered final core::int #this) → void
+ ;
+static method E|get#instanceMethod(lowered final core::int #this) → () → void
+ return () → void => self::E|instanceMethod(#this);
+static method main() → dynamic
+ ;
+
+
+Extra constant evaluation status:
+Evaluated: StaticGet @ org-dartlang-testcase:///annotations_scope.dart:18:4 -> IntConstant(1)
+Evaluated: StaticGet @ org-dartlang-testcase:///annotations_scope.dart:21:4 -> IntConstant(1)
+Evaluated: StaticGet @ org-dartlang-testcase:///annotations_scope.dart:9:4 -> IntConstant(1)
+Evaluated: StaticGet @ org-dartlang-testcase:///annotations_scope.dart:12:4 -> IntConstant(3)
+Evaluated: StaticGet @ org-dartlang-testcase:///annotations_scope.dart:15:4 -> IntConstant(2)
+Extra constant evaluation: evaluated: 8, effectively constant: 5
diff --git a/pkg/front_end/testcases/extensions/annotations_scope.dart.weak.transformed.expect b/pkg/front_end/testcases/extensions/annotations_scope.dart.weak.transformed.expect
new file mode 100644
index 0000000..1fc63c7
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/annotations_scope.dart.weak.transformed.expect
@@ -0,0 +1,31 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+extension E on core::int {
+ static field constField = self::E|constField;
+ static field constField1 = self::E|constField1;
+ static field constField2 = self::E|constField2;
+ static method staticMethod = self::E|staticMethod;
+ method instanceMethod = self::E|instanceMethod;
+ tearoff instanceMethod = self::E|get#instanceMethod;
+}
+@#C1
+static const field core::int E|constField = #C1;
+@#C2
+static const field core::int E|constField1 = #C3;
+@#C3
+static const field core::int E|constField2 = #C2;
+@#C1
+static method E|staticMethod() → void {}
+@#C1
+static method E|instanceMethod(lowered final core::int #this) → void {}
+static method E|get#instanceMethod(lowered final core::int #this) → () → void
+ return () → void => self::E|instanceMethod(#this);
+static method main() → dynamic {}
+
+constants {
+ #C1 = 1
+ #C2 = 3
+ #C3 = 2
+}
diff --git a/pkg/front_end/testcases/extensions/issue47345.dart b/pkg/front_end/testcases/extensions/issue47345.dart
new file mode 100644
index 0000000..4d8722c
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/issue47345.dart
@@ -0,0 +1,12 @@
+// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+void main() {}
+
+class Foo {}
+
+extension on Foo {
+ static const bar = 1;
+ static const doubleBar = bar * 2;
+}
diff --git a/pkg/front_end/testcases/extensions/issue47345.dart.textual_outline.expect b/pkg/front_end/testcases/extensions/issue47345.dart.textual_outline.expect
new file mode 100644
index 0000000..ef181e1
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/issue47345.dart.textual_outline.expect
@@ -0,0 +1,8 @@
+void main() {}
+
+class Foo {}
+
+extension on Foo {
+ static const bar = 1;
+ static const doubleBar = bar * 2;
+}
diff --git a/pkg/front_end/testcases/extensions/issue47345.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/extensions/issue47345.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..0ddff5f
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/issue47345.dart.textual_outline_modelled.expect
@@ -0,0 +1,8 @@
+class Foo {}
+
+extension on Foo {
+ static const bar = 1;
+ static const doubleBar = bar * 2;
+}
+
+void main() {}
diff --git a/pkg/front_end/testcases/extensions/issue47345.dart.weak.expect b/pkg/front_end/testcases/extensions/issue47345.dart.weak.expect
new file mode 100644
index 0000000..38d9756
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/issue47345.dart.weak.expect
@@ -0,0 +1,21 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+ synthetic constructor •() → self::Foo
+ : super core::Object::•()
+ ;
+}
+extension _extension#0 on self::Foo {
+ static field bar = self::_extension#0|bar;
+ static field doubleBar = self::_extension#0|doubleBar;
+}
+static const field core::int _extension#0|bar = #C1;
+static const field core::int _extension#0|doubleBar = #C2;
+static method main() → void {}
+
+constants {
+ #C1 = 1
+ #C2 = 2
+}
diff --git a/pkg/front_end/testcases/extensions/issue47345.dart.weak.outline.expect b/pkg/front_end/testcases/extensions/issue47345.dart.weak.outline.expect
new file mode 100644
index 0000000..38ae11a
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/issue47345.dart.weak.outline.expect
@@ -0,0 +1,21 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+ synthetic constructor •() → self::Foo
+ ;
+}
+extension _extension#0 on self::Foo {
+ static field bar = self::_extension#0|bar;
+ static field doubleBar = self::_extension#0|doubleBar;
+}
+static const field core::int _extension#0|bar = 1;
+static const field core::int _extension#0|doubleBar = self::_extension#0|bar.{core::num::*}(2){(core::num) → core::int};
+static method main() → void
+ ;
+
+
+Extra constant evaluation status:
+Evaluated: InstanceInvocation @ org-dartlang-testcase:///issue47345.dart:11:32 -> IntConstant(2)
+Extra constant evaluation: evaluated: 1, effectively constant: 1
diff --git a/pkg/front_end/testcases/extensions/issue47345.dart.weak.transformed.expect b/pkg/front_end/testcases/extensions/issue47345.dart.weak.transformed.expect
new file mode 100644
index 0000000..38d9756
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/issue47345.dart.weak.transformed.expect
@@ -0,0 +1,21 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+ synthetic constructor •() → self::Foo
+ : super core::Object::•()
+ ;
+}
+extension _extension#0 on self::Foo {
+ static field bar = self::_extension#0|bar;
+ static field doubleBar = self::_extension#0|doubleBar;
+}
+static const field core::int _extension#0|bar = #C1;
+static const field core::int _extension#0|doubleBar = #C2;
+static method main() → void {}
+
+constants {
+ #C1 = 1
+ #C2 = 2
+}
diff --git a/pkg/front_end/testcases/extensions/language_issue1182.dart b/pkg/front_end/testcases/extensions/language_issue1182.dart
index 2849485..d64e302 100644
--- a/pkg/front_end/testcases/extensions/language_issue1182.dart
+++ b/pkg/front_end/testcases/extensions/language_issue1182.dart
@@ -1,7 +1,9 @@
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+
// @dart=2.9
+
extension Test<T> on T {
T Function(T) get test => (a) => this;
}
diff --git a/pkg/front_end/testcases/extensions/language_issue1182.dart.weak.expect b/pkg/front_end/testcases/extensions/language_issue1182.dart.weak.expect
index 6b86f49..d952a83 100644
--- a/pkg/front_end/testcases/extensions/language_issue1182.dart.weak.expect
+++ b/pkg/front_end/testcases/extensions/language_issue1182.dart.weak.expect
@@ -2,7 +2,7 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/extensions/language_issue1182.dart:11:25: Error: A value of type 'num Function(num)' can't be assigned to a variable of type 'S Function(S)'.
+// pkg/front_end/testcases/extensions/language_issue1182.dart:13:25: Error: A value of type 'num Function(num)' can't be assigned to a variable of type 'S Function(S)'.
// S Function(S) f = x.test;
// ^
//
@@ -14,7 +14,7 @@
: super core::Object::•()
;
method test1(covariant-by-class self::Foo::S* x) → void {
- (self::Foo::S*) →* self::Foo::S* f = invalid-expression "pkg/front_end/testcases/extensions/language_issue1182.dart:11:25: Error: A value of type 'num Function(num)' can't be assigned to a variable of type 'S Function(S)'.
+ (self::Foo::S*) →* self::Foo::S* f = invalid-expression "pkg/front_end/testcases/extensions/language_issue1182.dart:13:25: Error: A value of type 'num Function(num)' can't be assigned to a variable of type 'S Function(S)'.
S Function(S) f = x.test;
^" in self::Test|get#test<core::num*>(x) as{TypeError} Never;
}
diff --git a/pkg/front_end/testcases/extensions/language_issue1182.dart.weak.transformed.expect b/pkg/front_end/testcases/extensions/language_issue1182.dart.weak.transformed.expect
index 6b86f49..d952a83 100644
--- a/pkg/front_end/testcases/extensions/language_issue1182.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/extensions/language_issue1182.dart.weak.transformed.expect
@@ -2,7 +2,7 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/extensions/language_issue1182.dart:11:25: Error: A value of type 'num Function(num)' can't be assigned to a variable of type 'S Function(S)'.
+// pkg/front_end/testcases/extensions/language_issue1182.dart:13:25: Error: A value of type 'num Function(num)' can't be assigned to a variable of type 'S Function(S)'.
// S Function(S) f = x.test;
// ^
//
@@ -14,7 +14,7 @@
: super core::Object::•()
;
method test1(covariant-by-class self::Foo::S* x) → void {
- (self::Foo::S*) →* self::Foo::S* f = invalid-expression "pkg/front_end/testcases/extensions/language_issue1182.dart:11:25: Error: A value of type 'num Function(num)' can't be assigned to a variable of type 'S Function(S)'.
+ (self::Foo::S*) →* self::Foo::S* f = invalid-expression "pkg/front_end/testcases/extensions/language_issue1182.dart:13:25: Error: A value of type 'num Function(num)' can't be assigned to a variable of type 'S Function(S)'.
S Function(S) f = x.test;
^" in self::Test|get#test<core::num*>(x) as{TypeError} Never;
}
diff --git a/pkg/front_end/testcases/strong.status b/pkg/front_end/testcases/strong.status
index 6b92aed..1bb2c89 100644
--- a/pkg/front_end/testcases/strong.status
+++ b/pkg/front_end/testcases/strong.status
@@ -6,9 +6,6 @@
# Kernel ASTs directly, that is, code in pkg/fasta/lib/src/kernel/ with
# strong-mode enabled.
-dart2js/late_statics: SemiFuzzFailure # dartbug.com/45854
-dart2js/late_from_dill/main: SemiFuzzFailure # dartbug.com/45854, see also https://dart-review.googlesource.com/c/sdk/+/213768
-
constructor_tearoffs/call_instantiation: TypeCheckError
constructor_tearoffs/lowering/invalid_redirect: VerificationError
extension_types/access_setter_as_getter: ExpectationFileMismatchSerialized # Expected.
diff --git a/pkg/front_end/testcases/unscheduled_experiments/folder.options b/pkg/front_end/testcases/unscheduled_experiments/folder.options
new file mode 100644
index 0000000..b931072
--- /dev/null
+++ b/pkg/front_end/testcases/unscheduled_experiments/folder.options
@@ -0,0 +1 @@
+--enable-unscheduled-experiments
\ No newline at end of file
diff --git a/pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart b/pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart
new file mode 100644
index 0000000..2c51514
--- /dev/null
+++ b/pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart
@@ -0,0 +1,82 @@
+class A {
+ A(int x, int y, {required int z});
+
+ factory A.foo(int x, int y, {required int z}) => new A(x, y, z: z);
+
+ void Function(int x, int y, {required int z}) get property => throw 42;
+
+ void bar(int x, int y, {required int z}) {}
+}
+
+typedef B = A;
+
+foo(int x, int y, {required int z}) {}
+
+extension E on A {
+ method1() {
+ method2(foo: 1, 2); // This call.
+ }
+ method2(int bar, {int? foo}) {}
+}
+
+test(dynamic d, Function f, A a) {
+ void local(int x, int y, {required int z}) {}
+
+ // StaticInvocation.
+ foo(1, 2, z: 3);
+ foo(1, z: 2, 3);
+ foo(z: 1, 2, 3);
+
+ // FactoryConstructorInvocation.
+ new A.foo(1, 2, z: 3);
+ new A.foo(1, z: 2, 3);
+ new A.foo(z: 1, 2, 3);
+ new B.foo(1, 2, z: 3);
+ new B.foo(1, z: 2, 3);
+ new B.foo(z: 1, 2, 3);
+
+ // ConstructorInvocation.
+ new A(1, 2, z: 3);
+ new A(1, z: 2, 3);
+ new A(z: 1, 2, 3);
+ new B(1, 2, z: 3);
+ new B(1, z: 2, 3);
+ new B(z: 1, 2, 3);
+
+ // DynamicInvocation.
+ d(1, 2, z: 3);
+ d(1, z: 2, 3);
+ d(z: 1, 2, 3);
+
+ // FunctionInvocation.
+ f(1, 2, z: 3);
+ f(1, z: 2, 3);
+ f(z: 1, 2, 3);
+
+ // InstanceGetterInvocation.
+ a.property(1, 2, z: 3);
+ a.property(1, z: 2, 3);
+ a.property(z: 1, 2, 3);
+
+ // InstanceInvocation.
+ a.bar(1, 2, z: 3);
+ a.bar(1, z: 2, 3);
+ a.bar(z: 1, 2, 3);
+
+ // LocalFunctionInvocation.
+ local(1, 2, z: 3);
+ local(1, z: 2, 3);
+ local(z: 1, 2, 3);
+}
+
+class Test extends A {
+ Test() : super(1, 2, z: 3);
+
+ test() {
+ super.bar(1, 2, z: 3);
+ super.bar(1, z: 2, 3);
+ super.bar(z: 1, 2, 3);
+ }
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart.strong.expect b/pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart.strong.expect
new file mode 100644
index 0000000..c92d158
--- /dev/null
+++ b/pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart.strong.expect
@@ -0,0 +1,251 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:17:21: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// method2(foo: 1, 2); // This call.
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:27:16: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// foo(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:28:13: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// foo(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:28:16: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// foo(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:32:22: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new A.foo(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:33:19: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new A.foo(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:33:22: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new A.foo(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:35:22: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new B.foo(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:36:19: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new B.foo(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:36:22: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new B.foo(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:40:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new A(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:41:15: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new A(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:41:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new A(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:43:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new B(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:44:15: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new B(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:44:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new B(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:48:14: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// d(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:49:11: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// d(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:49:14: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// d(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:53:14: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// f(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:54:11: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// f(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:54:14: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// f(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:58:23: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// a.property(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:59:20: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// a.property(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:59:23: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// a.property(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:63:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// a.bar(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:64:15: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// a.bar(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:64:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// a.bar(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:68:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// local(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:69:15: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// local(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:69:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// local(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:77:24: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// super.bar(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:78:21: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// super.bar(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:78:24: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// super.bar(z: 1, 2, 3);
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef B = self::A;
+class A extends core::Object {
+ constructor •(core::int x, core::int y, {required core::int z = #C1}) → self::A
+ : super core::Object::•()
+ ;
+ static factory foo(core::int x, core::int y, {required core::int z = #C1}) → self::A
+ return new self::A::•(x, y, z: z);
+ get property() → (core::int, core::int, {required z: core::int}) → void
+ return throw 42;
+ method bar(core::int x, core::int y, {required core::int z = #C1}) → void {}
+}
+class Test extends self::A {
+ constructor •() → self::Test
+ : super self::A::•(1, 2, z: 3)
+ ;
+ method test() → dynamic {
+ super.{self::A::bar}(1, 2, z: 3);
+ let final core::int #t1 = 1 in let final core::int #t2 = 2 in super.{self::A::bar}(#t1, 3, z: #t2);
+ let final core::int #t3 = 1 in super.{self::A::bar}(2, 3, z: #t3);
+ }
+}
+extension E on self::A {
+ method method1 = self::E|method1;
+ tearoff method1 = self::E|get#method1;
+ method method2 = self::E|method2;
+ tearoff method2 = self::E|get#method2;
+}
+static method foo(core::int x, core::int y, {required core::int z = #C1}) → dynamic {}
+static method E|method1(lowered final self::A #this) → dynamic {
+ let final self::A #t4 = #this in let final core::int #t5 = 1 in self::E|method2(#t4, 2, foo: #t5);
+}
+static method E|get#method1(lowered final self::A #this) → () → dynamic
+ return () → dynamic => self::E|method1(#this);
+static method E|method2(lowered final self::A #this, core::int bar, {core::int? foo = #C1}) → dynamic {}
+static method E|get#method2(lowered final self::A #this) → (core::int, {foo: core::int?}) → dynamic
+ return (core::int bar, {core::int? foo = #C1}) → dynamic => self::E|method2(#this, bar, foo: foo);
+static method test(dynamic d, core::Function f, self::A a) → dynamic {
+ function local(core::int x, core::int y, {required core::int z = #C1}) → void {}
+ self::foo(1, 2, z: 3);
+ let final core::int #t6 = 1 in let final core::int #t7 = 2 in self::foo(#t6, 3, z: #t7);
+ let final core::int #t8 = 1 in self::foo(2, 3, z: #t8);
+ self::A::foo(1, 2, z: 3);
+ let final core::int #t9 = 1 in let final core::int #t10 = 2 in self::A::foo(#t9, 3, z: #t10);
+ let final core::int #t11 = 1 in self::A::foo(2, 3, z: #t11);
+ self::A::foo(1, 2, z: 3);
+ let final core::int #t12 = 1 in let final core::int #t13 = 2 in self::A::foo(#t12, 3, z: #t13);
+ let final core::int #t14 = 1 in self::A::foo(2, 3, z: #t14);
+ new self::A::•(1, 2, z: 3);
+ let final core::int #t15 = 1 in let final core::int #t16 = 2 in new self::A::•(#t15, 3, z: #t16);
+ let final core::int #t17 = 1 in new self::A::•(2, 3, z: #t17);
+ new self::A::•(1, 2, z: 3);
+ let final core::int #t18 = 1 in let final core::int #t19 = 2 in new self::A::•(#t18, 3, z: #t19);
+ let final core::int #t20 = 1 in new self::A::•(2, 3, z: #t20);
+ d{dynamic}.call(1, 2, z: 3);
+ let final core::int #t21 = 1 in let final core::int #t22 = 2 in d{dynamic}.call(#t21, 3, z: #t22);
+ let final core::int #t23 = 1 in d{dynamic}.call(2, 3, z: #t23);
+ f(1, 2, z: 3);
+ let final core::int #t24 = 1 in let final core::int #t25 = 2 in f(#t24, 3, z: #t25);
+ let final core::int #t26 = 1 in f(2, 3, z: #t26);
+ let final self::A #t27 = a in let final core::int #t28 = 1 in let final core::int #t29 = 2 in let final core::int #t30 = 3 in #t27.{self::A::property}{(core::int, core::int, {required z: core::int}) → void}(#t28, #t29, z: #t30){(core::int, core::int, {required z: core::int}) → void};
+ let final self::A #t31 = a in let final core::int #t32 = 1 in let final core::int #t33 = 2 in let final core::int #t34 = 3 in #t31.{self::A::property}{(core::int, core::int, {required z: core::int}) → void}(#t32, #t34, z: #t33){(core::int, core::int, {required z: core::int}) → void};
+ let final self::A #t35 = a in let final core::int #t36 = 1 in let final core::int #t37 = 2 in let final core::int #t38 = 3 in #t35.{self::A::property}{(core::int, core::int, {required z: core::int}) → void}(#t37, #t38, z: #t36){(core::int, core::int, {required z: core::int}) → void};
+ a.{self::A::bar}(1, 2, z: 3){(core::int, core::int, {required z: core::int}) → void};
+ let final self::A #t39 = a in let final core::int #t40 = 1 in let final core::int #t41 = 2 in #t39.{self::A::bar}(#t40, 3, z: #t41){(core::int, core::int, {required z: core::int}) → void};
+ let final self::A #t42 = a in let final core::int #t43 = 1 in #t42.{self::A::bar}(2, 3, z: #t43){(core::int, core::int, {required z: core::int}) → void};
+ local(1, 2, z: 3){(core::int, core::int, {required z: core::int}) → void};
+ let final core::int #t44 = 1 in let final core::int #t45 = 2 in local(#t44, 3, z: #t45){(core::int, core::int, {required z: core::int}) → void};
+ let final core::int #t46 = 1 in local(2, 3, z: #t46){(core::int, core::int, {required z: core::int}) → void};
+}
+static method main() → dynamic {}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart.strong.transformed.expect b/pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart.strong.transformed.expect
new file mode 100644
index 0000000..82faf76
--- /dev/null
+++ b/pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart.strong.transformed.expect
@@ -0,0 +1,294 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:17:21: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// method2(foo: 1, 2); // This call.
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:27:16: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// foo(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:28:13: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// foo(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:28:16: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// foo(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:32:22: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new A.foo(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:33:19: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new A.foo(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:33:22: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new A.foo(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:35:22: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new B.foo(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:36:19: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new B.foo(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:36:22: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new B.foo(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:40:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new A(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:41:15: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new A(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:41:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new A(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:43:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new B(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:44:15: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new B(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:44:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new B(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:48:14: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// d(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:49:11: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// d(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:49:14: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// d(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:53:14: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// f(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:54:11: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// f(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:54:14: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// f(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:58:23: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// a.property(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:59:20: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// a.property(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:59:23: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// a.property(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:63:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// a.bar(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:64:15: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// a.bar(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:64:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// a.bar(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:68:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// local(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:69:15: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// local(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:69:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// local(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:77:24: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// super.bar(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:78:21: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// super.bar(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:78:24: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// super.bar(z: 1, 2, 3);
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef B = self::A;
+class A extends core::Object {
+ constructor •(core::int x, core::int y, {required core::int z = #C1}) → self::A
+ : super core::Object::•()
+ ;
+ static factory foo(core::int x, core::int y, {required core::int z = #C1}) → self::A
+ return new self::A::•(x, y, z: z);
+ get property() → (core::int, core::int, {required z: core::int}) → void
+ return throw 42;
+ method bar(core::int x, core::int y, {required core::int z = #C1}) → void {}
+}
+class Test extends self::A {
+ constructor •() → self::Test
+ : super self::A::•(1, 2, z: 3)
+ ;
+ method test() → dynamic {
+ super.{self::A::bar}(1, 2, z: 3);
+ let final core::int #t1 = 1 in let final core::int #t2 = 2 in super.{self::A::bar}(#t1, 3, z: #t2);
+ let final core::int #t3 = 1 in super.{self::A::bar}(2, 3, z: #t3);
+ }
+}
+extension E on self::A {
+ method method1 = self::E|method1;
+ tearoff method1 = self::E|get#method1;
+ method method2 = self::E|method2;
+ tearoff method2 = self::E|get#method2;
+}
+static method foo(core::int x, core::int y, {required core::int z = #C1}) → dynamic {}
+static method E|method1(lowered final self::A #this) → dynamic {
+ let final self::A #t4 = #this in let final core::int #t5 = 1 in self::E|method2(#t4, 2, foo: #t5);
+}
+static method E|get#method1(lowered final self::A #this) → () → dynamic
+ return () → dynamic => self::E|method1(#this);
+static method E|method2(lowered final self::A #this, core::int bar, {core::int? foo = #C1}) → dynamic {}
+static method E|get#method2(lowered final self::A #this) → (core::int, {foo: core::int?}) → dynamic
+ return (core::int bar, {core::int? foo = #C1}) → dynamic => self::E|method2(#this, bar, foo: foo);
+static method test(dynamic d, core::Function f, self::A a) → dynamic {
+ function local(core::int x, core::int y, {required core::int z = #C1}) → void {}
+ self::foo(1, 2, z: 3);
+ let final core::int #t6 = 1 in let final core::int #t7 = 2 in self::foo(#t6, 3, z: #t7);
+ let final core::int #t8 = 1 in self::foo(2, 3, z: #t8);
+ self::A::foo(1, 2, z: 3);
+ let final core::int #t9 = 1 in let final core::int #t10 = 2 in self::A::foo(#t9, 3, z: #t10);
+ let final core::int #t11 = 1 in self::A::foo(2, 3, z: #t11);
+ self::A::foo(1, 2, z: 3);
+ let final core::int #t12 = 1 in let final core::int #t13 = 2 in self::A::foo(#t12, 3, z: #t13);
+ let final core::int #t14 = 1 in self::A::foo(2, 3, z: #t14);
+ new self::A::•(1, 2, z: 3);
+ let final core::int #t15 = 1 in let final core::int #t16 = 2 in new self::A::•(#t15, 3, z: #t16);
+ let final core::int #t17 = 1 in new self::A::•(2, 3, z: #t17);
+ new self::A::•(1, 2, z: 3);
+ let final core::int #t18 = 1 in let final core::int #t19 = 2 in new self::A::•(#t18, 3, z: #t19);
+ let final core::int #t20 = 1 in new self::A::•(2, 3, z: #t20);
+ d{dynamic}.call(1, 2, z: 3);
+ let final core::int #t21 = 1 in let final core::int #t22 = 2 in d{dynamic}.call(#t21, 3, z: #t22);
+ let final core::int #t23 = 1 in d{dynamic}.call(2, 3, z: #t23);
+ f(1, 2, z: 3);
+ let final core::int #t24 = 1 in let final core::int #t25 = 2 in f(#t24, 3, z: #t25);
+ let final core::int #t26 = 1 in f(2, 3, z: #t26);
+ let final self::A #t27 = a in let final core::int #t28 = 1 in let final core::int #t29 = 2 in let final core::int #t30 = 3 in #t27.{self::A::property}{(core::int, core::int, {required z: core::int}) → void}(#t28, #t29, z: #t30){(core::int, core::int, {required z: core::int}) → void};
+ let final self::A #t31 = a in let final core::int #t32 = 1 in let final core::int #t33 = 2 in let final core::int #t34 = 3 in #t31.{self::A::property}{(core::int, core::int, {required z: core::int}) → void}(#t32, #t34, z: #t33){(core::int, core::int, {required z: core::int}) → void};
+ let final self::A #t35 = a in let final core::int #t36 = 1 in let final core::int #t37 = 2 in let final core::int #t38 = 3 in #t35.{self::A::property}{(core::int, core::int, {required z: core::int}) → void}(#t37, #t38, z: #t36){(core::int, core::int, {required z: core::int}) → void};
+ a.{self::A::bar}(1, 2, z: 3){(core::int, core::int, {required z: core::int}) → void};
+ let final self::A #t39 = a in let final core::int #t40 = 1 in let final core::int #t41 = 2 in #t39.{self::A::bar}(#t40, 3, z: #t41){(core::int, core::int, {required z: core::int}) → void};
+ let final self::A #t42 = a in let final core::int #t43 = 1 in #t42.{self::A::bar}(2, 3, z: #t43){(core::int, core::int, {required z: core::int}) → void};
+ local(1, 2, z: 3){(core::int, core::int, {required z: core::int}) → void};
+ let final core::int #t44 = 1 in let final core::int #t45 = 2 in local(#t44, 3, z: #t45){(core::int, core::int, {required z: core::int}) → void};
+ let final core::int #t46 = 1 in local(2, 3, z: #t46){(core::int, core::int, {required z: core::int}) → void};
+}
+static method main() → dynamic {}
+
+constants {
+ #C1 = null
+}
+
+Extra constant evaluation status:
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:77:15 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:77:21 -> IntConstant(2)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:78:18 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:17:18 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:27:7 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:27:13 -> IntConstant(2)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:28:10 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:32:13 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:32:19 -> IntConstant(2)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:33:16 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:35:13 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:35:19 -> IntConstant(2)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:36:16 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:40:9 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:40:15 -> IntConstant(2)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:41:12 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:43:9 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:43:15 -> IntConstant(2)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:44:12 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:48:5 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:48:11 -> IntConstant(2)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:49:8 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:53:5 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:53:11 -> IntConstant(2)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:54:8 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:57:14 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:57:17 -> IntConstant(2)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:57:23 -> IntConstant(3)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:58:14 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:58:23 -> IntConstant(3)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:58:20 -> IntConstant(2)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:59:20 -> IntConstant(2)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:59:23 -> IntConstant(3)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:59:17 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:63:9 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:63:15 -> IntConstant(2)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:64:12 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:68:9 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:68:15 -> IntConstant(2)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:69:12 -> IntConstant(1)
+Extra constant evaluation: evaluated: 155, effectively constant: 40
diff --git a/pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart.textual_outline.expect b/pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart.textual_outline.expect
new file mode 100644
index 0000000..903b3b6
--- /dev/null
+++ b/pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart.textual_outline.expect
@@ -0,0 +1,23 @@
+class A {
+ A(int x, int y, {required int z});
+ factory A.foo(int x, int y, {required int z}) => new A(x, y, z: z);
+ void Function(int x, int y, {required int z}) get property => throw 42;
+ void bar(int x, int y, {required int z}) {}
+}
+
+typedef B = A;
+foo(int x, int y, {required int z}) {}
+
+extension E on A {
+ method1() {}
+ method2(int bar, {int? foo}) {}
+}
+
+test(dynamic d, Function f, A a) {}
+
+class Test extends A {
+ Test() : super(1, 2, z: 3);
+ test() {}
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..f0b79da
--- /dev/null
+++ b/pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart.textual_outline_modelled.expect
@@ -0,0 +1,21 @@
+class A {
+ A(int x, int y, {required int z});
+ factory A.foo(int x, int y, {required int z}) => new A(x, y, z: z);
+ void Function(int x, int y, {required int z}) get property => throw 42;
+ void bar(int x, int y, {required int z}) {}
+}
+
+class Test extends A {
+ Test() : super(1, 2, z: 3);
+ test() {}
+}
+
+extension E on A {
+ method1() {}
+ method2(int bar, {int? foo}) {}
+}
+
+foo(int x, int y, {required int z}) {}
+main() {}
+test(dynamic d, Function f, A a) {}
+typedef B = A;
diff --git a/pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart.weak.expect b/pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart.weak.expect
new file mode 100644
index 0000000..c92d158
--- /dev/null
+++ b/pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart.weak.expect
@@ -0,0 +1,251 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:17:21: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// method2(foo: 1, 2); // This call.
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:27:16: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// foo(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:28:13: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// foo(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:28:16: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// foo(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:32:22: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new A.foo(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:33:19: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new A.foo(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:33:22: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new A.foo(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:35:22: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new B.foo(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:36:19: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new B.foo(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:36:22: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new B.foo(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:40:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new A(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:41:15: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new A(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:41:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new A(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:43:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new B(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:44:15: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new B(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:44:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new B(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:48:14: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// d(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:49:11: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// d(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:49:14: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// d(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:53:14: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// f(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:54:11: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// f(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:54:14: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// f(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:58:23: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// a.property(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:59:20: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// a.property(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:59:23: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// a.property(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:63:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// a.bar(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:64:15: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// a.bar(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:64:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// a.bar(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:68:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// local(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:69:15: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// local(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:69:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// local(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:77:24: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// super.bar(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:78:21: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// super.bar(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:78:24: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// super.bar(z: 1, 2, 3);
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef B = self::A;
+class A extends core::Object {
+ constructor •(core::int x, core::int y, {required core::int z = #C1}) → self::A
+ : super core::Object::•()
+ ;
+ static factory foo(core::int x, core::int y, {required core::int z = #C1}) → self::A
+ return new self::A::•(x, y, z: z);
+ get property() → (core::int, core::int, {required z: core::int}) → void
+ return throw 42;
+ method bar(core::int x, core::int y, {required core::int z = #C1}) → void {}
+}
+class Test extends self::A {
+ constructor •() → self::Test
+ : super self::A::•(1, 2, z: 3)
+ ;
+ method test() → dynamic {
+ super.{self::A::bar}(1, 2, z: 3);
+ let final core::int #t1 = 1 in let final core::int #t2 = 2 in super.{self::A::bar}(#t1, 3, z: #t2);
+ let final core::int #t3 = 1 in super.{self::A::bar}(2, 3, z: #t3);
+ }
+}
+extension E on self::A {
+ method method1 = self::E|method1;
+ tearoff method1 = self::E|get#method1;
+ method method2 = self::E|method2;
+ tearoff method2 = self::E|get#method2;
+}
+static method foo(core::int x, core::int y, {required core::int z = #C1}) → dynamic {}
+static method E|method1(lowered final self::A #this) → dynamic {
+ let final self::A #t4 = #this in let final core::int #t5 = 1 in self::E|method2(#t4, 2, foo: #t5);
+}
+static method E|get#method1(lowered final self::A #this) → () → dynamic
+ return () → dynamic => self::E|method1(#this);
+static method E|method2(lowered final self::A #this, core::int bar, {core::int? foo = #C1}) → dynamic {}
+static method E|get#method2(lowered final self::A #this) → (core::int, {foo: core::int?}) → dynamic
+ return (core::int bar, {core::int? foo = #C1}) → dynamic => self::E|method2(#this, bar, foo: foo);
+static method test(dynamic d, core::Function f, self::A a) → dynamic {
+ function local(core::int x, core::int y, {required core::int z = #C1}) → void {}
+ self::foo(1, 2, z: 3);
+ let final core::int #t6 = 1 in let final core::int #t7 = 2 in self::foo(#t6, 3, z: #t7);
+ let final core::int #t8 = 1 in self::foo(2, 3, z: #t8);
+ self::A::foo(1, 2, z: 3);
+ let final core::int #t9 = 1 in let final core::int #t10 = 2 in self::A::foo(#t9, 3, z: #t10);
+ let final core::int #t11 = 1 in self::A::foo(2, 3, z: #t11);
+ self::A::foo(1, 2, z: 3);
+ let final core::int #t12 = 1 in let final core::int #t13 = 2 in self::A::foo(#t12, 3, z: #t13);
+ let final core::int #t14 = 1 in self::A::foo(2, 3, z: #t14);
+ new self::A::•(1, 2, z: 3);
+ let final core::int #t15 = 1 in let final core::int #t16 = 2 in new self::A::•(#t15, 3, z: #t16);
+ let final core::int #t17 = 1 in new self::A::•(2, 3, z: #t17);
+ new self::A::•(1, 2, z: 3);
+ let final core::int #t18 = 1 in let final core::int #t19 = 2 in new self::A::•(#t18, 3, z: #t19);
+ let final core::int #t20 = 1 in new self::A::•(2, 3, z: #t20);
+ d{dynamic}.call(1, 2, z: 3);
+ let final core::int #t21 = 1 in let final core::int #t22 = 2 in d{dynamic}.call(#t21, 3, z: #t22);
+ let final core::int #t23 = 1 in d{dynamic}.call(2, 3, z: #t23);
+ f(1, 2, z: 3);
+ let final core::int #t24 = 1 in let final core::int #t25 = 2 in f(#t24, 3, z: #t25);
+ let final core::int #t26 = 1 in f(2, 3, z: #t26);
+ let final self::A #t27 = a in let final core::int #t28 = 1 in let final core::int #t29 = 2 in let final core::int #t30 = 3 in #t27.{self::A::property}{(core::int, core::int, {required z: core::int}) → void}(#t28, #t29, z: #t30){(core::int, core::int, {required z: core::int}) → void};
+ let final self::A #t31 = a in let final core::int #t32 = 1 in let final core::int #t33 = 2 in let final core::int #t34 = 3 in #t31.{self::A::property}{(core::int, core::int, {required z: core::int}) → void}(#t32, #t34, z: #t33){(core::int, core::int, {required z: core::int}) → void};
+ let final self::A #t35 = a in let final core::int #t36 = 1 in let final core::int #t37 = 2 in let final core::int #t38 = 3 in #t35.{self::A::property}{(core::int, core::int, {required z: core::int}) → void}(#t37, #t38, z: #t36){(core::int, core::int, {required z: core::int}) → void};
+ a.{self::A::bar}(1, 2, z: 3){(core::int, core::int, {required z: core::int}) → void};
+ let final self::A #t39 = a in let final core::int #t40 = 1 in let final core::int #t41 = 2 in #t39.{self::A::bar}(#t40, 3, z: #t41){(core::int, core::int, {required z: core::int}) → void};
+ let final self::A #t42 = a in let final core::int #t43 = 1 in #t42.{self::A::bar}(2, 3, z: #t43){(core::int, core::int, {required z: core::int}) → void};
+ local(1, 2, z: 3){(core::int, core::int, {required z: core::int}) → void};
+ let final core::int #t44 = 1 in let final core::int #t45 = 2 in local(#t44, 3, z: #t45){(core::int, core::int, {required z: core::int}) → void};
+ let final core::int #t46 = 1 in local(2, 3, z: #t46){(core::int, core::int, {required z: core::int}) → void};
+}
+static method main() → dynamic {}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart.weak.outline.expect b/pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart.weak.outline.expect
new file mode 100644
index 0000000..23ee911
--- /dev/null
+++ b/pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart.weak.outline.expect
@@ -0,0 +1,41 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+typedef B = self::A;
+class A extends core::Object {
+ constructor •(core::int x, core::int y, {required core::int z}) → self::A
+ ;
+ static factory foo(core::int x, core::int y, {required core::int z}) → self::A
+ ;
+ get property() → (core::int, core::int, {required z: core::int}) → void
+ ;
+ method bar(core::int x, core::int y, {required core::int z}) → void
+ ;
+}
+class Test extends self::A {
+ constructor •() → self::Test
+ ;
+ method test() → dynamic
+ ;
+}
+extension E on self::A {
+ method method1 = self::E|method1;
+ tearoff method1 = self::E|get#method1;
+ method method2 = self::E|method2;
+ tearoff method2 = self::E|get#method2;
+}
+static method foo(core::int x, core::int y, {required core::int z}) → dynamic
+ ;
+static method E|method1(lowered final self::A #this) → dynamic
+ ;
+static method E|get#method1(lowered final self::A #this) → () → dynamic
+ return () → dynamic => self::E|method1(#this);
+static method E|method2(lowered final self::A #this, core::int bar, {core::int? foo}) → dynamic
+ ;
+static method E|get#method2(lowered final self::A #this) → (core::int, {foo: core::int?}) → dynamic
+ return (core::int bar, {core::int? foo}) → dynamic => self::E|method2(#this, bar, foo: foo);
+static method test(dynamic d, core::Function f, self::A a) → dynamic
+ ;
+static method main() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart.weak.transformed.expect b/pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart.weak.transformed.expect
new file mode 100644
index 0000000..82faf76
--- /dev/null
+++ b/pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart.weak.transformed.expect
@@ -0,0 +1,294 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:17:21: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// method2(foo: 1, 2); // This call.
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:27:16: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// foo(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:28:13: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// foo(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:28:16: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// foo(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:32:22: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new A.foo(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:33:19: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new A.foo(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:33:22: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new A.foo(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:35:22: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new B.foo(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:36:19: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new B.foo(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:36:22: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new B.foo(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:40:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new A(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:41:15: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new A(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:41:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new A(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:43:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new B(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:44:15: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new B(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:44:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// new B(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:48:14: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// d(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:49:11: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// d(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:49:14: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// d(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:53:14: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// f(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:54:11: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// f(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:54:14: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// f(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:58:23: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// a.property(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:59:20: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// a.property(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:59:23: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// a.property(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:63:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// a.bar(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:64:15: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// a.bar(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:64:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// a.bar(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:68:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// local(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:69:15: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// local(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:69:18: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// local(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:77:24: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// super.bar(1, z: 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:78:21: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// super.bar(z: 1, 2, 3);
+// ^
+//
+// pkg/front_end/testcases/unscheduled_experiments/named_arguments_anywhere/all_kinds.dart:78:24: Error: Place positional arguments before named arguments.
+// Try moving the positional argument before the named arguments, or add a name to the argument.
+// super.bar(z: 1, 2, 3);
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef B = self::A;
+class A extends core::Object {
+ constructor •(core::int x, core::int y, {required core::int z = #C1}) → self::A
+ : super core::Object::•()
+ ;
+ static factory foo(core::int x, core::int y, {required core::int z = #C1}) → self::A
+ return new self::A::•(x, y, z: z);
+ get property() → (core::int, core::int, {required z: core::int}) → void
+ return throw 42;
+ method bar(core::int x, core::int y, {required core::int z = #C1}) → void {}
+}
+class Test extends self::A {
+ constructor •() → self::Test
+ : super self::A::•(1, 2, z: 3)
+ ;
+ method test() → dynamic {
+ super.{self::A::bar}(1, 2, z: 3);
+ let final core::int #t1 = 1 in let final core::int #t2 = 2 in super.{self::A::bar}(#t1, 3, z: #t2);
+ let final core::int #t3 = 1 in super.{self::A::bar}(2, 3, z: #t3);
+ }
+}
+extension E on self::A {
+ method method1 = self::E|method1;
+ tearoff method1 = self::E|get#method1;
+ method method2 = self::E|method2;
+ tearoff method2 = self::E|get#method2;
+}
+static method foo(core::int x, core::int y, {required core::int z = #C1}) → dynamic {}
+static method E|method1(lowered final self::A #this) → dynamic {
+ let final self::A #t4 = #this in let final core::int #t5 = 1 in self::E|method2(#t4, 2, foo: #t5);
+}
+static method E|get#method1(lowered final self::A #this) → () → dynamic
+ return () → dynamic => self::E|method1(#this);
+static method E|method2(lowered final self::A #this, core::int bar, {core::int? foo = #C1}) → dynamic {}
+static method E|get#method2(lowered final self::A #this) → (core::int, {foo: core::int?}) → dynamic
+ return (core::int bar, {core::int? foo = #C1}) → dynamic => self::E|method2(#this, bar, foo: foo);
+static method test(dynamic d, core::Function f, self::A a) → dynamic {
+ function local(core::int x, core::int y, {required core::int z = #C1}) → void {}
+ self::foo(1, 2, z: 3);
+ let final core::int #t6 = 1 in let final core::int #t7 = 2 in self::foo(#t6, 3, z: #t7);
+ let final core::int #t8 = 1 in self::foo(2, 3, z: #t8);
+ self::A::foo(1, 2, z: 3);
+ let final core::int #t9 = 1 in let final core::int #t10 = 2 in self::A::foo(#t9, 3, z: #t10);
+ let final core::int #t11 = 1 in self::A::foo(2, 3, z: #t11);
+ self::A::foo(1, 2, z: 3);
+ let final core::int #t12 = 1 in let final core::int #t13 = 2 in self::A::foo(#t12, 3, z: #t13);
+ let final core::int #t14 = 1 in self::A::foo(2, 3, z: #t14);
+ new self::A::•(1, 2, z: 3);
+ let final core::int #t15 = 1 in let final core::int #t16 = 2 in new self::A::•(#t15, 3, z: #t16);
+ let final core::int #t17 = 1 in new self::A::•(2, 3, z: #t17);
+ new self::A::•(1, 2, z: 3);
+ let final core::int #t18 = 1 in let final core::int #t19 = 2 in new self::A::•(#t18, 3, z: #t19);
+ let final core::int #t20 = 1 in new self::A::•(2, 3, z: #t20);
+ d{dynamic}.call(1, 2, z: 3);
+ let final core::int #t21 = 1 in let final core::int #t22 = 2 in d{dynamic}.call(#t21, 3, z: #t22);
+ let final core::int #t23 = 1 in d{dynamic}.call(2, 3, z: #t23);
+ f(1, 2, z: 3);
+ let final core::int #t24 = 1 in let final core::int #t25 = 2 in f(#t24, 3, z: #t25);
+ let final core::int #t26 = 1 in f(2, 3, z: #t26);
+ let final self::A #t27 = a in let final core::int #t28 = 1 in let final core::int #t29 = 2 in let final core::int #t30 = 3 in #t27.{self::A::property}{(core::int, core::int, {required z: core::int}) → void}(#t28, #t29, z: #t30){(core::int, core::int, {required z: core::int}) → void};
+ let final self::A #t31 = a in let final core::int #t32 = 1 in let final core::int #t33 = 2 in let final core::int #t34 = 3 in #t31.{self::A::property}{(core::int, core::int, {required z: core::int}) → void}(#t32, #t34, z: #t33){(core::int, core::int, {required z: core::int}) → void};
+ let final self::A #t35 = a in let final core::int #t36 = 1 in let final core::int #t37 = 2 in let final core::int #t38 = 3 in #t35.{self::A::property}{(core::int, core::int, {required z: core::int}) → void}(#t37, #t38, z: #t36){(core::int, core::int, {required z: core::int}) → void};
+ a.{self::A::bar}(1, 2, z: 3){(core::int, core::int, {required z: core::int}) → void};
+ let final self::A #t39 = a in let final core::int #t40 = 1 in let final core::int #t41 = 2 in #t39.{self::A::bar}(#t40, 3, z: #t41){(core::int, core::int, {required z: core::int}) → void};
+ let final self::A #t42 = a in let final core::int #t43 = 1 in #t42.{self::A::bar}(2, 3, z: #t43){(core::int, core::int, {required z: core::int}) → void};
+ local(1, 2, z: 3){(core::int, core::int, {required z: core::int}) → void};
+ let final core::int #t44 = 1 in let final core::int #t45 = 2 in local(#t44, 3, z: #t45){(core::int, core::int, {required z: core::int}) → void};
+ let final core::int #t46 = 1 in local(2, 3, z: #t46){(core::int, core::int, {required z: core::int}) → void};
+}
+static method main() → dynamic {}
+
+constants {
+ #C1 = null
+}
+
+Extra constant evaluation status:
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:77:15 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:77:21 -> IntConstant(2)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:78:18 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:17:18 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:27:7 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:27:13 -> IntConstant(2)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:28:10 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:32:13 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:32:19 -> IntConstant(2)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:33:16 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:35:13 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:35:19 -> IntConstant(2)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:36:16 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:40:9 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:40:15 -> IntConstant(2)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:41:12 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:43:9 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:43:15 -> IntConstant(2)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:44:12 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:48:5 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:48:11 -> IntConstant(2)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:49:8 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:53:5 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:53:11 -> IntConstant(2)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:54:8 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:57:14 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:57:17 -> IntConstant(2)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:57:23 -> IntConstant(3)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:58:14 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:58:23 -> IntConstant(3)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:58:20 -> IntConstant(2)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:59:20 -> IntConstant(2)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:59:23 -> IntConstant(3)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:59:17 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:63:9 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:63:15 -> IntConstant(2)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:64:12 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:68:9 -> IntConstant(1)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:68:15 -> IntConstant(2)
+Evaluated: VariableGet @ org-dartlang-testcase:///all_kinds.dart:69:12 -> IntConstant(1)
+Extra constant evaluation: evaluated: 155, effectively constant: 40
diff --git a/pkg/front_end/testcases/weak.status b/pkg/front_end/testcases/weak.status
index fe8d64f..1f9bcca 100644
--- a/pkg/front_end/testcases/weak.status
+++ b/pkg/front_end/testcases/weak.status
@@ -9,8 +9,6 @@
general/error_recovery/issue_39202.crash: SemiFuzzCrash
general/error_recovery/issue_39058.crash: SemiFuzzFailure
regress/utf_16_le_content.crash: SemiFuzzCrash
-dart2js/late_statics: SemiFuzzFailure # dartbug.com/45854
-dart2js/late_from_dill/main: SemiFuzzFailure # dartbug.com/45854, see also https://dart-review.googlesource.com/c/sdk/+/213768
constructor_tearoffs/call_instantiation: TypeCheckError
constructor_tearoffs/lowering/invalid_redirect: VerificationError
diff --git a/pkg/front_end/tool/_fasta/additional_targets_test.dart b/pkg/front_end/tool/_fasta/additional_targets_test.dart
index e5b3b50..dabba4c 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 @@
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 61caaf3..0c8312e 100644
--- a/pkg/front_end/tool/_fasta/command_line.dart
+++ b/pkg/front_end/tool/_fasta/command_line.dart
@@ -60,6 +60,7 @@
Options.compileSdk,
Options.dumpIr,
Options.enableExperiment,
+ Options.enableUnscheduledExperiments,
Options.excludeSource,
Options.omitPlatform,
Options.fatal,
@@ -106,7 +107,7 @@
final bool verbose = Options.verbose.read(parsedOptions);
if (help) {
- print(computeUsage(programName, verbose).message);
+ print(computeUsage(programName, verbose).problemMessage);
exit(0);
}
@@ -188,6 +189,9 @@
? NnbdMode.Agnostic
: (nnbdStrongMode ? NnbdMode.Strong : NnbdMode.Weak);
+ final bool enableUnscheduledExperiments =
+ Options.enableUnscheduledExperiments.read(parsedOptions);
+
final bool warnOnReachabilityCheck =
Options.warnOnReachabilityCheck.read(parsedOptions);
@@ -247,6 +251,7 @@
..explicitExperimentalFlags = explicitExperimentalFlags
..environmentDefines = noDefines ? null : parsedOptions.defines
..nnbdMode = nnbdMode
+ ..enableUnscheduledExperiments = enableUnscheduledExperiments
..additionalDills = linkDependencies
..emitDeps = !noDeps
..warnOnReachabilityCheck = warnOnReachabilityCheck
@@ -330,7 +335,7 @@
return CompilerContext.runWithOptions<T>(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;
@@ -350,9 +355,10 @@
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 =
@@ -393,7 +399,7 @@
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 55d233a..f75d37e 100644
--- a/pkg/front_end/tool/_fasta/generate_messages.dart
+++ b/pkg/front_end/tool/_fasta/generate_messages.dart
@@ -430,10 +430,10 @@
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 @@
List<String> templateArguments = <String>[];
// 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 @@
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 37f4d7a..3ef774c 100644
--- a/pkg/front_end/tool/dart_doctest_impl.dart
+++ b/pkg/front_end/tool/dart_doctest_impl.dart
@@ -653,7 +653,7 @@
location,
endToken.charEnd - startToken.charOffset,
source.importUri!.toString(),
- message.message);
+ message.problemMessage);
}
CommentString extractComments(CommentToken comment, String rawString) {
diff --git a/tools/VERSION b/tools/VERSION
index 8d77ea2..4f88fa0 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 15
PATCH 0
-PRERELEASE 179
+PRERELEASE 180
PRERELEASE_PATCH 0
\ No newline at end of file