diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/type_info_impl.dart b/pkg/_fe_analyzer_shared/lib/src/parser/type_info_impl.dart index 07d1752630b..099319fa44c 100644 --- a/pkg/_fe_analyzer_shared/lib/src/parser/type_info_impl.dart +++ b/pkg/_fe_analyzer_shared/lib/src/parser/type_info_impl.dart @@ -451,7 +451,6 @@ class VoidType implements TypeInfo { bool looksLikeName(Token token) { return token.kind == IDENTIFIER_TOKEN || optional('this', token) || - optional('super', token) || (token.isIdentifier && // Although `typedef` is a legal identifier, // type `typedef` identifier is not legal and in this situation @@ -795,9 +794,7 @@ class ComplexTypeInfo implements TypeInfo { if (optional('?', next)) { next = next.next!; } - if (!(next.isIdentifier || - optional('this', next) || - optional('super', next))) { + if (!(next.isIdentifier || optional('this', next))) { break; // `Function` used as the name in a function declaration. } } diff --git a/pkg/analyzer/test/generated/utilities_test.dart b/pkg/analyzer/test/generated/utilities_test.dart index 348bd17459e..a95e1f47fd7 100644 --- a/pkg/analyzer/test/generated/utilities_test.dart +++ b/pkg/analyzer/test/generated/utilities_test.dart @@ -2152,6 +2152,7 @@ enum E2 {two; void bar() {}} node, Getter_NodeReplacerTest_test_superConstructorInvocation_2()); } + @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/47741') void test_superFormalParameter() { var findNode = _parseStringToFindNode(r''' class A { diff --git a/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_fields.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_fields.dart.intertwined.expect index 04790ba6cf5..769412af646 100644 --- a/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_fields.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_fields.dart.intertwined.expect @@ -1471,27 +1471,28 @@ parseUnit(class) listener: beginMetadataStar(int) listener: endMetadataStar(0) listener: beginMember() - recoverFromInvalidMember(int, ;, null, null, null, null, null, null, ;, Instance of 'SimpleType', null, DeclarationKind.Class, WrapperClass) - parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', super, DeclarationKind.Class, WrapperClass, false) - listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, ;) - listener: handleIdentifier(int, typeReference) - listener: handleNoTypeArguments(super) - listener: handleType(int, null) - ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false) - reportRecoverableErrorWithToken(super, Instance of 'Template<(Token) => Message>') - listener: handleRecoverableError(Message[ExpectedIdentifierButGotKeyword, 'super' can't be used as an identifier because it's a keyword., Try renaming this to be an identifier that isn't a keyword., {lexeme: super}], super, super) - listener: handleIdentifier(super, fieldDeclaration) - parseFieldInitializerOpt(super, super, null, null, null, null, DeclarationKind.Class, WrapperClass) - listener: beginFieldInitializer(=) - parseExpression(=) - parsePrecedenceExpression(=, 1, true) - parseUnaryExpression(=, true) - parsePrimary(=, expression) - parseLiteralInt(=) - listener: handleLiteralInt(42) - listener: endFieldInitializer(=, ;) - listener: endClassFields(null, null, null, null, null, null, 1, int, ;) - listener: endMember() + isReservedKeyword(super) + indicatesMethodOrField(=) + parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', super, DeclarationKind.Class, WrapperClass, true) + listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, ;) + listener: handleIdentifier(int, typeReference) + listener: handleNoTypeArguments(super) + listener: handleType(int, null) + ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, true) + reportRecoverableErrorWithToken(super, Instance of 'Template<(Token) => Message>') + listener: handleRecoverableError(Message[ExpectedIdentifierButGotKeyword, 'super' can't be used as an identifier because it's a keyword., Try renaming this to be an identifier that isn't a keyword., {lexeme: super}], super, super) + listener: handleIdentifier(super, fieldDeclaration) + parseFieldInitializerOpt(super, super, null, null, null, null, DeclarationKind.Class, WrapperClass) + listener: beginFieldInitializer(=) + parseExpression(=) + parsePrecedenceExpression(=, 1, true) + parseUnaryExpression(=, true) + parsePrimary(=, expression) + parseLiteralInt(=) + listener: handleLiteralInt(42) + listener: endFieldInitializer(=, ;) + listener: endClassFields(null, null, null, null, null, null, 1, int, ;) + listener: endMember() notEofOrValue(}, int) parseClassOrMixinOrExtensionOrEnumMemberImpl(;, DeclarationKind.Class, WrapperClass) parseMetadataStar(;) diff --git a/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_methods.dart.expect b/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_methods.dart.expect index eb90b6750ad..bf58a68733b 100644 --- a/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_methods.dart.expect +++ b/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_methods.dart.expect @@ -308,14 +308,6 @@ parser/error_recovery/keyword_named_class_methods:282:7: 'super' can't be used a int super(int x) { ^^^^^ -parser/error_recovery/keyword_named_class_methods:282:7: Expected ';' after this. - int super(int x) { - ^^^^^ - -parser/error_recovery/keyword_named_class_methods:282:12: Expected an identifier, but got '('. - int super(int x) { - ^ - parser/error_recovery/keyword_named_class_methods:287:7: 'switch' can't be used as an identifier because it's a keyword. int switch(int x) { ^^^^^^ @@ -3891,23 +3883,12 @@ beginCompilationUnit(class) beginMetadataStar(int) endMetadataStar(0) beginMember() - beginFields(DeclarationKind.Class, null, null, null, null, null, null, }) + beginMethod(DeclarationKind.Class, null, null, null, null, null, super) handleIdentifier(int, typeReference) handleNoTypeArguments(super) handleType(int, null) handleRecoverableError(Message[ExpectedIdentifierButGotKeyword, 'super' can't be used as an identifier because it's a keyword., Try renaming this to be an identifier that isn't a keyword., {lexeme: super}], super, super) - handleIdentifier(super, fieldDeclaration) - handleNoFieldInitializer(() - handleRecoverableError(Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}], super, super) - endClassFields(null, null, null, null, null, null, 1, int, ;) - endMember() - beginMetadataStar(() - endMetadataStar(0) - beginMember() - beginMethod(DeclarationKind.Class, null, null, null, null, null, () - handleNoType(;) - handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got '('., Try inserting an identifier before '('., {lexeme: (}], (, () - handleIdentifier(, methodDeclaration) + handleIdentifier(super, methodDeclaration) handleNoTypeVariables(() beginFormalParameters((, MemberKind.NonStaticMethod) beginMetadataStar(int) @@ -3956,7 +3937,7 @@ beginCompilationUnit(class) endBinaryExpression(+) endReturnStatement(true, return, ;) endBlockFunctionBody(2, {, }) - endClassMethod(null, , (, null, }) + endClassMethod(null, int, (, null, }) endMember() beginMetadataStar(int) endMetadataStar(0) @@ -4762,7 +4743,7 @@ beginCompilationUnit(class) endBlockFunctionBody(2, {, }) endClassMethod(null, int, (, null, }) endMember() - endClassOrMixinOrExtensionBody(DeclarationKind.Class, 71, {, }) + endClassOrMixinOrExtensionBody(DeclarationKind.Class, 70, {, }) endClassDeclaration(class, }) endTopLevelDeclaration() endCompilationUnit(1, ) diff --git a/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_methods.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_methods.dart.intertwined.expect index 08d5d988283..22c9cba2cb3 100644 --- a/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_methods.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_methods.dart.intertwined.expect @@ -8560,164 +8560,141 @@ parseUnit(class) listener: beginMetadataStar(int) listener: endMetadataStar(0) listener: beginMember() - recoverFromInvalidMember(int, }, null, null, null, null, null, null, }, Instance of 'SimpleType', null, DeclarationKind.Class, WrapperClass) - parseFields(}, null, null, null, null, null, null, }, Instance of 'SimpleType', super, DeclarationKind.Class, WrapperClass, false) - listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, }) - listener: handleIdentifier(int, typeReference) - listener: handleNoTypeArguments(super) - listener: handleType(int, null) - ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false) - reportRecoverableErrorWithToken(super, Instance of 'Template<(Token) => Message>') - listener: handleRecoverableError(Message[ExpectedIdentifierButGotKeyword, 'super' can't be used as an identifier because it's a keyword., Try renaming this to be an identifier that isn't a keyword., {lexeme: super}], super, super) - listener: handleIdentifier(super, fieldDeclaration) - parseFieldInitializerOpt(super, super, null, null, null, null, DeclarationKind.Class, WrapperClass) - listener: handleNoFieldInitializer(() - ensureSemicolon(super) - reportRecoverableError(super, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}]) - listener: handleRecoverableError(Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}], super, super) - rewriter() - listener: endClassFields(null, null, null, null, null, null, 1, int, ;) - listener: endMember() - notEofOrValue(}, () - parseClassOrMixinOrExtensionOrEnumMemberImpl(;, DeclarationKind.Class, WrapperClass) - parseMetadataStar(;) - listener: beginMetadataStar(() - listener: endMetadataStar(0) - listener: beginMember() - recoverFromInvalidMember(;, ;, null, null, null, null, null, null, ;, Instance of 'NoType', null, DeclarationKind.Class, WrapperClass) - parseMethod(;, null, null, null, null, null, null, ;, Instance of 'NoType', null, (, DeclarationKind.Class, WrapperClass, false) - listener: beginMethod(DeclarationKind.Class, null, null, null, null, null, () - listener: handleNoType(;) - ensureIdentifierPotentiallyRecovered(;, methodDeclaration, false) - insertSyntheticIdentifier(;, methodDeclaration, message: null, messageOnToken: null) - reportRecoverableError((, Message[ExpectedIdentifier, Expected an identifier, but got '('., Try inserting an identifier before '('., {lexeme: (}]) - listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got '('., Try inserting an identifier before '('., {lexeme: (}], (, () - rewriter() - listener: handleIdentifier(, methodDeclaration) - parseQualifiedRestOpt(, methodDeclarationContinuation) - parseMethodTypeVar() - listener: handleNoTypeVariables(() - parseGetterOrFormalParameters(, (, false, MemberKind.NonStaticMethod) - parseFormalParameters(, MemberKind.NonStaticMethod) - parseFormalParametersRest((, MemberKind.NonStaticMethod) - listener: beginFormalParameters((, MemberKind.NonStaticMethod) - parseFormalParameter((, FormalParameterKind.mandatory, MemberKind.NonStaticMethod) - parseMetadataStar(() - listener: beginMetadataStar(int) - listener: endMetadataStar(0) - listener: beginFormalParameter(int, MemberKind.NonStaticMethod, null, null, null) - listener: handleIdentifier(int, typeReference) - listener: handleNoTypeArguments(x) - listener: handleType(int, null) - ensureIdentifier(int, formalParameterDeclaration) - listener: handleIdentifier(x, formalParameterDeclaration) - listener: handleFormalParameterWithoutValue()) - listener: endFormalParameter(null, null, null, x, null, null, FormalParameterKind.mandatory, MemberKind.NonStaticMethod) - listener: endFormalParameters(1, (, ), MemberKind.NonStaticMethod) - parseInitializersOpt()) - listener: handleNoInitializers() - parseAsyncModifierOpt()) - listener: handleAsyncModifier(null, null) - inPlainSync() + isReservedKeyword(super) + indicatesMethodOrField(() + parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, super, DeclarationKind.Class, WrapperClass, true) + listener: beginMethod(DeclarationKind.Class, null, null, null, null, null, super) + listener: handleIdentifier(int, typeReference) + listener: handleNoTypeArguments(super) + listener: handleType(int, null) + ensureIdentifierPotentiallyRecovered(int, methodDeclaration, true) + reportRecoverableErrorWithToken(super, Instance of 'Template<(Token) => Message>') + listener: handleRecoverableError(Message[ExpectedIdentifierButGotKeyword, 'super' can't be used as an identifier because it's a keyword., Try renaming this to be an identifier that isn't a keyword., {lexeme: super}], super, super) + listener: handleIdentifier(super, methodDeclaration) + parseQualifiedRestOpt(super, methodDeclarationContinuation) + parseMethodTypeVar(super) + listener: handleNoTypeVariables(() + parseGetterOrFormalParameters(super, super, false, MemberKind.NonStaticMethod) + parseFormalParameters(super, MemberKind.NonStaticMethod) + parseFormalParametersRest((, MemberKind.NonStaticMethod) + listener: beginFormalParameters((, MemberKind.NonStaticMethod) + parseFormalParameter((, FormalParameterKind.mandatory, MemberKind.NonStaticMethod) + parseMetadataStar(() + listener: beginMetadataStar(int) + listener: endMetadataStar(0) + listener: beginFormalParameter(int, MemberKind.NonStaticMethod, null, null, null) + listener: handleIdentifier(int, typeReference) + listener: handleNoTypeArguments(x) + listener: handleType(int, null) + ensureIdentifier(int, formalParameterDeclaration) + listener: handleIdentifier(x, formalParameterDeclaration) + listener: handleFormalParameterWithoutValue()) + listener: endFormalParameter(null, null, null, x, null, null, FormalParameterKind.mandatory, MemberKind.NonStaticMethod) + listener: endFormalParameters(1, (, ), MemberKind.NonStaticMethod) + parseInitializersOpt()) + listener: handleNoInitializers() + parseAsyncModifierOpt()) + listener: handleAsyncModifier(null, null) inPlainSync() - parseFunctionBody(), false, true) - listener: beginBlockFunctionBody({) - notEofOrValue(}, if) - parseStatement({) - parseStatementX({) - parseIfStatement({) - listener: beginIfStatement(if) - ensureParenthesizedCondition(if) - parseExpressionInParenthesisRest(() - parseExpression(() - parsePrecedenceExpression((, 1, true) - parseUnaryExpression((, true) - parsePrimary((, expression) - parseSendOrFunctionLiteral((, expression) - parseSend((, expression) - isNextIdentifier(() - ensureIdentifier((, expression) - listener: handleIdentifier(x, expression) - listener: handleNoTypeArguments(==) - parseArgumentsOpt(x) - listener: handleNoArguments(==) - listener: handleSend(x, ==) - listener: beginBinaryExpression(==) - parsePrecedenceExpression(==, 8, true) - parseUnaryExpression(==, true) - parsePrimary(==, expression) - parseLiteralInt(==) - listener: handleLiteralInt(0) - listener: endBinaryExpression(==) - ensureCloseParen(0, () - listener: handleParenthesizedCondition(() - listener: beginThenStatement(return) - parseStatement()) - parseStatementX()) - parseReturnStatement()) - listener: beginReturnStatement(return) - parseExpression(return) - parsePrecedenceExpression(return, 1, true) - parseUnaryExpression(return, true) - parsePrimary(return, expression) - parseLiteralInt(return) - listener: handleLiteralInt(42) - ensureSemicolon(42) - listener: endReturnStatement(true, return, ;) - inGenerator() - listener: endThenStatement(;) - listener: endIfStatement(if, null) - notEofOrValue(}, return) - parseStatement(;) - parseStatementX(;) - parseReturnStatement(;) - listener: beginReturnStatement(return) - parseExpression(return) - parsePrecedenceExpression(return, 1, true) - parseUnaryExpression(return, true) - parsePrimary(return, expression) - parseSuperExpression(return, expression) - listener: handleSuperExpression(super, expression) - listener: handleNoTypeArguments(() - parseArguments(super) - parseArgumentsRest(() - listener: beginArguments(() - parseExpression(() - parsePrecedenceExpression((, 1, true) - parseUnaryExpression((, true) - parsePrimary((, expression) - parseSendOrFunctionLiteral((, expression) - parseSend((, expression) - isNextIdentifier(() - ensureIdentifier((, expression) - listener: handleIdentifier(x, expression) - listener: handleNoTypeArguments(-) - parseArgumentsOpt(x) - listener: handleNoArguments(-) - listener: handleSend(x, -) - listener: beginBinaryExpression(-) - parsePrecedenceExpression(-, 14, true) - parseUnaryExpression(-, true) - parsePrimary(-, expression) - parseLiteralInt(-) - listener: handleLiteralInt(1) - listener: endBinaryExpression(-) - listener: endArguments(1, (, )) - listener: handleSend(super, +) - listener: beginBinaryExpression(+) - parsePrecedenceExpression(+, 14, true) - parseUnaryExpression(+, true) - parsePrimary(+, expression) - parseLiteralInt(+) - listener: handleLiteralInt(1) - listener: endBinaryExpression(+) - ensureSemicolon(1) - listener: endReturnStatement(true, return, ;) - inGenerator() - notEofOrValue(}, }) - listener: endBlockFunctionBody(2, {, }) - listener: endClassMethod(null, , (, null, }) - listener: endMember() + inPlainSync() + parseFunctionBody(), false, true) + listener: beginBlockFunctionBody({) + notEofOrValue(}, if) + parseStatement({) + parseStatementX({) + parseIfStatement({) + listener: beginIfStatement(if) + ensureParenthesizedCondition(if) + parseExpressionInParenthesisRest(() + parseExpression(() + parsePrecedenceExpression((, 1, true) + parseUnaryExpression((, true) + parsePrimary((, expression) + parseSendOrFunctionLiteral((, expression) + parseSend((, expression) + isNextIdentifier(() + ensureIdentifier((, expression) + listener: handleIdentifier(x, expression) + listener: handleNoTypeArguments(==) + parseArgumentsOpt(x) + listener: handleNoArguments(==) + listener: handleSend(x, ==) + listener: beginBinaryExpression(==) + parsePrecedenceExpression(==, 8, true) + parseUnaryExpression(==, true) + parsePrimary(==, expression) + parseLiteralInt(==) + listener: handleLiteralInt(0) + listener: endBinaryExpression(==) + ensureCloseParen(0, () + listener: handleParenthesizedCondition(() + listener: beginThenStatement(return) + parseStatement()) + parseStatementX()) + parseReturnStatement()) + listener: beginReturnStatement(return) + parseExpression(return) + parsePrecedenceExpression(return, 1, true) + parseUnaryExpression(return, true) + parsePrimary(return, expression) + parseLiteralInt(return) + listener: handleLiteralInt(42) + ensureSemicolon(42) + listener: endReturnStatement(true, return, ;) + inGenerator() + listener: endThenStatement(;) + listener: endIfStatement(if, null) + notEofOrValue(}, return) + parseStatement(;) + parseStatementX(;) + parseReturnStatement(;) + listener: beginReturnStatement(return) + parseExpression(return) + parsePrecedenceExpression(return, 1, true) + parseUnaryExpression(return, true) + parsePrimary(return, expression) + parseSuperExpression(return, expression) + listener: handleSuperExpression(super, expression) + listener: handleNoTypeArguments(() + parseArguments(super) + parseArgumentsRest(() + listener: beginArguments(() + parseExpression(() + parsePrecedenceExpression((, 1, true) + parseUnaryExpression((, true) + parsePrimary((, expression) + parseSendOrFunctionLiteral((, expression) + parseSend((, expression) + isNextIdentifier(() + ensureIdentifier((, expression) + listener: handleIdentifier(x, expression) + listener: handleNoTypeArguments(-) + parseArgumentsOpt(x) + listener: handleNoArguments(-) + listener: handleSend(x, -) + listener: beginBinaryExpression(-) + parsePrecedenceExpression(-, 14, true) + parseUnaryExpression(-, true) + parsePrimary(-, expression) + parseLiteralInt(-) + listener: handleLiteralInt(1) + listener: endBinaryExpression(-) + listener: endArguments(1, (, )) + listener: handleSend(super, +) + listener: beginBinaryExpression(+) + parsePrecedenceExpression(+, 14, true) + parseUnaryExpression(+, true) + parsePrimary(+, expression) + parseLiteralInt(+) + listener: handleLiteralInt(1) + listener: endBinaryExpression(+) + ensureSemicolon(1) + listener: endReturnStatement(true, return, ;) + inGenerator() + notEofOrValue(}, }) + listener: endBlockFunctionBody(2, {, }) + listener: endClassMethod(null, int, (, null, }) + listener: endMember() notEofOrValue(}, int) parseClassOrMixinOrExtensionOrEnumMemberImpl(}, DeclarationKind.Class, WrapperClass) parseMetadataStar(}) @@ -10789,7 +10766,7 @@ parseUnit(class) listener: endClassMethod(null, int, (, null, }) listener: endMember() notEofOrValue(}, }) - listener: endClassOrMixinOrExtensionBody(DeclarationKind.Class, 71, {, }) + listener: endClassOrMixinOrExtensionBody(DeclarationKind.Class, 70, {, }) listener: endClassDeclaration(class, }) listener: endTopLevelDeclaration() reportAllErrorTokens(class) diff --git a/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_methods.dart.parser.expect b/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_methods.dart.parser.expect index 5eaa7cd4284..70d958ed331 100644 --- a/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_methods.dart.parser.expect +++ b/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_methods.dart.parser.expect @@ -281,7 +281,7 @@ if (x == 0) return 42; return static(x-1) + 1; } -int super;*synthetic*(int x) { +int super(int x) { if (x == 0) return 42; return super(x-1) + 1; } @@ -629,7 +629,7 @@ if[KeywordToken] ([BeginToken]x[StringToken] ==[SimpleToken] 0[StringToken])[Sim return[KeywordToken] static[KeywordToken]([BeginToken]x[StringToken]-[SimpleToken]1[StringToken])[SimpleToken] +[SimpleToken] 1[StringToken];[SimpleToken] }[SimpleToken] -int[StringToken] super[KeywordToken];[SyntheticToken][SyntheticStringToken]([BeginToken]int[StringToken] x[StringToken])[SimpleToken] {[BeginToken] +int[StringToken] super[KeywordToken]([BeginToken]int[StringToken] x[StringToken])[SimpleToken] {[BeginToken] if[KeywordToken] ([BeginToken]x[StringToken] ==[SimpleToken] 0[StringToken])[SimpleToken] return[KeywordToken] 42[StringToken];[SimpleToken] return[KeywordToken] super[KeywordToken]([BeginToken]x[StringToken]-[SimpleToken]1[StringToken])[SimpleToken] +[SimpleToken] 1[StringToken];[SimpleToken] }[SimpleToken] diff --git a/pkg/front_end/parser_testcases/error_recovery/keyword_named_top_level_fields.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/keyword_named_top_level_fields.dart.intertwined.expect index a0b0eaa1816..b2228b8df29 100644 --- a/pkg/front_end/parser_testcases/error_recovery/keyword_named_top_level_fields.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/keyword_named_top_level_fields.dart.intertwined.expect @@ -1444,12 +1444,14 @@ parseUnit(int) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(int) - parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', super, DeclarationKind.TopLevel, null, false) + isReservedKeyword(super) + indicatesMethodOrField(=) + parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', super, DeclarationKind.TopLevel, null, true) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, ;) listener: handleIdentifier(int, typeReference) listener: handleNoTypeArguments(super) listener: handleType(int, null) - ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false) + ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, true) reportRecoverableErrorWithToken(super, Instance of 'Template<(Token) => Message>') listener: handleRecoverableError(Message[ExpectedIdentifierButGotKeyword, 'super' can't be used as an identifier because it's a keyword., Try renaming this to be an identifier that isn't a keyword., {lexeme: super}], super, super) listener: handleIdentifier(super, topLevelVariableDeclaration) diff --git a/pkg/front_end/parser_testcases/error_recovery/keyword_named_top_level_methods.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/keyword_named_top_level_methods.dart.intertwined.expect index 09deafa724c..bad4dea292f 100644 --- a/pkg/front_end/parser_testcases/error_recovery/keyword_named_top_level_methods.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/keyword_named_top_level_methods.dart.intertwined.expect @@ -8308,12 +8308,14 @@ parseUnit(int) listener: endMetadataStar(0) parseTopLevelMemberImpl(}) listener: beginTopLevelMember(int) - parseTopLevelMethod(}, null, }, Instance of 'SimpleType', null, super, false) + isReservedKeyword(super) + indicatesMethodOrField(() + parseTopLevelMethod(}, null, }, Instance of 'SimpleType', null, super, true) listener: beginTopLevelMethod(}, null) listener: handleIdentifier(int, typeReference) listener: handleNoTypeArguments(super) listener: handleType(int, null) - ensureIdentifierPotentiallyRecovered(int, topLevelFunctionDeclaration, false) + ensureIdentifierPotentiallyRecovered(int, topLevelFunctionDeclaration, true) reportRecoverableErrorWithToken(super, Instance of 'Template<(Token) => Message>') listener: handleRecoverableError(Message[ExpectedIdentifierButGotKeyword, 'super' can't be used as an identifier because it's a keyword., Try renaming this to be an identifier that isn't a keyword., {lexeme: super}], super, super) listener: handleIdentifier(super, topLevelFunctionDeclaration) diff --git a/pkg/front_end/testcases/super_parameters/typed_super_parameter.dart b/pkg/front_end/testcases/super_parameters/typed_super_parameter.dart deleted file mode 100644 index a0f94cc477c..00000000000 --- a/pkg/front_end/testcases/super_parameters/typed_super_parameter.dart +++ /dev/null @@ -1,51 +0,0 @@ -// 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 A1 { - final int foo; - A1(int this.foo); -} - -class B1 extends A1 { - B1(int super.foo); -} - -class A2 { - final int Function(int) foo; - A2(int Function(int) this.foo); -} - -class B2 extends A2 { - B2(int Function(int) super.foo); -} - -class A3 { - final int Function(int) foo; - A3(int this.foo(int)); -} - -class B3 extends A3 { - B3(int super.foo(int)); -} - -class A4 { - final void Function() Function(void Function()) foo; - A4(void Function() this.foo(void Function())); -} - -class B4 extends A4 { - B4(void Function() super.foo(void Function())); -} - - -class A5 { - final void Function() Function(void Function()) foo; - A5(void Function() Function(void Function()) this.foo); -} - -class B5 extends A5 { - B5(void Function() Function(void Function()) super.foo); -} - -main() {} diff --git a/pkg/front_end/testcases/super_parameters/typed_super_parameter.dart.strong.expect b/pkg/front_end/testcases/super_parameters/typed_super_parameter.dart.strong.expect deleted file mode 100644 index aecf2d6af23..00000000000 --- a/pkg/front_end/testcases/super_parameters/typed_super_parameter.dart.strong.expect +++ /dev/null @@ -1,93 +0,0 @@ -library /*isNonNullableByDefault*/; -// -// Problems in library: -// -// pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:11:3: Error: The superclass, 'A1', has no unnamed constructor that takes no arguments. -// B1(int super.foo); -// ^^ -// -// pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:20:3: Error: The superclass, 'A2', has no unnamed constructor that takes no arguments. -// B2(int Function(int) super.foo); -// ^^ -// -// pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:29:3: Error: The superclass, 'A3', has no unnamed constructor that takes no arguments. -// B3(int super.foo(int)); -// ^^ -// -// pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:38:3: Error: The superclass, 'A4', has no unnamed constructor that takes no arguments. -// B4(void Function() super.foo(void Function())); -// ^^ -// -// pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:48:3: Error: The superclass, 'A5', has no unnamed constructor that takes no arguments. -// B5(void Function() Function(void Function()) super.foo); -// ^^ -// -import self as self; -import "dart:core" as core; - -class A1 extends core::Object { - final field core::int foo; - constructor •(core::int foo) → self::A1 - : self::A1::foo = foo, super core::Object::•() - ; -} -class B1 extends self::A1 { - constructor •(core::int foo) → self::B1 - : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:11:3: Error: The superclass, 'A1', has no unnamed constructor that takes no arguments. - B1(int super.foo); - ^^" - ; -} -class A2 extends core::Object { - final field (core::int) → core::int foo; - constructor •((core::int) → core::int foo) → self::A2 - : self::A2::foo = foo, super core::Object::•() - ; -} -class B2 extends self::A2 { - constructor •((core::int) → core::int foo) → self::B2 - : final dynamic #t2 = invalid-expression "pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:20:3: Error: The superclass, 'A2', has no unnamed constructor that takes no arguments. - B2(int Function(int) super.foo); - ^^" - ; -} -class A3 extends core::Object { - final field (core::int) → core::int foo; - constructor •((dynamic) → core::int foo) → self::A3 - : self::A3::foo = foo, super core::Object::•() - ; -} -class B3 extends self::A3 { - constructor •((dynamic) → core::int foo) → self::B3 - : final dynamic #t3 = invalid-expression "pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:29:3: Error: The superclass, 'A3', has no unnamed constructor that takes no arguments. - B3(int super.foo(int)); - ^^" - ; -} -class A4 extends core::Object { - final field (() → void) → () → void foo; - constructor •((() → void) → () → void foo) → self::A4 - : self::A4::foo = foo, super core::Object::•() - ; -} -class B4 extends self::A4 { - constructor •((() → void) → () → void foo) → self::B4 - : final dynamic #t4 = invalid-expression "pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:38:3: Error: The superclass, 'A4', has no unnamed constructor that takes no arguments. - B4(void Function() super.foo(void Function())); - ^^" - ; -} -class A5 extends core::Object { - final field (() → void) → () → void foo; - constructor •((() → void) → () → void foo) → self::A5 - : self::A5::foo = foo, super core::Object::•() - ; -} -class B5 extends self::A5 { - constructor •((() → void) → () → void foo) → self::B5 - : final dynamic #t5 = invalid-expression "pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:48:3: Error: The superclass, 'A5', has no unnamed constructor that takes no arguments. - B5(void Function() Function(void Function()) super.foo); - ^^" - ; -} -static method main() → dynamic {} diff --git a/pkg/front_end/testcases/super_parameters/typed_super_parameter.dart.strong.transformed.expect b/pkg/front_end/testcases/super_parameters/typed_super_parameter.dart.strong.transformed.expect deleted file mode 100644 index aecf2d6af23..00000000000 --- a/pkg/front_end/testcases/super_parameters/typed_super_parameter.dart.strong.transformed.expect +++ /dev/null @@ -1,93 +0,0 @@ -library /*isNonNullableByDefault*/; -// -// Problems in library: -// -// pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:11:3: Error: The superclass, 'A1', has no unnamed constructor that takes no arguments. -// B1(int super.foo); -// ^^ -// -// pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:20:3: Error: The superclass, 'A2', has no unnamed constructor that takes no arguments. -// B2(int Function(int) super.foo); -// ^^ -// -// pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:29:3: Error: The superclass, 'A3', has no unnamed constructor that takes no arguments. -// B3(int super.foo(int)); -// ^^ -// -// pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:38:3: Error: The superclass, 'A4', has no unnamed constructor that takes no arguments. -// B4(void Function() super.foo(void Function())); -// ^^ -// -// pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:48:3: Error: The superclass, 'A5', has no unnamed constructor that takes no arguments. -// B5(void Function() Function(void Function()) super.foo); -// ^^ -// -import self as self; -import "dart:core" as core; - -class A1 extends core::Object { - final field core::int foo; - constructor •(core::int foo) → self::A1 - : self::A1::foo = foo, super core::Object::•() - ; -} -class B1 extends self::A1 { - constructor •(core::int foo) → self::B1 - : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:11:3: Error: The superclass, 'A1', has no unnamed constructor that takes no arguments. - B1(int super.foo); - ^^" - ; -} -class A2 extends core::Object { - final field (core::int) → core::int foo; - constructor •((core::int) → core::int foo) → self::A2 - : self::A2::foo = foo, super core::Object::•() - ; -} -class B2 extends self::A2 { - constructor •((core::int) → core::int foo) → self::B2 - : final dynamic #t2 = invalid-expression "pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:20:3: Error: The superclass, 'A2', has no unnamed constructor that takes no arguments. - B2(int Function(int) super.foo); - ^^" - ; -} -class A3 extends core::Object { - final field (core::int) → core::int foo; - constructor •((dynamic) → core::int foo) → self::A3 - : self::A3::foo = foo, super core::Object::•() - ; -} -class B3 extends self::A3 { - constructor •((dynamic) → core::int foo) → self::B3 - : final dynamic #t3 = invalid-expression "pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:29:3: Error: The superclass, 'A3', has no unnamed constructor that takes no arguments. - B3(int super.foo(int)); - ^^" - ; -} -class A4 extends core::Object { - final field (() → void) → () → void foo; - constructor •((() → void) → () → void foo) → self::A4 - : self::A4::foo = foo, super core::Object::•() - ; -} -class B4 extends self::A4 { - constructor •((() → void) → () → void foo) → self::B4 - : final dynamic #t4 = invalid-expression "pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:38:3: Error: The superclass, 'A4', has no unnamed constructor that takes no arguments. - B4(void Function() super.foo(void Function())); - ^^" - ; -} -class A5 extends core::Object { - final field (() → void) → () → void foo; - constructor •((() → void) → () → void foo) → self::A5 - : self::A5::foo = foo, super core::Object::•() - ; -} -class B5 extends self::A5 { - constructor •((() → void) → () → void foo) → self::B5 - : final dynamic #t5 = invalid-expression "pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:48:3: Error: The superclass, 'A5', has no unnamed constructor that takes no arguments. - B5(void Function() Function(void Function()) super.foo); - ^^" - ; -} -static method main() → dynamic {} diff --git a/pkg/front_end/testcases/super_parameters/typed_super_parameter.dart.textual_outline.expect b/pkg/front_end/testcases/super_parameters/typed_super_parameter.dart.textual_outline.expect deleted file mode 100644 index f29b9814dbc..00000000000 --- a/pkg/front_end/testcases/super_parameters/typed_super_parameter.dart.textual_outline.expect +++ /dev/null @@ -1,36 +0,0 @@ -class A1 { - final int foo; - A1(int this.foo); -} -class B1 extends A1 { - B1(int super.foo); -} -class A2 { - final int Function(int) foo; - A2(int Function(int) this.foo); -} -class B2 extends A2 { - B2(int Function(int) super.foo); -} -class A3 { - final int Function(int) foo; - A3(int this.foo(int)); -} -class B3 extends A3 { - B3(int super.foo(int)); -} -class A4 { - final void Function() Function(void Function()) foo; - A4(void Function() this.foo(void Function())); -} -class B4 extends A4 { - B4(void Function() super.foo(void Function())); -} -class A5 { - final void Function() Function(void Function()) foo; - A5(void Function() Function(void Function()) this.foo); -} -class B5 extends A5 { - B5(void Function() Function(void Function()) super.foo); -} -main() {} diff --git a/pkg/front_end/testcases/super_parameters/typed_super_parameter.dart.weak.expect b/pkg/front_end/testcases/super_parameters/typed_super_parameter.dart.weak.expect deleted file mode 100644 index aecf2d6af23..00000000000 --- a/pkg/front_end/testcases/super_parameters/typed_super_parameter.dart.weak.expect +++ /dev/null @@ -1,93 +0,0 @@ -library /*isNonNullableByDefault*/; -// -// Problems in library: -// -// pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:11:3: Error: The superclass, 'A1', has no unnamed constructor that takes no arguments. -// B1(int super.foo); -// ^^ -// -// pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:20:3: Error: The superclass, 'A2', has no unnamed constructor that takes no arguments. -// B2(int Function(int) super.foo); -// ^^ -// -// pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:29:3: Error: The superclass, 'A3', has no unnamed constructor that takes no arguments. -// B3(int super.foo(int)); -// ^^ -// -// pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:38:3: Error: The superclass, 'A4', has no unnamed constructor that takes no arguments. -// B4(void Function() super.foo(void Function())); -// ^^ -// -// pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:48:3: Error: The superclass, 'A5', has no unnamed constructor that takes no arguments. -// B5(void Function() Function(void Function()) super.foo); -// ^^ -// -import self as self; -import "dart:core" as core; - -class A1 extends core::Object { - final field core::int foo; - constructor •(core::int foo) → self::A1 - : self::A1::foo = foo, super core::Object::•() - ; -} -class B1 extends self::A1 { - constructor •(core::int foo) → self::B1 - : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:11:3: Error: The superclass, 'A1', has no unnamed constructor that takes no arguments. - B1(int super.foo); - ^^" - ; -} -class A2 extends core::Object { - final field (core::int) → core::int foo; - constructor •((core::int) → core::int foo) → self::A2 - : self::A2::foo = foo, super core::Object::•() - ; -} -class B2 extends self::A2 { - constructor •((core::int) → core::int foo) → self::B2 - : final dynamic #t2 = invalid-expression "pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:20:3: Error: The superclass, 'A2', has no unnamed constructor that takes no arguments. - B2(int Function(int) super.foo); - ^^" - ; -} -class A3 extends core::Object { - final field (core::int) → core::int foo; - constructor •((dynamic) → core::int foo) → self::A3 - : self::A3::foo = foo, super core::Object::•() - ; -} -class B3 extends self::A3 { - constructor •((dynamic) → core::int foo) → self::B3 - : final dynamic #t3 = invalid-expression "pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:29:3: Error: The superclass, 'A3', has no unnamed constructor that takes no arguments. - B3(int super.foo(int)); - ^^" - ; -} -class A4 extends core::Object { - final field (() → void) → () → void foo; - constructor •((() → void) → () → void foo) → self::A4 - : self::A4::foo = foo, super core::Object::•() - ; -} -class B4 extends self::A4 { - constructor •((() → void) → () → void foo) → self::B4 - : final dynamic #t4 = invalid-expression "pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:38:3: Error: The superclass, 'A4', has no unnamed constructor that takes no arguments. - B4(void Function() super.foo(void Function())); - ^^" - ; -} -class A5 extends core::Object { - final field (() → void) → () → void foo; - constructor •((() → void) → () → void foo) → self::A5 - : self::A5::foo = foo, super core::Object::•() - ; -} -class B5 extends self::A5 { - constructor •((() → void) → () → void foo) → self::B5 - : final dynamic #t5 = invalid-expression "pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:48:3: Error: The superclass, 'A5', has no unnamed constructor that takes no arguments. - B5(void Function() Function(void Function()) super.foo); - ^^" - ; -} -static method main() → dynamic {} diff --git a/pkg/front_end/testcases/super_parameters/typed_super_parameter.dart.weak.outline.expect b/pkg/front_end/testcases/super_parameters/typed_super_parameter.dart.weak.outline.expect deleted file mode 100644 index 70b9d6ee1f0..00000000000 --- a/pkg/front_end/testcases/super_parameters/typed_super_parameter.dart.weak.outline.expect +++ /dev/null @@ -1,51 +0,0 @@ -library /*isNonNullableByDefault*/; -import self as self; -import "dart:core" as core; - -class A1 extends core::Object { - final field core::int foo; - constructor •(core::int foo) → self::A1 - ; -} -class B1 extends self::A1 { - constructor •(core::int foo) → self::B1 - ; -} -class A2 extends core::Object { - final field (core::int) → core::int foo; - constructor •((core::int) → core::int foo) → self::A2 - ; -} -class B2 extends self::A2 { - constructor •((core::int) → core::int foo) → self::B2 - ; -} -class A3 extends core::Object { - final field (core::int) → core::int foo; - constructor •((dynamic) → core::int foo) → self::A3 - ; -} -class B3 extends self::A3 { - constructor •((dynamic) → core::int foo) → self::B3 - ; -} -class A4 extends core::Object { - final field (() → void) → () → void foo; - constructor •((() → void) → () → void foo) → self::A4 - ; -} -class B4 extends self::A4 { - constructor •((() → void) → () → void foo) → self::B4 - ; -} -class A5 extends core::Object { - final field (() → void) → () → void foo; - constructor •((() → void) → () → void foo) → self::A5 - ; -} -class B5 extends self::A5 { - constructor •((() → void) → () → void foo) → self::B5 - ; -} -static method main() → dynamic - ; diff --git a/pkg/front_end/testcases/super_parameters/typed_super_parameter.dart.weak.transformed.expect b/pkg/front_end/testcases/super_parameters/typed_super_parameter.dart.weak.transformed.expect deleted file mode 100644 index aecf2d6af23..00000000000 --- a/pkg/front_end/testcases/super_parameters/typed_super_parameter.dart.weak.transformed.expect +++ /dev/null @@ -1,93 +0,0 @@ -library /*isNonNullableByDefault*/; -// -// Problems in library: -// -// pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:11:3: Error: The superclass, 'A1', has no unnamed constructor that takes no arguments. -// B1(int super.foo); -// ^^ -// -// pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:20:3: Error: The superclass, 'A2', has no unnamed constructor that takes no arguments. -// B2(int Function(int) super.foo); -// ^^ -// -// pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:29:3: Error: The superclass, 'A3', has no unnamed constructor that takes no arguments. -// B3(int super.foo(int)); -// ^^ -// -// pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:38:3: Error: The superclass, 'A4', has no unnamed constructor that takes no arguments. -// B4(void Function() super.foo(void Function())); -// ^^ -// -// pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:48:3: Error: The superclass, 'A5', has no unnamed constructor that takes no arguments. -// B5(void Function() Function(void Function()) super.foo); -// ^^ -// -import self as self; -import "dart:core" as core; - -class A1 extends core::Object { - final field core::int foo; - constructor •(core::int foo) → self::A1 - : self::A1::foo = foo, super core::Object::•() - ; -} -class B1 extends self::A1 { - constructor •(core::int foo) → self::B1 - : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:11:3: Error: The superclass, 'A1', has no unnamed constructor that takes no arguments. - B1(int super.foo); - ^^" - ; -} -class A2 extends core::Object { - final field (core::int) → core::int foo; - constructor •((core::int) → core::int foo) → self::A2 - : self::A2::foo = foo, super core::Object::•() - ; -} -class B2 extends self::A2 { - constructor •((core::int) → core::int foo) → self::B2 - : final dynamic #t2 = invalid-expression "pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:20:3: Error: The superclass, 'A2', has no unnamed constructor that takes no arguments. - B2(int Function(int) super.foo); - ^^" - ; -} -class A3 extends core::Object { - final field (core::int) → core::int foo; - constructor •((dynamic) → core::int foo) → self::A3 - : self::A3::foo = foo, super core::Object::•() - ; -} -class B3 extends self::A3 { - constructor •((dynamic) → core::int foo) → self::B3 - : final dynamic #t3 = invalid-expression "pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:29:3: Error: The superclass, 'A3', has no unnamed constructor that takes no arguments. - B3(int super.foo(int)); - ^^" - ; -} -class A4 extends core::Object { - final field (() → void) → () → void foo; - constructor •((() → void) → () → void foo) → self::A4 - : self::A4::foo = foo, super core::Object::•() - ; -} -class B4 extends self::A4 { - constructor •((() → void) → () → void foo) → self::B4 - : final dynamic #t4 = invalid-expression "pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:38:3: Error: The superclass, 'A4', has no unnamed constructor that takes no arguments. - B4(void Function() super.foo(void Function())); - ^^" - ; -} -class A5 extends core::Object { - final field (() → void) → () → void foo; - constructor •((() → void) → () → void foo) → self::A5 - : self::A5::foo = foo, super core::Object::•() - ; -} -class B5 extends self::A5 { - constructor •((() → void) → () → void foo) → self::B5 - : final dynamic #t5 = invalid-expression "pkg/front_end/testcases/super_parameters/typed_super_parameter.dart:48:3: Error: The superclass, 'A5', has no unnamed constructor that takes no arguments. - B5(void Function() Function(void Function()) super.foo); - ^^" - ; -} -static method main() → dynamic {} diff --git a/pkg/front_end/testcases/textual_outline.status b/pkg/front_end/testcases/textual_outline.status index bed6b86a2ff..956276e30a6 100644 --- a/pkg/front_end/testcases/textual_outline.status +++ b/pkg/front_end/testcases/textual_outline.status @@ -200,7 +200,6 @@ regress/issue_39091_1: FormatterCrash regress/issue_41265.crash: Crash regress/issue_41265.crash: FormatterCrash super_parameters/simple: FormatterCrash -super_parameters/typed_super_parameter: FormatterCrash triple_shift/invalid_operator: FormatterCrash variance/class_type_parameter_modifier: FormatterCrash variance/generic_covariance_sound_variance: FormatterCrash