merlin
merlin copied to clipboard
Jump to definition broken on file with typing error
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
Thanks for the report, probably a similar issue than the others: Merlin recovery lacks finesse in some cases.