PROPOSAL: Method and Field Literals
Mark Mahieu
markmahieu at googlemail.com
Thu Mar 12 14:33:06 PDT 2009
On 12 Mar 2009, at 21:24, Rémi Forax wrote:
>>> class A {
>>> static int f(int) { ... }
>>> }
>>> ...
>>> {int => int} c=A#f(int);
>>> A#f(int).equals(c) // false because A#f(int) is a
>>> java.lang.reflect.Method
>>>
>>>
>>> Rémi
>>>
>>
>> I expect that would rather depend on how closure equality is
>> defined (or not).
>
> Here equals() is called on Method.
I saw that, but I thought your point was that the programmer may
*believe* it's two objects of closure/function type being compared,
and therefore expect the result to be true in this example.
Have I misunderstood?
Mark
More information about the coin-dev
mailing list