Skip to content

Commit e431216

Browse files
Merge pull request swiftlang#74343 from nate-chandler/gh73525
[Test] Add regression test.
2 parents 5e18474 + c9e2e8e commit e431216

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// RUN: %target-swift-frontend \
2+
// RUN: -emit-sil -verify \
3+
// RUN: %s \
4+
// RUN: -sil-verify-all
5+
6+
////////////////////////////////////////////////////////////////////////////////
7+
// https://github.com/apple/swift/issues/73525 {{
8+
////////////////////////////////////////////////////////////////////////////////
9+
protocol K {
10+
var a: Int { get }
11+
}
12+
13+
protocol B {
14+
init(k: any K)
15+
}
16+
17+
struct A: B {
18+
let a: Int
19+
20+
init(k: borrowing K) {
21+
self.a = k.a
22+
}
23+
}
24+
////////////////////////////////////////////////////////////////////////////////
25+
// https://github.com/apple/swift/issues/73525 }}
26+
////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)