Skip to content

Return file attributes as NSNumbers when SCL-F is imported #641

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

Merged
merged 1 commit into from
May 29, 2024

Conversation

jmschonfeld
Copy link
Contributor

Clients of the existing SCL-F expect to be able to cast file attribute values to any numeric type via NSNumber implicit bridging. This works in Foundation.framework today and this PR enables this functionality when SCL-F is imported on non-Darwin platforms by dynamically checking to see if we can initialize an NSNumber (falling back to the existing concrete numeric type when Foundation is not loaded.

@jmschonfeld
Copy link
Contributor Author

@swift-ci please test

@jmschonfeld
Copy link
Contributor Author

The NSNumber initializer is added to SCL-F in swiftlang/swift-corelibs-foundation#4966

@jmschonfeld jmschonfeld merged commit 3297fb3 into swiftlang:main May 29, 2024
2 checks passed
@jmschonfeld jmschonfeld deleted the fm-nsnumber-upcall branch May 29, 2024 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants