fork(2) download
  1. program genericsdemo;
  2.  
  3. {$mode delphi}
  4.  
  5. uses fgl;
  6.  
  7. type TMyDictionary = class (TFPGMap<String, TMyDictionary>) end;
  8.  
  9. // for delphi:
  10. // uses generics.collections;
  11. // type TMyDictionary = class (TDictionary<String, TMyDictionary>) end;
  12.  
  13. begin
  14.  
  15. WriteLn('Ok');
  16.  
  17. end.
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.pas(7,45) Error: Illegal expression
prog.pas(7,58) Error: Type parameters of specializations of generics cannot reference the currently specialized type
prog.pas(276,60) Error: Type "TData" is not completely defined
prog.pas(288,49) Error: Type "TData" is not completely defined
prog.pas(289,44) Error: Type "TData" is not completely defined
prog.pas(295,64) Error: Type "TData" is not completely defined
prog.pas(296,59) Error: Type "TData" is not completely defined
prog.pas(301,54) Error: Type "TData" is not completely defined
prog.pas(305,44) Error: Type "TData" is not completely defined
prog.pas(307,81) Error: Type "TData" is not completely defined
prog.pas(310,42) Error: Type "TData" is not completely defined
prog.pas(311,47) Error: Type "TData" is not completely defined
Error: Illegal expression
prog.pas(17,4) Fatal: There were 13 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled)
stdout
Standard output is empty