make-array transform for list dimensions fails on unknown element-type

Bug #1156095 reported by James Kalenius on 2013-03-17
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Reported by Kenjin on #lisp. I cut down to a smaller test case.

(defpackage #:temp-kenjin
  (:use #:cl))

(in-package #:temp-kenjin)

(defparameter *world* nil)

;(defclass tile () ())

(defun reset ()
  (setf *world* (make-array '(30 40) :element-type 'tile)))

Compiling this will get you a compile-time error about an unknown type TILE, or more specifically that upgraded-array-element-type was called on it. (This happens with the defclass uncommented because of, but that's not directly relevant.) It won't occur with say (make-array 30 :element-type 'tile) because the transform for vectors gives up if it can't determine the saetp. Since the transform for multidimensional arrays just uses the u-a-e-t'd spec for a truly-the, the fix is pretty trivial, just using * instead of the u-a-e-t if the type is unknown.



sbcl --version

I know mine's a bit old, but my patch is against what I pulled from git and it doesn't seem to have been fixed.

James Kalenius (aeshtaer) wrote :
Stas Boukarev (stassats) wrote :

commit e3b6a3e3ee72b4bee3909a1876b33bd3bf6fa596
Author: Stas Boukarev <email address hidden>
Date: Sun Mar 17 12:53:47 2013 +0400

    make-array transform error on unknown element-type.

    Check for the type to be known, otherwise give up transforming.
    Based on a patch by James Kalenius.

Changed in sbcl:
status: New → Fix Committed
Stas Boukarev (stassats) on 2013-03-31
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers