[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#39395: GOOPS generic promotion fails for nary functions
From: |
Rob Browning |
Subject: |
bug#39395: GOOPS generic promotion fails for nary functions |
Date: |
Fri, 07 Feb 2020 00:39:15 -0600 |
Rob Browning <address@hidden> writes:
> And then I found that the the manual says this:
>
> If symbol was previously bound to a Scheme procedure (or
> procedure-with-setter), the old procedure (and setter) is incorporated
> into the new generic function as its default procedure (and setter).
>
> So I wondered if this might be a bug, or was expected behavior. It's
> also easy to work around -- just change the first define to a
> define-method.
Not sure if this might be related. With guile-3.0
(use-modules (oop goops))
(define x close)
(define-generic x)
produces:
$ guile-3.0 -s test.scm
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;; or pass the --no-auto-compile argument to disable.
;;; compiling /home/rlb/test.scm
;;; /home/rlb/test.scm:5:0: warning: shadows previous definition of `x' at
/home/rlb/test.scm:4:0
;;; compiled /home/rlb/.cache/guile/ccache/3.0-LE-8-4.2/home/rlb/test.scm.go
Thanks
--
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4