[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gcl-devel] Latest ansi-test fixes
From: |
Paul F. Dietz |
Subject: |
Re: [Gcl-devel] Latest ansi-test fixes |
Date: |
Sun, 06 Oct 2002 00:25:19 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020408 |
Camm Maguire wrote:
Are you sure? Surely an array which can only be filled with a certain
type of element is a subtype of an array which can be filled with
anything, no?
No. The spec says (on the page for SIMPLE-ARRAY):
The types simple-vector, simple-string, and simple-bit-vector
are disjoint subtypes of type simple-array.
SIMPLE-VECTOR is a subtype of (VECTOR T);
SIMPLE-BIT-VECTOR is a subtype of (VECTOR BIT);
SIMPLE-STRING is a subtype of the union of (VECTOR c) for c
from some collection of subtypes of CHARACTER (just which subsets
is implementation dependent; the collection must contain CHARACTER
and BASE-CHAR, at least.)
Consider also the difference between these and their supertype,
(VECTOR *).
>
In any case, if I eliminate the relationships you
propose, I then get the following inconsistencies:
Test CL-TEST::TYPES-9 failed
Form: (CL-TEST::TYPES-9-BODY)
Expected value: NIL
Actual value: ((SIMPLE-BASE-STRING SIMPLE-STRING ARRAY)
(SIMPLE-BASE-STRING SIMPLE-STRING SIMPLE-ARRAY)
(SIMPLE-BASE-STRING SIMPLE-STRING VECTOR)
(BASE-STRING STRING ARRAY) (BASE-STRING STRING VECTOR)
(SIMPLE-BASE-STRING STRING ARRAY)
(SIMPLE-BASE-STRING STRING VECTOR)).
The output of this test is a set of triples of types (T1 T2 T3) such
that (SUBTYPEP T1 T2) ==> t t, (SUBTYPE T2 T3) ==> t t, but
(SUBTYPEP T1 T3) ==> nil t (i.e., failure of transitivity).
All those relationships should be there -- strings are vectors and
arrays, and simple-strings are simple-arrays (but not simple-vectors).
Paul