From a248003674f79052b0c1287cf7fbfedfbfa22aa3 Mon Sep 17 00:00:00 2001 From: Tim-ats-d Date: Thu, 20 Nov 2025 16:46:43 +0100 Subject: [PATCH] Add a test to ensure the illustrate the behavior of `type-enclosing` command showed in issue #1949. --- tests/test-dirs/type-enclosing/issue1949.t | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/test-dirs/type-enclosing/issue1949.t diff --git a/tests/test-dirs/type-enclosing/issue1949.t b/tests/test-dirs/type-enclosing/issue1949.t new file mode 100644 index 0000000000..57570b7b76 --- /dev/null +++ b/tests/test-dirs/type-enclosing/issue1949.t @@ -0,0 +1,11 @@ + $ cat >main.ml < let foo a b = b + > EOF + + $ $MERLIN single type-enclosing -position 1:6 -filename main.ml 'b -> 'b" + +Inconsistent type variables are returned by `type-enclosing`. In term of user experience, the type of `b` it should be `'b`. +See https://github.com/ocaml/merlin/issues/1949. + $ $MERLIN single type-enclosing -position 1:14 -filename main.ml