Files
sdk/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_inClass.dart.expect
T
Johnni Winther 5b0def4a87 [parser][Augmentations] Remove support for macro class and import augment
These were part of the macros experiments which has been cancelled.

Change-Id: I14071bc8e86025f273a533c313a3194c8eae5190
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/495341
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2026-04-16 02:25:05 -07:00

42 lines
1.7 KiB
Plaintext

Problems reported:
parser/patterns/patternVariableDeclaration_inClass:2:7: A pattern variable declaration may not appear outside a function or method.
var (a, b) = (0, 1);
^^^^^^
beginCompilationUnit(class)
beginMetadataStar(class)
endMetadataStar(0)
beginClassOrMixinOrNamedMixinApplicationPrelude(class)
handleIdentifier(C, classOrMixinDeclaration)
handleNoTypeVariables({)
beginClassDeclaration(class, null, null, null, null, null, null, null, C)
handleNoPrimaryConstructor(DeclarationKind.Class, C, null)
handleNoType(C)
handleClassExtends(null, 1)
handleClassNoWithClause()
handleImplements(null, 0)
handleClassHeader(class, class, null)
beginClassOrMixinOrExtensionBody(DeclarationKind.Class, {)
beginMetadataStar(var)
endMetadataStar(0)
beginMember()
handleRecoverableError(PatternVariableDeclarationOutsideFunctionOrMethod, (, ))
beginFields(DeclarationKind.Class, null, null, null, null, null, null, var, {)
handleNoType(var)
handleIdentifier(, fieldDeclaration)
beginFieldInitializer(=)
beginParenthesizedExpressionOrRecordLiteral(()
handleLiteralInt(0)
handlePositionalRecordField(0)
handleLiteralInt(1)
handlePositionalRecordField(1)
endRecordLiteral((, 2, null)
endFieldInitializer(=, ))
endFields(DeclarationKind.Class, null, null, null, null, null, null, var, 1, var, ;)
endMember()
endClassOrMixinOrExtensionBody(DeclarationKind.Class, 1, {, })
endClassDeclaration(class, })
endTopLevelDeclaration(})
endCompilationUnit(1, )