We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88630e8 commit b8dc0f4Copy full SHA for b8dc0f4
stdlib/public/core/BridgeObjectiveC.swift
@@ -394,14 +394,14 @@ public struct AutoreleasingUnsafeMutablePointer<Pointee /* TODO : class */>
394
// explicitly handle the nil case.
395
let unmanaged =
396
UnsafePointer<Optional<Unmanaged<AnyObject>>>(_rawValue).pointee
397
- return unsafeBitCast(
+ return _unsafeReferenceCast(
398
unmanaged?.takeUnretainedValue(),
399
to: Pointee.self)
400
}
401
402
@_transparent nonmutating set {
403
// Autorelease the object reference.
404
- let object = unsafeBitCast(newValue, to: Optional<AnyObject>.self)
+ let object = _unsafeReferenceCast(newValue, to: Optional<AnyObject>.self)
405
Builtin.retain(object)
406
Builtin.autorelease(object)
407
0 commit comments