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-2154] Don't allow wildcard platform in @available with version #44762

Closed
devincoughlin opened this issue Jul 23, 2016 · 4 comments
Closed
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@devincoughlin
Copy link
Member

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.

@belkadan
Copy link
Contributor

Heck, Parse could probably treat it as an error.

@devincoughlin
Copy link
Member Author

Yes, that's a good point.

@Dante-Broggi
Copy link
Contributor

Is this resolved? If so, this should be closed.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@tshortli
Copy link
Contributor

Swift 5.6 emits:

warning: unexpected version number in 'available' attribute for non-specific platform '*'

Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

4 participants