4
type A() =
static member B() =()
static member B(x) = B() //ERROR: The value or constructor 'B' is not defined
type A() =
static member B() =()
static member B(x) = B() //ERROR: The value or constructor 'B' is not defined
當引用F#中的靜態成員時,需要使用全名(包括類型的名稱)。 F#編譯器不會自動查找當前類的靜態成員。
下面應該工作:
type A() =
static member B() =()
static member B(x) = A.B()