Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
1.0-beta-4
-
None
-
None
-
Mac OS X, java 1.4.2
Description
It is unclear and inconsistent of what the method signature should be for overloading the == operator. Here is a mailing list posting regarding this issue:
> For example, this does not work:
>
> class A {
> String b = "hi"
> equals(A a)
> }
>
> a1 = new A()
> a2 = new A()
>
> println a1 == a2
Okay, I'm an idiot. That does parse as expected. The problem is
with the equals method signature:
boolean equals( a )
will work. I tried several other combinations and only this one
worked.
So, it probably is a bug, and you should go ahead and report it.
Thanks,
Chris.