Just noticing in multiple scenarios that the following decomposition
let ({a, b}, y) = someValue
gives an error the record field a can't be found
, so I need to add an explicit type annotation to {a, b}
like {a, b}: rType
to make it pass.
However if the same decomposition is done in two steps, it works without the annotation.
let (x, y) = someValue
let {a, b} = x
Is this a bug that I should report, or is this a known limitation? If the latter, what’s the reason behind it?
(Rescript 11.0.0-rc.8)