Open
Description
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)
^