Method reference controversy
Zdenek Tronicek
tronicek at fel.cvut.cz
Mon May 19 00:40:33 PDT 2008
Hi,
static void m(Object o) { }
we can refer to the m method as follows
{ Object => void } pp1 = CovariantEtaControversy#m(Object);
There is also a useful conversion so that we can use
{ String => void } pp2 = CovariantEtaControversy#m(Object);
But why is allowed the following?
{ String => void } pp3 = CovariantEtaControversy#m(String);
The method refered is always determined at compilation time. So, I
find this a little confusing.
Zdenek
--
Zdenek Tronicek
Department of Computer Science and Engineering
Prague tel: +420 2 2435 7410
http://cs.felk.cvut.cz/~tronicek
More information about the closures-dev
mailing list