From: "Ludovic Courtès" <ludo@gnu.org>
To: 48096@debbugs.gnu.org
Subject: bug#48096: [3.0.6] ‘syntax-error’ exceptions include vectors instead of source location properties
Date: Thu, 29 Apr 2021 11:41:46 +0200 [thread overview]
Message-ID: <87fsz9mnqd.fsf@inria.fr> (raw)
[-- Attachment #1: Type: text/plain, Size: 226 bytes --]
Hi!
In 3.0.6, a slight incompatibility crept in: ‘syntax-error’ exceptions
include vectors like #("example.scm" 1 2) instead of good’ol source
property alists.
Here is a test case that reproduces the problem:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1308 bytes --]
diff --git a/test-suite/tests/syntax.test b/test-suite/tests/syntax.test
index 10bc7b080..c60a453aa 100644
--- a/test-suite/tests/syntax.test
+++ b/test-suite/tests/syntax.test
@@ -1,7 +1,7 @@
;;;; syntax.test --- test suite for Guile's syntactic forms -*- scheme -*-
;;;;
;;;; Copyright (C) 2001, 2003, 2004, 2005, 2006, 2009, 2010,
-;;;; 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
+;;;; 2011, 2012, 2013, 2014, 2021 Free Software Foundation, Inc.
;;;;
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
@@ -112,6 +112,18 @@
(with-test-prefix "Bad argument list"
+ (pass-if-equal "syntax-error location"
+ '((line . 1) (column . 2) (filename . "example.scm"))
+ (catch 'syntax-error
+ (lambda ()
+ (eval (call-with-input-string "\n (let foo bar)"
+ (lambda (port)
+ (set-port-filename! port "example.scm")
+ (read port)))
+ (interaction-environment)))
+ (lambda (key proc message properties form subform . rest)
+ properties)))
+
(pass-if-syntax-error "improper argument list of length 1"
exception:generic-syncase-error
(eval '(let ((foo (lambda (x y) #t)))
[-- Attachment #3: Type: text/plain, Size: 12 bytes --]
Ludo’.
next reply other threads:[~2021-04-29 9:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-29 9:41 Ludovic Courtès [this message]
2021-04-29 20:00 ` bug#48096: [3.0.6] ‘syntax-error’ exceptions include vectors instead of source location properties Andy Wingo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fsz9mnqd.fsf@inria.fr \
--to=ludo@gnu.org \
--cc=48096@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).