Files
swift-mirror/test/SILOptimizer/noimplicitcopy_existentials.swift
2024-06-12 09:07:02 -07:00

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 }}
////////////////////////////////////////////////////////////////////////////////