I'm getting this error when I try to compile
The operator 'expr.[idx]' has been used on an object of indeterminate type based on information prior to this program point. Consider adding further type constraints
This is the code
let convertFile fileName =
let arrayToTransaction (arr: string[]) =
arr
|> Array.map (fun x -> splitStr [|"\n"|])
|> Array.map
(fun x -> {
date = DateTime.Parse(x.[1]);
payee = x.[0].Substring(0, x.[0].IndexOf(','))
category = "Everyday Expenses: Groceries/Food"
memo = "Parsed with my F# parser"
outflow = Single.Parse(x.[2].Substring(str.IndexOf('-') + 1))
inflow = 0.0f
})