1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-18 17:27:40 +00:00

Allow round-tripping more functions with disasm and asm.

Nested functions that captured with environments didn't
work well with asm.
This commit is contained in:
Calvin Rose
2023-01-30 09:03:39 -06:00
parent 244833cfa1
commit dacbe29771
5 changed files with 28 additions and 8 deletions

View File

@@ -102,5 +102,8 @@
(assert (= 6 (with-dyns [*err* errout] (dummy 1 2 3))) "trace to custom err function")
(assert (deep= @"trace (dummy 1 2 3)\n" b) "trace buffer correct"))
(def f (asm (disasm (fn [x] (fn [y] (+ x y))))))
(assert (= ((f 10) 37) 47) "asm environment tables")
(end-suite)