Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Karsten Poeck
ansi-test
Commits
2b9f321b
Commit
2b9f321b
authored
Sep 25, 2011
by
ehuelsmann
Browse files
Test that local function and macro definitions shadow global macro,
function and compiler-macro definitions.
parent
a4fc1a22
Changes
3
Hide whitespace changes
Inline
Side-by-side
ansi-tests/flet.lsp
View file @
2b9f321b
...
...
@@ -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)
ansi-tests/labels.lsp
View file @
2b9f321b
...
...
@@ -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
ansi-tests/macrolet.lsp
View file @
2b9f321b
...
...
@@ -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)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment