throw evaluable type error for unrecognized atoms in arith_eval_by_metacall

This commit is contained in:
Mark Thom
2020-05-23 13:33:05 -06:00
parent 18cf4a3bd3
commit 15db77558c

View File

@@ -269,6 +269,18 @@ impl MachineState {
caller,
));
}
&HeapCellValue::Atom(ref name, _) => {
let evaluable_stub = MachineError::functor_stub(name.clone(), 0);
return Err(self.error_form(
MachineError::type_error(
self.heap.h(),
ValidType::Evaluable,
evaluable_stub,
),
caller,
));
}
&HeapCellValue::Addr(addr) if addr.is_ref() => {
return Err(self.error_form(
MachineError::instantiation_error(),