Skip to content

Merlin jumps to definition in wrong library when contents are identical #1403

@ddickstein

Description

@ddickstein

Create a project with the following minimal setup:

.
├── dune
├── dune-project
├── liba
│   ├── dep.ml
│   ├── dune
│   └── liba.ml
├── libb
│   ├── dep.ml
│   ├── dune
│   └── libb.ml
└── mytest.ml

Both dep.ml files should look like this:

let x = ()

Both liba.ml and libb.ml should look like this:

module Dep = Dep

mytest.ml should look like this:

let _ = Liba.Dep.x
let _ = Libb.Dep.x

If you try to jump to definition on the "Dep" or "x" of the first line, you will be brought to libb instead of liba. However, if you change the implementations of the two dep.ml files, e.g., by making the one in liba assign "a" to x and the one in libb assign "b" to x, the jump to definition works properly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions