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

ocamllsp(hole)/"typed hole" error on locally abstract type in an incomplete fragment #1826

Open 2BitSalute opened 2 months ago

2BitSalute commented 2 months ago

Repro:

Type this fragment:

let eval_value (type a)

The (type a) is highlighted as an error, with the ocamllsp(hole) error message: This typed hole should be replaced with an expression of type 'a.

image
voodoos commented 2 months ago

Thanks for your report.

I think this is a Merlin issue. What happens is probably that Merlin's recovery fills the Typedtree with a hole, but since it is not a hole introduced by the user we should not issue that kind of "actionable" message relating to it.