Fix .push on empty list in KissInterp2
Some checks failed
CI / test (push) Failing after 7s
CI / test-core (14, ubuntu-latest, 3.x, cpp) (push) Failing after 0s
CI / test-core (14, ubuntu-latest, 3.x, nodejs) (push) Failing after 1m45s
CI / test-core (14, ubuntu-latest, 3.x, js) (push) Failing after 1m59s
CI / test-core (14, ubuntu-latest, 3.x, interp) (push) Failing after 2m2s
CI / test-core (14, ubuntu-latest, 3.x, py) (push) Failing after 2m37s

This commit is contained in:
2025-11-14 15:56:08 -06:00
parent 50c0d673d7
commit 7dc02c94d4

View File

@@ -123,7 +123,6 @@
(declareInScope globals)
=>"localVar"
(declareInScope (nth localScopes -1))
// TODO support list unpacking
=>"let"
->[args cc]
(let [bindings (first args)
@@ -291,11 +290,11 @@
// Field access
((FieldExp field obj safe)
(evalCC obj ->v
(if v
(if (isNotNull v)
(cc (Reflect.getProperty v field))
(if safe
(cc null)
(throw "field access on null! $(Reader.toString obj.def)")))))
(throw "field access (.$field) on null! $(Reader.toString obj.def)")))))
// String literal
((StrExp str)
(cc str))