X-Loop: help-debbugs@HIDDEN Subject: bug#36691: GOOPS: accessor breaks inherited slots with getters Resent-From: "Thompson, David" <dthompson2@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-guile@HIDDEN Resent-Date: Tue, 16 Jul 2019 14:22:01 +0000 Resent-Message-ID: <handler.36691.B.15632869108041 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 36691 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 36691 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-guile@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.15632869108041 (code B ref -1); Tue, 16 Jul 2019 14:22:01 +0000 Received: (at submit) by debbugs.gnu.org; 16 Jul 2019 14:21:50 +0000 Received: from localhost ([127.0.0.1]:50930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1hnOKz-00025a-JF for submit <at> debbugs.gnu.org; Tue, 16 Jul 2019 10:21:50 -0400 Received: from lists.gnu.org ([209.51.188.17]:43674) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <dthompson2@HIDDEN>) id 1hnOKx-00025Q-0K for submit <at> debbugs.gnu.org; Tue, 16 Jul 2019 10:21:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39645) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from <dthompson2@HIDDEN>) id 1hnOKw-0005Jq-1s for bug-guile@HIDDEN; Tue, 16 Jul 2019 10:21:46 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <dthompson2@HIDDEN>) id 1hnOKv-0001l8-2N for bug-guile@HIDDEN; Tue, 16 Jul 2019 10:21:45 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:34096) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <dthompson2@HIDDEN>) id 1hnOKu-0001k7-Ho for bug-guile@HIDDEN; Tue, 16 Jul 2019 10:21:45 -0400 Received: by mail-wr1-x42d.google.com with SMTP id 31so21210981wrm.1 for <bug-guile@HIDDEN>; Tue, 16 Jul 2019 07:21:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=worcester-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=a1quRdKi/kRU0D5RhO3WWoT/ePY+LUO0hv0zZ8cBRrY=; b=ZhtyIODg9amVEGIod5wO8ycbNJY2TEtrPkrmT7+VnBG4BcpXaOC1Tk6p+SLCXEbmec Yj+DEwiHwdSZlQl6egUGPORyT2FKMKQftapmwuSFnk/Ghphe1yvcf/gKUXVezaf2HH6P zSzVrlyhjBiG9adjunLeWDVka5SsvWry2JcehCHRosuMch0FmyXN6Md4qESQODx4fuVW fqkbdqyEO97EsU2XpVA4kbUCFe7FBR66HJoj16wxwoIj2YJzDplnfGHZjuj8hr7GL4sX ZhFRUsEwxUhNgzB6dAkaFOXU2D8cw8yBa+ndmqY8GyBFe+dRs70uwtfUAyy9axXV1EcB ggFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=a1quRdKi/kRU0D5RhO3WWoT/ePY+LUO0hv0zZ8cBRrY=; b=frIjcWtZFNgOFTAez7T0A1nfYc1CsAZAPkdm5OWQNP9gRwnITgOiZ2LhGru1VJSNRK bznd6CAJ0gyZe6/Q1wrkMrLdgJL0nlQ7abIWdDTeQrLySeJPESRNPpHnP/tiIFKui8ex GpR8lu+PrABMcqI7nKcE42V226cM6TLcg7ET5mmHz5zTMawXmkpMAxGFxdt5zu8pIU9y NIA+mYULcdWAHlT8f/7OajznICJyT9EtzUilKNrh1DjNFiIsPnxciqafquKsHfphHg16 HRX+9h7FfdN+8Px/TMOtglRf3yoxlA3pdoDj5VM2jn9p1zG3rAk8KWQL7YBw6S+cTToK 1YUA== X-Gm-Message-State: APjAAAU3i4YA8OEIAs2qS1uxBVpGwuGA5sV3ZP23d2sBXe8+Cb7hmSzs FJgFSzpQVUx7qQq8xPv2q2wjsT264bO2MYTEXqrPkQyzAOg= X-Google-Smtp-Source: APXvYqwpLZrbfpwvvPWE4zxDKOA/KC8Cbq4YAku3LwdKoY8TzqyNYmcRYjSwMX1zvJ2U1XmC7bEeVK4CfdbtME/ON7U= X-Received: by 2002:a5d:53ca:: with SMTP id a10mr37044461wrw.131.1563286902081; Tue, 16 Jul 2019 07:21:42 -0700 (PDT) MIME-Version: 1.0 From: "Thompson, David" <dthompson2@HIDDEN> Date: Tue, 16 Jul 2019 10:21:31 -0400 Message-ID: <CAJ=RwfaRhV_gb53rPMHh8JtZ6xadDupwuoMRsAPN2brsneK_mA@HIDDEN> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42d X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) Hi, When a subclass inherits a slot with a getter, but a previously defined class creates an accessor with the same name, the inherited getter is seemingly ignored and an error is thrown when attempting to use the getter on an instance of the subclass. It's hard to explain in a clear way, so here's a minimal example that demonstrates the problem: (use-modules (oop goops)) (define-class <cat> () (name #:getter name #:init-keyword #:name)) (define-class <boat> () (name #:accessor name #:init-keyword #:name)) (define-class <leopard> (<cat>)) (display (name (make <cat> #:name "Mittens"))) (newline) (display (name (make <boat> #:name "Boaty McBoatface"))) (newline) (display (name (make <leopard> #:name "Spot"))) (newline) This program outputs "Mittens" and "Boaty McBoatface" then prints a backtrace when it should print "Spot": Backtrace: 7 (apply-smob/1 #<catch-closure 5556814626c0>) In ice-9/boot-9.scm: 702:2 6 (call-with-prompt ("prompt") #<procedure 55568147c920 =E2= =80=A6> =E2=80=A6) In ice-9/eval.scm: 619:8 5 (_ #(#(#<directory (guile-user) 555681529750>))) In ice-9/boot-9.scm: 2296:4 4 (save-module-excursion #<procedure 55568153acc0 at ice-=E2= =80=A6>) 3816:12 3 (_) In /home/dthompson/Code/starling/examples/tetra/test.scm: 15:9 2 (_) In oop/goops.scm: 1460:4 1 (cache-miss #<<leopard> 5556815fd730>) 1585:2 0 (goops-error _ . _) oop/goops.scm:1585:2: In procedure goops-error: No applicable method for #<<accessor> name (2)> in call (name #<<leopard> 5556815fd730>) I am using Guile 2.9.2 on GNU/Linux. - Dave
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: "Thompson, David" <dthompson2@HIDDEN> Subject: bug#36691: Acknowledgement (GOOPS: accessor breaks inherited slots with getters) Message-ID: <handler.36691.B.15632869108041.ack <at> debbugs.gnu.org> References: <CAJ=RwfaRhV_gb53rPMHh8JtZ6xadDupwuoMRsAPN2brsneK_mA@HIDDEN> X-Gnu-PR-Message: ack 36691 X-Gnu-PR-Package: guile Reply-To: 36691 <at> debbugs.gnu.org Date: Tue, 16 Jul 2019 14:22:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-guile@HIDDEN If you wish to submit further information on this problem, please send it to 36691 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 36691: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D36691 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.