Box Some of a constant case represented by undefined
Why
Some(U) with @as(undefined) U compiled to plain undefined when U was a constant, so it was None, while Some(v) with v = U passed at run time stayed distinct (#8954).
A constant constructor whose literal is undefined is now a none for const_some_none_depth, so Some of it is boxed like Some(None). This holds for untagged and tagged variants alike. The spec's known bug is gone, and rule 12 states the case.
modifiedJS
@unboxed type u = | @as(undefined) U | V(string)let x: option<u> = Some(U)
js
Before
After
let x = undefined;let x = Primitive_option.some(undefined);