Skip to content

Commit 72492aa

Browse files
committed
Respect trivially-destructible and copyable for zero-sized enum payloads
Only the non-zero-sized associated values of a type were considered when determining whether an enum is copyable or was trivially-destructible, meaning that a zero-sized, noncopyable type with a `deinit` wouldn't get destroyed. Treat these associated values as if they were a payload, and centralize the logic for figuring out these overall aspects of the enum (copyable, trivially-destructible, bitwise-takable) since the same checks were repeated. Fixes rdar://118449507.
1 parent 5a546ed commit 72492aa

File tree

3 files changed

+137
-51
lines changed

3 files changed

+137
-51
lines changed

0 commit comments

Comments
 (0)