From 32e49fa35528692a8ac0ddf583655646dd09f36e Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 20 Mar 2009 12:52:24 +0100 Subject: [PATCH] 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. --- module/oop/goops.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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))))))) ;;;