You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
you might want to change your chosen fix for the "Immutable property will not be decoded because it is declared with an initial value which cannot be overwritten" problem with the UUID id property and the Codable conformance.
The current fix allows item.id = UUID()—breaking the concept of having a stable unique ID:
Button("💣"){letsame=UUID()
for i in expenses.items.indices {
expenses.items[i].id = same
}}List{ForEach(expenses.items){ item in// ... depends on Identifiable and stable unique IDs}}
Whereas the proposal would prohibit it but still allow struct initialization and decoding.
The text was updated successfully, but these errors were encountered:
Hi,
you might want to change your chosen fix for the "Immutable property will not be decoded because it is declared with an initial value which cannot be overwritten" problem with the UUID
id
property and theCodable
conformance.⇓
instead of
The current fix allows
item.id = UUID()
—breaking the concept of having a stable unique ID:Whereas the proposal would prohibit it but still allow struct initialization and decoding.
The text was updated successfully, but these errors were encountered: