I would like to apply the available attribute with the renamed and unavailable arguments to a property of struct that conforms to Codable , as shown below:
struct SampleData: Codable {
@available(*, unavailable, renamed: "newProperty")
let oldProperty: String
let newProperty: String
}
But when I tried to build this code , I got a compile error like this:
note: 'oldProperty' has been explicitly marked unavailable here
If a struct does not conform to Codable, it works well.
Does anyone know how to resolve this problem?
And if it is impossible to resolve this, I'd appreciate it if you could tell me why.
Thanks in advance.

