]> Repositorios git - scryer-prolog.git/commitdiff
issue callable type error from dynamic_module_resolution if module is not an atom...
authorMark <[email protected]>
Thu, 29 Feb 2024 03:35:38 +0000 (20:35 -0700)
committerMark <[email protected]>
Thu, 29 Feb 2024 03:35:38 +0000 (20:35 -0700)
src/lib/debug.pl
src/machine/system_calls.rs

index e237d8e196fdfabbee4f8acd0df798fa1bbf76a3..702947fa1d122c5c8104f2073573f5097469c483 100644 (file)
@@ -53,5 +53,4 @@ $(G_0) :-
 %
 %  Generalize away Goal.
 
-
 *(_).
index fb3ecc1d5ea981b369e173107371cacbb65e2e79..7efcc2df741acd7e57548c063b9a38666cce7b68 100644 (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));
             }
         );