[Lazarus] array[0..n] of class of TSomething

Sven Barth pascaldragon at googlemail.com
Tue Jul 12 21:29:07 CEST 2011


On 12.07.2011 18:38, leledumbo wrote:
> Seems like codetools parser bug. Try writing it type by type:
>
> type
>    Tp2pMessageClass = class of Tp2pMessage;
>    Tp2pMessageClassArray = array [0 .. 1] of Tp2pMessageClass;
> const
>    MsgTypes: Tp2pMessageClassArray = (
>      ...
>    );

Free Pascal supports "class of" in declarations while Delphi does not, 
but it's a seldom used feature so the developers of the code tools might 
not have noticed that problem at all :)

@Bernd: Would you create a bug report, please?

Regards,
Sven





More information about the Lazarus mailing list