Skip to content

Commit 4f8a0ae

Browse files
committed
add test for lambda in lambda
1 parent 0e7f996 commit 4f8a0ae

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

test/env.l

+2-5
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
(init-unit-test)
44

5-
(eval-when (compile) ;; this does not work on compiled code
6-
(when nil
7-
85
;;(defun make-c (a) (let ((x 0)) #'(lambda () (list a x))))
96
;;(defun make-c () (let ((x 0)) #'(lambda () (list x))))
107
(defun make-c0 () #'(lambda () (list 0)))
@@ -16,6 +13,7 @@
1613
(format t ";; funcall make-c0 ~A~%" (funcall f0))
1714
(assert (equal (funcall f0) '(0))))
1815

16+
1917
(defun make-c1 () (let () #'(lambda (x) (list x))))
2018

2119
(compile 'make-c1)
@@ -25,6 +23,7 @@
2523
(format t ";; funcall make-c1 ~A~%" (funcall f1 1))
2624
(assert (equal (funcall f1 1) '(1))))
2725

26+
2827
(defun make-c2 () (let ((x 0)) #'(lambda () (list x))))
2928

3029
(compile 'make-c2)
@@ -52,8 +51,6 @@
5251
(format t ";; funcall make-c4 ~A~%" (funcall f4 1))
5352
(assert (equal (funcall f4 1) '(1))))
5453

55-
)) ;; eval-when (compile) (when nil
56-
5754
(deftest lambda-in-lambda
5855
(let (r)
5956
(setq r

0 commit comments

Comments
 (0)