From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id QNycAGS+o2MTDQEAbAwnHQ (envelope-from ) for ; Thu, 22 Dec 2022 03:18:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id YAN6O2O+o2PJVQEAG6o9tA (envelope-from ) for ; Thu, 22 Dec 2022 03:18:11 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id BF8EE3D972 for ; Thu, 22 Dec 2022 03:18:11 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p8B9t-00058q-U9; Wed, 21 Dec 2022 21:18:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p8B9m-00058P-CL for guix-patches@gnu.org; Wed, 21 Dec 2022 21:18:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p8B9m-0006za-3c for guix-patches@gnu.org; Wed, 21 Dec 2022 21:18:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p8B9l-00089R-Sb for guix-patches@gnu.org; Wed, 21 Dec 2022 21:18:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60225] [PATCH v2 2/2] tests: records: Add a failing test for match-record. Resent-From: Attila Lendvai Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 22 Dec 2022 02:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60225 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60225@debbugs.gnu.org Cc: Attila Lendvai Received: via spool by 60225-submit@debbugs.gnu.org id=B60225.167167544131317 (code B ref 60225); Thu, 22 Dec 2022 02:18:01 +0000 Received: (at 60225) by debbugs.gnu.org; 22 Dec 2022 02:17:21 +0000 Received: from localhost ([127.0.0.1]:55302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p8B97-000893-Bm for submit@debbugs.gnu.org; Wed, 21 Dec 2022 21:17:21 -0500 Received: from mail-oi1-f171.google.com ([209.85.167.171]:41549) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p8B95-00088v-GI for 60225@debbugs.gnu.org; Wed, 21 Dec 2022 21:17:19 -0500 Received: by mail-oi1-f171.google.com with SMTP id i127so749371oif.8 for <60225@debbugs.gnu.org>; Wed, 21 Dec 2022 18:17:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=ML+g7edwdiyUjQc+UNmpnbSSNI8fh+l0uRMUzrNdaCg=; b=poViqPcuviv4yWkqDQrGWp0yO18tXOVNWgfQIY6OTsfK2pHUi+sPB+XwR7cZ75yb4d TSPdH0y5rWHLNYUOvAKTb+OfbLLfc3adO58TL0ULgafcy6XXGSbpCXKAham9tp2gz5tC 2PMRRHNNELo1OsHU44Rm08mfVGxdhDYeuJWrZjIFKLFIg5YRhKWgF+jrfCGzn5kTpDrh j8K6Q23B9ilFagGJ7LhjgxVubcvGfYMM2YeZk4spa94fTSaYqWCuvbrUR6F5htZAfJgF P3KZUQ6yVDy6SD+h90UQCDRpPFyIsrBJ3ZCnJe0KDuWYwF8I/5vFGw6DMeSh3lt++Snj Rgxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ML+g7edwdiyUjQc+UNmpnbSSNI8fh+l0uRMUzrNdaCg=; b=wpa0K9p8kMN+z/+kIxXJOhHCnpsz68x3bz22BjAsuSOQ6KKV0lZpRfGL7J5+OUSqRz xxY1OHaOIFDIXJrBpM3Ltji20TSdIVbfFpxmnViusIeOOhi6Ka+ZKN9IJiVOTWYvzPR8 wQ4j8v0gH+CUnB0H7KNa1SlUagsYlHvM0gy3KEU2EDZNYctTRzgfoaDQO693f+CqO9mi fkv/+dKR0faJUzsVxQaQPyJHPELY8QI6EadChtdE/M5zfKLWzR1qM2AZfSxzY6DR9ti2 4+qNZflbFy93752KjCLNS+f2/QgepVrJ2XiADSfiBo6XyGDsXohgwF/yULsOZAnS5Jqm w7CQ== X-Gm-Message-State: AFqh2kotrWJLpHubUQ1t+rdlkP6Yd4JnON2mcEC/xQp22MD0vQYk3Zus x1KkmQe3yPfNoDjaIgJI0sHbbE4TN1c= X-Google-Smtp-Source: AMrXdXsooxE+ba2hGxJAiYpT4p/ckezeB6iCLQ7jWn1+9CgD9FVGRF45ytrdyd9id1Rc+ivzP5FXyQ== X-Received: by 2002:a05:6808:21a7:b0:35c:492d:27ad with SMTP id be39-20020a05680821a700b0035c492d27admr2515028oib.30.1671675433995; Wed, 21 Dec 2022 18:17:13 -0800 (PST) Received: from localhost.localdomain ([179.218.10.217]) by smtp.gmail.com with ESMTPSA id k5-20020a544405000000b0035763a9a36csm7361592oiw.44.2022.12.21.18.17.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Dec 2022 18:17:13 -0800 (PST) From: Attila Lendvai Date: Wed, 21 Dec 2022 23:14:57 -0300 Message-Id: <20221222021455.18632-2-attila@lendvai.name> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221222021455.18632-1-attila@lendvai.name> References: <20221222021455.18632-1-attila@lendvai.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671675491; a=rsa-sha256; cv=none; b=j2+oQBJoVJr77k8VUPJLlW0uJi9024YmqXPZ2yz5oQAxGz/eRh+fPM6MHc1DLvbxGE2tqT 6L/R81q8pIcUhWU7b/sG0w5wEnwDij18gUNiwZg+NAMr1Dj2z1mfZqPkcasodAThMRn0EV m4kOiO0ruHYLtUPg9C7uv4OaLxx5fxjoQFjIh2yNszHJitM6e2Cw8ZHbhMQvxUROFinhdh qnAUjvsiKxUL9BNmPKX6oHTZRPZZYEdkzgpXZ0NXEeojHXCBivIXSqO9eyv1AT5Cu8HyBI qG9/M1dMJrIHi8KCpzwpnB3habLu+kWZQOjtoYjveKh2GNh80m7naw8dfjhZjw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=poViqPcu; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671675491; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ML+g7edwdiyUjQc+UNmpnbSSNI8fh+l0uRMUzrNdaCg=; b=EQK+Iz7ofwSmp5s2yMXJmYbqcwdWqY51A/BNSMVvkcy3YP0xPY9CAEVmB1zHOmtBOeDILy YVO27koaVplaEjLaxmOnEwa/e6QWLGvkIejre7hUEOBmecft/i6wJ6HYOUXKirvMlb8ap3 8qOiFCEr0IM1VUNQa5ANWyzHhOjaz3XIU9A46+KogjtubO0DrJekENpl4QYoQPRbIUE0pM wIOyfyeMafFTZeM2dilfcAxLTweWU8OiEEKnr/wPwWQw0iQu4X5Vwd4Xs+b0VBZgOFhKv0 M4DR/2toOFTAoHwiN+8ARqEdYWP9ulXjaM2fG1jcDaNTHQ+JP0O0BS93jgyMaw== X-Spam-Score: -1.80 X-Migadu-Queue-Id: BF8EE3D972 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=poViqPcu; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -1.80 X-TUID: hwZLKmA8M6BA * tests/records.scm ("match-record, syntactic interference"): New failing test. --- i'm not sure what's going on here, but it looks like a bug to me. i've experienced this in real code, and the error message was not very helpful. tests/records.scm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/records.scm b/tests/records.scm index b1203dfeb7..8a48e2fd07 100644 --- a/tests/records.scm +++ b/tests/records.scm @@ -561,4 +561,27 @@ (define-record-type* foo make-foo (make-fresh-user-module))) (lambda (key . args) key))) +(test-expect-fail 1) +(test-equal "match-record, syntactic interference" + '(1 2) + (begin + (define* (make-form #:optional (bindings '())) + `(begin + (use-modules (guix records)) + + (let ((first 42)) ; here it does not interfere + (define-record-type* foo make-foo + foo? + (first foo-first (default 1)) + (second foo-second)) + + (let (,@bindings) ; but here it does interfere + (match-record (foo (second 2)) + (first second) + (list first second)))))) + ;; This works fine. + (eval (make-form) (make-fresh-user-module)) + ;; But this fails, although I think it shouldn't. + (eval (make-form '((second 43))) (make-fresh-user-module)))) + (test-end) -- 2.35.1