Differentiate apply asserts.

* mes.c (apply_env): Split bool assert into bool, number and string.
This commit is contained in:
Jan Nieuwenhuizen 2016-10-18 09:21:49 +02:00
parent b9bbac3d0c
commit 2a8d3c57b7

6
mes.c
View file

@ -340,8 +340,10 @@ apply_env (scm *fn, scm *x, scm *a)
scm *p = pairlis (args, x, a); scm *p = pairlis (args, x, a);
return eval_env (cons (&symbol_begin, body), cons (cons (&symbol_closure, p), p)); return eval_env (cons (&symbol_begin, body), cons (cons (&symbol_closure, p), p));
} }
scm *efn = eval_env (fn, a); scm *efn = eval_env (fn, a);
if (efn->type == NUMBER || efn == &scm_f || efn == &scm_t) assert (!"apply bool"); if (efn == &scm_f || efn == &scm_t) assert (!"apply bool");
if (efn->type == NUMBER) assert (!"apply number");
if (efn->type == STRING) assert (!"apply string");
return apply_env (efn, x, a); return apply_env (efn, x, a);
} }