Files
swift-mirror/test/SILGen/auto_closures_swift4.swift
Michael Gottesman 9e13779702 [ownership] Remove most -enable-sil-ownership from SILGen now that %target-swift-emit-silgen does it automatically.
I did this using a sed pattern and verified by hand that I was only touching
target-swift-emit-silgen lines.
2018-12-13 11:54:54 -08:00

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)
}