Re: [Jastadd] Question on types such as "wildcards.& java.lang.Integer& java.lang.String"

From: Jesper qvist <jesper.oqvist_at_cs.lth.se>
Date: Fri, 18 Jan 2013 16:08:11 +0100

Hi Eric
The type of an expression such as the one in your example is incorrectly
evaluated in JastAddJ currently.
This has been known for some time know. I added the bug on the issue
tracker when I was working on Java 7.

It's not something that we can easily fix, if you have any suggestions I
would be all ears! The type analysis concerning LUBType is *very*
complicated. I was planning to work through it at some point and try to
get an understanding of why it currently doesn't work but right now I
have no clue.

/Jesper

On 01/18/2013 01:54 PM, Eric Bodden wrote:
> Hi all.
>
> We are having another small problem with Soot's JastAdd frontend. When
> parsing the following code, we get an exception "couldn't find class:
> wildcards.& java.lang.Integer& java.lang.String":
>
> public class SootWildcardTest {
>
> void foo() {
> Integer cursor = 42;
> Object o = (cursor != null ? cursor : "null");
> }
>
> }
>
>
> The problems seems to be that the type() attribute on the node for the
> expression "cursor != null ? cursor : "null"" returns an LUBType
> "wildcards.& java.lang.Integer& java.lang.String". My question is: why
> are such types not automatically reduced (here to java.lang.Object)
> and what can I do to reduce them to a "ground" type?
>
> Cheers,
> Eric
Received on Fri Jan 18 2013 - 16:07:53 CET

This archive was generated by hypermail 2.3.0 : Wed Apr 16 2014 - 17:19:06 CEST