GNU bug report logs - #42757
calling internal define with incorrect n(args) gives invalid error

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guile; Reported by: Christopher Lam <christopher.lck@HIDDEN>; merged with #42345; dated Sat, 8 Aug 2020 07:00:02 UTC; Maintainer for guile is bug-guile@HIDDEN.
Merged 42345 42757. Request was from Taylan Kammer <taylan.kammer@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 8 Aug 2020 06:59:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 08 02:59:28 2020
Received: from localhost ([127.0.0.1]:57956 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k4IpE-0005Vt-11
	for submit <at> debbugs.gnu.org; Sat, 08 Aug 2020 02:59:28 -0400
Received: from lists.gnu.org ([209.51.188.17]:35146)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <christopher.lck@HIDDEN>) id 1k4IpB-0005Vl-N5
 for submit <at> debbugs.gnu.org; Sat, 08 Aug 2020 02:59:26 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:34788)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <christopher.lck@HIDDEN>)
 id 1k4IpB-0002tS-E6
 for bug-guile@HIDDEN; Sat, 08 Aug 2020 02:59:25 -0400
Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]:41740)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <christopher.lck@HIDDEN>)
 id 1k4Ip9-0003QY-LG
 for bug-guile@HIDDEN; Sat, 08 Aug 2020 02:59:25 -0400
Received: by mail-ed1-x533.google.com with SMTP id c2so2781703edx.8
 for <bug-guile@HIDDEN>; Fri, 07 Aug 2020 23:59:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=Ahc/DXh2J3RGeiAYvgpeub3uA0am3I4sNf95PDqSRFE=;
 b=h4rRl5JX6lMbNOl0JK+XdT6G3FyldIlBgC7u/v+l7XdjDProTvP3qgBLuZi0vm5F3w
 slgYey3sYtj5bqhANwRUblVYlGu0pLrgdA2HavPrnPGK7RIql0UYEFAcpF0jDO584Fst
 3if1lWv4ZDqsF5DEId51odPv2p7Jdm5XMKXASCkwq2b7CxevREFqjtdCwGdhrDVv5hx1
 RSRESJcR/80SN9BBsf0dX4GZjnd/YEkeSmcgnsYeTKdVv/H2oH5PeAwVtuJ1+kGSx+MO
 5aYI1cLe/JQLKK78F4QSEunGtK0+n8J1UGGdUCRdTkrJKbv5uj+rcky47gNxA7I3E2+r
 p+zA==
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;
 bh=Ahc/DXh2J3RGeiAYvgpeub3uA0am3I4sNf95PDqSRFE=;
 b=MCI07dMTp7IkBlJguqlYgFBP75bzdnsMT5yzkgtR8Fc2hhwzBfOj5NLnIKgPo4QsRC
 pZJfWeFfJ5j6cnun2gwepIhJcTDyKLSP744tZ0WJaFe9NV7JUeYPs64lkj9mRjOFWBvr
 tzTrCQo/gNgU6cc3/a/71HJv/LC7PHqS2V7R0NiVLAe3j5m0zpcugCz/SQTR+k0A2xst
 v9AymMRnOQkTLdIhlAPfjPH4QMFzKkcLsgXiCtQU0OQdN4zgYTaxUTj0kRTPIZXd+QY/
 ERQaoW/oWFbENmiZTf2Z+cxvfSJQBGSdP4CWfbSkQBgkV8qtHUluTldKp6+VVsJBZ0gh
 yZ7g==
X-Gm-Message-State: AOAM533Nt/pUcjb/UxWHXVRVmBl/cVlp0ePy6trgkqGz4IotQ8U7lB5T
 HTNaTawIeCBAFb1ufiHzNJbDsXW1itAFAhNFWmLG0cy9
X-Google-Smtp-Source: ABdhPJxyQ/sBSei/BJE5nxadh+gvCJipfDvFo44GHZQOLgp29Zm2tA+1NB9dPQGUD+N6p4JjCzGTf391DWEFayVqC0c=
X-Received: by 2002:aa7:df8a:: with SMTP id b10mr11870573edy.62.1596869960559; 
 Fri, 07 Aug 2020 23:59:20 -0700 (PDT)
MIME-Version: 1.0
From: Christopher Lam <christopher.lck@HIDDEN>
Date: Sat, 8 Aug 2020 06:58:53 +0000
Message-ID: <CAKVAZZJY0w_AKvrHj1tXzbs4PP3gOoL8TLNqNZnWak0zc7HUQw@HIDDEN>
Subject: calling internal define with incorrect n(args) gives invalid error
To: bug-guile@HIDDEN
Content-Type: multipart/alternative; boundary="000000000000c070b105ac5842f7"
Received-SPF: pass client-ip=2a00:1450:4864:20::533;
 envelope-from=christopher.lck@HIDDEN; helo=mail-ed1-x533.google.com
X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache.
 That's all we know.
X-Spam_score_int: -1
X-Spam_score: -0.2
X-Spam_bar: /
X-Spam_report: (-0.2 / 5.0 requ) BAYES_40=-0.001, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -0.1 (/)
X-Debbugs-Envelope-To: submit
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 (--)

--000000000000c070b105ac5842f7
Content-Type: text/plain; charset="UTF-8"

Using guile 3.0.1 (also tested with 3.0.4)

Consider following snippet
------
(define (outer-function)
  (define (inner-function q w e r t y)  ;takes 6 args
    #f)
  (inner-function 'a 'b 'c 'd 'e))     ;send 5 args
(outer-function)
------

The internally defined function is called with insufficient args. We'd
expect error to be
"Wrong number of arguments to inner-function"

Instead the error is
"Wrong number of arguments to a"

Note if the invalid code is not internally-defined, the error is correct:
"Wrong number of arguments to #<procedure inner-function (q w e r t y)>"

--000000000000c070b105ac5842f7
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Using guile 3.0.1 (also tested with 3.0.4)</div><div>=
<br></div><div>Consider following snippet</div><div>------</div><div>(defin=
e (outer-function)<br>=C2=A0 (define (inner-function q w e r t y) =C2=A0;ta=
kes 6 args<br>=C2=A0 =C2=A0 #f)<br>=C2=A0 (inner-function &#39;a &#39;b &#3=
9;c &#39;d &#39;e)) =C2=A0 =C2=A0 ;send 5 args<br>(outer-function)<br></div=
><div><div>------</div><div><br></div><div>The internally defined function =
is called with insufficient args. We&#39;d expect error to be</div><div>&qu=
ot;Wrong number of arguments to inner-function&quot;</div><div><br></div><d=
iv>Instead the error is</div><div>&quot;Wrong number of arguments to a&quot=
;</div><div><br></div><div>Note if the invalid code is not internally-defin=
ed, the error is correct:</div><div>&quot;Wrong number of arguments to #&lt=
;procedure inner-function (q w e r t y)&gt;&quot;</div></div></div>

--000000000000c070b105ac5842f7--




Acknowledgement sent to Christopher Lam <christopher.lck@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guile@HIDDEN. Full text available.
Report forwarded to bug-guile@HIDDEN:
bug#42757; Package guile. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 23 May 2021 20:00:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.