Skip to content

Commit d8f3880

Browse files
committed
[Test] Adds a new test case where we have an enum case with duplicate label
1 parent eca1c1f commit d8f3880

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/Constraints/tuple.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,3 +304,6 @@ let zeroTuple = (0,0)
304304

305305
if case (foo: let x, foo: let y) = zeroTuple { print(x+y) } // expected-error {{cannot create a tuple with a duplicate element label}}
306306
// expected-warning@-1 {{'if' condition is always true}}
307+
308+
enum BishBash { case bar(foo: Int, foo: String) }
309+
let f: BishBash = .bar(foo: 0, foo: "") // expected-error {{cannot create a tuple with a duplicate element label}}

0 commit comments

Comments
 (0)