SwiftUI View with variadic generics

For some reason Xcode can't build SwiftUI views with variadic generics. Sample code is:

struct CustomView<each T>: View {
    var body: some View {
        Color.red
    }
}

Error message is empty but sometimes it's possible to get a common error with no details in log:

Command SwiftEmitModule failed with a nonzero exit code

What I'm doing wrong? Xcode versions: 15.1.0 beta 3 and 15.0 RC

Accepted Reply

Replies