How to do an if-else comparison on enums with arguments : <p><strong>Language</strong>: Swift2.3</p>

<p>For example let's I'll show you different kinds of enums</p>

<pre><code>enum Normal {
    case one
    case two, three
}

enum NormalRaw: Int {
    case one
    case two, three
}

enum NormalArg {
    case one(Int)
    case two, three
}   
</code></pre>

<p><code>Switch</code> can be used on all three enums like so:</p>

<pre><code>var normal: Normal = .one
var normalRaw: NormalRaw = .one
var normalArg: NormalArg = .one(1)

switch normal {
    case .one: print("1")
    default: break
}

switch normalRaw {
    case .one: print(normalRaw.rawValue)
    default: break
}

switch normalArg {
    case .one(let value): print(value)
    default: break
}
</code></pre>

<p>On the if-else statement though I can only do comparison for <code>Normal</code> and <code>NormalRaw</code>, and an error message shows for <code>NormalArg</code>, so I can't run the code</p>

<blockquote>
  <p>Binary Operator '==' cannot be applied to operands of type <code>NormalArg</code>
  and <code>_</code></p>
</blockquote>

<p>Here's the code example:</p>

<pre><code>if normal == .two { // no issue
    .. do something
}

if normalRaw == .two { // no issue
    .. do something
}

if normalArg == .two { // error here (the above message)
    .. do something
}

if normalArg == .one(_) { // error here (the above message)
    .. do something
}

if normalArg == .three { // error here (the above message)
    .. do something
}
</code></pre>

<p>Any Ideas? I'm not really doing anything with this code, I'm just wondering as to why we can't do comparison.</p>
