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: Sun, 02 Feb 2020 13:04:42 -0600 Message-ID: <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="89773"; 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 Sun Feb 02 20:05: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 1iyKYS-000NCA-5q for guile-bugs@m.gmane-mx.org; Sun, 02 Feb 2020 20:05:12 +0100 Original-Received: from localhost ([::1]:58836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iyKYQ-00056b-RF for guile-bugs@m.gmane-mx.org; Sun, 02 Feb 2020 14:05:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55173) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iyKYK-00056I-IU for bug-guile@gnu.org; Sun, 02 Feb 2020 14:05:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iyKYI-0001i9-PD for bug-guile@gnu.org; Sun, 02 Feb 2020 14:05:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34578) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iyKYI-0001hp-5N for bug-guile@gnu.org; Sun, 02 Feb 2020 14:05:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iyKYI-00060D-0I for bug-guile@gnu.org; Sun, 02 Feb 2020 14:05:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Rob Browning Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sun, 02 Feb 2020 19:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 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.158067028623035 (code B ref -1); Sun, 02 Feb 2020 19:05:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 Feb 2020 19:04:46 +0000 Original-Received: from localhost ([127.0.0.1]:40551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iyKY2-0005zS-Jo for submit@debbugs.gnu.org; Sun, 02 Feb 2020 14:04:46 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:41399) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iyKY0-0005zK-Nk for submit@debbugs.gnu.org; Sun, 02 Feb 2020 14:04:45 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55084) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iyKXz-0004zF-Je for bug-guile@gnu.org; Sun, 02 Feb 2020 14:04:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iyKXy-0001IO-HJ for bug-guile@gnu.org; Sun, 02 Feb 2020 14:04:43 -0500 Original-Received: from defaultvalue.org ([45.33.119.55]:58388) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iyKXy-0001GE-Ck for bug-guile@gnu.org; Sun, 02 Feb 2020 14:04:42 -0500 Original-Received: from trouble.defaultvalue.org (localhost [127.0.0.1]) (Authenticated sender: rlb@defaultvalue.org) by defaultvalue.org (Postfix) with ESMTPSA id A3FA9200FA for ; Sun, 2 Feb 2020 13:04:40 -0600 (CST) Original-Received: by trouble.defaultvalue.org (Postfix, from userid 1000) id 5CBD214E071; Sun, 2 Feb 2020 13:04:42 -0600 (CST) 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:9555 Archived-At: I noticed that this fails in (at least) 2.0, 2.2 and 3.0: (use-modules (oop goops)) (define (foo . rest) 'fallback) (define-method (foo (x )) ) e.g.: $ guile-3.0 -s test.scm Backtrace: In ice-9/boot-9.scm: 1736:10 6 (with-exception-handler _ _ #:unwind? _ # _) In unknown file: 5 (apply-smob/0 #) In ice-9/boot-9.scm: 718:2 4 (call-with-prompt _ _ #) In ice-9/eval.scm: 619:8 3 (_ #(#(#))) In ice-9/boot-9.scm: 2806:4 2 (save-module-excursion _) 4351:12 1 (_) In oop/goops.scm: 1585:2 0 (_ _ _) 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. 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