Avoid dif/1 attribute with empty list

Closes #1956
This commit is contained in:
bakaq
2023-09-21 14:00:37 -03:00
parent cac52c0537
commit cb79e83510
2 changed files with 11 additions and 1 deletions

View File

@@ -189,6 +189,13 @@ test("dif#12 but with multiple variables in the residuals",(
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),