From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Rob Browning Newsgroups: gmane.lisp.guile.bugs Subject: bug#39395: GOOPS generic promotion fails for nary functions Date: Fri, 07 Feb 2020 00:39:15 -0600 Message-ID: <87o8ua2964.fsf@trouble.defaultvalue.org> References: <87a7606cad.fsf@trouble.defaultvalue.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="21222"; mail-complaints-to="usenet@ciao.gmane.io" To: 39395@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Fri Feb 07 07:40:13 2020 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1izxJF-0005RK-Hs for guile-bugs@m.gmane-mx.org; Fri, 07 Feb 2020 07:40:13 +0100 Original-Received: from localhost ([::1]:50636 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izxJE-0006jB-6u for guile-bugs@m.gmane-mx.org; Fri, 07 Feb 2020 01:40:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45403) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izxJ5-0006iw-7K for bug-guile@gnu.org; Fri, 07 Feb 2020 01:40:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izxJ4-0001uq-8s for bug-guile@gnu.org; Fri, 07 Feb 2020 01:40:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42849) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1izxJ4-0001uc-5P for bug-guile@gnu.org; Fri, 07 Feb 2020 01:40:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1izxJ4-0005Ix-1j for bug-guile@gnu.org; Fri, 07 Feb 2020 01:40:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Rob Browning Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 07 Feb 2020 06:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39395 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.158105756520345 (code B ref -1); Fri, 07 Feb 2020 06:40:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Feb 2020 06:39:25 +0000 Original-Received: from localhost ([127.0.0.1]:48822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1izxIT-0005I5-09 for submit@debbugs.gnu.org; Fri, 07 Feb 2020 01:39:25 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:45997) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1izxIQ-0005Hx-Iy for submit@debbugs.gnu.org; Fri, 07 Feb 2020 01:39:23 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45112) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izxIP-0006Y6-Do for bug-guile@gnu.org; Fri, 07 Feb 2020 01:39:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izxII-0001CL-Mv for bug-guile@gnu.org; Fri, 07 Feb 2020 01:39:21 -0500 Original-Received: from defaultvalue.org ([45.33.119.55]:58522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1izxII-0001B2-It for bug-guile@gnu.org; Fri, 07 Feb 2020 01:39:14 -0500 Original-Received: from trouble.defaultvalue.org (localhost [127.0.0.1]) (Authenticated sender: rlb@defaultvalue.org) by defaultvalue.org (Postfix) with ESMTPSA id 46D2220136 for ; Fri, 7 Feb 2020 00:39:13 -0600 (CST) Original-Received: by trouble.defaultvalue.org (Postfix, from userid 1000) id 0E66114E071; Fri, 7 Feb 2020 00:39:16 -0600 (CST) In-Reply-To: <87a7606cad.fsf@trouble.defaultvalue.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:9567 Archived-At: Rob Browning 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