code.ml (ocaml)
- class virtual number: object ('a)
- method virtual value: 'b
- method virtual plus: 'a -> 'a
- end = object
- method virtual value: 'b
- method virtual plus: 'a -> 'a
- end
error.txt
- Error: The class type
- object method virtual plus : 'a -> 'a method virtual value : 'b end
- is not matched by the class type
- object ('a)
- method virtual plus : 'a -> 'a
- method virtual value : 'b
- end
- The method plus has type 'a -> 'a but is expected to have type
- (< plus : 'b; value : 'd. 'd; .. > as 'c) -> 'c as 'b