Skip to content

Commit 437bf77

Browse files
committed
Fix Linux build issue
1 parent 963ce3c commit 437bf77

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Sources/OpenSwiftUI/Core/Update/Update.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,11 @@ enum Update {
8686
} else {
8787
withoutActuallyEscaping(body) { escapableBody in
8888
MovableLock.syncMain(lock: lock) {
89+
#if canImport(Darwin)
8990
AnyRuleContext(attribute: AnyOptionalAttribute.current.identifier).update(body: escapableBody)
91+
#else
92+
fatalError("See #39")
93+
#endif
9094
}
9195
}
9296
}

Sources/OpenSwiftUI/Core/View/ViewGraph.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,11 @@ final class ViewGraph: GraphHost {
181181
}
182182

183183
func setRootView<V: View>(_ view: V) {
184+
#if canImport(Darwin)
184185
@Attribute(identifier: rootView)
185186
var rootView: V
186187
rootView = view
188+
#endif
187189
}
188190

189191
// MARK: - Override Methods

0 commit comments

Comments
 (0)