This behaviour is as expected. Briefly, functions with optional arguments must take at least one non-optional argument so that the compiler can decide which arguments have been omitted, and order matters.

The criterion for deciding whether an optional argument has been omitted is the non-labeled application of an argument appearing after this optional argument in the function type. Note that if that argument is labeled, you will only be able to eliminate optional arguments through the special case for total applications.

The problem is (and I got hit by it):

let f ?a ~b = ()
let g = f ~b:()

is equivalent to

let g ?a = ()

which triggers warning 16. As I understand it, argument ?a in f cannot be erased.

Something like
---
Note that if that argument is labeled, you will only be able to eliminate optional arguments by totally applying the function, omitting all optional arguments and omitting all labels for all arguments.
---