Compiler error when specializing fgl.TFPGList with a record type

Original Reporter info from Mantis: befelemepeseveze
  • Reporter name:

Description:

$ cat project1.pas
program project1;

{$mode objfpc}{$H+}

uses
       fgl;

type
 TPar = record
   I: Integer;
 end;

 TSpec = specialize TFPGList<TPar>;

begin
end.

$

Steps to reproduce:

$ fpc project1.pas
Free Pascal Compiler version 2.5.1 [2010/01/05] for x86_64
Copyright (c) 1993-2009 by Florian Klaempfl
Target OS: Linux for x86-64
Compiling project1.pas
Error: Operator is not overloaded
project1.pas(18) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /home/myname/lib/fpc/2.5.1/ppcx64 returned an error exitcode (normal if you did not specify a source file to be compiled)
$

Additional information:

- Not tested if reproducible on other platforms/architectures.

- Discussion went here:
http://www.mail-archive.com/fpc-pascal@lists.freepascal.org/msg18933.html

- If possible, it would be nice if the compiler error message could provide a little bit more information (e.g. line number, what operator).

Mantis conversion info:

  • Mantis ID: 15480
  • OS: Ubuntu
  • OS Build: 9.10
  • Build: r14549
  • Platform: x86-64
  • Version: 2.5.1
  • Monitored by: » Lord Horazont (Jonas Schäfer), » alexionne (Aleksa Todorovic), » warrence (Stefan Müller), » David Pethes (David Pethes), » Basil Peace (Basil Peace), » @michaliskambi (Michalis Kamburelis)