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-14884] @available(*, deprecated) does not affect Property Wrapper #57231

Open
t-ae opened this issue Jul 7, 2021 · 1 comment
Open

[SR-14884] @available(*, deprecated) does not affect Property Wrapper #57231

t-ae opened this issue Jul 7, 2021 · 1 comment
Assignees
Labels
availability The @available attribute and availability checking in general bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler itself property wrappers Feature: property wrappers swift 5.4 type checker Area → compiler: Semantic analysis

Comments

@t-ae
Copy link
Contributor

t-ae commented Jul 7, 2021

Previous ID SR-14884
Radar rdar://problem/80277462
Original Reporter @t-ae
Type Bug
Environment

Apple Swift version 5.4.2 (swiftlang-1205.0.28.2 clang-1205.0.19.57)
Target: x86_64-apple-darwin20.5.0

Additional Detail from JIRA
Votes 0
Component/s
Labels Bug
Assignee None
Priority Medium

md5: ccfb8e611ad9f91b67012c41168c82be

Issue Description:

Swift compiler does not warn accessing to deprecated property wrapper.

In the example below, the expected behavior should be that accessing to $value and _value also be reported.

$ cat main.swift 
import Combine

final class Foo: ObservableObject {
    @available(*, deprecated)
    @Published var value: Int = 0
    
    func bar() {
        print(value)
        print($value)
        print(_value)
    }
}

$ swiftc main.swift 
main.swift:8:15: warning: 'value' is deprecated
        print(value)
              ^
@typesanitizer
Copy link

@swift-ci create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added compiler The Swift compiler itself type checker Area → compiler: Semantic analysis property wrappers Feature: property wrappers availability The @available attribute and availability checking in general swift 5.4 labels Jan 21, 2023
@tshortli tshortli self-assigned this Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
availability The @available attribute and availability checking in general bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler itself property wrappers Feature: property wrappers swift 5.4 type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

4 participants