mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
I did this using a sed pattern and verified by hand that I was only touching target-swift-emit-silgen lines.
17 lines
401 B
Swift
17 lines
401 B
Swift
|
|
// RUN: %target-swift-emit-silgen -module-name auto_closures -parse-stdlib -swift-version 4 %s
|
|
|
|
// Swift 4-style autoclosure forwarding should not crash - rdar://problem/44657505
|
|
|
|
public struct Empty {}
|
|
|
|
public func x(_: @autoclosure () -> Empty) {}
|
|
|
|
public func y1(_ message: @autoclosure () -> Empty) {
|
|
x(message)
|
|
}
|
|
|
|
public func y2(_ message: @autoclosure @escaping () -> Empty) {
|
|
x(message)
|
|
}
|