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

Answered by MobileTen in 772471022
Accepted Answer
SwiftUI View with variadic generics
 
 
Q