Skip to content

Jump to definition: jumps to decl inside recursive modules #1980

@trefis

Description

@trefis
  • /tmp/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 ()
  • tests:
$ ocamlmerlin single locate -position 10:18 -look-for implementation -filename test.ml < /tmp/test.ml | jq .value
{
  "file": "test.ml",
  "pos": {
    "line": 2,
    "col": 6
  }
}
$ ocamlmerlin single locate -position 13:16 -look-for implementation -filename test.ml < /tmp/test.ml | jq .value
{
  "file": "test.ml",
  "pos": {
    "line": 4,
    "col": 6
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions