Re: :type-added-1,2 tests
Raymond Toy <[email protected]>
| Newsgroups | gmane.lisp.clocc.devel |
|---|---|
| Message-ID | <[email protected]> |
>>>>> "Sam" == Sam Steingold <[email protected]> writes: >> * In message <[email protected]> >> * On the subject of ":type-added-1,2 tests" >> * Sent on 17 Jul 2002 13:13:48 -0400 >> * Honorable Raymond Toy <[email protected]> writes: >> >> >From a (very brief) discussion on comp.lang.lisp, the results for >> :type-added-1 and :type-added-2 tests in type.lisp are questionable: >> >> >> (check-for-bug :type-added-1 >> (type-of (coerce (list 1 2 3 4) '(simple-array (unsigned-byte 8)))) >> (simple-array (unsigned-byte 8) (4))) >> >> (check-for-bug :type-added-2 >> (type-of (coerce (list 1 2 3 4) '(simple-array *))) >> (simple-vector 4)) >> >> Since the desired type is not a subtype of sequence, it is acceptable >> for CMUCL to produce an error here. (Actually, the discussion says it >> should be mandatory because the type is not a sequence.) >> >> Perhaps the results should be conditionalized? Sam> I would rather replace the result type with Sam> (simple-array (unsigned-byte 8) (*)) Sam> and Sam> (simple-array * (*)) Sam> respectively. Sam> this way the test would not have to be conditionalized. This is ok too. Since the tests don't really way what they're testing, it's hard for me to really know what to do. :-) I just assumed that the test was really to see if you could coerce to such objects. Ray ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf