]> Repositorios git - scryer-prolog.git/commitdiff
fix builtin_predicate (#1819)
authorMark <[email protected]>
Tue, 27 Jun 2023 16:41:15 +0000 (10:41 -0600)
committerMark <[email protected]>
Tue, 27 Jun 2023 16:41:15 +0000 (10:41 -0600)
src/machine/loader.rs

index 3e9ae50eab6e5cd51a84386056186fd5fd261a9f..5a309197bca6e3dd463d96b1fad4f1823f02e654 100644 (file)
@@ -2475,11 +2475,10 @@ impl Machine {
         if !ClauseType::is_inbuilt(name, arity) { // ClauseType::from(key.0, key.1, &mut self.machine_st.arena) {
             if let Some(module) = self.indices.modules.get(&(atom!("builtins"))) {
                 self.machine_st.fail = !module.code_dir.contains_key(&(name, arity));
-                return;
+            } else {
+                self.machine_st.fail = true;
             }
         }
-
-        self.machine_st.fail = true;
     }
 }