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

[SR-2670] @available(Android, unavailable) gives error in Swift Source #45275

Open
johnno1962 opened this issue Sep 16, 2016 · 2 comments
Open
Labels
Android Platform: Android bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@johnno1962
Copy link
Contributor

Previous ID SR-2670
Radar None
Original Reporter @johnno1962
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, Android
Assignee None
Priority Medium

md5: dc3f0310127a015fd9f19b51bf1266d8

Issue Description:

During the port of Foundation to Android apple/swift-corelibs-foundation#622 it was found that it was not possible to gate the code of NSTask.swift using @available(Android, unavailable) or where this could be readilly updated in the compiler source. It’s strange as the construct #if os(Android) will give a warning if mistyped so the Compiler has some awareness of Android.

@belkadan
Copy link
Contributor

@available normally controls versioned OSs, and works with #available to do dynamic checks, but it is reasonable for this to work. We still haven't worked out all the queries around os(…) though: how do we check for different Linux distros, or all Apple platforms, or Cygwin+MinGW+MSVC? I'm not sure which of those need to go into @available.

@johnno1962
Copy link
Contributor Author

Thanks Jordan, Sounds like it might take a while to spec out and arrive downstream.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Platform: Android bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

2 participants