I'm basically asking why the following lines of codes do not compile:
type IGenericType<'a> =
abstract member MyFunc : 'a -> 'a -> 'a
type Implementer() =
member x.Test () () = () // unit->unit->unit
interface IGenericType<unit> with
member x.MyFunc a b = b // FS0017
// member x.MyFunc () () = () // FS0017
Just curious if there is a method to make this work as intended. I assume this is a limitation which has to to with the implementation of unit and generics.
Im using the following workaround at the moment:
type Nothing =
| Nothing
type Implementer() =
interface IGenericType<Nothing> with
member x.MyFunc a b = b
Hope someone can bring some light over this behavior.