Files
swift-mirror/test/SILGen/Inputs/opaque_values_silgen_resilient.swift
Nate Chandler 98acb40d99 [SIL] Addr-only enums have non-none ownership.
Values produced by address-only `enum` instructions have non-none
ownership.  And because `enum` is representation-changing, they have
`owned` ownership.

This corresponds at the opaque values SIL stage to the fact that at the
address-lowered SIL stage the storage location has non-trivial
initialization which must be `destroy_addr`d, regardless of whether an
empty case was stored to it.
2023-11-16 11:03:14 -08:00

15 lines
315 B
Swift

public class ClassEquatable : Equatable {
public static func ==(lhs: ClassEquatable, rhs: ClassEquatable) -> Bool { lhs === rhs }
}
public enum EnumNontrivialWithEmptyCases : Equatable {
case empty
case other
case loaded(ClassEquatable)
}
public enum EnumTrivial : Equatable {
case empty
case other
}