enum E { case c(Bool) } let e = E.c(true) switch e { case .c(let b) where b == true: print(1) case .c(let b) where b == false: print(2) case .c(true): print(3) case .c(false): print(4) }