Skip to content
Snippets Groups Projects
Commit f225fa08 authored by pfdietz's avatar pfdietz
Browse files

Add test that compiler macros don't override ordinary macros when a NOTINLINE...

Add test that compiler macros don't override ordinary macros when a NOTINLINE declaration is in effectt.
parent 677d311f
No related branches found
No related tags found
No related merge requests found
...@@ -154,3 +154,22 @@ ...@@ -154,3 +154,22 @@
5 11) 5 11)
*x*))) *x*)))
(5 11) :good) (5 11) :good)
(deftest define-compiler-macro.8
(let* ((sym (gensym))
(form `(define-compiler-macro ,sym (x y)
(declare (special *x*))
(setf *x* :bad)
`(list ,x ,y)))
(form2 `(defmacro ,sym (x y) `(list ,x ,y))))
(eval form)
(eval form2)
(let ((*x* :good))
(declare (special *x*))
(values
(funcall (compile nil `(lambda (a b)
(declare (notinline ,sym))
(,sym a b)))
7 23)
*x*)))
(7 23) :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