02c3d9c3f0
This allows `var int a` in primary constructors when the declaring constructors feature is enabled. Part of https://github.com/dart-lang/sdk/issues/61699 Change-Id: I486ad8aa3ddbe09451455b024b3aa9cfbaa9a5e9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456340 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com>
72 lines
2.8 KiB
Plaintext
72 lines
2.8 KiB
Plaintext
Problems reported:
|
|
|
|
parser/patterns/nullCheck_insideCast:4:10: This pattern cannot appear inside a unary pattern (cast pattern, null check pattern, or null assert pattern) without parentheses.
|
|
case y? as num:
|
|
^^
|
|
|
|
beginCompilationUnit(void)
|
|
beginMetadataStar(void)
|
|
endMetadataStar(0)
|
|
beginTopLevelMember(void)
|
|
beginTopLevelMethod(, null, null)
|
|
handleVoidKeyword(void)
|
|
handleIdentifier(f, topLevelFunctionDeclaration)
|
|
handleNoTypeVariables(()
|
|
beginFormalParameters((, MemberKind.TopLevelMethod)
|
|
beginMetadataStar(x)
|
|
endMetadataStar(0)
|
|
beginFormalParameter(x, MemberKind.TopLevelMethod, null, null, null)
|
|
handleNoType(()
|
|
handleIdentifier(x, formalParameterDeclaration)
|
|
handleFormalParameterWithoutValue())
|
|
endFormalParameter(null, null, null, null, x, null, null, FormalParameterKind.requiredPositional, MemberKind.TopLevelMethod)
|
|
endFormalParameters(1, (, ), MemberKind.TopLevelMethod)
|
|
handleAsyncModifier(null, null)
|
|
beginBlockFunctionBody({)
|
|
beginMetadataStar(const)
|
|
endMetadataStar(0)
|
|
handleNoType(const)
|
|
beginVariablesDeclaration(y, null, const)
|
|
handleIdentifier(y, localVariableDeclaration)
|
|
beginInitializedIdentifier(y)
|
|
beginVariableInitializer(=)
|
|
handleLiteralInt(1)
|
|
endVariableInitializer(=)
|
|
endInitializedIdentifier(y)
|
|
endVariablesDeclaration(1, ;)
|
|
beginSwitchStatement(switch)
|
|
handleIdentifier(x, expression)
|
|
handleNoTypeArguments())
|
|
handleNoArguments())
|
|
handleSend(x, x)
|
|
handleParenthesizedCondition((, null, null)
|
|
beginSwitchBlock({)
|
|
beginCaseExpression(case)
|
|
beginPattern(case)
|
|
beginConstantPattern(null)
|
|
handleIdentifier(y, expression)
|
|
handleNoTypeArguments(?)
|
|
handleNoArguments(?)
|
|
handleSend(y, y)
|
|
endConstantPattern(null)
|
|
handleNullCheckPattern(?)
|
|
handleRecoverableError(InvalidInsideUnaryPattern, y, ?)
|
|
beginAsOperatorType(as)
|
|
handleIdentifier(num, typeReference)
|
|
handleNoTypeArguments(:)
|
|
handleType(num, null)
|
|
endAsOperatorType(as)
|
|
handleCastPattern(as)
|
|
endPattern(num)
|
|
handleSwitchCaseNoWhenClause(num)
|
|
endCaseExpression(case, null, :)
|
|
beginSwitchCase(0, 1, case)
|
|
handleBreakStatement(false, break, ;)
|
|
endSwitchCase(0, 1, null, null, 1, case, ;)
|
|
endSwitchBlock(1, {, })
|
|
endSwitchStatement(switch, })
|
|
endBlockFunctionBody(2, {, })
|
|
endTopLevelMethod(void, null, })
|
|
endTopLevelDeclaration(})
|
|
endCompilationUnit(1, )
|