mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
27 lines
778 B
Swift
27 lines
778 B
Swift
// RUN: %target-swift-frontend \
|
|
// RUN: -emit-sil -verify \
|
|
// RUN: %s \
|
|
// RUN: -sil-verify-all
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
// https://github.com/apple/swift/issues/73525 {{
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
protocol K {
|
|
var a: Int { get }
|
|
}
|
|
|
|
protocol B {
|
|
init(k: any K)
|
|
}
|
|
|
|
struct A: B {
|
|
let a: Int
|
|
|
|
init(k: borrowing K) {
|
|
self.a = k.a
|
|
}
|
|
}
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
// https://github.com/apple/swift/issues/73525 }}
|
|
////////////////////////////////////////////////////////////////////////////////
|