Skip to content

Fix TimeZone does not conforms to _ObjectiveCBridgeable #3131

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

Conversation

dreampiggy
Copy link

PR description

This PR fix the missing _ObjectiveCBridgeable protocol conformance on TimeZone struct.

The API in Apple's Foundation declares TimeZone is marked as here:

image

So this seems a typo, not designed behavior.

Environment

Platform: Linux
Docker Image: swift/latest d8708e4f244e2fa11eb9d1f4d718ee0a8481807f0070a7c5f9da5c2f853a94e5
Swift Version: Swift version 5.5.2 (swift-5.5.2-RELEASE)

Demo Code

public protocol NSObjectBridgeable : _ObjectiveCBridgeable {}
extension TimeZone : NSObjectBridgeable {}

Excepted Result

Build Success.

Actual Result

Build Failure. Showing:

error: conformance of 'TimeZone' to '_ObjectiveCBridgeable' can only be written in module 'Foundation'
extension TimeZone : NSObjectBridgeable {}
^

@dreampiggy
Copy link
Author

@swift-ci please test

1 similar comment
@Kyle-Ye
Copy link

Kyle-Ye commented Jan 24, 2022

@swift-ci please test

@dreampiggy
Copy link
Author

@swift-ci please test macOS platform

@Kyle-Ye
Copy link

Kyle-Ye commented Jan 24, 2022

@swift-ci please test Linux platform

@Kyle-Ye
Copy link

Kyle-Ye commented Jan 24, 2022

@swift-ci Please test Linux platform

1 similar comment
@Kyle-Ye
Copy link

Kyle-Ye commented Jan 28, 2022

@swift-ci Please test Linux platform

@millenomi
Copy link
Contributor

@swift-ci please test

@compnerd
Copy link
Member

compnerd commented Feb 1, 2022

Please test with following PRs:
swiftlang/swift#41115

@swift-ci please test macOS platform

@millenomi millenomi merged commit 989f6d5 into swiftlang:main Feb 2, 2022
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.

4 participants