[fpc-devel] Generics syntax error
Sven Barth
pascaldragon at googlemail.com
Mon Sep 27 14:21:47 CEST 2010
Am 22.09.2010 15:59, schrieb Felipe Monteiro de Carvalho:
> Hello,
>
> Has anyone experienced issues with generics? I have the following code:
>
> unit cdescreen;
>
> {$mode delphi}
>
> interface
>
> uses
> // LCL, RTL, FCL
> Classes, SysUtils, Controls, Graphics, LCLType, SDFData, fpimage,
> fgl,
> //
> cdeconfig, cdeprovinces, cdeutils, cdegame, cdetypes, dlgstatus;
>
> type
>
> TCDEScreen = class;
>
> { TCDEDrawerDelegate }
>
> TCDEDrawerDelegate = class
> public
> Owner: TCDEScreen;
> procedure HandleMouseDown(Sender: TObject; Button: TMouseButton;
> Shift:TShiftState; X,Y:Integer); virtual; abstract;
> procedure HandleMouseUp(Sender: TObject; Button: TMouseButton;
> Shift:TShiftState; X,Y:Integer); virtual; abstract;
> procedure HandleMouseMove(Sender: TObject; Shift: TShiftState; X,
> Y: Integer); virtual; abstract;
> procedure Prepare; virtual; abstract;
> end;
>
> TDrawerDelegateList = specialize TFPGList<TCDEDrawerDelegate>;
> ...
> cdescreen.pas(29,63) Fatal: Syntax error, ";" expected but ">" found
>
> If I change the line to TDrawerDelegateList = specialize
> TFPGList<TCDEDrawerDelegate;
>
> then it says:
>
> cdescreen.pas(29,63) Fatal: Syntax error, ">" expected but ";" found
>
> o.O FPC 2.4.0 on Windows
>
> I couldn't find anything in the bug tracker
>
> Changing the mode to objfpc doesn't change anything
>
> thanks,
I'm having this issue, too, but with 2.4.3.
Regards,
Sven
More information about the fpc-devel
mailing list