CL not is not not?

Per Bothner per@bothner.com
Fri May 25 05:00:00 GMT 2012


On 05/24/2012 04:15 PM, Jamison Hope wrote:
> OK, I figured this out.
>
> The problem line is
>> boolean val = PrimType.booleanValue(value);
>
> in Compilation#compileConstant. PrimType#booleanValue is implemented as:
>> return ! (value instanceof Boolean) || ((Boolean) value).booleanValue();
> which (of course!) returns the wrong value when passed Lisp2.FALSE
> (which is a LList, not a Boolean) in Common Lisp.
>
> Replacing that line in Compilation.java with
> boolean val = getLanguage().isTrue(value);
> does the right thing:

Thanks - I checked in your patch.

P.S. It would be appreciated if you can try to include ChangeLog
entries.

Testcases are also also welcome if it's not too difficult
to write them.  For something like this using RunScriptTest might
be appropriate - see gnu/q2/testsuite for examples for Q2, and
the main testsuite for Scheme examples.  We might need to enhance
RunScriptTest for CommonLisp - I haven't tried that yet.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/



More information about the Kawa mailing list