Skip to content
Snippets Groups Projects
Commit 2b9f321b authored by ehuelsmann's avatar ehuelsmann
Browse files

Test that local function and macro definitions shadow global macro,

function and compiler-macro definitions.
parent a4fc1a22
No related branches found
No related tags found
No related merge requests found
...@@ -559,4 +559,27 @@ ...@@ -559,4 +559,27 @@
(%f))) (%f)))
:good) :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)
...@@ -404,3 +404,34 @@ ...@@ -404,3 +404,34 @@
(labels ((%f () (expand-in-current-env (%m :good)))) (labels ((%f () (expand-in-current-env (%m :good))))
(%f))) (%f)))
:good) :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
...@@ -346,6 +346,7 @@ ...@@ -346,6 +346,7 @@
(%f))) (%f)))
:good) :good)
;;; The &environment parameter is bound first ;;; The &environment parameter is bound first
(deftest macrolet.38 (deftest macrolet.38
...@@ -443,3 +444,29 @@ ...@@ -443,3 +444,29 @@
;;; TODO: more special declarations for other macrolet arguments ;;; 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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment