vars_remove_goal([Var|Vars], Goal0) :-
get_atts(Var, +dif(Goals0)),
remove_goal(Goals0, Goal0, Goals),
- put_atts(Var, +dif(Goals)),
+ ( Goals = [] ->
+ put_atts(Var, -dif(_))
+ ; put_atts(Var, +dif(Goals))
+ ),
vars_remove_goal(Vars, Goal0).
reinforce_goal(Goal0, Goal) :-
Res = []
)).
+% https://github.com/mthom/scryer-prolog/issues/1956
+test("scryer-prolog#1956",(
+ call_residue_vars((dif(a-a,X-_),X=b), Res),
+ X == b,
+ Res = []
+)).
+
main :-
findall(test(Name, Goal), test(Name, Goal), Tests),
run_tests(Tests, Failed),