@@ -210,12 +210,12 @@ internal struct AnyMetatypeWrapper: Hashable, Equatable, Sendable {
210210 state. otherProperties [ AnyMetatypeWrapper ( metatype: P . self) ] = newValue
211211
212212 // Generate an array of myself + children values of the property
213- let flattenedChildrenValues : [ P . Value ? ] = {
213+ let flattenedChildrenValues : [ P . Value ] = {
214214 let childrenDictionary = state. childrenOtherProperties [ AnyMetatypeWrapper ( metatype: P . self) ]
215- var childrenValues : [ P . Value ? ] = [ ]
215+ var childrenValues : [ P . Value ] = [ ]
216216 if let dictionary = childrenDictionary {
217217 for (_, value) in dictionary {
218- if let value = value as? [ P . Value ? ] {
218+ if let value = value as? [ P . Value ] {
219219 childrenValues. append ( contentsOf: value)
220220 }
221221 }
@@ -224,7 +224,7 @@ internal struct AnyMetatypeWrapper: Hashable, Equatable, Sendable {
224224 } ( )
225225
226226 // Send the array of myself + children values of property to parents
227- let updateValueForParent : [ P . Value ? ] = [ newValue] + flattenedChildrenValues
227+ let updateValueForParent : [ P . Value ] = [ newValue] + flattenedChildrenValues
228228 manager. parents. withLock { [ manager] parents in
229229 for (parent, _) in parents {
230230 parent. updateChildrenOtherProperties ( property: P . self, child: manager, value: updateValueForParent)
@@ -307,7 +307,7 @@ internal struct AnyMetatypeWrapper: Hashable, Equatable, Sendable {
307307 /// Returns an array of values for specified property in subtree.
308308 /// - Parameter metatype: Type of property.
309309 /// - Returns: Array of values for property.
310- public func values< P: Property > ( of property: P . Type ) -> [ P . Value ? ] {
310+ public func values< P: Property > ( of property: P . Type ) -> [ P . Value ] {
311311 _ $observationRegistrar. access ( self , keyPath: \. state)
312312 return state. withLock { state in
313313 let childrenValues = getFlattenedChildrenValues ( property: property, state: & state)
0 commit comments