Warning 16: Optional argument cannot be erased

I’m not sure were to start. I just setup a new machine. It has been a while since I’ve had to do that. A piece of code I have been working on contains a several optional arguments. I never had a problem compiling it on my old machine and the script hasn’t changed. Yet dune won’t build it on the new machine. I’m getting “Warning 16 this optional argument cannot be erased” on a few but not all optional arguments. I’m sure I missed something when setting up my new computer but I can’t figure out what it might be. Any ideas?

1 Like

I bet you installed OCaml 4.12, which is fairly new, on your new machine. It causes warning 16 to apply in more cases: Widen warning 16 to more cases by lpw25 · Pull Request #9783 · ocaml/ocaml · GitHub

1 Like

That was it! Thank you, Levi!