title: Generic parameter 'S' could not be inferred + Ambiguous reference to member 'count'
body: <p>I am facing a strange error with that Swift code inside a View:</p>
  
  <p>Swift file 1</p>
  
  <pre><code>[...]
      let cookingDifficulties: [String] = ["Very easy","Easy","Medium","Difficult"]
  [...]
  </code></pre>
  
  <p>Swift file 2: that one compiles</p>
  
  <pre><code>[...]
      Picker(selection: $selectedCookingDifficulty, label: Text("")) {
                  ForEach(0..&lt;cookingDifficulties.count) {
                      Text(cookingDifficulties[$0])
                  }
              }.pickerStyle(SegmentedPickerStyle())
  [...]
  </code></pre>
  
  <p>Swift file 3: that one returns the Generic parameter 'S' could not be inferred error</p>
  
  <pre><code>[...]
              HStack{
                  Text("Difficulty: ")
                  Picker(selection: $selectedCookingDifficulty, label: Text("")) {
                      ForEach(0..&lt;cookingDifficulties.count) { //--&gt; Ambiguous reference to member 'count'
                          Text(cookingDifficulties[$0]) //--&gt; Generic parameter 'S' could not be inferred
                      }
                  }.pickerStyle(SegmentedPickerStyle())
              }
  [...]
  </code></pre>
  
  <p>I spent a couple of hours to search for an answer but without success.
  Anyone would have a great idea please ?</p>