Skip to content

Commit

Permalink
Merge pull request #2243 from bakaq/issue_2241
Browse files Browse the repository at this point in the history
Fix anonymous attributed variables not showing in toplevel
  • Loading branch information
mthom authored Dec 22, 2023
2 parents 6c07256 + 20c6a32 commit 799035c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/toplevel.pl
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,11 @@
% one layer of depth added for (=/2) functor
'$term_variables_under_max_depth'(OrigVars, 22, Vars0),
'$project_atts':project_attributes(Vars0, AttrVars),
% need to copy all the visible Vars here so that they appear
% properly in AttrGoals, even the non-attributed.
copy_term(Vars0, Vars0, AttrGoals),
% Need to copy all the visible Vars here so that they appear
% properly in AttrGoals, even the non-attributed. Need to also
% copy all the attributed variables here so that anonymous
% attributed variables also appear properly in AttrGoals.
copy_term([Vars0, AttrVars], [Vars0, AttrVars], AttrGoals),
term_variables(AttrGoals, AttrGoalVars),
append([Vars0, AttrGoalVars, AttrVars], Vars),
charsio:extend_var_list(Vars, VarList, NewVarList, fabricated),
Expand Down

0 comments on commit 799035c

Please sign in to comment.