[fpc-pascal] generic, specialize keywords in mode delphi in FPC trunk

Paul Ishenin webpirat at mail.ru
Tue Apr 12 00:05:01 CEST 2011


12.04.2011 4:22, cobines wrote:
> Hello.
>
> Following program:
>
> program a;
> {$mode delphi}
> type
>    generic TGen<T>  = class end;
>    TSpc = specialize TGen<Integer>;
> begin
> end.
>
> compiles with FPC 2.4.2, but not with 2.5.1 rev. 17306:
>
> a.pas(4,11) Fatal: Syntax error, "=" expected but "identifier TGEN" found
> a.pas(5,21) Error: Identifier not found "specialize"
> a.pas(5,21) Error: Error in type definition
> a.pas(5,21) Fatal: Syntax error, ";" expected but "identifier TGEN" found
>
> "generic" and "specialize" are not allowed in delphi mode in 2.5.1 but
> they are required in 2.4.2.
>
> Is this a conscious change? There is no mention of this on Wiki User
> Changes 2.4.4 or User Changes Trunk pages.
In mode delphi FPC understands delphi generic syntax. I did not write a 
line to the

User Changes Trunk because this work is not finished. But looking at my free time I don't think it will be finished by me, so I will add a note there today.

Best regards,
Paul Ishenin




More information about the fpc-pascal mailing list