mirror of
https://github.com/apple/swift.git
synced 2026-10-06 12:37:28 +02:00
A C function returning a foreign reference or CoreFoundation type unretained cannot be safely implemented, because there is no way to ensure that the result object lives past the return. However, such C functions do exist, and we would like to be able to implement them via `@c @implementation`. Extend the signature-matching logic for `@implementation` to permit an `Unmanaged<T>` result even when the signature comes in an `T` to allow the use of `@implementation` here. Implements rdar://188429740