Xcode gives me:
“Failed to produce diagnostic for expression…” when I include the code between /* and */ .
I thought I had faithfully followed the video for M2L14.
The code below the dotted line is a modification of business.swift of M6L12
var body: some View {
VStack (alignment: .leading) {
HStack {
// Office and picture
VStack (alignment: .leading) {
Image(String(business.name ?? ""))
.resizable()
.frame(width:58, height:58)
.cornerRadius(5)
.scaledToFit()
Text(business.name ?? "")
.bold()
}
Spacer()
/*
HStack {
{ ForEach (business.AWTStaff,id:/.self) { r in Text(r) }
}
}
*/
}
Divider()
}
.foregroundColor(.black)
}
}
import Foundation
class Business: Decodable, Identifiable, ObservableObject {
@Published var imageData: Data?
var id: String?
var alias: String?
var name: String?
var imageUrl: String?
var isClosed: Bool?
var url: String?
var reviewCount: Int?
var categories: [Category]?
var rating: Double?
var coordinates: Coordinate?
var transactions: [String]?
var price: String?
var location: Location?
var phone: String?
var displayPhone: String?
var distance: Double?
var Address: String?
var AWTStaff: [String]?
enum CodingKeys: String, CodingKey {
case imageUrl = "image_url"
case isClosed = "is_closed"
case reviewCount = "review_count"
case displayPhone = "display_phone"
case id
case alias
case name
case url
case categories
case rating
case coordinates
case transactions
case price
case location
case phone
case distance
case Address
case AWTStaff
}