You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The recently-added -swift-version N flag in SR-2582 only affects the #if swift(>=N) compiler-control statements, which is not sufficient for shipping a library with parts that are unconditionally compiled but conditionally available. For the latter, we need to support something like @available(swift N) similar to the platform availability tests.
The exact semantics are a bit subtle; as far as I can tell, swift-version unavailability should override platform availability, but swift-version availability should not override platform unavailability. That is, swift-version availability should be considered in conjunction, not disjunction, with platform availability. We don't exactly have a way to write availability conjuncts at the moment, so as an initial implementation we might just prohibit combining `@available(swift N)` with any other platform-availability spec in the same attribute argument list.
Other suggestions welcome!
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: 70a882de5a4a030863b28ba3fa99ae94
Issue Description:
The recently-added
-swift-version N
flag in SR-2582 only affects the#if swift(>=N)
compiler-control statements, which is not sufficient for shipping a library with parts that are unconditionally compiled but conditionally available. For the latter, we need to support something like@available(swift N)
similar to the platform availability tests.The exact semantics are a bit subtle; as far as I can tell, swift-version unavailability should override platform availability, but swift-version availability should not override platform unavailability. That is, swift-version availability should be considered in conjunction, not disjunction, with platform availability. We don't exactly have a way to write availability conjuncts at the moment, so as an initial implementation we might just prohibit combining `@available(swift N)` with any other platform-availability spec in the same attribute argument list.
Other suggestions welcome!
The text was updated successfully, but these errors were encountered: