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:
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user