In Xcode 16.0 and 16.1, it was clear how @Entry
macro works from the generated code. If you explicitly specify the type, then defaultValue is a computed property, if you do not specify the type, then a stored property.
In Xcode 16.2, @__EntryDefaultValue
has been added to the generated code, which Xcode does not want to expand. Visually, it seems that a stored property is generated, but the behavior shows that as a result we have a computed property, and for both options: with an explicit type and without an explicit type.
So the question is: what does this @__EntryDefaultValue
macro generate and is the result a bug? Or was it a bug in previous versions of Xcode?
Well, if Xcode doesn't show it, there are other ways. And indeed, this @__EntryDefaultValue
macro makes the variable computed. So in Xcode 16.2, the behavior of @Entry
is different from Xcode 16.1.
Considering the number of bugs in SwiftUI, changing the existing behavior and adding such ambiguity is not a good solution.