diff --git a/Sources/OpenSwiftUI/Data/Environment/CachedEnvironment.swift b/Sources/OpenSwiftUI/Data/Environment/CachedEnvironment.swift index f5bd3512..be8bb48c 100644 --- a/Sources/OpenSwiftUI/Data/Environment/CachedEnvironment.swift +++ b/Sources/OpenSwiftUI/Data/Environment/CachedEnvironment.swift @@ -6,19 +6,24 @@ // Status: WIP // ID: C424ABD9FC88B2DFD0B7B2319F2E7987 +import Foundation internal import OpenGraphShims struct CachedEnvironment { var environment: Attribute private var items: [Item] + #if canImport(Darwin) private var constants: [HashableConstant: OGAttribute] + #endif private var animatedFrame: AnimatedFrame? // private var resolvedFgStyles: [ResolvedFgStyle : Swift<_ShapeStyle_Resolved.ResolvedFg>] init(_ environment: Attribute) { self.environment = environment items = [] + #if canImport(Darwin) constants = [:] + #endif animatedFrame = nil // resolvedFgStyles = [:] } @@ -41,7 +46,9 @@ struct CachedEnvironment { extension CachedEnvironment { private struct Item { var key: PartialKeyPath + #if canImport(Darwin) var value: OGAttribute + #endif } }