From: Andy Wingo Date: Thu, 6 Oct 2011 21:28:19 +0000 (+0200) Subject: peval: bugfix in constant-expression? X-Git-Url: https://git.hcoop.net/bpt/guile.git/commitdiff_plain/1082cbba47d3735a502c7cc631c5cc4a705b6a62 peval: bugfix in constant-expression? * module/language/tree-il/peval.scm (constant-expression?): Correctly handle lambda-case alternates. --- diff --git a/module/language/tree-il/peval.scm b/module/language/tree-il/peval.scm index aadba24a6..4ceb793eb 100644 --- a/module/language/tree-il/peval.scm +++ b/module/language/tree-il/peval.scm @@ -527,7 +527,8 @@ top-level bindings from ENV and return the resulting expression." (($ ) #t) (($ ) #t) (($ _ 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)))) (($ _ _ gensym) (not (assigned-lexical? gensym))) (($ ) #t)