mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
I am doing this separately from the actual change to eliminate the option to make it easier to review.
25 lines
387 B
Swift
25 lines
387 B
Swift
// RUN: %target-swift-frontend -emit-ir %s
|
|
|
|
enum Singleton {
|
|
case F((Singleton) -> ())
|
|
}
|
|
|
|
enum Single {
|
|
case F((Single) -> ())
|
|
case X
|
|
case Y
|
|
}
|
|
|
|
enum Multi {
|
|
case F((Multi) -> ())
|
|
case G((Multi) -> ())
|
|
}
|
|
|
|
enum Autoclosure<T> {
|
|
case first(@autoclosure () -> Bool, T)
|
|
case second(Int, @autoclosure () -> T)
|
|
}
|
|
|
|
_ = Autoclosure.first(false, 3)
|
|
_ = Autoclosure.second(3, "hi")
|