[fpc-pascal] Generics Bug

African Wild Dog paintedlycaon at gmail.com
Sat Mar 18 19:55:03 CET 2017


Please confirm this bug.

The unit code bellow won't compile (fpc 3.0.2 - debian jessie amd64):

"generics_bug.pas(17,48) Fatal: Syntax error, "," expected but "<" found"

=== CODE  ===

*unit* generics_bug;

{$mode delphi}



  TPair<TKey, TValue> = *record*
    Key: TKey;
    Value: TValue;

  TEnumerator<T> = *class*

  TGenericClass<T, K> = *class*(TEnumerator<TPair<T, K>>)




This code compiles in Delphi XE 2.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20170318/c2c7a2f9/attachment.html>

More information about the fpc-pascal mailing list