Open swift-ci opened 4 years ago
is duplicated by:
Issue Description:
For some reason the following code produces:
SomeSubClass init subWillSet - 105553175052640 123 321 SomeSuperClass init
It seems that the @propertyWrapper can at some point access an uninitialized memory area.
@propertyWrapper struct SomeWrapper { private var someValue: Int var wrappedValue: Int { get { someValue } set { someValue = newValue } } init(wrappedValue: Int) { someValue = wrappedValue } } class SomeSuperClass { @SomeWrapper var superProperty: Int init() { print("SomeSuperClass init") superProperty = 1 } } final class SomeSubClass: SomeSuperClass { @SomeWrapper var subProperty: Int = 123 { willSet { print("subWillSet - ", superProperty, subProperty, newValue) } } override init() { print("SomeSubClass init") subProperty = 321 super.init() } } let testObject = SomeSubClass()
@swift-ci create
Environment
Xcode: Version 11.3.1 (11C504) Swift: Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 1 | |Component/s | Compiler | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: cbb8599608eb9f716cf415a3616fff97is duplicated by:
Issue Description:
For some reason the following code produces:
It seems that the @propertyWrapper can at some point access an uninitialized memory area.