Add a new attribute
[<Prototype(?bool)>] (name discussable).
- Default behavior:
A record type has a prototype iff one of the following is true: - It has instance members. - It implements an interface. - With
[<Prototype>] (or equivalently
A record type always has a prototype. - With
A record type never has a prototype.
- Instance members are compiled into static members with 1 extra first arg. - If it tries to implement an interface, compile error. - Note: if a record type doesn't have a prototype (for any of the above reasons), then trying to type-test against it throws a compile error.