Commit 64a795b
fix(rt): handle closure aggregate and non-tuple tuple-arg fallback
Add a rule for `aggregateKindClosure` to construct closures as
`Aggregate(variantIdx(0), ARGS)`, matching the existing tuple and ADT
aggregate handling.
Add an `[owise]` fallback to `#setTupleArgs` for `Value` arguments
that are not wrapped in an `Aggregate` tuple. This handles closure-call
paths where a single argument is passed directly.
Test: `closure-no-capture.rs` — a non-capturing closure passed through
a generic `FnOnce` call. Exercises the `#setTupleArgs` fallback for
unwrapped single-value arguments.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 682df6b commit 64a795b
3 files changed
Lines changed: 24 additions & 0 deletions
File tree
- kmir/src
- kmir/kdist/mir-semantics
- rt
- tests/integration/data/prove-rs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
604 | 604 | | |
605 | 605 | | |
606 | 606 | | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
607 | 613 | | |
608 | 614 | | |
609 | 615 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1051 | 1051 | | |
1052 | 1052 | | |
1053 | 1053 | | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
1054 | 1060 | | |
1055 | 1061 | | |
1056 | 1062 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments