jscl icon indicating copy to clipboard operation
jscl copied to clipboard

nested feature testing: ERROR: ECASE expression failed for the object `NIL'.

Open VitoVan opened this issue 2 years ago • 1 comments
trafficstars

CL-USER> #-jscl 
... (defun hello () 
...   #+types (format t "Has types~%") 
...   #-types (format t "No types~%"))
ERROR: ECASE expression failed for the object `NIL'.
CL-USER> 

Am I doing something wrong?

on SBCL nothing will happen:

This is SBCL 2.3.3, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.
* #-sbcl
(defun hello ()
  #+types (format t "Has types~%")
  #-types (format t "No types~%"))

This makes me not able to test features happily.

VitoVan avatar Apr 21 '23 05:04 VitoVan

Found a workaround, don't nest, use uiop:featurep or just check *features* manually.

(uiop:featurep :darwin)

VitoVan avatar Apr 21 '23 05:04 VitoVan