I see that on MacOS I have access to the following fields and initializer:
public struct Decimal : @unchecked Sendable {
public init()
public init(_exponent: Int32, _length: UInt32, _isNegative: UInt32, _isCompact: UInt32, _reserved: UInt32, _mantissa: (UInt16, UInt16, UInt16, UInt16, UInt16, UInt16, UInt16, UInt16))
public var _exponent: Int32
public var _length: UInt32
public var _isNegative: UInt32
public var _isCompact: UInt32
public var _reserved: UInt32
public var _mantissa: (UInt16, UInt16, UInt16, UInt16, UInt16, UInt16, UInt16, UInt16)
}
According to documentation, there is an initializer for Decimal is exposed to public API in Foundation: https://developer.apple.com/documentation/foundation/decimal/1407961-init
I see that on MacOS I have access to the following fields and initializer:
and my test code compiles and runs:
On Linux I have the following error:
The same if I use initializer:
error for Linux is the following:
I use Xcode 16.0 beta 6 on MacOS:
And swift 6.0 release on Linux: