From unknown Fri Jun 13 06:07:24 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#42757 <42757@debbugs.gnu.org> To: bug#42757 <42757@debbugs.gnu.org> Subject: Status: calling internal define with incorrect n(args) gives invalid error Reply-To: bug#42757 <42757@debbugs.gnu.org> Date: Fri, 13 Jun 2025 13:07:24 +0000 retitle 42757 calling internal define with incorrect n(args) gives invalid = error reassign 42757 guile submitter 42757 Christopher Lam severity 42757 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 08 02:59:28 2020 Received: (at submit) by debbugs.gnu.org; 8 Aug 2020 06:59:28 +0000 Received: from localhost ([127.0.0.1]:57956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4IpE-0005Vt-11 for submit@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 ) id 1k4IpB-0005Vl-N5 for submit@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 ) id 1k4IpB-0002tS-E6 for bug-guile@gnu.org; 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 ) id 1k4Ip9-0003QY-LG for bug-guile@gnu.org; Sat, 08 Aug 2020 02:59:25 -0400 Received: by mail-ed1-x533.google.com with SMTP id c2so2781703edx.8 for ; 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 Date: Sat, 8 Aug 2020 06:58:53 +0000 Message-ID: Subject: calling internal define with incorrect n(args) gives invalid error To: bug-guile@gnu.org Content-Type: multipart/alternative; boundary="000000000000c070b105ac5842f7" Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=christopher.lck@gmail.com; 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@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 #" --000000000000c070b105ac5842f7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Using guile 3.0.1 (also tested with 3.0.4)
=
Consider following snippet
------
(defin= e (outer-function)
=C2=A0 (define (inner-function q w e r t y) =C2=A0;ta= kes 6 args
=C2=A0 =C2=A0 #f)
=C2=A0 (inner-function 'a 'b = 9;c 'd 'e)) =C2=A0 =C2=A0 ;send 5 args
(outer-function)
------

The internally defined function = is called with insufficient args. We'd expect error to be
&qu= ot;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-defin= ed, the error is correct:
"Wrong number of arguments to #<= ;procedure inner-function (q w e r t y)>"
--000000000000c070b105ac5842f7-- From debbugs-submit-bounces@debbugs.gnu.org Sun May 23 15:59:00 2021 Received: (at control) by debbugs.gnu.org; 23 May 2021 19:59:00 +0000 Received: from localhost ([127.0.0.1]:41793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkuFX-0003py-Ri for submit@debbugs.gnu.org; Sun, 23 May 2021 15:58:59 -0400 Received: from mail-ej1-f48.google.com ([209.85.218.48]:43894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkuFV-0003pk-Dc for control@debbugs.gnu.org; Sun, 23 May 2021 15:58:57 -0400 Received: by mail-ej1-f48.google.com with SMTP id f18so8249378ejq.10 for ; Sun, 23 May 2021 12:58:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=L2BS4WS7mXHm2DyQZmmPavjTTJ1G4DRXEbiW8iuvzAw=; b=XKAbjjaHDuvQ5Xq08uKLnfEZA1+FiJZ1uckxs0avIXRSuRvlya6qLdQKxxe352gB7H N30M2jriXwunXbAzRc5mo5OjnmthEWJQpOz1le538FZL7rpVZ4KYDP3VKnI6qFGoncJV D5ZcuA8l6eUs5DKko+zd1XkxeraWkycYP7yRy4G2ZgJUgQ4XBPNfTXAIznn+uJM028XM CJnKTqjILjrLCDUZyLoSUw4a3zhzGz6BWU6rHzGxiWl+8IYb+KvgRQV+mozJrqRnZwdk mlXFNeFkpOTITDM+iP+Qns1C2za2XZ5JjOshoNAFglkQqJmjLiN7MSSHlZsQzrygRqbA IQlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=L2BS4WS7mXHm2DyQZmmPavjTTJ1G4DRXEbiW8iuvzAw=; b=r48V7zyMNvWJIhj39A7f/03+zgsHa4vkPU0DGfvti3kwjsL6bdfsHVbZoHubfLuyWB Djdvk+Ow6hr4cGszvVEavEtwHqwh3mlW4hnY2xhEMvhh0B1akqHiBo1egX77N4sPHNYE yA/I14BiPgAk2q9tWfF+sUpGbfW/QtEJ7NR6xKXfwM8Wo8I04+YaWbnbrXovT8qyAhc1 F5TIPx/tP6sVamfZBz7JvQUaPFrspo+zuGvA4mggttz/rp9kE0xB9Q/vrBHlkkhwjlbY OXuOYaAOgh69EvWNJywym0FaZk1BoBbMBgL18R+vX8ADz5xPvSPbowJnr1GM022ghTBL WINQ== X-Gm-Message-State: AOAM531Y1F5eC2LBPEIfRTi8OpflcDKqNCxPR7EQJenIGHAh9fPhew/h lDCy7XKchk76EaBIfxLXYOozLEuEa3WDQQ== X-Google-Smtp-Source: ABdhPJyLbMXFLnMPivBiGF7haw3nUMFcg1WG3IKtCucx0SJZhbEMTut+DsvrQ962JFgTSiuRDkFmiA== X-Received: by 2002:a17:906:e210:: with SMTP id gf16mr20101631ejb.472.1621799931462; Sun, 23 May 2021 12:58:51 -0700 (PDT) Received: from [192.168.178.20] (b2b-109-90-125-150.unitymedia.biz. [109.90.125.150]) by smtp.gmail.com with ESMTPSA id h21sm5869648ejc.2.2021.05.23.12.58.50 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 23 May 2021 12:58:51 -0700 (PDT) To: control@debbugs.gnu.org From: Taylan Kammer Subject: merge 42345 42757 Message-ID: Date: Sun, 23 May 2021 21:58:49 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) merge 42345 42757