Skip to content

Commit b7481e7

Browse files
committed
fix: an address of the last argument of the supercombinator should be updated
1 parent 87bc60c commit b7481e7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/compiler/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,11 @@ fn sc_step(state: &mut TiState, sc_addr: Addr, arg_names: Vec<lang::Name>, body:
116116
}
117117
let is_let = body.is_let();
118118
let result_addr = heap.instantiate(body, globals);
119-
for _ in 0..=arg_names_len {
119+
for _ in 0..arg_names_len {
120120
stack.pop();
121121
}
122122
heap.update(
123-
arg_bindings.last().map(|(_, a)| *a).unwrap_or(sc_addr),
123+
stack.pop().unwrap_or(sc_addr),
124124
Node::Ind(result_addr),
125125
);
126126
stack.push(result_addr);

0 commit comments

Comments
 (0)