polymorphing

BlitzMax Forums/BlitzMax Beginners Area/polymorphing

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

If you are going to use fields of the same name, then you have to make sure that the object is cast to the right type.

In your example you have cast your type C to an A, so it trys to use the field in A. If you recast it back to a C, or make Me a C in the first place, you should get the value you expect