summaryrefslogtreecommitdiff
path: root/testsuite/tests/letrec/class_2.ml
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/letrec/class_2.ml')
-rw-r--r--testsuite/tests/letrec/class_2.ml8
1 files changed, 8 insertions, 0 deletions
diff --git a/testsuite/tests/letrec/class_2.ml b/testsuite/tests/letrec/class_2.ml
new file mode 100644
index 0000000000..71c7880d67
--- /dev/null
+++ b/testsuite/tests/letrec/class_2.ml
@@ -0,0 +1,8 @@
+(* class expressions may also contain local recursive bindings *)
+class test =
+ let rec f = print_endline "f"; fun x -> g x
+ and g = print_endline "g"; fun x -> f x in
+object
+ method f : 'a 'b. 'a -> 'b = f
+ method g : 'a 'b. 'a -> 'b = g
+end