Records do not offer the same possibilities as classes do. This reflects on the possibilities when creating record helpers. Below the restrictions on record helpers are enumerated:
TTestHelper = record helper for TObject
end;
TTest = record
Test: Integer;
end;
TTestHelper = record helper for TTest
property AccessTest: Integer read Test;
end;
type
TTest = record
function Test(aRecurse: Boolean): Integer;
end;
TTestHelper = record helper for TTest
function Test(aRecurse: Boolean): Integer;
end;
function TTest.Test(aRecurse: Boolean): Integer;
begin
Result := 1;
end;
function TTestHelper.Test(aRecurse: Boolean): Integer;
begin
if aRecurse then
Result := inherited Test(False)
else
Result := 2;
end;