Sender @$00007F97ED561210 = TLabel( FALIGNMENT: TALEFTJUSTIFY; FFOCUSCONTROL: nil; FOPTIMALFILL: False;
it does not change the facts that the compiler in their case must be inserting a Type check when clearly the coder didn't specify that
Yes, it can, and this is undocumented behavior. This is what I documented in Indy's source code when I learned of the issue:Code: Pascal [Select][+][-]// In FreePascal, if the -CR compiler option (Verify object method call validity) is enabled,// the compiler emits code to make class methods raise an error if their Self pointer is nil// (this is documented behavior), BUT the compiler will ALSO silently change object hard-casts// into the 'as' operator (this is undocumented behavior!). This change breaks any place that// Indy uses Accessor Classes to reach protected class members across unit boundaries. ...
You can use class helpers to overcome this, see my recent changes to win32 widgetset code.