title: Swift Struct compiler error "Return from initializer without initializing all stored properties"
body: <p>According to <a href="https://docs.swift.org/swift-book/LanguageGuide/Initialization.html" rel="nofollow noreferrer">The Swift Programming Language Book</a>...</p>
  
  <blockquote>
    <p>Memberwise Initializers for Structure Types
    Structure types automatically receive a memberwise initializer if they don’t define any of their own custom initializers. Unlike a default initializer, the structure receives a memberwise initializer even if it has stored properties that don’t have default values.</p>
  </blockquote>
  
  <p>However, I'm getting a "Return from initializer without initializing all stored properties" error if I try to compile while relying on this automatic memberwise initializer.</p>
  
  <p>Even more frustrating, sometimes if I clean the build folder it will compile, then a few builds later the error will be back. I'm using XCode Version 11.4 beta (11N111s).</p>
  
  <pre><code>struct OpenShoppingListPage: View {
  
      @Binding var tabSelection: Int
      @ObservedObject var storesData: StoresData
      @ObservedObject var shoppingListData: ShoppingListData
  
      var body: some View {
          List {
              ForEach(storesData.openShoppingLists) { eachLedger in
                  Button(action: {
                      self.shoppingListData.dataStack.currentReceipt = eachLedger
                      self.shoppingListData.refreshSections()
                      self.tabSelection = 0
                  }) {
                      HStack {
                          Text("\(eachLedger.dateLedger.shortDate())—\(eachLedger.myStore!.longName)")
                          Spacer()
                          Image(systemName: "chevron.right")
                      }
                  }
              }
          }.navigationBarTitle("Open Shopping Lists")
      }
  }
  </code></pre>
  
  <p>I can fix this by manually typing an init() as shown below. However, that's boilerplate that I was hoping to avoid by using Swift Struct. Is anyone else seeing this problem with recent XCode builds?</p>
  
  <pre><code>init(tabSelection: Binding&lt;Int&gt;, storesData: StoresData, shoppingListData: ShoppingListData) {
      self._tabSelection = tabSelection
      self.storesData = storesData
      self.shoppingListData = shoppingListData
  }
  </code></pre>
  
  <p>I have submitted feedback to Apple, but am hoping Stack Overflow can provide faster feedback.</p>