Huston, we have a problem !

Florian Weimer fweimer at bfk.de
Mon Feb 21 01:44:36 PST 2011


* Neal Gafter:

> On Fri, Feb 18, 2011 at 9:10 AM, Florian Weimer <fweimer at bfk.de> wrote:
>
>> Clearly, those a different at compile time.  What I'm looking for is a
>> case where both Foo and Foo<> result in legal expressions at compile
>> time and produce different byte code.
>>
>
> *public class X<T> {
>     public X(T t) {}
>     public T get() { return null; }
>     public static int f(String s) { return 1; }
>     public static int f(Object o) { return 2; }
>     public static void main(String[] args)
>     {
>         System.out.println(f(new X<>("").get()));
>         System.out.println(f(new X("").get()));
>     }
> }*

Ah, thanks.  Of course, this settles it. 8-)

-- 
Florian Weimer                <fweimer at bfk.de>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99



More information about the coin-dev mailing list