Another question: what happens if you call the constructor twice? Does this create 2 VMT tables or overwrites the first?
================================================ type TA = object constructor Create; procedure DoThis; virtual; end; procedure TA.DoThis; begin writeln('TA.DoThis'); end; constructor TA.Create; begin end; type PB = ^TB; TB = object (TA) procedure DoThis; virtual; end; procedure TB.DoThis; begin writeln('TB.DoThis'); end; var obj: TB; begin TA(obj).Create; // creates VMT for TA TB(obj).Create; // creates VMT for TB+TA? obj.DoThis; end. Regards, Ryan Joseph _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal