I have the following code
module File1
let convert<'T> x = x
type myType () =
member this.first<'T> y =
convert<'T> y
member this.second<'T> ys =
ys
|> Seq.map this.first<'T>
On the last 'T
I get the error Unexpected type arguments
. When for example I call let x = myType.first<int> "34"
there are no warnings and everything works as expected. Leaving of the type argument gets rid of the warning and the program behaves as intended some of the time.
Can anyone explain what's going on here?
Thanks