1
Fork 0
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:
Andy Wingo 2011-10-06 23:28:19 +02:00
parent 012492a7f1
commit 1082cbba47

View file

@ -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)