you are saying "the thing that objB points to is a B object. It can do anything a B object can do."
you stick an A object in there. you call a method that is defined in B (which you can do, because the reference is what determines the methods to call) - what should happen? there is no method defined for that object with that name.
What i don't understand is why you would want to do this?
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors