Files
swift-mirror/test/expr/postfix/dot/optional_context_member_enum.swift
2017-05-01 01:32:02 -04:00

26 lines
504 B
Swift

// RUN: %target-typecheck-verify-swift
enum Bar {
case Simple
case Complex(Int)
}
func optEnumContext() -> Bar? {
switch () {
case ():
return .Simple
case (): // expected-warning {{case is already handled by previous patterns; consider removing it}}
return .Complex(0)
}
}
func iuoEnumContext() -> Bar! {
switch () {
case ():
return .Simple
case (): // expected-warning {{case is already handled by previous patterns; consider removing it}}
return .Complex(0)
}
}