sdk
sdk copied to clipboard
Nested record type annotation as type argument is not parsed
@jensjoha
void f() {
foo<List<(int, String)>>();
}
parsed as
[(21..21): A comparison expression can't be an operand of another comparison expression., (38..38): Expected an identifier.]
void f() {foo < List < (int, String) >> ();}
CompilationUnit
declarations
FunctionDeclaration
returnType: NamedType
name: SimpleIdentifier
token: void
name: f
functionExpression: FunctionExpression
parameters: FormalParameterList
leftParenthesis: (
rightParenthesis: )
body: BlockFunctionBody
block: Block
leftBracket: {
statements
ExpressionStatement
expression: BinaryExpression
leftOperand: BinaryExpression
leftOperand: SimpleIdentifier
token: foo
operator: <
rightOperand: SimpleIdentifier
token: List
operator: <
rightOperand: BinaryExpression
leftOperand: RecordLiteral
leftParenthesis: (
fields
SimpleIdentifier
token: int
SimpleIdentifier
token: String
rightParenthesis: )
operator: >>
rightOperand: ParenthesizedExpression
leftParenthesis: (
expression: SimpleIdentifier
token: <empty> <synthetic>
rightParenthesis: )
semicolon: ;
rightBracket: }