Cause
This error occurs if the input contains a typecast that is not valid. This can be for one of the following reasons.
The code attempts to cast a class to a primitive type or a primitive type to a class.
An illegal primitive typecast is being performed (for a complete list of valid and invalid primitive type casts, see "
An illegal class type cast is being performed.
For a typecast to be legal, the class of the typecast must be the same as, or a subclass of, the defined class of the operand; for example, if f is defined to be of class Form:
base := f.MyBaseForm // valid // MyBaseForm is a subclass of Form win := f.Window // invalid // Window is not a subclass of Form button := f.Button // invalid // Button is not a subclass of Form
Action
Change the typecast so that it conforms to the above rules.