On 21 Jan 2017, at 12:56, tridiak via swift-users <swift-users@swift.org> 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 that I’ve spelt out all the cases so that the compiler warns me if I add 
or remove a case in the future.

Share and Enjoy
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware


_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to