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
macOS Big Sur Beta 6
Xcode 12.0 Beta 6
Apple Swift version 5.3 (swiftlang-1200.0.28.1 clang-1200.0.30.1)
x86_64-apple-darwin20.1.0
Additional Detail from JIRA
Votes
0
Component/s
Compiler
Labels
Bug
Assignee
briantkelley (JIRA)
Priority
Medium
md5: 1aad3a12f6edcdb532443a87ca442d59
Issue Description:
In the attached sample program, an assignment is made through a property wrapper before and after the call to super.init(). The compiler leaks the resources assigned to the property at its definition.
The text was updated successfully, but these errors were encountered:
Thank you for investigating this and filing the issue!
The problem is that we're not re-writing assign_by_wrapper to re-assignment of the backing property wrapper in the case where it has already been initialized. Regardless of property observers, we can't call the getter or setter of the wrapped value before all of self is initialized because of enclosing self property wrappers, and it would be really unfortunate to not allow this kind of code for such property wrappers:
Attachment: Download
Environment
macOS Big Sur Beta 6
Xcode 12.0 Beta 6
Apple Swift version 5.3 (swiftlang-1200.0.28.1 clang-1200.0.30.1)
x86_64-apple-darwin20.1.0
Additional Detail from JIRA
md5: 1aad3a12f6edcdb532443a87ca442d59
Issue Description:
In the attached sample program, an assignment is made through a property wrapper before and after the call to super.init(). The compiler leaks the resources assigned to the property at its definition.
The text was updated successfully, but these errors were encountered: