ocaml / merlin

Context sensitive completion for OCaml in Vim and Emacs
https://ocaml.github.io/merlin/
MIT License
1.59k stars 232 forks source link

Fix type enclosing deduplication #1864

Open voodoos opened 1 day ago

voodoos commented 1 day ago

Deduplication can only be done if the type have been printed which is an expensive process. We perform that printing only at the junction between the reconstructed identifier's enclosings and the ones from the tree nodes because we often want to keep both (often this gives the generic type and then its specialized version). All other duplicated ranges are removed.