1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-15 07:47:40 +00:00
Fix compiler bug when compiling desturctured bindings in a top-level
def or var. Also introduce janet_table_clone API call to make this
easier.
This commit is contained in:
Calvin Rose
2019-07-07 23:18:39 -05:00
parent 044fc7c461
commit affcb5b459
4 changed files with 33 additions and 7 deletions

View File

@@ -303,5 +303,16 @@
# Regression Test
(assert (= 1 (((compile '(fn [] 1) @{})))) "regression test")
# Regression Test #137
(def [a b c] (range 10))
(assert (= a 0) "regression #137 (1)")
(assert (= b 1) "regression #137 (2)")
(assert (= c 2) "regression #137 (3)")
(var [x y z] (range 10))
(assert (= a 0) "regression #137 (4)")
(assert (= b 1) "regression #137 (5)")
(assert (= c 2) "regression #137 (6)")
(end-suite)