Skip to content

Commit

Permalink
issue callable type error from dynamic_module_resolution if module is…
Browse files Browse the repository at this point in the history
… not an atom (#2345)
  • Loading branch information
mthom committed Feb 29, 2024
1 parent 84d5ce0 commit ba362e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/lib/debug.pl
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,4 @@
%
% Generalize away Goal.


*(_).
5 changes: 4 additions & 1 deletion src/machine/system_calls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
);

Expand Down

0 comments on commit ba362e2

Please sign in to comment.