Skip to content

Commit 7611705

Browse files
committed
[test] Add test case that exercises lots of ~= overloads
1 parent 05ff1a4 commit 7611705

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/Constraints/patterns.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,3 +651,10 @@ func testExprPatternIsolation() {
651651
var opt: Int?
652652
if case opt = 0 {}
653653
}
654+
655+
enum LotsOfOptional {
656+
case yup(Int?, Int?, Int?, Int?, Int?, Int?, Int?, Int?, Int?, Int?, Int?, Int?, Int?, Int?, Int?)
657+
}
658+
func testLotsOfNil(_ x: LotsOfOptional) {
659+
if case .yup(nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil) = x {}
660+
}

0 commit comments

Comments
 (0)