issue callable type error from dynamic_module_resolution if module is not an atom (#2345)

This commit is contained in:
Mark
2024-02-28 20:35:38 -07:00
parent 84d5ce0d1e
commit ba362e2fe0
2 changed files with 4 additions and 2 deletions

View File

@@ -53,5 +53,4 @@ $(G_0) :-
%
% Generalize away Goal.
*(_).

View File

@@ -1693,7 +1693,10 @@ impl Machine {
}
}
_ => {
unreachable!()
let call_form = functor!(atom!(":"), [cell(module_name), cell(self.machine_st.registers[2])]);
let stub = functor_stub(atom!("call"), narity + 1);
let err = self.machine_st.type_error(ValidType::Callable, call_form);
return Err(self.machine_st.error_form(err, stub));
}
);