From 637c6ef51f79cf6c07673c05a13344b6cefcb820 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Sun, 2 Dec 2018 00:14:53 +0000 Subject: [PATCH] Compiler chokes on a variable named |#[continuation]|. --- tests/check.scm | 1 + tests/compiler/test-varname.scm | 41 +++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 tests/compiler/test-varname.scm diff --git a/tests/check.scm b/tests/check.scm index 26984f128..ba10de521 100644 --- a/tests/check.scm +++ b/tests/check.scm @@ -40,6 +40,7 @@ USA. (define known-tests '( + "compiler/test-varname" "microcode/test-chacha" ;++ Kludge to run the flonum cast tests interpreted and compiled -- ;++ the compiler has a bug with negative zero. diff --git a/tests/compiler/test-varname.scm b/tests/compiler/test-varname.scm new file mode 100644 index 000000000..9d879048d --- /dev/null +++ b/tests/compiler/test-varname.scm @@ -0,0 +1,41 @@ +#| -*-Scheme-*- + +Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, + 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, + 2017, 2018 Massachusetts Institute of Technology + +This file is part of MIT/GNU Scheme. + +MIT/GNU Scheme is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at +your option) any later version. + +MIT/GNU Scheme is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with MIT/GNU Scheme; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, +USA. + +|# + +;;;; Tests for unusual variable names + +(declare (usual-integrations)) + +(define loser-env + (the-environment)) + +(define-test 'continuation + (lambda () + (expect-error + (lambda () + ((compile-procedure + (eval '(lambda (|#[continuation]|) |#[continuation]|) + loser-env)) + 'ok))))) -- 2.25.1