Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
ansi-test
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michał Herda
ansi-test
Commits
2b9f321b
Commit
2b9f321b
authored
13 years ago
by
ehuelsmann
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ansi-tests/flet.lsp
+23
-0
23 additions, 0 deletions
ansi-tests/flet.lsp
ansi-tests/labels.lsp
+31
-0
31 additions, 0 deletions
ansi-tests/labels.lsp
ansi-tests/macrolet.lsp
+27
-0
27 additions, 0 deletions
ansi-tests/macrolet.lsp
with
81 additions
and
0 deletions
ansi-tests/flet.lsp
+
23
−
0
View file @
2b9f321b
...
@@ -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)
This diff is collapsed.
Click to expand it.
ansi-tests/labels.lsp
+
31
−
0
View file @
2b9f321b
...
@@ -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
This diff is collapsed.
Click to expand it.
ansi-tests/macrolet.lsp
+
27
−
0
View file @
2b9f321b
...
@@ -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)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment