This page is no longer maintained — Please continue to the home page at www.scala-lang.org

super.==(x)

1 reply
extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.

I checked in this:

https://lampsvn.epfl.ch/trac/scala/changeset/22702

Figuring it could hardly be worse than runtime failure, as noted here:

http://lampsvn.epfl.ch/trac/scala/ticket/3736

But then it occurred to me that these methods can be overloaded. Even
isInstanceOf can be overloaded, fun. So if that is to be supported then
I better find some other way, else you can't call the overloaded
verisons in superclasses. At first I had tried rewriting those calls
like .## already is, but it wasn't as simple as ## because they're
binary methods and the analogous code exploded the compiler.

Personally I'd say only unhappiness is likely to come of overloading
these methods and it'd be better to disallow it, but I can understand
wanting to preserve the illusion that there's no special case.

extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.
Re: super.==(x)

On Sat, Aug 07, 2010 at 01:22:03PM -0700, Paul Phillips wrote:
> [some nonsense]

And THEN I realized that if I looked at the symbol instead of the name I
wouldn't scoop the overloads up in the net. So I could just fix it that
way if it sounds good to disallow the super.XX syntax on final Any
methods.

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland