False hint with child type helpers: “unit not used”.
Compiling the following program with 2 units:
main.pas
:
uses
UnitB;
begin
end.
UnitA.pas
:
{$modeswitch typehelpers}
unit UnitA;
interface
uses
SysUtils;
type
IntegerHelper = type helper(TIntegerHelper) for integer end;
implementation
end.
UnitB.pas
:
unit UnitB;
interface
uses
UnitA;
implementation
begin
writeln(integer(1).ToString);
end.
Gives a false hint:
UnitB.pas(6,2) Hint: Unit "UnitA" not used in UnitB.