Skip to content

Commit e58c62a

Browse files
committed
Fix compilation
1 parent c29a790 commit e58c62a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Benchmarks/Tests/ViewTest.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
import SwiftUI
22

33
struct ViewTest<Content: View>: _ViewTest {
4-
let rootView: () -> Content
4+
let rootView: @MainActor () -> Content
55

66
func initRootView() -> some View {
7-
rootView()
7+
MainActor.assumeIsolated {
8+
rootView()
9+
}
810
}
911

1012
func initSize() -> CGSize {
11-
UIScreen.main.bounds.size
13+
MainActor.assumeIsolated {
14+
UIScreen.main.bounds.size
15+
}
1216
}
1317

1418
func perform(_ body: () -> Void) {

0 commit comments

Comments
 (0)