vim
vim copied to clipboard
Fix class downcasting
When casting an object from one class to another the target type may be a subclass (downcast) or superclass (upcast) of the source one. Upcasts require a runtime type check to be emitted.
Fixes #13244
Thanks. @yegappan are you fine with this?
Downloaded and played with it. Tried a few things, no problems. Didn't really look at the implementation.
the target type may be a subclass (downcast) or superclass (upcast) of the source one
About nomenclature; there's a typo in the title (I think). Shouldn't the title be about downcasting; casting to a subclass is what failed.
About nomenclature; there's a typo in the title (I think). Shouldn't the title be about downcasting; casting to a subclass is what failed.
Indeed, please remember to fix the typo in the commit message before merging.
Thanks. @yegappan are you fine with this?
The change looks good to me. It will be good to add a disassemble test for this.
thanks!