landmarks icon indicating copy to clipboard operation
landmarks copied to clipboard

Let-in-annotation may introduce "unused variables"

Open mlasson opened this issue 9 years ago • 0 comments

For instance:

let () = 
  let[@landmark] rec f () = ()
  and g () = f () in 
  g ()

will produce unused variable "f". This is a bug in the ppx "translation".

On the other hand, the warning will disappear with:

let f = ()
let () = 
  let[@landmark] rec f () = ()
  and g () = f () in 
  g ()

this seems to be a bug in the ocaml compiler.

mlasson avatar Feb 13 '17 16:02 mlasson