To be fair, I was primed to really think about the code execution given he'd indicated there was a trap in there somewhere, so it certainly would not have been immediately obvious on first glance. But I think, generally developers understand that <code>override</code> is necessary to override code from a parent class.
Typically XCode helps out with this sort of thing – adding <code>override</code> where it seems like it should be added – but perhaps not when a parent class is using a default protocol implementation.
But again, in this scenario where a class is inheriting from another class, it's typically known you need to override the function in order to use your own implementation, so this does seem a bit contrived.
That actually doesn't work because the greet function is implemented on an extension. You can only override class functions.
IF the inferred type of a variable is the protocol:
AND the method is defined in the original protocol
THEN the runtime type’s implementation is called, irrespective of whether there is a default implementation in the extension.
AND the method is not defined in the original protocol,
THEN the default implementation is called.
ELSE IF the inferred type of the variable is the type
THEN the type’s implementation is called.