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
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
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: