summaryrefslogtreecommitdiff
path: root/manual/manual/refman/classes.etex
diff options
context:
space:
mode:
Diffstat (limited to 'manual/manual/refman/classes.etex')
-rw-r--r--manual/manual/refman/classes.etex9
1 files changed, 9 insertions, 0 deletions
diff --git a/manual/manual/refman/classes.etex b/manual/manual/refman/classes.etex
index d9f27d7402..2480357c9f 100644
--- a/manual/manual/refman/classes.etex
+++ b/manual/manual/refman/classes.etex
@@ -27,6 +27,7 @@ class-type:
class-body-type:
'object' ['(' typexpr ')'] {class-field-spec} 'end'
| ['[' typexpr {',' typexpr} ']'] classtype-path
+ | 'let' 'open' module-path 'in' class-body-type
;
%\end{syntax} \begin{syntax}
class-field-spec:
@@ -75,6 +76,10 @@ virtual method will match a concrete method, which makes it possible
to forget its implementation. An immutable instance variable will match a
mutable instance variable.
+\subsubsection*{Local opens}
+
+Local opens are supported in class types since OCaml 4.06.
+
\subsubsection*{Inheritance}
\ikwd{inherit\@\texttt{inherit}}
@@ -173,6 +178,7 @@ class-expr:
| 'fun' {{parameter}} '->' class-expr
| 'let' ['rec'] let-binding {'and' let-binding} 'in' class-expr
| 'object' class-body 'end'
+ | 'let' 'open' module-path 'in' class-expr
;
%BEGIN LATEX
\end{syntax} \begin{syntax}
@@ -258,6 +264,9 @@ definition, it will be evaluated when the class is created (just as if
the definition was outside of the class).
Otherwise, it will be evaluated when the object constructor is called.
+\subsubsection*{Local opens}
+
+Local opens are supported in class expressions since OCaml 4.06.
\subsubsection*{Class\label{ss:class-body} body}
\begin{syntax}