According to Delphi's wiki documentation the indexof with offset neither exists for TStringlist nor TStrings :shrugs:
That is correct, but that is not the issue. I did a test in Delphi where a base class has public overloaded virtual methods, a derived class that overrides only 1 of them, and then call both overloads via a pointer to the derived class:
type
TTestBase = class
public
procedure DoIt(AValue: Integer); overload; virtual;
procedure DoIt(AValue1, AValue2: Integer); overload; virtual;
end;
TTest = class(TTestBase)
public
procedure DoIt(AValue: Integer); override;
end;
...
var
t: TTest;
t := TTest.Create;
t.DoIt(1);
t.DoIt(2, 2);
t.Free;
It works fine in Delphi without needing to type-cast to the base class.
The same test
should work in FreePascal as well (ie, calling both
IndexOf() overloads on a
TStringList object without type-casting to
TStrings). If it doesn't work, then it should be reported as a compiler bug.