If you see the snippet of code above, it will give un-convertible types. Look at this snippet
The error must be first coming when you will be assigning c to to ref variable. You can't do that, because C extends B and
in turn B doesn't extends A, so they are inconvertible types. So you cannot assign c to A.
Well, what do you mean by it runs fine and doesn't give any error. Are you talking about this statement
Even at this line, it's going to give you an error of in convertible types.