fail on non-list solutions in setof/3 (#1553)

This commit is contained in:
Mark Thom
2022-08-13 10:14:37 -06:00
parent 181be5be3f
commit b51460a59a
2 changed files with 3 additions and 2 deletions

View 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
).

View 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",
);
}