Files
swift-mirror/test/IRGen/Inputs/noncopyable_private_other.swift
Arnold Schwaighofer ad6f6dec6e IRGen: We cannot call destroy through metadata of private types of non-copyable fields
So call the destroy on the closing type instead.

Amends the concepts areFieldsABIAccessible/isABIAccessible to take metadata
accessibility of non-copyable types into account.

rdar://133990500
2024-08-21 11:22:30 -07:00

25 lines
414 B
Swift

fileprivate struct PrivateType : ~Copyable {
let x = 5
deinit {
print("deinit")
}
}
public struct PublicType : ~Copyable {
fileprivate let p = PrivateType()
public init() {}
}
public enum PublicSinglePayloadEnum : ~Copyable {
case empty
case some(PrivateType)
}
public enum PublicMultiPayloadEnum : ~Copyable {
case empty
case some(PrivateType)
case someOther(PrivateType)
}