Why can't I call the base
implementation of f
here:
type Base =
abstract f : int -> int -> int
default this.f (x : int) (y : int) : int = x + y
type Derived =
inherit Base
override this.f (x : int) (y : int) : int = base.f -x -y
The call to base.f
elicits this compiler error:
error FS0419: 'base' values may only be used to make direct calls to the base implementations of overridden members
If I change f
to take a single argument then it compiles. Presumably this is something to do with curried parameters vs tupled parameters, but the above code looks fine to me.