From d3632dd48ce5866cbdd91ffc63fe5a32b5cd2ce1 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Thu, 7 May 2009 23:51:18 -0400 Subject: [PATCH] fix case where you may bind variable (eg, freeze(X,Y)), obs from Ulrich Neumerkel. --- pl/corout.yap | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pl/corout.yap b/pl/corout.yap index 0488b4bae..c4242f535 100644 --- a/pl/corout.yap +++ b/pl/corout.yap @@ -524,7 +524,8 @@ frozen(V, LG) :- '$purge_done_goals'(G0, GF). '$purge_done_goals'(['$redo_freeze'(_Done, _, CallCleanup)|G0], GF) :- nonvar(CallCleanup), - CallCleanup = _:'$clean_call'(_), !, + % be careful about possibly adding extra binding at this point. + CallCleanup = _:T, nonvar(T), T = '$clean_call'(_), !, '$purge_done_goals'(G0, GF). '$purge_done_goals'(['$redo_eq'(Done, _, _, _)|G0], GF) :- nonvar(Done), !, '$purge_done_goals'(G0, GF).