title: Type of expression is ambiguous without more context in Xcode 11
body: <p>I'm trying to refer to an <code>[Item]</code> list within an <code>@EnvironmentObject</code> however when accessing it within a <code>SwiftUI</code> <code>List</code>, I get the error. What I don't understand is, this error doesn't pop up when following <a href="https://developer.apple.com/tutorials/swiftui/handling-user-input" rel="noreferrer">Apple's Landmark tutorial</a>. </p>
  
  <p>As far as I can tell, the <code>[Item]</code> list is loading correctly as I can print it out and do other functions with it. It just bugs out when using it for a <code>SwiftUI</code> <code>List</code> Is there something I've missed?</p>
  
  <p>ItemHome.swift:</p>
  
  <pre><code>struct ItemHome : View {
  
      @EnvironmentObject var dataBank: DataBank
  
      var body: some View {
          List {
              ForEach(dataBank.itemList) { item in
                  Text("\(item.name)") // Type of expression is ambiguous without more context
              }
          }
      }
  }
  </code></pre>
  
  <p>Supporting code below:</p>
  
  <p>Item Struct:</p>
  
  <pre><code>struct Item {
  
      var id: Int
      var uid: String
      var company: String
      var item_class: String
      var name: String
      var stock: Int
      var average_cost: Decimal
      var otc_price: Decimal
      var dealer_price: Decimal
      var ctc_price: Decimal
  }
  </code></pre>
  
  <p>DataBank.swift:</p>
  
  <pre><code>final class DataBank : BindableObject {
      let didChange = PassthroughSubject&lt;DataBank, Never&gt;()
  
      var itemList: [Item] = load("itemsResults.json") {
          didSet {
              didChange.send(self)
          }
      }
  }
  
  func load&lt;T: Decodable&gt;(_ filename: String, as type: T.Type = T.self) -&gt; T {
  let data: Data
  
  guard let file = Bundle.main.url(forResource: filename, withExtension: nil)
      else {
          fatalError("Couldn't find \(filename) in main bundle.")
  }
  
  do {
      data = try Data(contentsOf: file)
  } catch {
      fatalError("Couldn't load \(filename) from main bundle:\n\(error)")
  }
  
  do {
      let decoder = JSONDecoder()
      return try decoder.decode(T.self, from: data)
  } catch {
      fatalError("Couldn't parse \(filename) as \(T.self):\n\(error)")
  }
  </code></pre>
  
  <p>}</p>
  
  <p>itemsResults.json:</p>
  
  <pre><code>[
      {
          "id": 1,
          "uid": "a019bf6c-44a2-11e9-9121-4ccc6afe39a1",
          "company": "Bioseed",
          "item_class": "Seeds",
          "name": "9909",
          "stock": 0,
          "average_cost": 0.0,
          "otc_price": 0.0,
          "dealer_price": 0.0,
          "ctc_price": 0.0
      },
      {
          "id": 2,
          "uid": "a019bf71-44a2-11e9-9121-4ccc6afe39a1",
          "company": "Pioneer",
          "item_class": "Seeds",
          "name": "4124YR",
          "stock": 0,
          "average_cost": 0.0,
          "otc_price": 0.0,
          "dealer_price": 0.0,
          "ctc_price": 0.0
      }
  ]
  </code></pre>