[<AbstractClass>]
.First attempt:
> type C =
inherit Exception
new () = {inherit Exception()}
abstract print : unit -> unit
;;
type C =
-----^
stdin(14,6): error FS0365: No implementation was given for 'abstract member C.print : unit -> unit'
Now apply the annotation and, hey presto, the compiler responds with:
type C =
class
inherit Exception
new : unit -> C
abstract member print : unit -> unit
end
But why the compiler can't work it out for itself I don't know.
No comments:
Post a Comment