1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-21 10:47:40 +00:00

Fix #919 - strange quasiquote behavior.

Nested expression in the quasiquote were being compiled with the "hint"
flag passed to the expression compilation, essentially telling the
compiler to put intermediates into the final slot, possibly overwriting
other intermediate values. This fix removes that flags on any recursive
calls to quasiquote.
This commit is contained in:
Calvin Rose
2022-02-09 20:23:55 -06:00
parent 66e0b53cf6
commit a097537a03
2 changed files with 15 additions and 4 deletions

View File

@@ -39,5 +39,14 @@
(assert-error "compile error" (eval-string "(+ a 5)"))
# 919
(defn test
[]
(var x 1)
(set x ~(,x ()))
x)
(assert (= (test) '(1 ())) "issue #919")
(end-suite)