Skip to content

Commit bfaf971

Browse files
committed
Update ViewBuilder.swift
1 parent 7113e0f commit bfaf971

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

Sources/OpenSwiftUICore/View/ViewBuilder.swift

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
//
22
// ViewBuilder.swift
3-
// OpenSwiftUI
3+
// OpenSwiftUICore
44
//
5-
// Audited for RELEASE_2023
5+
// Audited for iOS 18.0
66
// Status: Complete
77

88
@resultBuilder
9-
public enum ViewBuilder {
9+
public struct ViewBuilder {
1010
@_alwaysEmitIntoClient
1111
public static func buildExpression<Content>(_ content: Content) -> Content where Content: View {
1212
content
1313
}
14+
15+
@available(*, unavailable, message: "this expression does not conform to 'View'")
16+
@_disfavoredOverload
17+
@_alwaysEmitIntoClient
18+
public static func buildExpression(_ invalid: Any) -> some View {
19+
fatalError()
20+
}
1421

1522
@_alwaysEmitIntoClient
1623
public static func buildBlock() -> EmptyView {
@@ -30,7 +37,7 @@ public enum ViewBuilder {
3037
}
3138

3239
@available(*, unavailable)
33-
extension ViewBuilder: Swift.Sendable {}
40+
extension ViewBuilder: Sendable {}
3441

3542
extension ViewBuilder {
3643
@_alwaysEmitIntoClient

0 commit comments

Comments
 (0)