title: SwiftUI: Generic parameter 'C0' could not be inferred
body: <p>I've been working with this code and I keep getting this error: ''Generic parameter 'C0' could not be inferred'' Additionally it says 'In call to function 'buildBlock' (SwiftUI.ViewBuilder)'on my <code>HStack</code> when I include this line of code: </p>
  
  <pre><code>self.userData.tempBatchUnit = productName
  </code></pre>
  
  <p>I am not sure why. The code works fine without that line of code. Many thanks</p>
  
  <pre><code>struct enterProductUnitView: View {
      @EnvironmentObject var userData: UserData
      @State var productName: String = ""
  
      var body: some View {
          VStack {
              HStack { // error Generic parameter 'C0' could not be inferred
                  Text("Product Unit:")
                      .font(.headline)
                  Spacer()
                  NavigationLink(destination: InstructionsView(desireInstructions: "Product Unit")) {
                      Text("?")
                  }
              }
  
               Text("ex: bags of popcorn, jars of jam etc.")
                  .font(.subheadline)
              TextField("Enter here", text: $productName)
                  .textFieldStyle(RoundedBorderTextFieldStyle())
                  .padding()
                  .padding(.leading)
              self.userData.tempBatchUnit = productName
          }
      }
  }
  </code></pre>