I'm getting an error that says
Here's my project.Failed to produce diagnostic for expression; please file a bug report
I'm getting an error that says
Here's my project.Failed to produce diagnostic for expression; please file a bug report
Update:
The problem has something to do with this codeCode Block swift Section(header: Text("Friends").sectionHeader()) { ForEach(user.friends, id: \.id) { friend in Button({ friendNavViewActive = true }, action: { NavigationLink(destination: DetailView(user:appData.users.first(where: { user in user.id == friend.id }) ), label: { HStack { Image(systemName: "person.circle") Text(friend.name) } }, IsActive: $friendNavViewActive) }) .buttonStyle(FriendLink()) } }
My Fix
Ok, so here's what I did. I'm going to leave this thread open incase there was an error with swiftUI, but this is definitely the better way to do what I was trying to do.Code Block swift Section(header: Text("Friends").sectionHeader()) { ForEach(user.friends, id: \.id) { friend in NavigationLink(destination: DetailView(user: appData.users.first(where: { $0.id == friend.id })!)) { HStack { Image(systemName: "person.circle") Text(friend.name) } .foregroundColor(.primary) } .buttonStyle(FriendLink()) } }