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 e3f4c5e commit 1f96583Copy full SHA for 1f96583
stdlib/public/core/StringGuts.swift
@@ -422,8 +422,9 @@ extension _StringGuts {
422
423
private static var associationKey: UnsafeRawPointer {
424
// We never dereference this, we just use this address as a unique key
425
- // TODO: perhaps use the address of a metatype instead
426
- unsafe UnsafeRawPointer(Builtin.addressof(&_swiftEmptyArrayStorage))
+ unsafe unsafeBitCast(
+ ObjectIdentifier(_StringGuts.self), to: UnsafeRawPointer.self
427
+ )
428
}
429
430
internal func getAssociatedStorage() -> __StringStorage? {
0 commit comments