]> Repositorios git - scryer-prolog.git/commitdiff
fail on non-list solutions in setof/3 (#1553)
authorMark Thom <[email protected]>
Sat, 13 Aug 2022 16:14:37 +0000 (10:14 -0600)
committerMark Thom <[email protected]>
Thu, 27 Oct 2022 05:36:07 +0000 (23:36 -0600)
src/lib/builtins.pl
tests/scryer/issues.rs

index dd7fb5470f3057eacb31a41d6f4ea95ea8d5daa0..536f0d67d37635610ae95f99d90618307bba2269 100644 (file)
@@ -818,7 +818,8 @@ bagof(Template, Goal, Solution) :-
 :- non_counted_backtracking iterate_variants_and_sort/3.
 
 iterate_variants_and_sort([V-Solution0|GroupSolutions], V, Solution) :-
-    sort(Solution0, Solution),
+    sort(Solution0, Solution1),
+    Solution1 = Solution,
     (  GroupSolutions == [] -> !
     ;  true
     ).
index 9f22bfc8a1fa8765b7d14fab0af1231987310c74..af22252abcbe0a7906190c6b8cc916fca9442f93 100644 (file)
@@ -155,7 +155,7 @@ fn ignored_constraint() {
     run_top_level_test_no_args(
         "use_module(library(freeze)), freeze(X,false), X \\=a.\n\
          halt.",
-        "   freeze:freeze(X,user:false).\n",
+        "   freeze:freeze(X,false).\n",
     );
 }