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-8634] Deprecation warning at declaration site in typed enum #51149

Closed
swift-ci opened this issue Aug 24, 2018 · 2 comments
Closed

[SR-8634] Deprecation warning at declaration site in typed enum #51149

swift-ci opened this issue Aug 24, 2018 · 2 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-8634
Radar rdar://problem/43887814
Original Reporter iamkevb (JIRA User)
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Environment

Xcode 9.4.1, Xcode 10 Betas.

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee @AnthonyLatsis
Priority Medium

md5: 86b090b7c1dcb1475ef9b21ddaf4d39e

duplicates:

  • SR-6637 Deprecation warnings from Clang-imported enums with deprecated cases

relates to:

  • SR-9094 Unavailable enum case with synthesized raw value causes error
  • SR-6637 Deprecation warnings from Clang-imported enums with deprecated cases

Issue Description:

This code produces deprecation warnings:

enum Clean: String {
  case yes
  @available(*, deprecated, message: "NO")
  case no
}
struct A: Equatable {
  @available(*, deprecated, message: "NO")
  let x: Int
}

This code does not:

enum Clean {
  case yes
  @available(*, deprecated, message: "NO")
  case no
}
struct A {
  @available(*, deprecated, message: "NO")
  let x: Int
}

Deprecation warnings should only be presented to the callers of the deprecated API, not at the declaration site.

@belkadan
Copy link
Contributor

@swift-ci create

@AnthonyLatsis
Copy link
Collaborator

#19269

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
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

3 participants