handle cases where test is called with unbound variable.

This commit is contained in:
Costa Vitor 2009-08-31 23:59:34 -05:00
parent 4431682276
commit d02c9d23c2

View File

@ -905,7 +905,7 @@ static void
c_test(Int Op, Term t1, compiler_struct *cglobs) {
Term t = Deref(t1);
if (!IsVarTerm(t)) {
if (!IsVarTerm(t) || IsNewVar(t)) {
Term tn = MkVarTerm();
c_eq(t, tn, cglobs);
t = tn;