We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e981b7 commit 221033dCopy full SHA for 221033d
lib/Parse/ParseType.cpp
@@ -1967,7 +1967,7 @@ bool Parser::canParseTypeTupleBody() {
1967
skipSingle();
1968
}
1969
1970
- } while (consumeIf(tok::comma));
+ } while (consumeIf(tok::comma) && Tok.isNot(tok::r_paren));
1971
1972
1973
return consumeIf(tok::r_paren);
test/type/types.swift
@@ -234,3 +234,19 @@ let closureTypeWithTrailingCommas: (
234
bar: String,
235
quux: String,
236
)
237
+
238
+let _ = Array<(
239
+ foo: Int,
240
+ bar: String,
241
+)>()
242
243
+let _ = Dictionary<
244
+ String,
245
+ Dictionary<
246
247
+ Array<(
248
249
250
+ )>,
251
+ >,
252
+>()
0 commit comments