Fix GOOPS method compilation bug when no next-method exists
authorMark H Weaver <mhw@netris.org>
Sun, 30 Jan 2011 03:07:49 +0000 (22:07 -0500)
committerAndy Wingo <wingo@pobox.com>
Sun, 30 Jan 2011 12:30:08 +0000 (13:30 +0100)
* module/oop/goops/compile.scm (compute-cmethod): Fix a bug
  that caused the method compiler to barf while compiling a
  method that calls (next-method), if there is no applicable
  next method.

module/oop/goops/compile.scm

index db1a160..ace89b4 100644 (file)
@@ -48,7 +48,7 @@
   (let ((make-procedure (slot-ref (car methods) 'make-procedure)))
     (if make-procedure
         (make-procedure
-         (if (null? methods)
+         (if (null? (cdr methods))
              (lambda args
                (no-next-method (method-generic-function (car methods)) args))
              (compute-cmethod (cdr methods) types)))