1.0.4.45: workaround for bug #412 & undefined variable cleanup
[sbcl.git] / tests / compiler.pure.lisp
index ff91c66..64acb35 100644 (file)
                            0)
                 (division-by-zero ()
                   :error)))))
+
+;;; Dead unbound variable (bug 412)
+(with-test (:name :dead-unbound)
+  (assert (eq :error
+              (handler-case
+                  (funcall (compile nil
+                                    '(lambda ()
+                                      #:unbound
+                                      42)))
+                (unbound-variable ()
+                  :error)))))