For example: let x:Int if … { x = 1 } else if … { x = 2 } else { precondition(false) } // no initialization needed Similarly, let x:Int switch ... { case …: x = 1 case …: x = 2 default: precondition(false) // no initialization needed }