4 ms·
It's funny that you keep picking blatantly wrong examples. scala> def ==(a: Any) = false <console>:7: error: overriding method == in class Any of type
by happy_dino 14y ago
It's funny that you keep picking blatantly wrong examples.
scala> def ==(a: Any) = false
<console>:7: error: overriding method == in class Any of type (x$1: Any)Boolean;
method == cannot override final member
def ==(a: Any) = false
^
Maybe you should actually use the language for a few minutes before commenting? :-)
- xjru 14y agoMaybe you shouldn't try so hard to deliberately misunderstand what I'm saying. Your nitpicking doesn't change the fact that you can redefine what == does in your own classes. I hope you do realise that my point isn't even specifically about Scala, but about syntactical abstraction in general.