Post

Replies

Boosts

Views

Activity

Reply to Failed to produce diagnostic for expression; please file a bug report
My build is failing and I don't know why. I received this error: Failed to produce diagnostic for expression; please file a bug report at var body: some View import SwiftUI struct CardListView: View {   @EnvironmentObject var wallet: Wallet       var headerView: some View {     HStack{       Text("Overview")         .fontWeight(.bold)         .font(.title)       Spacer()       Button(action: {         // What to perform       }) {         Image("add")           .resizable()           .frame(width: 40, height: 40)           .padding(.trailing)         }       }   }       var body: some View {     VStack {       headerView       ScrollView(.horizontal, showsIndicators: false) {         HStack(spacing: 10) { ForEach(wallet.cards.indices, id: \self) { index in Text(wallet.cards[index])                       }         }       }       Spacer()     }   } struct CardListView_Previews: PreviewProvider {   static var previews: some View {     CardListView()       .environmentObject(Wallet())     }   } } ```
Mar ’21