summaryrefslogtreecommitdiff
path: root/pit/src/runtime
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2026-10-23 20:47:43 -0400
committerLLLL Colonq <llll@colonq>2026-10-23 20:48:45 -0400
commitdb58f43065c3b397754bb9efcb4a7376b2538131 (patch)
tree81452d262163237e82821e0eb5e518e581fa9276 /pit/src/runtime
parent62ab8e0b42a57bd794941f030b4c3140d6f7c744 (diff)
pit: Add tests, fix binding bugHEADmaster
Diffstat (limited to 'pit/src/runtime')
-rw-r--r--pit/src/runtime/eval.c2
1 files changed, 1 insertions, 1 deletions
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);