Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Karsten Poeck
ansi-test
Commits
2b9f321b
Commit
2b9f321b
authored
Sep 25, 2011
by
ehuelsmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
Showing
3 changed files
with
81 additions
and
0 deletions
+81
-0
ansi-tests/flet.lsp
ansi-tests/flet.lsp
+23
-0
ansi-tests/labels.lsp
ansi-tests/labels.lsp
+31
-0
ansi-tests/macrolet.lsp
ansi-tests/macrolet.lsp
+27
-0
No files found.
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
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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