I'm trying to add an enum type to an Array and am getting an error. I am able to add a String and other types, but this enum is failing. Does anyone know what might be going wrong here?
enum Domain {
case Default
}
let domains: Array<Domain> = [.Default]
Thread 1:EXC_BAD_INSTRUCTION(code=EXC_i386_INVOP, subcode=0x0)
This is definitely an Apple bug - log it! https://bugreport.apple.com
Add a second case to your Enumeration (e.g. case Other) and see that the error no longer occurs. Something crazy is going on in Swift when an Enumeration has only one case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With