Complier warning, "W1020 Constructing instance of 'StringArray' containing abstract method 'TROArray.IntResize"

I just upgraded to 10.0.0.1485 (from 9.x) and get the following warning when compiling my application:

[dcc32 Warning] PensionClientClass.pas(231): W1020 Constructing instance of ‘StringArray’ containing abstract method ‘TROArray.IntResize’

Here is my line of code:

result := StringArray.Create;

I have used StringArray for a long time–should I be using something else? Or is this something that will be cleaned up in an update?

Thanks

Ed Dressel

Hello

This will be cleaned up. I will log an issue so you will be notified in this thread when this issue is fixed.

Thanks, logged as bugs://84746

Hi,

I can’t reproduce this issue.
looks like you are using some outdated code inside PensionClientClass.pas.

workarounds:

  • re-declare this array in ServiceBuilder, generate code and replace implementation inside PensionCl\ientClass.pas with generated code.
  • if you are using modern IDE (XE4+), you can declare this array as StringArray = class(TROArray<ROAnsiString>); or similar
  • implement that method as
procedure StringArray.IntResize(ElementCount : integer; AllocItems: Boolean);
begin
  Resize(ElementCount);
end;

1st or 2nd way more suitable.

bugs://84746 got closed with status cannotrepro.