summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2009-03-20 12:52:24 +0100
committerAndy Wingo <wingo@pobox.com>2009-03-20 16:20:00 +0100
commit32e49fa35528692a8ac0ddf583655646dd09f36e (patch)
tree74cd2a255f98a16800b8f31d0c8235544eab8651
parent4e2f1e9edd1d49b1ed395ca48872bddc25759f30 (diff)
downloadguile-32e49fa35528692a8ac0ddf583655646dd09f36e.tar.gz
fix interpreted methods with empty bodies
* module/oop/goops.scm (method): If a method has no body, subst in `(if #f #f)' instead of `(begin)', to please the memoizer.
-rw-r--r--module/oop/goops.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/module/oop/goops.scm b/module/oop/goops.scm
index 3bbf3047c..2254f93e5 100644
--- a/module/oop/goops.scm
+++ b/module/oop/goops.scm
@@ -491,7 +491,10 @@
;; contain a call to `next-method'
`(lambda ,(formals args)
,@(if (null? body)
- '((begin))
+ ;; This used to be '((begin)), but
+ ;; guile's memoizer doesn't like
+ ;; (lambda args (begin)).
+ '((if #f #f))
body)))))))
;;;