Why can’t i define a noncopyable enum?

seems simple enough:

@_moveOnly
enum E
{
    case a, b, c
}
error: move-only enum 'E' cannot conform to protocol 'Equatable'
enum E
     ^

surpressing the synthesized conformances doesn’t work either:

@available(*, unavailable)
extension E:Equatable
{
}
@available(*, unavailable)
extension E:Hashable
{
}

how do you define a noncopyable enum?

1 Like

this works fine for me using the latest nightly snapshot: Compiler Explorer

2 Likes

ah, 5.8 problem then. thanks!