Unnecessary `Caml_option.valFromOption` when using default parameters?

is there a reason why this happens? i just find it a bit odd since it falls into neither of the two cases described at Null, Undefined and Option | ReScript Language Manual

here’s a MCVE:

let foo = (~foo: option<string>=None, ()) => foo

This is indeed an missed optimization, but it should have been fixed in the master

1 Like