File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Sources/OpenSwiftUICore/Data/Binding
Tests/OpenSwiftUICoreTests/Data/Binding Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -363,7 +363,7 @@ package struct FunctionalLocation<Value>: Location {
363363 }
364364
365365 package static func == ( lhs: FunctionalLocation < Value > , rhs: FunctionalLocation < Value > ) -> Bool {
366- compareValues ( lhs, rhs)
366+ compareValues ( lhs. functions , rhs. functions )
367367 }
368368}
369369
Original file line number Diff line number Diff line change @@ -136,5 +136,13 @@ struct LocationTests {
136136 location. set ( 2 , transaction: . init( ) )
137137 #expect( location. wasRead == true )
138138 #expect( location. get ( ) == 4 )
139+
140+ let location2 = FunctionalLocation {
141+ value. count
142+ } setValue: { newCount, _ in
143+ value. count = newCount * newCount
144+ }
145+ #expect( location2 != location)
146+ #expect( location == location)
139147 }
140148}
You can’t perform that action at this time.
0 commit comments