From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Lam Newsgroups: gmane.lisp.guile.bugs Subject: bug#38617: should internal defines be callable with incorrect number of args? Date: Sun, 15 Dec 2019 01:02:41 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000075ce970599b3a839" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="76936"; mail-complaints-to="usenet@blaine.gmane.org" To: 38617@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sun Dec 15 02:04:13 2019 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1igIKS-000JrZ-K8 for guile-bugs@m.gmane.org; Sun, 15 Dec 2019 02:04:12 +0100 Original-Received: from localhost ([::1]:35062 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igIKQ-0005y4-Qh for guile-bugs@m.gmane.org; Sat, 14 Dec 2019 20:04:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37889) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igIKL-0005xs-DR for bug-guile@gnu.org; Sat, 14 Dec 2019 20:04:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igIKJ-0001TY-BO for bug-guile@gnu.org; Sat, 14 Dec 2019 20:04:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58168) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igIKI-0001T1-Hc for bug-guile@gnu.org; Sat, 14 Dec 2019 20:04:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1igIKI-0001z8-Be for bug-guile@gnu.org; Sat, 14 Dec 2019 20:04:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Christopher Lam Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sun, 15 Dec 2019 01:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 38617 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15763717997571 (code B ref -1); Sun, 15 Dec 2019 01:04:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Dec 2019 01:03:19 +0000 Original-Received: from localhost ([127.0.0.1]:35908 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1igIJb-0001y2-1y for submit@debbugs.gnu.org; Sat, 14 Dec 2019 20:03:19 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:35941) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1igIJZ-0001xt-5t for submit@debbugs.gnu.org; Sat, 14 Dec 2019 20:03:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55298) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igIJY-0005te-84 for bug-guile@gnu.org; Sat, 14 Dec 2019 20:03:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igIJV-0007wx-7r for bug-guile@gnu.org; Sat, 14 Dec 2019 20:03:16 -0500 Original-Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:39521) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igIJU-0007tB-HG for bug-guile@gnu.org; Sat, 14 Dec 2019 20:03:13 -0500 Original-Received: by mail-ed1-x52d.google.com with SMTP id v16so2164888edy.6 for ; Sat, 14 Dec 2019 17:03:09 -0800 (PST) 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=Xg9l0RxxraOI8pPXGYNpuYRf/4HAcEkIAoPeM29jPP0=; b=hSQpF1IqVUb9+1fNbJB1SDt+7opPpgNfdSj+nzX23nNHJVEGFSkqYXm9YdmaWpGbku hM9T9m3LkBxs6/RUpSHJ40tjb6yX9rXhz8xEtpwFrB3RkRh2iVrwd+EZWyJM7ZdHWzLK DgShZfcCG+DkjZ4h6hgwB0eqCQcsomZes5lIe9hQgnWT97PpxXJehlBj5o+vfrzIzyth kETvbYMVV3wImP3XAO/gcA2oyrPivp3BPFFbZ83KQhJZ+Z7jJrz18l+8AFWDX9hjOXsT 2wGx1nB688boE16iIQijW9n/CXzNITFkDT9UmeudlfV6XXw4QR9OYmhxFhEu5F6pI+h4 0q7w== 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=Xg9l0RxxraOI8pPXGYNpuYRf/4HAcEkIAoPeM29jPP0=; b=LbdQ3+MNzY6kZlGEtq8LutoUkIMppyMb44ssEAmM1ieJOCJmoMJycBGFkOvIIqqCmr byFCjoumZUpCOIOxah94Y8pZYf3CjhHbuXcKfrB70cQV2Uk6IcP3axLtC29vUEmm3AS+ CS5QTZ/1TiPgGcCCokT2OJvUHDjAkLI/qOfa2hfVqlC0vPwIduLoOTLSnJJKh+855VJF ERcX2PQLOejUGzvFLGfIetkC+SKyhovRwgyL8Qp78iZ+Irpe3zI2EacGlbZfUjFjFGQR o6zNBY6sboSyBYbfF5Nx2+c7c1tEO36KjSXy1BnRqMKxbeBNYdrAkgjW5neoXaPc5Edp LjUw== X-Gm-Message-State: APjAAAXUiSRR0eNjX9MKxtjHXjaVyw1E8e6D1AhbywnlQzv7Dt285GhK 0wtVqi2l63H8JtsIx1/xR2fRFi8itogp9iJ0pC4H7mOHrdY= X-Google-Smtp-Source: APXvYqzKxcQv+Ne1z4zuwtOAzVsQdcpSs03nPwC/H2pxDAxWVFKhLCCP/rIbfbSYTfa31gQwqeugeUsnoBTvtDEMgHQ= X-Received: by 2002:a17:906:2894:: with SMTP id o20mr25694842ejd.199.1576371788040; Sat, 14 Dec 2019 17:03:08 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:9490 Archived-At: --00000000000075ce970599b3a839 Content-Type: text/plain; charset="UTF-8" See snippet below. IMHO the second call to add1 should fail. On guile-2.2.6 it does not error out. On guile-2.0 it does throw error (as I think it should). Is this intentional? =-=-= (define (main) (define (add1 num) (+ num 1)) (display "testing") (display (add1 2)) (display (add1 2 3))) (main) =-=-= --00000000000075ce970599b3a839 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
See snippet below.
IMHO the second cal= l to add1 should fail. On guile-2.2.6 it does not error out.
On g= uile-2.0 it does throw error (as I think it should).
Is this inte= ntional?

=3D-=3D-=3D
(define (ma= in)
=C2=A0 (define (add1 num)
=C2=A0 =C2=A0 (+ num 1))
=C2=A0 (dis= play "testing")
=C2=A0 (display (add1 2))
=C2=A0 (display (= add1 2 3)))

(main)
=3D-=3D-=3D
--00000000000075ce970599b3a839--