Reputation: 47904
type A() =
static member B() = ()
static member B(x) = B() //ERROR: The value or constructor 'B' is not defined
Upvotes: 4
Views: 166
Reputation: 243061
When refering to a static member in F#, you need to use the full name (including the name of the type). The F# compiler doesn't automatically look for static members of the current class.
The following should work:
type A() =
static member B() = ()
static member B(x) = A.B()
Upvotes: 5