[fpc-devel] Re: RFC: Delphi style class helpers

Sven Barth pascaldragon at googlemail.com
Fri Jan 7 11:56:24 CET 2011


Am 07.01.2011 10:40, schrieb Marco van de Voort:
> In our previous episode, Sven Barth said:
>>
>> In the last few days I've written quite a few tests regarding class
>> helpers and have come across some interesting cases. I've used Delphi
>> 2007 to compile these tests.
>
> C:\testing>dcc32 tchlp20.dpr
> Embarcadero Delphi for Win32 compiler version 22.0
> Copyright (c) 1983,2010 Embarcadero Technologies, Inc.
> tchlp20.dpr(14) Error: E2527 Helper type 'TObjectHelper' cannot be used in
> declarations
> tchlp20.dpr(19)
>

Ok, then it's a bug indeed. Thanks.

> Embarcadero Delphi for Win32 compiler version 22.0
> Copyright (c) 1983,2010 Embarcadero Technologies, Inc.
> tchlp36.dpr(23) Warning: W1036 Variable 'f' might not have been initialized
> tchlp36.dpr(25)
> 26 lines, 0.03 seconds, 13512 bytes code, 13104 bytes data.
>
> Embarcadero Delphi for Win32 compiler version 22.0
> Copyright (c) 1983,2010 Embarcadero Technologies, Inc.
> tchlp35.dpr(6) Error: E2003 Undeclared identifier: 'TObjectHelperA'
> tchlp35.dpr(6) Error: E2022 Class helper type required
> tchlp35.dpr(7) Error: E2137 Method 'VirtualTest' not found in base class
> tchlp35.dpr(20) Error: E2003 Undeclared identifier: 'Test'
> tchlp35.dpr(25)
>
> uchlp36 compiles without warnings

Oops. I forgot to add a "uses uchlp35" to tchlp35. Can you retest with 
that change, please?

Regards,
Sven



More information about the fpc-devel mailing list