I tried to use a tuple to create a new instance of a class defined in F#. To duplicate the problem, I tried the following code.
type test(x: int, y:int) =
let distance =
x * x + y * y |> float |> sqrt
new (x: int, y:int, z:int) =
new test(x, y)
let args = 1, 2
let test2 = new test(args)
It complains that
Error 1 The member or object constructor 'test' does not take 1 argument(s). An overload was found taking 2 arguments.
If I remove the non-default constructor, things are fine. I don't understand why it becomes two/three arguments instead of tuples.
Thank you very much.