mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
A parse-only option is needed for parse performance tracking and the current option also includes semantic analysis.
26 lines
322 B
Swift
26 lines
322 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
enum Bar {
|
|
case Simple
|
|
case Complex(Int)
|
|
}
|
|
|
|
func optEnumContext() -> Bar? {
|
|
switch () {
|
|
case ():
|
|
return .Simple
|
|
case ():
|
|
return .Complex(0)
|
|
}
|
|
}
|
|
|
|
func iuoEnumContext() -> Bar! {
|
|
switch () {
|
|
case ():
|
|
return .Simple
|
|
case ():
|
|
return .Complex(0)
|
|
}
|
|
}
|
|
|