1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-29 16:30:19 +02:00

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.
This commit is contained in:
Andy Wingo 2009-03-20 12:52:24 +01:00
parent 4e2f1e9edd
commit 32e49fa355

View file

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