* Index and bound were swapped around.
* Also fix the name in the type declamation for INVALID-ARRAY-INDEX-ERROR.
Thanks to Stas Boukarev.
;;;; -*- coding: utf-8; fill-column: 78 -*-
changes in sbcl-1.0.28 relative to 1.0.27:
+ * bug fix: some error messages for out-of-bound array indexes confused the
+ index and the bound. (thanks to Stas Boukarev)
* bug fix: pretty printing malformed DEFPACKAGE forms (thanks to Sidney
Markowitz)
* bug fix: running regressions tests in shells without OSTYPE set now works.
(defun data-vector-ref-with-offset (array index offset)
(hairy-data-vector-ref array (+ index offset)))
-(declaim (ftype (function (array integer integer &optional t) nil) signal-invalid-array-index-error))
+(declaim (ftype (function (array integer integer &optional t) nil)
+ invalid-array-index-error))
(defun invalid-array-index-error (array index bound &optional axis)
(error 'invalid-array-index-error
:array array
:format-arguments (list key-name)))
(deferr invalid-array-index-error (array bound index)
- (invalid-array-index-error array bound index))
+ (invalid-array-index-error array index bound))
(deferr object-not-simple-array-error (object)
(error 'type-error
(= 3 (type-error-datum e))
(equal '(integer 0 (3)) (type-error-expected-type e)))
:right)))))))
+
+(with-test (:name :out-of-bounds-error-details)
+ (assert (eq :good
+ (handler-case
+ (flet ((test (array i)
+ (aref array i)))
+ (test (eval '(vector 0 1 2 3)) 6))
+ (sb-int:invalid-array-index-error (e)
+ (when (and (equal '(integer 0 (4))
+ (type-error-expected-type e))
+ (eql 6 (type-error-datum e)))
+ :good))))))
+
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.27.25"
+"1.0.27.26"