[ansi-test-devel] Problem with CTYPECASE.15

Tobias C Rittweiler tcr at freebits.de
Sat Feb 19 07:37:18 UTC 2011


In article 
<AANLkTimWBti8V5CE1Va1fhy45KgVaLskqVVc5GOkd-1t at mail.gmail.com>,
 Juan Jose Garcia-Ripoll <juanjose.garciaripoll at googlemail.com> wrote:

> (MACROLET ((%M (Z)
>                    Z))
>         (CTYPECASE (EXPAND-IN-CURRENT-ENV (%M :FOO))
>           (INTEGER :BAD1)
>           (KEYWORD :GOOD)
>           (SYMBOL :BAD2)))
> 
> Is this test really correct? CTYPECASE must be able to write into the keyval
> (in this case the form (EXPAND-IN-CURRENT-ENV (%M :FOO))). ECL properly
> detects that this is impossible, because the expression is constant, but
> this is not what the test suite expects.
> 
> Would the following make sense?
> 
> (MACROLET ((%M (Z)
>                    Z))
>         (CTYPECASE (LET ((X (EXPAND-IN-CURRENT-ENV (%M :FOO)))) X)
>           (INTEGER :BAD1)
>           (KEYWORD :GOOD)
>           (SYMBOL :BAD2)))
> 
> Juanjo

"ctypecase keyplace {normal-clause}* => result*"

and

"keyplace---a form; evaluated initially to produce a test-key. Possibly 
also used later as a place if no types match."

So it seems to me it's only valid to complain
if no type clause would match.

I can see that it's probably a bit of a hassle to
implement.

  -T.





More information about the ansi-test-devel mailing list