Can a static member be overloaded?
type A() =
static member B() = ()
static member B(x) = B() //ERROR: Th开发者_StackOverflowe value or constructor 'B' is not defined
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()
精彩评论