base
ここの実装を呼び出せないのはなぜですかf
:
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
を呼び出すとbase.f
、次のコンパイラ エラーが発生します。
error FS0419: 'base' values may only be used to make direct calls to the base implementations of overridden members
f
単一の引数を取るように変更すると、コンパイルされます。おそらくこれは、カリー化されたパラメーターとタプルされたパラメーターに関係していますが、上記のコードは私には問題ないようです。