3 ms·
I still don't get ThingDebugger.debug() first you can't call super() in that method without a downcast. how does that count as overriding the method? it's a b
by foolfoolz 11y ago
I still don't get ThingDebugger.debug()
first you can't call super() in that method without a downcast. how does that count as overriding the method?
it's a big problem if you have another subclass of Debugger that does not change the parameter type. you now have 2 subclassed of Debugger, one has a method debug(cat: Cat). the other has a method debug(cat: Thing). that accepts cats, dogs, and tubas. these subtypes of Debugger are not safely interchangeable.
this does not compile in scala, I'm surprised swift would allow it.