Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Sat Dec 20 11:15:42 CET 2025
+ 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
- Add a test case illustrating how a snippet produces two unrelated errors in issue #2000. (#2003)
- Add a test reproducing issue #1983 where `document` command which sometime concatenates consecutive variants and labels (#2005)
- Signature-help should trigger on unfinished `let ... in` bindings (#2009)
Expand Down
32 changes: 32 additions & 0 deletions tests/test-dirs/issue1980.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
$ cat > test.ml <<EOF
> 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
}
}
Loading