mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Make sure we remove the `@moveOnly` marker while projecting the payload as expected for the (no longer non-implicitly-copyable) projected result. Fixes rdar://116127887.
16 lines
448 B
Swift
16 lines
448 B
Swift
// RUN: %target-swift-emit-silgen -verify %s
|
|
|
|
extension Unmanaged {
|
|
func something1(with x: consuming Unmanaged<Instance>?) -> UnsafeMutableRawPointer? {
|
|
x?.toOpaque()
|
|
}
|
|
|
|
func something2(with x: consuming Unmanaged<Instance>?) -> UnsafeMutableRawPointer? {
|
|
let y = x
|
|
return y?.toOpaque()
|
|
}
|
|
func something3(with x: __owned Unmanaged<Instance>?) -> UnsafeMutableRawPointer? {
|
|
x?.toOpaque()
|
|
}
|
|
}
|