Generic closure reconstruction omitted captured types
Limitation
Generic closure reconstruction previously omitted the static types of captured
bindings. A closure over a partially moved nominal record could therefore fail
with I0010 at its call site; the move checker also could not analyze the body.
Generic closures now carry those creation-time capture types into construction
and ownership analysis. The issue-backed regression
evaluator/records/release_matrix_generic_residual_capture.mtl now passes with
move checking enabled, covering partial and empty residual captures and field
restoration. A negative typechecking regression confirms that a moved field
does not become accessible again inside the captured body. The fixes merged in
metel-core#1422.
Impact
Previously, generic closure checking could not reliably reconstruct the captured value's narrowed nominal type.
Affects
Resolution
Implemented in metel-core commit 5f038b189cb67c5ec40e51d16a3e11a831a4535e
(PR #1422). The executable residual-capture fixture and the negative
neg_release_matrix_generic_capture_moved_field fixture provide exit evidence
for metel-core#1411.