Kawa regressions since 1.9.90?

Jamison Hope jrh@theptrgroup.com
Mon Oct 4 21:49:00 GMT 2010


On Oct 4, 2010, at 3:22 PM, Per Bothner wrote:

> On 10/01/2010 03:00 PM, Jamison Hope wrote:
>> I just tried rebuilding some code with the latest Kawa from SVN  
>> which I
>> had previously compiled using 1.9.90, and I now see a few
>> warnings/errors which I didn't see before:
>>
>> One is of the form "warning - type integer is incompatible with  
>> required
>> type double" in statements such as (javax.vecmath.Vector3d -1.5 0 0).
>> Apparently Kawa forgot how to promote an int to a double?
>
> No, the problem is when it can convert an (infinite-precision) integer
> to a double.  The type of an integer literal is 'integer', which is
> implemented by gnu.math.IntNum.  But where the context requires an
> 'int' or 'long' Kawa has to figure out what to do.  And of course
> method overloading adds complications. So it's all a bit tricky.

Yeah I figured it was something along those lines.

> I just checked in some changes which fix this problem and in general
> should be an improvement.

Confirmed, I can pass a literal 0 to a method expecting a double and  
it does not give me a warning anymore.

Thanks, Per!

-Jamie

--
Jamison Hope
The PTR Group
www.theptrgroup.com





More information about the Kawa mailing list