Skip to content

Commit 383ec4a

Browse files
authored
Merge pull request #22875 from gottesmm/pr-fe1c66a629a5faac7ff130825bc7601431a2410a
Add a leaking test case for SILGenPattern that was already fixed.
2 parents 256d47a + 983d1dd commit 383ec4a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/Interpreter/switch.swift

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,4 +222,19 @@ SwitchTestSuite.test("TupleUnforwarding") {
222222
}
223223
}
224224

225+
protocol P {}
226+
227+
SwitchTestSuite.test("Protocol Conformance Check Leaks") {
228+
do {
229+
let x = LifetimeTracked(0)
230+
let y = LifetimeTracked(1)
231+
switch (x, y) {
232+
case (is P, is P):
233+
break
234+
default:
235+
break
236+
}
237+
}
238+
}
239+
225240
runAllTests()

0 commit comments

Comments
 (0)