mirror of
https://github.com/apple/swift.git
synced 2026-10-30 22:15:52 +01:00
This is a workaround to avoid missing lowering of dynamic_self in IRGen Fixes rdar://174428100
11 lines
231 B
Swift
11 lines
231 B
Swift
@inlinable @inline(__always)
|
|
public func withWrapper<R>(_ body: @escaping (Int) -> R) -> R {
|
|
_withInner { x in body(x) }
|
|
}
|
|
|
|
@usableFromInline
|
|
@inline(never)
|
|
internal func _withInner<R>(_ body: (Int) -> R) -> R {
|
|
body(42)
|
|
}
|