[SR-2154] Don't allow wildcard platform in @available with version
| Previous ID | SR-2154 |
| Radar | None |
| Original Reporter | @devincoughlin |
| Type | Bug |
Environment
Xcode 8
Additional Detail from JIRA
| Votes | 0 |
| Component/s | Compiler |
| Labels | Bug |
| Assignee | @devincoughlin |
| Priority | Medium |
md5: e6fa577c28f75e0080ee0afd097a98f5
cloned from:
- SR-2153 Deprecation warning despite #available check
Issue Description:
The Dispatch overlay currently has an availability attributes that like:
@available(*, deprecated: 8.0, message: "Use qos attributes instead")
public static let priorityBackground: DispatchQueue.GlobalAttributes
This says priorityBackground is deprecated on all OSes on version 8.0, which doesn't make any sense. (It would prevent a deprecation warning from being diagnosed on watchOS 2.0, for example.
It seems to me that Sema should treat the wildcard platform in an @available with a specific version as an error.
Heck, Parse could probably treat it as an error.
Yes, that's a good point.
Is this resolved? If so, this should be closed.
Swift 5.6 emits:
warning: unexpected version number in 'available' attribute for non-specific platform '*'
Closing.