Skip to content

Commit 6417658

Browse files
committed
fix misuse of TypeError trait while fixing #2345
1 parent ba362e2 commit 6417658

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/machine/system_calls.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1693,9 +1693,12 @@ impl Machine {
16931693
}
16941694
}
16951695
_ => {
1696+
let h = self.machine_st.heap.len();
16961697
let call_form = functor!(atom!(":"), [cell(module_name), cell(self.machine_st.registers[2])]);
1698+
self.machine_st.heap.extend(call_form);
1699+
16971700
let stub = functor_stub(atom!("call"), narity + 1);
1698-
let err = self.machine_st.type_error(ValidType::Callable, call_form);
1701+
let err = self.machine_st.type_error(ValidType::Callable, str_loc_as_cell!(h));
16991702
return Err(self.machine_st.error_form(err, stub));
17001703
}
17011704
);

0 commit comments

Comments
 (0)