mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Serialize the relationship between a property that has an attached delegate and its backing variable, so deserialization can reestablish that link. Fixes rdar://problem/50447022.
13 lines
214 B
Swift
13 lines
214 B
Swift
@_propertyDelegate
|
|
public struct SomeDelegate<T> {
|
|
public var value: T
|
|
|
|
public init(initialValue: T) {
|
|
self.value = initialValue
|
|
}
|
|
}
|
|
|
|
public struct HasDelegates {
|
|
@SomeDelegate public var x: Int = 17
|
|
}
|