Skip to content

ECL errors when it has a :predicate field with value NIL in DEFSTRUCT.

ECL errors when it has a :predicate field with value NIL in DEFSTRUCT.

CLHS states: "If the argument is provided and is nil, no predicate is defined."

This problem occurs with ECL 16.1.3.

CLHS Link: http://www.lispworks.com/documentation/HyperSpec/Body/m_defstr.htm

(defstruct (vec (:type (vector single-float))
                (:constructor %vec (&optional x y z))
                (:conc-name v)
                (:copier nil)
                (:predicate nil))
  (x 0.0 :type single-float)
  (y 0.0 :type single-float)
  (z 0.0 :type single-float))

Reported by axion. After solving the issue, add this test (reduce the test case to minimum) to ansi-tests.