Return type checking at inheritance is broken