If I have the below TFoo, and in ANOTHER unit I declare var foo: TFoo
then I can access
foo.e := a1;This works even though "a1" is private and not visible. But by being the type for a public field (or method) it becomes available.
This is not true for
foo.b.abc;Is that intentional?
unit Unit2;
{$mode ObjFPC}{$H+}
interface
uses SysUtils;
type
TFoo = class
private type
TEnum = (a1,a2);
TBar = class
protected
procedure abc; virtual ; abstract;
end;
public
b: TBar;
e: TEnum;
end;
implementation
end.