My opinion would be generally no.
The reason is that it even if you could somehow make your FlyingCar behave only like it would if it were a Car from this point forward, it's still already been operated on as if it were a FlyingCar, and may no longer be in a valid state for a Car.
Maybe the reason your graphics engine can't display a FlyingCar is because of the textures it uses. But someone's already called a load_appropriate_textures
method on it, which has stored its texture data inside it. Changing the FlyingCar into a Car would change what happened if you called load_appropriate_textures
again, but FlyingCar doesn't override the render_car
method, it just puts data where render_car
will find it. So some other poor programmer in your organisation will just end up trying to debug why a Car is failing to render with some error message about FlyingCar textures.
Maybe that won't happen in this one particular case. But it could. And someone could modify Car and FlyingCar later in a way that introduces this sort of problem.
In general, to a FlyingCar "as if" it were a Car, you really have to repeat all the initialisation (and subsequent modifications) again. Repeating later modifications is generally not possible (because they're not recorded), and repeating the initialisation means nothing more than constructing a new Car.
So it seems like "in general" it's a bad idea. In any particular case, if you can find a way to do it, maybe you'll decide it's acceptable. Programmers make compromises every day, it happens. But if it's not possible to do this with full generality, then you always run the risk that later perfectly reasonable changes will be made to Car and/or FlyingCar that make your hacks no longer work.
Really, it sounds like FlyingCar needs to have the functionality to disable its flying functionality. Something like that is always really hard to bolt on after the fact.