The following (simplified) snippet is taken from an application I'm implementing which consistently uses Type Parameters resolved statically.
type A< ^B when ^B : (static member MyMember : Unit -> Unit)> = {
Field : unit
}
type TestA = {
AField : A< BTy >
}
and BTy = {
BField : Unit
} with
static member MyMember () = ()
IntelliSense gives me the following error when I define the type of field AField (AField : A< BTy >) which is: The type 'BTy' does not support any operators named 'MyMember'.
EDITED.
Declaring them separately works, but if I have a mutual reference and I cannot declare a third type to put in the top which contains the common Infos of the two types. What should I do to avoid this problem? Anyway, if I define below the definitions let pluto = ("" :> obj) :?> A< BTy > it works, I imagine because both types are visible from the let binding.
Cannot be used on types.for statically resolved. - John Palmertype A, thentype BTy, thentype TestA? - bytebusterstaticmember constraints are listed on MSDN as a valid example - bytebuster