From a2df51bbe02db227d320aef4be4f2f8ba63c019a Mon Sep 17 00:00:00 2001 From: Lucccyo Date: Fri, 19 Dec 2025 11:22:03 +0100 Subject: [PATCH 1/2] Add reproduction case --- tests/test-dirs/issue1980.t | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tests/test-dirs/issue1980.t diff --git a/tests/test-dirs/issue1980.t b/tests/test-dirs/issue1980.t new file mode 100644 index 0000000000..fc1c42dfa7 --- /dev/null +++ b/tests/test-dirs/issue1980.t @@ -0,0 +1,32 @@ + $ cat > test.ml < module rec M : sig + > val f : unit -> unit + > end = struct + > let f () = () + > end + > and N : sig + > val foo : unit -> unit + > end = struct + > let foo () = M.f () + > end + > let foo () = M.f () + > EOF + + $ ocamlmerlin single locate -position 11:16 -look-for implementation -filename test.ml < test.ml | jq .value + { + "file": "$TESTCASE_ROOT/test.ml", + "pos": { + "line": 4, + "col": 6 + } + } + +-- FIXME : Merlin should return the definition position instead of the declaration one + $ ocamlmerlin single locate -position 9:18 -look-for implementation -filename test.ml < test.ml | jq .value + { + "file": "$TESTCASE_ROOT/test.ml", + "pos": { + "line": 2, + "col": 6 + } + } From 3404b0c91867c931c2008c6ebddd7352c764b39a Mon Sep 17 00:00:00 2001 From: Lucccyo Date: Fri, 19 Dec 2025 11:45:10 +0100 Subject: [PATCH 2/2] Update Changelog --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index a1b98ec3db..8b46c7942f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,6 +8,7 @@ unreleased + test suite - Add a test to ensure the behavior showed in issue #1517 is no longer relevant (#1995) - Add a test to ensure the code fragment exhibited in issue #1118 no longer makes Merlin crash (#1996) + - Add a test to ensure the behavior showed in issue #1980 merlin 5.6 ==========