Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AREF-ACCESSOR-DIMENSION-ERROR results #22

Open
phoe opened this issue Nov 2, 2022 · 0 comments
Open

AREF-ACCESSOR-DIMENSION-ERROR results #22

phoe opened this issue Nov 2, 2022 · 0 comments

Comments

@phoe
Copy link
Member

phoe commented Nov 2, 2022

ABCL ???
(one (one (make-array 1 :initial-element nil))) => ?
(two (one (make-array 1 :initial-element nil))) => ?
ACL ???
(one (one (make-array 1 :initial-element nil))) => ?
(two (one (make-array 1 :initial-element nil))) => ?
CCL ???
(one (one (make-array 1 :initial-element nil))) => ?
(two (one (make-array 1 :initial-element nil))) => ?
CLASP ???
(one (one (make-array 1 :initial-element nil))) => ?
(two (one (make-array 1 :initial-element nil))) => ?
CLISP ???
(one (one (make-array 1 :initial-element nil))) => ?
(two (one (make-array 1 :initial-element nil))) => ?
CMU ???
(one (one (make-array 1 :initial-element nil))) => ?
(two (one (make-array 1 :initial-element nil))) => ?
ECL ???
(one (one (make-array 1 :initial-element nil))) => ?
(two (one (make-array 1 :initial-element nil))) => ?
LWPE ???
(one (one (make-array 1 :initial-element nil))) => ?
(two (one (make-array 1 :initial-element nil))) => ?
SBCL 2.1.3
(one (one (make-array 1 :initial-element nil)))
=> [signals invalid-array-index-error, a subclass of type-error]
(two
=> [signals invalid-array-index-error, a subclass of type-error]

Question: is a TYPE-ERROR signaled in these cases?

Test cases for the above question:

(progn
  (defun one (object)
    (declare (optimize (safety 3)))
    (aref object 1))
  (defun two (object)
    (declare (optimize (safety 3)))
    (setf (aref object 1) 345))
  (list (if (typep (nth-value 1 (ignore-errors (one (make-array 1 :initial-element nil))))
                   'type-error)
            t nil)
        (if (typep (nth-value 1 (ignore-errors (two (make-array 1 :initial-element nil))))
                   'type-error)
            t nil)))

Results:

CCL: (NIL NIL)
ECL: (T T)
CLISP: (T T)
ABCL: (T T)
Clasp: (T T)
CMUCL: (NIL NIL)
ACL: (T T)
LWPE: (NIL NIL)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant