Post

Replies

Boosts

Views

Created

"Failed to produce a diagnostic for expression; please file a bug report" error.
İ am getting "Failed to produce a diagnostic for expression; please file a bug report" error. import SwiftUI struct ContentView: View {     let lifeformanalyzer = Lifeformanalyzer()     @State var text = ""     @State var title = "Merhaba insan!"          var body: some View { ————> error is here         VStack {             Image(systemName: "face.smiling.fill")                 .imageScale(.large)                 .foregroundColor(.accentColor)                 .padding(.top, 50)             Text(title)                 .font(.largeTitle)                          Spacer()                          TextField("Birşey yazın", text: $text)                 .multilineTextAlignment(.center)                 .frame(width: 300)                          Spacer()                          Button("Gönder") {                 submit()             }                          Spacer()                      }                                   .padding()         .frame(maxWidth: .infinity, maxHeight: .infinity)         .background(Color(red: 0.024, green: 0.392, blue: 0.549))         .ignoresSafeArea()                  func submit() {                      }     var title = "Merhaba \(lifeformanalyzer.processLifeform(text: text))!"                       }                     } The other swift file Lifeformanalyzer: class Lifeformanalyzer {          func processLifeform(text: String) -> String{                  text.lowercased().contains("vak")         ? "ördek" : "insan"     } }
2
0
1k
Apr ’22