From ad1fbf97691a28fba55ac282b2b15b5e983c4347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathana=C3=ABlle=20Courant?= Date: Fri, 15 Dec 2023 13:18:21 +0100 Subject: [PATCH] Add tests for #2142 --- ocaml/testsuite/tests/typing-local/local_optparam.ml | 6 ++++++ ocaml/testsuite/tests/typing-local/local_optparam.reference | 0 2 files changed, 6 insertions(+) create mode 100644 ocaml/testsuite/tests/typing-local/local_optparam.ml create mode 100644 ocaml/testsuite/tests/typing-local/local_optparam.reference diff --git a/ocaml/testsuite/tests/typing-local/local_optparam.ml b/ocaml/testsuite/tests/typing-local/local_optparam.ml new file mode 100644 index 00000000000..79b892bac89 --- /dev/null +++ b/ocaml/testsuite/tests/typing-local/local_optparam.ml @@ -0,0 +1,6 @@ +(* TEST *) + +let foo (local_ f) l = l +let go a b g ?(x = foo (fun y -> a, y) b) () = + let x = foo (fun y -> a, y) x in + g x \ No newline at end of file diff --git a/ocaml/testsuite/tests/typing-local/local_optparam.reference b/ocaml/testsuite/tests/typing-local/local_optparam.reference new file mode 100644 index 00000000000..e69de29bb2d