fix misuse of TypeError trait while fixing #2345
This commit is contained in:
@@ -1693,9 +1693,12 @@ impl Machine {
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
let h = self.machine_st.heap.len();
|
||||
let call_form = functor!(atom!(":"), [cell(module_name), cell(self.machine_st.registers[2])]);
|
||||
self.machine_st.heap.extend(call_form);
|
||||
|
||||
let stub = functor_stub(atom!("call"), narity + 1);
|
||||
let err = self.machine_st.type_error(ValidType::Callable, call_form);
|
||||
let err = self.machine_st.type_error(ValidType::Callable, str_loc_as_cell!(h));
|
||||
return Err(self.machine_st.error_form(err, stub));
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user