summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camlp4/Camlp4Parsers/Camlp4OCamlRevisedParser.ml2
-rw-r--r--camlp4/test/fixtures/original_syntax.ml2
2 files changed, 4 insertions, 0 deletions
diff --git a/camlp4/Camlp4Parsers/Camlp4OCamlRevisedParser.ml b/camlp4/Camlp4Parsers/Camlp4OCamlRevisedParser.ml
index 229d111d0..10b8d9938 100644
--- a/camlp4/Camlp4Parsers/Camlp4OCamlRevisedParser.ml
+++ b/camlp4/Camlp4Parsers/Camlp4OCamlRevisedParser.ml
@@ -1256,6 +1256,8 @@ Very old (no more supported) syntax:
<:class_str_item< inherit $ce$ as $pb$ >>
| value_val; mf = opt_mutable; lab = label; e = cvalue_binding ->
<:class_str_item< value $mutable:mf$ $lab$ = $e$ >>
+ | value_val; mf = opt_mutable; "virtual"; l = label; ":"; t = poly_type ->
+ <:class_str_item< value virtual $mutable:mf$ $l$ : $t$ >>
| value_val; "virtual"; mf = opt_mutable; l = label; ":"; t = poly_type ->
<:class_str_item< value virtual $mutable:mf$ $l$ : $t$ >>
| "method"; "virtual"; pf = opt_private; l = label; ":"; t = poly_type ->
diff --git a/camlp4/test/fixtures/original_syntax.ml b/camlp4/test/fixtures/original_syntax.ml
index bb498b417..72d733ea9 100644
--- a/camlp4/test/fixtures/original_syntax.ml
+++ b/camlp4/test/fixtures/original_syntax.ml
@@ -1 +1,3 @@
fun x when x <> 0 -> x / 42
+;;
+object val virtual mutable x : int val mutable virtual y : int end