mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-26 05:00:28 +02:00
peval fix: (cons 1 #nil) is not (list 1)
* module/language/tree-il/peval.scm (peval): (cons FOO #nil) is not (cons FOO '()). * test-suite/tests/tree-il.test ("partial evaluation"): Add a test.
This commit is contained in:
parent
fff39e1aa5
commit
cc8afa2b36
2 changed files with 6 additions and 1 deletions
|
@ -1419,6 +1419,11 @@
|
|||
(((x) #f #f #f () (_))
|
||||
(apply (toplevel top) (lexical x _)))))))
|
||||
|
||||
(pass-if-peval
|
||||
;; Constant folding: cons of #nil does not make list
|
||||
(cons 1 #nil)
|
||||
(apply (primitive cons) (const 1) (const '#nil)))
|
||||
|
||||
(pass-if-peval
|
||||
;; Constant folding: cons
|
||||
(begin (cons 1 2) #f)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue