Commit c420e50c authored by POTTIER Francois's avatar POTTIER Francois

Comment.

parent 6f079a2e
...@@ -1046,7 +1046,16 @@ type of every method. ...@@ -1046,7 +1046,16 @@ type of every method.
% A curious remark: even though the private methods do not appear in the type % A curious remark: even though the private methods do not appear in the type
% of self, OCaml still allows their types to contain unconstrained type % of self, OCaml still allows their types to contain unconstrained type
% variables. % variables. For instance, the following is allowed, with and without
% self-parameterization:
%
% class virtual foo = object
% method private virtual f: _
% end
%
% class virtual ['self] foo = object (_ : 'self)
% method private virtual f: _
% end
We modify the example as follows. We parameterize the class over a single type We modify the example as follows. We parameterize the class over a single type
variable, named \oc|'self|, which we constrain to be the type of ``self'', via variable, named \oc|'self|, which we constrain to be the type of ``self'', via
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment