]> Repositorios git - scryer-prolog.git/commitdiff
mark anonymous variables in compile_is_call (#2257)
authorMark <[email protected]>
Tue, 2 Jan 2024 17:06:07 +0000 (10:06 -0700)
committerMark <[email protected]>
Tue, 2 Jan 2024 17:06:07 +0000 (10:06 -0700)
src/codegen.rs

index fd0d21f92c33fa530d38d13b8a693ba8b3e56cc4..11ad867fc594421af5b77c8c33f72e6059b677ae 100644 (file)
@@ -860,6 +860,12 @@ impl<'b> CodeGenerator<'b> {
                     self.marker.mark_safe_var_unconditionally(var_num);
                     compile_expr!(self, &terms[1], term_loc, code)
                 } else {
+                    self.marker.mark_anon_var::<QueryInstruction>(
+                        Level::Shallow,
+                        term_loc,
+                        code,
+                    );
+
                     if let Term::Var(ref vr, ref var) = &terms[1] {
                         let var_num = var.to_var_num().unwrap();