From: Nathan Froyd Date: Thu, 20 Dec 2012 04:13:47 +0000 (-0500) Subject: don't check SUBTYPEP of ELEMENT-TYPE in ADJUST-ARRAY unnecessarily X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=43c6634142a96e1d1bab2efe1a39cd8234903c41;p=sbcl.git don't check SUBTYPEP of ELEMENT-TYPE in ADJUST-ARRAY unnecessarily --- diff --git a/src/code/array.lisp b/src/code/array.lisp index 8a4ddfe..90b7a99 100644 --- a/src/code/array.lisp +++ b/src/code/array.lisp @@ -871,7 +871,7 @@ of specialized arrays is supported." ;;;; ADJUST-ARRAY (defun adjust-array (array dimensions &key - (element-type (array-element-type array)) + (element-type (array-element-type array) element-type-p) (initial-element nil initial-element-p) (initial-contents nil initial-contents-p) fill-pointer @@ -884,7 +884,8 @@ of specialized arrays is supported." (cond ((/= (the fixnum (length (the list dimensions))) (the fixnum (array-rank array))) (error "The number of dimensions not equal to rank of array.")) - ((not (subtypep element-type (array-element-type array))) + ((and element-type-p + (not (subtypep element-type (array-element-type array)))) (error "The new element type, ~S, is incompatible with old type." element-type)) ((and fill-pointer (not (array-has-fill-pointer-p array)))