Re: [swift-users] enum compare

2017-01-23 Thread Quinn "The Eskimo!" via swift-users
On 21 Jan 2017, at 12:56, tridiak via swift-users wrote: > How do I fix this? Simply cannot see it. Use a switch statement: switch type { case .noType, .dodge, .other: return true case .natural, .armour, .shield, .deflection, .sacred, .luck: return false } Note

Re: [swift-users] enum compare

2017-01-21 Thread Rien via swift-users
Oh, I am not using the correct terminology, sorry. Enum’s don’t have “instances” right? Anyhow, I guess you get my drift… Regards, Rien Site: http://balancingrock.nl Blog: http://swiftrien.blogspot.com Github: http://github.com/Swiftrien Project: http://swiftfire.nl > On 21 Jan 2017, at

Re: [swift-users] enum compare

2017-01-21 Thread Rien via swift-users
The “==“ operation can only compare concrete instances of the enum. With “type == ACType.other” the right side is not an instance. as the associated value is missing. Regards, Rien Site: http://balancingrock.nl Blog: http://swiftrien.blogspot.com Github: http://github.com/Swiftrien Project: