X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.impure.lisp;h=9a8458c203d1867f9fa25356b6312db331005300;hb=09d7974601df2aaaa820ca576026b9b4f03e6ab1;hp=f3f1d20087dce8fa90745c703a877d42e340e9a7;hpb=7ce2c42adf3d62f03086de940adaee48e6161a40;p=sbcl.git diff --git a/tests/compiler.impure.lisp b/tests/compiler.impure.lisp index f3f1d20..9a8458c 100644 --- a/tests/compiler.impure.lisp +++ b/tests/compiler.impure.lisp @@ -615,6 +615,27 @@ BUG 48c, not yet fixed: (assert (typep (check-embedded-thes 3 3 2 3.5f0) 'type-error)) +;;; INLINE inside MACROLET +(declaim (inline to-be-inlined)) +(macrolet ((def (x) `(defun ,x (y) (+ y 1)))) + (def to-be-inlined)) +(defun call-inlined (z) + (to-be-inlined z)) +(assert (= (call-inlined 3) 4)) +(macrolet ((frob (x) `(+ ,x 3))) + (defun to-be-inlined (y) + (frob y))) +(assert (= (call-inlined 3) + ;; we should have inlined the previous definition, so the + ;; new one won't show up yet. + 4)) +(defun call-inlined (z) + (to-be-inlined z)) +(assert (= (call-inlined 3) 6)) +(defun to-be-inlined (y) + (+ y 5)) +(assert (= (call-inlined 3) 6)) + ;;;; tests not in the problem domain, but of the consistency of the ;;;; compiler machinery itself