Skip to content

Commit e0b090c

Browse files
authored
Update State implementation (#537)
1 parent 0bc6eae commit e0b090c

File tree

4 files changed

+310
-84
lines changed

4 files changed

+310
-84
lines changed

Sources/OpenSwiftUICore/Data/DynamicProperty/Namespace.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
// Namespace.swift
33
// OpenSwiftUICore
44
//
5-
// Audited for 6.0.87
5+
// Audited for 6.5.4
66
// Status: Complete
77
// ID: 79F323039D8AB6E63210271E57AD5E86 (SwiftUICore)
88

99
/// A dynamic property type that allows access to a namespace defined
1010
/// by the persistent identity of the object containing the property
1111
/// (e.g. a view).
12+
@available(OpenSwiftUI_v2_0, *)
1213
@frozen
1314
@propertyWrapper
1415
public struct Namespace: DynamicProperty, Sendable {

Sources/OpenSwiftUICore/Data/Location/Location.swift

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,30 @@ open class AnyLocation<Value>: AnyLocationBase, @unchecked Sendable {
4848
}
4949

5050
@_spi(ForOpenSwiftUIOnly)
51-
open func get() -> Value { _openSwiftUIBaseClassAbstractMethod() }
52-
53-
@_spi(ForOpenSwiftUIOnly)
54-
open func set(_ value: Value, transaction: Transaction) { _openSwiftUIBaseClassAbstractMethod() }
55-
51+
open func get() -> Value {
52+
_openSwiftUIBaseClassAbstractMethod()
53+
}
54+
5655
@_spi(ForOpenSwiftUIOnly)
5756
open func projecting<P>(_ projection: P) -> AnyLocation<P.Projected> where Value == P.Base, P: Projection {
5857
_openSwiftUIBaseClassAbstractMethod()
5958
}
60-
59+
6160
@_spi(ForOpenSwiftUIOnly)
62-
open func update() -> (Value, Bool) { _openSwiftUIBaseClassAbstractMethod() }
63-
61+
open func set(_ value: Value, transaction: Transaction) {
62+
_openSwiftUIBaseClassAbstractMethod()
63+
}
64+
6465
@_spi(ForOpenSwiftUIOnly)
65-
open func isEqual(to other: AnyLocation<Value>) -> Bool { self === other }
66-
66+
open func update() -> (Value, Bool) {
67+
_openSwiftUIBaseClassAbstractMethod()
68+
}
69+
70+
@_spi(ForOpenSwiftUIOnly)
71+
open func isEqual(to other: AnyLocation<Value>) -> Bool {
72+
self === other
73+
}
74+
6775
package override init() {
6876
super.init()
6977
}

0 commit comments

Comments
 (0)