// RUN: %target-swift-emit-sil -verify %s -o /dev/null func foo() -> Int { switch Bool.random() { case true: 0 // expected-warning {{integer literal is unused}} case false: do {} } } // expected-error {{missing return in global function expected to return 'Int'}} enum E { case x(T), y func foo() -> E { switch self { case .x: while true {} case .y: fatalError() } } }