# Type coercion/conversion woes

**URL:** <https://forum.kirupa.com/t/type-coercion-conversion-woes/328508>\
**Category:** flash\
**Created:** [May 22, 2012, 8:22am UTC](https://forum.kirupa.com/t/type-coercion-conversion-woes/328508 "2012-05-22T08:22:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Intravenus](https://avatars.discourse-cdn.com/v4/letter/i/e480ec/32.png) [@Intravenus](https://forum.kirupa.com/u/Intravenus)\
**Post date:** [May 22, 2012, 8:22am UTC](https://forum.kirupa.com/t/type-coercion-conversion-woes/328508/1 "2012-05-22T08:22:20Z")

</div>

I have a hierarchy of classes extending each other as such:

vertex  
vector extends vertex  
unit extends vector  
character extends unit

Now, if I assign a character instance to a variable of type vertex and then try to reference it from elsewhere as a character, I get a null return while referencing it as a unit, vector and vertex all return correctly.

Does anyone know why this is happening?
