diff --git a/src/boot/boot.janet b/src/boot/boot.janet index 13c1daa0..0ef6ce78 100644 --- a/src/boot/boot.janet +++ b/src/boot/boot.janet @@ -1113,7 +1113,8 @@ (def fmt-2 (if (or (neg? l) (neg? c)) ":" (string/format " on line %d, column %d:" l c))) (def fmt (string fmt-1 fmt-2 " %j is ")) (def s (gensym)) - ~(let [,s ,x] + ~(upscope + (def ,s ,x) (,eprinf ,fmt ',x) (,eprintf (,dyn :pretty-format "%q") ,s) ,s)) diff --git a/test/suite0007.janet b/test/suite0007.janet index edf16598..d821fa1a 100644 --- a/test/suite0007.janet +++ b/test/suite0007.janet @@ -320,4 +320,8 @@ (array/push a x)) (assert (deep= (range 4) a) "eachk 1") + +(tracev (def my-unique-var-name true)) +(assert my-unique-var-name "tracev upscopes") + (end-suite)