1 (cl:in-package :cl-user)
3 (declaim (optimize (debug 3) (speed 2) (space 1)))
5 ;;; Until version 0.6.9 or so, SBCL's version of Python couldn't this
6 ;;; correctly, due to the bug patched by Rob MacLachlan on the
7 ;;; cmucl-imp list 2000-06-21, and apply to SBCL by Martin Atzmueller.
8 ;;; (The effectiveness of the test also depends on the implicit
9 ;;; function typing of Python (where DEFUN is like DECLAIM FTYPE),
10 ;;; which violates the ANSI spec, and should be fixed. Once that
11 ;;; unrelated bug is fixed, this code will no longer test the type
12 ;;; inference behavior it's intended to test.)
13 (defun emptyvalues (&rest rest) (declare (ignore rest)) (values))
16 (let ((res (emptyvalues)))
17 (unless (typep res 'foo)
19 (assert (eq (bar) 'expected-value))
21 (sb-ext:quit :unix-status 104) ; success