[ansi-test-cvs] r2166 - trunk/ansi-tests
ehuelsmann at common-lisp.net
ehuelsmann at common-lisp.net
Sun Sep 25 21:02:29 UTC 2011
Author: ehuelsmann
Date: Sun Sep 25 14:02:28 2011
New Revision: 2166
Log:
Test that local function and macro definitions shadow global macro,
function and compiler-macro definitions.
Modified:
trunk/ansi-tests/flet.lsp
trunk/ansi-tests/labels.lsp
trunk/ansi-tests/macrolet.lsp
Modified: trunk/ansi-tests/flet.lsp
==============================================================================
--- trunk/ansi-tests/flet.lsp Tue Sep 13 13:17:48 2011 (r2165)
+++ trunk/ansi-tests/flet.lsp Sun Sep 25 14:02:28 2011 (r2166)
@@ -559,4 +559,27 @@
(%f)))
:good)
+;;; local function bindings shadow global functions, macros
+;;; and compiler-macros
+(defun flet.72 () :bad)
+
+(deftest flet.72
+ (flet ((flet.72 () :good))
+ (flet.72))
+ :good)
+
+(defmacro flet.73 () :bad)
+
+(deftest flet.73
+ (flet ((flet.73 () :good))
+ (flet.73))
+ :good)
+
+(define-compiler-macro flet.74 (&whole form)
+ :bad)
+
+(deftest flet.74
+ (flet ((flet.74 () :good))
+ (flet.74))
+ :good)
Modified: trunk/ansi-tests/labels.lsp
==============================================================================
--- trunk/ansi-tests/labels.lsp Tue Sep 13 13:17:48 2011 (r2165)
+++ trunk/ansi-tests/labels.lsp Sun Sep 25 14:02:28 2011 (r2166)
@@ -404,3 +404,34 @@
(labels ((%f () (expand-in-current-env (%m :good))))
(%f)))
:good)
+
+
+;;; local function bindings shadow global functions, macros
+;;; and compiler-macros
+
+
+
+(defun labels.50 () :bad)
+
+
+(deftest labels.50
+ (labels ((labels.50 () :good))
+ (labels.50))
+ :good)
+
+(defmacro labels.51 () :bad)
+
+(deftest labels.51
+ (labels ((labels.51 () :good))
+ (labels.51))
+ :good)
+
+(define-compiler-macro labels.52 (&whole form)
+ :bad)
+
+(deftest labels.52
+ (labels ((labels.52 () :good))
+ (labels.52))
+ :good)
+
+
\ No newline at end of file
Modified: trunk/ansi-tests/macrolet.lsp
==============================================================================
--- trunk/ansi-tests/macrolet.lsp Tue Sep 13 13:17:48 2011 (r2165)
+++ trunk/ansi-tests/macrolet.lsp Sun Sep 25 14:02:28 2011 (r2166)
@@ -346,6 +346,7 @@
(%f)))
:good)
+
;;; The &environment parameter is bound first
(deftest macrolet.38
@@ -443,3 +444,29 @@
;;; TODO: more special declarations for other macrolet arguments
+
+
+;;; macrolet shadows global macro, function and compiler-macro
+;;; definitions
+
+(defmacro macrolet.50 () :bad)
+
+(deftest macrolet.50
+ (macrolet ((macrolet.50 () :good))
+ (macrolet.50))
+ :good)
+
+(defun macrolet.51 () :bad)
+
+(deftest macrolet.51
+ (macrolet ((macrolet.51 () :good))
+ (macrolet.51))
+ :good)
+
+(define-compiler-macro macrolet.52 (&whole form)
+ :bad)
+
+(deftest macrolet.52
+ (macrolet ((macrolet.52 () :good))
+ (macrolet.52))
+ :good)
More information about the ansi-test-cvs
mailing list