@@ -2225,6 +2225,49 @@ final class ExpressionTests: ParserTestCase {
22252225 let _ = ((Int, Bool, String,) -> Void).self
22262226 """
22272227 )
2228+
2229+ assertParse (
2230+ """
2231+ let _ = Array<(
2232+ bar: String,
2233+ baaz: String,
2234+ )>()
2235+ """ ,
2236+ substructure: FunctionCallExprSyntax (
2237+ calledExpression: GenericSpecializationExprSyntax (
2238+ expression: DeclReferenceExprSyntax ( baseName: . identifier( " Array " ) ) ,
2239+ genericArgumentClause: GenericArgumentClauseSyntax (
2240+ leftAngle: . leftAngleToken( ) ,
2241+ arguments: GenericArgumentListSyntax ( [
2242+ GenericArgumentSyntax (
2243+ argument: . type( TypeSyntax ( TupleTypeSyntax (
2244+ leftParen: . leftParenToken( ) ,
2245+ elements: TupleTypeElementListSyntax ( [
2246+ TupleTypeElementSyntax (
2247+ firstName: . identifier( " bar " ) ,
2248+ colon: . colonToken( ) ,
2249+ type: TypeSyntax ( IdentifierTypeSyntax ( name: . identifier( " String " ) ) ) ,
2250+ trailingComma: . commaToken( )
2251+ ) ,
2252+ TupleTypeElementSyntax (
2253+ firstName: . identifier( " baaz " ) ,
2254+ colon: . colonToken( ) ,
2255+ type: TypeSyntax ( IdentifierTypeSyntax ( name: . identifier( " String " ) ) ) ,
2256+ trailingComma: . commaToken( )
2257+ )
2258+ ] ) ,
2259+ rightParen: . rightParenToken( )
2260+ ) ) )
2261+ )
2262+ ] ) ,
2263+ rightAngle: . rightAngleToken( )
2264+ )
2265+ ) ,
2266+ leftParen: . leftParenToken( ) ,
2267+ arguments: LabeledExprListSyntax ( [ ] ) ,
2268+ rightParen: . rightParenToken( )
2269+ )
2270+ )
22282271 }
22292272
22302273 func testSecondaryArgumentLabelDollarIdentifierInClosure( ) {
0 commit comments