Skip to content

Commit fe0e683

Browse files
Remove enum case list trailing comma support
1 parent 013997d commit fe0e683

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

lib/Parse/ParseDecl.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9351,10 +9351,6 @@ Parser::parseDeclEnumCase(ParseDeclOptions Flags,
93519351
if (!Tok.is(tok::comma))
93529352
break;
93539353
CommaLoc = consumeToken(tok::comma);
9354-
if (Context.LangOpts.hasFeature(Feature::TrailingComma) &&
9355-
(Tok.isAtStartOfLine() || Tok.is(tok::r_brace) || Tok.is(tok::semi))) {
9356-
break;
9357-
}
93589354
}
93599355

93609356
if (!(Flags & PD_AllowEnumElement)) {

test/Parse/trailing-comma.swift

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,6 @@ struct S<T1, T2, T3,> where T1: P1, T2: P2, { }
4141

4242
let _ = { [obj1, obj2,] in }
4343

44-
// Enum Case List
45-
46-
enum E1 {
47-
case a, b, c,
48-
func foo() { }
49-
}
50-
51-
enum E2 { case a, b, c, }
52-
53-
enum E3 { case a, b, c, ; func foo() { } }
54-
5544
// Switch Case List
5645

5746
switch number {

0 commit comments

Comments
 (0)