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
I also opined that the expression `UnsafeMutablePointer(&s.prop)` should never have compiled in the first place (I can't imagine which initializer the compiler imagines this would be), and that this, not the behavior when setting through the pointer's `pointee`, was the actual surprise.
However, I'm out of my depth.
The text was updated successfully, but these errors were encountered:
The original example no longer behaves as described in Swift 5.4. Also, it produces a warning: "Initialization of 'UnsafeMutablePointer<Int>' results in a dangling pointer".
Additional Detail from JIRA
md5: 7584086bf8002310dcab41ac775b8904
relates to:
Issue Description:
The following observation was made today on Stack Overflow:
This was said to be odd because things behave "as expected" if there is no setter observer on `prop`.
My response was to suggest that the way to get the expected result was to write:
I also opined that the expression `UnsafeMutablePointer(&s.prop)` should never have compiled in the first place (I can't imagine which initializer the compiler imagines this would be), and that this, not the behavior when setting through the pointer's `pointee`, was the actual surprise.
However, I'm out of my depth.
The text was updated successfully, but these errors were encountered: