From db58f43065c3b397754bb9efcb4a7376b2538131 Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Fri, 23 Oct 2026 20:47:43 -0400 Subject: pit: Add tests, fix binding bug --- pit/src/runtime/eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pit/src/runtime') diff --git a/pit/src/runtime/eval.c b/pit/src/runtime/eval.c index 3cd1c1f..43c8998 100644 --- a/pit/src/runtime/eval.c +++ b/pit/src/runtime/eval.c @@ -38,7 +38,7 @@ static pit_value vm_pop(pit_runtime *rt) { } static pit_value vm_bind_or_replace(pit_runtime *rt, pit_value nm, pit_value cell, pit_value bound) { - if (pit_value_list_contains_eq(rt, nm, bound)) { + if (pit_value_list_contains_eq(rt, nm, bound) != PIT_NIL) { /* if we're already responsible for unbinding this symbol (e.g. in a tail call), */ /* simply replace the old binding - this keeps the binding stack from growing for TCO purposes */ pit_symtab_replace(rt, nm, cell); -- cgit v1.3.1