I have this Multiplatform app project I started with Xcode 12 beta 5, 3 days ago I updated Xcode to the latest version (12.0, build 12A7209) from App Store and now there's a problem with this piece of code
.navigationBarItems(trailing: HStack {
Button(action: {
self.showSettings.toggle()
}, label: {
Image(systemName: "gear").font(.system(size: 30))
})
.sheet(isPresented: $showSettings, content: {
SettingsView(showSheet: $showSettings)
})
})
When I try to add a leading HStack:
.navigationBarItems(leading: HStack {
Button("Hello") {
print("Hello")
}
}, trailing: HStack {
Button(action: {
self.showSettings.toggle()
}, label: {
Image(systemName: "gear").font(.system(size: 30))
})
.sheet(isPresented: $showSettings, content: {
SettingsView(showSheet: $showSettings)
})
})
I get this error: The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
Edit: I tried to replicate it in a new project but I don't get the error so this happen only on this "old" project