dffa3191b9
This push the constant context for constant patterns such that the constness is propagated to subexpressions. Closes #50629 Change-Id: Idcb279765c5464ba17abb98b3f9eb852a7c87b96 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/277860 Reviewed-by: Chloe Stefantsova <cstefantsova@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com>
49 lines
1.9 KiB
Plaintext
49 lines
1.9 KiB
Plaintext
beginCompilationUnit(test)
|
|
beginMetadataStar(test)
|
|
endMetadataStar(0)
|
|
beginTopLevelMember(test)
|
|
beginTopLevelMethod(, null, null)
|
|
handleNoType()
|
|
handleIdentifier(test, topLevelFunctionDeclaration)
|
|
handleNoTypeVariables(()
|
|
beginFormalParameters((, MemberKind.TopLevelMethod)
|
|
beginMetadataStar(dynamic)
|
|
endMetadataStar(0)
|
|
beginFormalParameter(dynamic, MemberKind.TopLevelMethod, null, null, null)
|
|
handleIdentifier(dynamic, typeReference)
|
|
handleNoTypeArguments(x)
|
|
handleType(dynamic, null)
|
|
handleIdentifier(x, formalParameterDeclaration)
|
|
handleFormalParameterWithoutValue())
|
|
endFormalParameter(null, null, null, x, null, null, FormalParameterKind.requiredPositional, MemberKind.TopLevelMethod)
|
|
endFormalParameters(1, (, ), MemberKind.TopLevelMethod)
|
|
handleAsyncModifier(null, null)
|
|
beginBlockFunctionBody({)
|
|
beginSwitchStatement(switch)
|
|
handleIdentifier(x, expression)
|
|
handleNoTypeArguments())
|
|
handleNoArguments())
|
|
handleSend(x, ))
|
|
handleParenthesizedCondition((, null, null)
|
|
beginSwitchBlock({)
|
|
beginCaseExpression(case)
|
|
beginConstantPattern(const)
|
|
handleIdentifier(Foo, expression)
|
|
handleNoTypeArguments(()
|
|
beginArguments(()
|
|
handleLiteralInt(1)
|
|
endArguments(1, (, ))
|
|
handleSend(Foo, ?)
|
|
endConstantPattern(const)
|
|
handleNullCheckPattern(?)
|
|
endCaseExpression(case, null, :)
|
|
beginSwitchCase(0, 1, case)
|
|
handleBreakStatement(false, break, ;)
|
|
endSwitchCase(0, 1, null, null, 1, case, })
|
|
endSwitchBlock(1, {, })
|
|
endSwitchStatement(switch, })
|
|
endBlockFunctionBody(1, {, })
|
|
endTopLevelMethod(test, null, })
|
|
endTopLevelDeclaration()
|
|
endCompilationUnit(1, )
|