Supporting @available stored properties
Swift Forums
Supporting @available stored properties
I ran into an issue with someone today. I think this code represents the issue pretty closely. @available(anyAppleOS 27.0, *) struct SomeBrandNewType { } struct AdoptingType { // error: Stored properties cannot be marked potentially unavailable with '@available' @available(anyAppleOS 27.0, *) var maybeAvailable: SomeBrandNewType? } I get it. But, also, this feels a bit like lazy properties. Could such an arrangement work, and just resolve to nil unconditionally when unavailable? Or is t...
0 comments
No comments yet.