mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-22 20:40:29 +02:00
peval: bugfix in constant-expression?
* module/language/tree-il/peval.scm (constant-expression?): Correctly handle lambda-case alternates.
This commit is contained in:
parent
012492a7f1
commit
1082cbba47
1 changed files with 2 additions and 1 deletions
|
@ -527,7 +527,8 @@ top-level bindings from ENV and return the resulting expression."
|
||||||
(($ <const>) #t)
|
(($ <const>) #t)
|
||||||
(($ <lambda>) #t)
|
(($ <lambda>) #t)
|
||||||
(($ <lambda-case> _ req opt rest kw inits _ body alternate)
|
(($ <lambda-case> _ req opt rest kw inits _ body alternate)
|
||||||
(and (every loop inits) (loop body) (loop alternate)))
|
(and (every loop inits) (loop body)
|
||||||
|
(or (not alternate) (loop alternate))))
|
||||||
(($ <lexical-ref> _ _ gensym)
|
(($ <lexical-ref> _ _ gensym)
|
||||||
(not (assigned-lexical? gensym)))
|
(not (assigned-lexical? gensym)))
|
||||||
(($ <primitive-ref>) #t)
|
(($ <primitive-ref>) #t)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue