Skip to content
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

Stream.property(forKey:) and Stream.setProperty(_:forKey:) have different signatures on macOS and Linux #4815

Open
alanfalloon opened this issue Sep 6, 2023 · 0 comments

Comments

@alanfalloon
Copy link

The Stream.property(forKey:) and Stream.setProperty(_:forKey:) methods have the following signatures on macOS:

func property(forKey: Stream.PropertyKey) -> Any?
func setProperty(
    _ property: Any?,
    forKey key: Stream.PropertyKey
) -> Bool

However, on Linux the signature appears to be:

func property(forKey: Stream.PropertyKey) -> AnyObject?
func setProperty(
    _ property: AnyObject?,
    forKey key: Stream.PropertyKey
) -> Bool

I.e. they accept and return AnyObject? instead of Any?.

I discovered this when trying to make an InputStream subclass that works in macOS and Linux on Swift 5.9

Swift version 5.9-dev (LLVM 4f65c75dc0fa855, Swift 174828b01c4e250)
Target: x86_64-unknown-linux-gnu
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

No branches or pull requests

1 participant