I have this code in my SwiftUI view struct
HStack{
Text("Direction")
Spacer()
Picker("Direction", selection: $selectorIndex) {
ForEach(0 ..< directions.count) { index in
Text(self.directions[index]).tag(index)
}
}
.pickerStyle(SegmentedPickerStyle())
}
Picker("From status", selection: $fromStatus2) {
ForEach(Self.orderStatusFromArray, id: \.self) { status in
Text(status)
}
}
So far so good. If I now break it on purpose by changing line 12 to
Picker("From status", selection: "025") {
Xcode now indicates that there is an error on line 06
Generic parameter 'S' could not be inferred
1. In call to initializer (SwiftUI.Text)
Shouldn't it rather indicate that the error is on line 12 instead of 6?
Max