merlin icon indicating copy to clipboard operation
merlin copied to clipboard

Jump to definition broken on file with typing error

Open ddickstein opened this issue 2 years ago • 1 comments

I don't know if this is related to https://github.com/ocaml/merlin/issues/1580, so I'm opening this as a separate issue. Jumping to test on line 3 gives "Not in environment 'test'". As in that issue, fixing the type error (in this case, removing the annotation on ~f in the first line) fixes locate.

let test ~f:(_ : unit -> unit) = ()
type t = F : { f : unit -> 'fn } -> t
let call (F { f }) = test ~f

Tested on https://github.com/ocaml/merlin/commit/945e5e10373640b622c47a54b84f4c2a0252c477

ddickstein avatar Apr 01 '23 16:04 ddickstein

Thanks for the report, probably a similar issue than the others: Merlin recovery lacks finesse in some cases.

voodoos avatar Apr 19 '23 13:04 voodoos