Smart pascal source code
type
TBase = partial class end;
type
TSub = class(TBase)
SubField: Integer;
function SubTest: Integer; virtual; abstract;
end;
type
TBase = partial class BaseField: Integer;
function BaseTest: Integer; virtual; abstract;
end;
type
TSubSub = class(TSub)
function SubTest: Integer; override;
begin
Result := SubField;
end;
function BaseTest: Integer; override;
begin
Result := BaseField;
end;
end;
var o := new TSubSub;
o.BaseField := 1;
o.SubField := 2;
WriteLn(o.BaseField);
WriteLn(o.SubField);
WriteLn(o.BaseTest);
WriteLn(o.SubTest);
{<<< RESULT - CONSOLE LOG >>>
-----------------------------
1
2
1
2
-----------------------------
{<<<<<<<<< THE END >>>>>>>>>}