From 3286e78cd2057a407dcfc54a74835854f0abb9dc Mon Sep 17 00:00:00 2001 From: Mark Thom Date: Sun, 26 Feb 2023 16:29:39 -0700 Subject: [PATCH] third argument of copy_term should be instantiated as a list (#1747) --- src/machine/project_attributes.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/machine/project_attributes.pl b/src/machine/project_attributes.pl index 59ad0790..20a19e97 100644 --- a/src/machine/project_attributes.pl +++ b/src/machine/project_attributes.pl @@ -111,7 +111,11 @@ delete_all_attributes_from_var(V) :- '$delete_all_attributes_from_var'(V). copy_term(Term, Copy, Gs) :- can_be(list, Gs), - findall(Term-Rs, term_residual_goals(Term,Rs), [Copy-Gs]). + findall(Term-Rs, term_residual_goals(Term,Rs), [Copy-Gs]), + ( var(Gs) -> + Gs = [] + ; true + ). term_residual_goals(Term,Rs) :- '$term_attributed_variables'(Term, Vs), -- 2.54.0