]> Repositorios git - scryer-prolog.git/commitdiff
Fix subsumes_term/2 predicate to use unify_with_occurs_check/2 instead of (=)/2
authorPaulo Moura <[email protected]>
Wed, 12 May 2021 19:02:09 +0000 (20:02 +0100)
committerPaulo Moura <[email protected]>
Wed, 12 May 2021 19:02:09 +0000 (20:02 +0100)
src/lib/builtins.pl

index d96e0a163abf6fb556703610284227334152700d..309120f3fc4789362fe196d8939248c37ad44789 100644 (file)
@@ -1395,7 +1395,7 @@ number_codes(N, Chs) :-
 subsumes_term(General, Specific) :-
    \+ \+ (
       term_variables(Specific, SVs1),
-      General = Specific,
+      unify_with_occurs_check(General, Specific),
       term_variables(SVs1, SVs2),
       SVs1 == SVs2
    ).