From 43c6634142a96e1d1bab2efe1a39cd8234903c41 Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Wed, 19 Dec 2012 23:13:47 -0500 Subject: [PATCH] don't check SUBTYPEP of ELEMENT-TYPE in ADJUST-ARRAY unnecessarily --- src/code/array.lisp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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))) -- 1.7.10.4