Skip to content

Commit ae7430e

Browse files
committed
should fix CI issues caused by different swift version than I apparently use locally
1 parent 635c216 commit ae7430e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/SwiftCrossUI/Environment/Environment.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
@propertyWrapper
3838
public struct Environment<Value>: DynamicProperty {
3939
var keyPath: KeyPath<EnvironmentValues, Value>?
40-
var environmentKey: EnvironmentKey.Type?
40+
var environmentKey: (any EnvironmentKey.Type)?
4141
var value: Box<Value?>
4242

4343
public func update(
@@ -47,15 +47,15 @@ public struct Environment<Value>: DynamicProperty {
4747
if let keyPath {
4848
value.value = environment[keyPath: keyPath]
4949
} else if let environmentKey {
50-
value.value = environment[environmentKey] as! Value
50+
value.value = (environment[environmentKey] as! Value)
5151
}
5252
}
5353

5454
public var wrappedValue: Value {
5555
guard let value = value.value else {
5656
fatalError(
5757
"""
58-
Environment value \(keyPath) used before initialization. Don't \
58+
Environment value \(keyPath.debugDescription) used before initialization. Don't \
5959
use @Environment properties before SwiftCrossUI requests the \
6060
view's body.
6161
"""

0 commit comments

Comments
 (0)