diff --git a/CotEditor/Sources/AboutView.swift b/CotEditor/Sources/AboutView.swift index 071cda77d..d9cd2a1be 100644 --- a/CotEditor/Sources/AboutView.swift +++ b/CotEditor/Sources/AboutView.swift @@ -255,7 +255,7 @@ private struct CreditsView: View { var content: () -> Content - init(_ label: String, content: @escaping () -> Content) { + init(_ label: String, @ViewBuilder content: @escaping () -> Content) { self.label = label self.content = content diff --git a/CotEditor/Sources/PopoverHolderView.swift b/CotEditor/Sources/PopoverHolderView.swift index 233e3e7d5..d7bd3d1ea 100644 --- a/CotEditor/Sources/PopoverHolderView.swift +++ b/CotEditor/Sources/PopoverHolderView.swift @@ -51,11 +51,11 @@ private extension Edge { } -private struct PopoverHolderView: NSViewRepresentable { +private struct PopoverHolderView: NSViewRepresentable { @Binding var isPresented: Bool let arrowEdge: Edge - var content: () -> T + @ViewBuilder var content: () -> Content func makeNSView(context: Context) -> NSView { diff --git a/CotEditor/Sources/SyntaxFileMappingEditView.swift b/CotEditor/Sources/SyntaxFileMappingEditView.swift index f7408fe74..916dc4043 100644 --- a/CotEditor/Sources/SyntaxFileMappingEditView.swift +++ b/CotEditor/Sources/SyntaxFileMappingEditView.swift @@ -78,7 +78,7 @@ struct SyntaxFileMappingEditView: View { @Binding var items: [Item] - let label: () -> (Label) + let label: () -> Label @State private var selection: Set = [] @FocusState private var focusedField: Item.ID? diff --git a/CotEditor/Sources/WrappingHStack.swift b/CotEditor/Sources/WrappingHStack.swift index e6d210f42..7c1fbb82b 100644 --- a/CotEditor/Sources/WrappingHStack.swift +++ b/CotEditor/Sources/WrappingHStack.swift @@ -29,7 +29,7 @@ struct WrappingHStack: View { var horizontalSpacing: Double = 4 var verticalSpacing: Double = 4 - var content: () -> Content + @ViewBuilder var content: () -> Content var body: some View {