Skip to content

Commit 86f6c29

Browse files
committed
[stdlib] Temporarily reinstate original ObjectIdentifier.init as public
The new generalization sometimes causes a runtime hang that I’m still analyzing. The original declaration should be considered more specific for preexisting use cases, eliminating the source compatibility issue.
1 parent 4cd0351 commit 86f6c29

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

stdlib/public/core/ObjectIdentifier.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,10 @@ public struct ObjectIdentifier: Sendable {
6666
self._value = unsafe unsafeBitCast(x, to: Builtin.RawPointer.self)
6767
}
6868

69-
@_spi(SwiftStdlibLegacyABI) @available(swift, obsoleted: 1)
70-
@usableFromInline
71-
internal init(_ x: Any.Type) {
69+
@inlinable
70+
public init(_ x: Any.Type) {
71+
// FIXME: This ought to be obsoleted in favor of the generalized overload
72+
// above. Unfortunately, that one sometimes causes a runtime hang.
7273
self._value = unsafe unsafeBitCast(x, to: Builtin.RawPointer.self)
7374
}
7475
}

test/api-digester/stability-stdlib-abi-without-asserts.test

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,6 @@ Accessor UnsafeMutableBufferPointer.indices.Get() has generic signature change f
853853
Accessor UnsafeMutableBufferPointer.indices.Get() has mangled name changing from 'Swift.UnsafeMutableBufferPointer.indices.getter : Swift.Range<Swift.Int>' to '(extension in Swift):Swift.UnsafeMutableBufferPointer< where A: ~Swift.Copyable>.indices.getter : Swift.Range<Swift.Int>'
854854
Var UnsafeMutableBufferPointer.indices has mangled name changing from 'Swift.UnsafeMutableBufferPointer.indices : Swift.Range<Swift.Int>' to '(extension in Swift):Swift.UnsafeMutableBufferPointer< where A: ~Swift.Copyable>.indices : Swift.Range<Swift.Int>'
855855
Var UnsafeMutableBufferPointer.indices is now with @_preInverseGenerics
856-
Constructor ObjectIdentifier.init(_:) has been removed
857856
Func !=(_:_:) has been removed
858857
Func ==(_:_:) has been removed
859858
Func type(of:) has been removed

0 commit comments

Comments
 (0)