Question with wildcard types

Vicente-Arturo Romero-Zaldivar vicente.romero at oracle.com
Sat Nov 16 11:04:33 PST 2013


Thanks for the follow up,

Vicente

On 16/11/13 13:40, José Cornado wrote:
> I have spent enough time trying to reproduce the behavior "described" 
> in the previous emails of this thread.
>
> It is not happening anymore but I have distracted by other random 
> behavior in the same area: analyzing wildcard types that are not 
> happening anymore either.
>
> It is time to stamp "can not reproduce" on this one.
>
> Thanks for the help!!
>
>
>
>
> On Fri, Nov 15, 2013 at 6:24 AM, José Cornado <jose.cornado at gmail.com 
> <mailto:jose.cornado at gmail.com>> wrote:
>
>     Sorry, I will reconfirm the behavior and make it more readable!
>
>
>     On Fri, Nov 15, 2013 at 5:51 AM, Vicente-Arturo Romero-Zaldivar
>     <vicente.romero at oracle.com <mailto:vicente.romero at oracle.com>> wrote:
>
>         Hi Jose,
>
>         Your query seems to be interesting but it's a little bit
>         messy, could you please join the pieces with possibly a small
>         test case that clarifies what do you find as a bug or
>         unexpected behavior?
>
>         Thanks,
>         Vicente
>
>
>         On 13/11/13 17:40, José Cornado wrote:
>>         Ok. At the root of everything:
>>
>>         field.getGenericType() returns a WildcardType with "? super
>>         X" instead of "? super C" or "? super
>>         C<implementorOfanInterface>".
>>
>>         Shouldn't this be a bug since the super clause is expecting
>>         an ascendant of C?
>>
>>
>>
>>
>>         On Wed, Nov 13, 2013 at 10:12 AM, José Cornado
>>         <jose.cornado at gmail.com <mailto:jose.cornado at gmail.com>> wrote:
>>
>>             please disregard emails. It is user error until further
>>             notice! :-}
>>
>>
>>             On Wed, Nov 13, 2013 at 10:03 AM, José Cornado
>>             <jose.cornado at gmail.com <mailto:jose.cornado at gmail.com>>
>>             wrote:
>>
>>                 wouldn't be more appropriate to return Class C?
>>
>>
>>                 On Wed, Nov 13, 2013 at 9:58 AM, José Cornado
>>                 <jose.cornado at gmail.com
>>                 <mailto:jose.cornado at gmail.com>> wrote:
>>
>>                     Hello!
>>
>>                     I have a short question regarding wildcard types:
>>
>>                     public class C<X extends anInterface>{
>>
>>                     anotherInterface<? super C<X>> p;
>>
>>                     }
>>
>>                     I compile say C<implementorOfanInterface> and I
>>                     do a getLowerBounds() on p's type I get
>>                     TypeVariable X instead of
>>                     ParameterizedType C<implementorOfanInterface>.
>>
>>                     Is this expected?
>>
>>                     JVM info:
>>
>>                     java version "1.7.0_25"
>>                     Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
>>                     Java HotSpot(TM) 64-Bit Server VM (build
>>                     23.25-b01, mixed mode)
>>
>>                     on mac os X.
>>
>>                     Thanks a lot!!
>>
>>                     -- 
>>                     José Cornado
>>
>>                     --
>>
>>                     home: http://www.efekctive.com
>>                     blog: http://blogging.efekctive.com
>>                     ----------------------
>>
>>                     Everything has been said before, but since nobody
>>                     listens we have to keep going back and beginning
>>                     all over again.
>>
>>                     Andre Gide
>>
>>
>>
>>
>>                 -- 
>>                 José Cornado
>>
>>                 --
>>
>>                 home: http://www.efekctive.com
>>                 blog: http://blogging.efekctive.com
>>                 ----------------------
>>
>>                 Everything has been said before, but since nobody
>>                 listens we have to keep going back and beginning all
>>                 over again.
>>
>>                 Andre Gide
>>
>>
>>
>>
>>             -- 
>>             José Cornado
>>
>>             --
>>
>>             home: http://www.efekctive.com
>>             blog: http://blogging.efekctive.com
>>             ----------------------
>>
>>             Everything has been said before, but since nobody listens
>>             we have to keep going back and beginning all over again.
>>
>>             Andre Gide
>>
>>
>>
>>
>>         -- 
>>         José Cornado
>>
>>         --
>>
>>         home: http://www.efekctive.com
>>         blog: http://blogging.efekctive.com
>>         ----------------------
>>
>>         Everything has been said before, but since nobody listens we
>>         have to keep going back and beginning all over again.
>>
>>         Andre Gide
>
>
>
>
>     -- 
>     José Cornado
>
>     --
>
>     home: http://www.efekctive.com
>     blog: http://blogging.efekctive.com
>     ----------------------
>
>     Everything has been said before, but since nobody listens we have
>     to keep going back and beginning all over again.
>
>     Andre Gide
>
>
>
>
> -- 
> José Cornado
>
> --
>
> home: http://www.efekctive.com
> blog: http://blogging.efekctive.com
> ----------------------
>
> Everything has been said before, but since nobody listens we have to 
> keep going back and beginning all over again.
>
> Andre Gide

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20131116/4f40a80e/attachment-0001.html 


More information about the compiler-dev mailing list