File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -547,12 +547,12 @@ Parser::parseGenericArgumentClauseSyntax() {
547
547
548
548
SmallVector<ParsedGenericArgumentSyntax, 4 > Args;
549
549
SmallVector<ParsedSyntax, 0 > Junk;
550
+ Junk.push_back (LAngle);
550
551
551
552
while (true ) {
552
553
ParserResult<TypeRepr> Ty = parseType (diag::expected_type);
553
554
auto Type = SyntaxContext->popIf <ParsedTypeSyntax>();
554
555
if (Ty.isParseError () || Ty.hasCodeCompletion ()) {
555
- Junk.push_back (LAngle);
556
556
Junk.append (Args.begin (), Args.end ());
557
557
if (Type)
558
558
Junk.push_back (*Type);
@@ -571,9 +571,7 @@ Parser::parseGenericArgumentClauseSyntax() {
571
571
diagnose (Tok, diag::expected_rangle_generic_arg_list);
572
572
diagnose (LAngleLoc, diag::opening_angle);
573
573
574
- Junk.push_back (LAngle);
575
- for (auto &&Arg : Args)
576
- Junk.push_back (Arg);
574
+ Junk.append (Args.begin (), Args.end ());
577
575
skipUntilGreaterInTypeListSyntax (Junk);
578
576
return makeParsedError<ParsedGenericArgumentClauseSyntax>(Junk);
579
577
}
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ class C {
4
4
// Erroneous typealias decl.
5
5
typealias Inner : Foo = Int
6
6
7
+ typealias Inner: Foo2 = [ Generic< Int
8
+
7
9
// Implict accessor with attribute at the top of its body.
8
10
var x : Int {
9
11
@objc
You can’t perform that action at this time.
0 commit comments