-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decimal: different access level for fields and initializer on MacOS and Linux #934
Comments
I am seeing the same issue. |
Are you able to use other initializers that are available for both platforms in your code? |
Ubuntu 24.04 - Swift 6.0.1 :
|
@itingliu we want to encode Decimal to flatbuffers efficiently as fixed size structure thus we would like to have an interface that give us its internals. For Mac we are able to access these fields and encode/decode them as plain types. We understand that encoding raw data may implies that we need some versioning in case this type internals will ever change or will be implemented in stdlib. |
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:
The text was updated successfully, but these errors were encountered: