次の問題が発生し続けます。
(System.Console.ReadLine ()).Split [|'('; ')'|]
|> Array.filter (fun s -> not (System.String.IsNullOrEmpty (s)))
|> Array.map (fun s -> s.Split [|','|])
|> Array.map (fun s -> Array.map (fun t -> t.Trim ()) s) (* t.Trim () is underlined with a red squiggly line *)
|> [MORE CODE]
赤い波線に関連するエラーは次のとおりです。
Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved.
しかし、マウス ポインターが の上に置かれると、IntelliSense はそれが であるとt
正しく言います。t
type string
と書くことでエラーを回避できますがfun (t : string) -> [CODE]
、Visual Studio が変数の型を正しく検出しているのに、なぜ波線を描画するのか不思議です。これはトライアル ビルドの単純なバグですか、それとも F# の型推論について誤解しているのでしょうか?
ご回答ありがとうございます。