Skip to content

Commit 8aec896

Browse files
committed
[Test] Add regression test.
rdar://125864434
1 parent af72e9b commit 8aec896

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

test/Interpreter/rdar125864434.swift

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: %target-build-swift %s -o %t/bin
3+
// RUN: %target-codesign %t/bin
4+
// RUN: %target-run %t/bin | %FileCheck %s
5+
6+
// REQUIRES: executable_test
7+
8+
protocol Boopable: ~Copyable {
9+
func boop()
10+
}
11+
12+
struct S: ~Copyable, Boopable {
13+
func boop() { print("boop") }
14+
}
15+
16+
func check(_ b: borrowing any Boopable & ~Copyable) {
17+
b.boop()
18+
}
19+
20+
// CHECK: boop
21+
check(S())

0 commit comments

Comments
 (0)