[fpc-pascal] Generics problem/question

Honza befelemepeseveze at gmail.com
Tue Jan 5 22:46:25 CET 2010


Hi all,

I tried to specialize fgl.TFPGList with some record type and got a
compiler error.
Am I doing something completely wrong (sorry in that case) or is this
a bug? (Ubuntu 9.10, 64 bit)

----

22:35 myname at tux64:~/fpc/bugreports/20100105$ cat project1.pas
program project1;

{$mode objfpc}{$H+}

uses
	fgl;

type
  TPar = record
    I: Integer;
  end;

  TSpec = specialize TFPGList<TPar>;

begin
end.

22:35 myname at tux64:~/fpc/bugreports/20100105$ 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)
22:35 myname at tux64:~/fpc/bugreports/20100105$ svn info ~/svn/fpc/trunk/
Path: /home/myname/svn/fpc/trunk
URL: http://svn2.freepascal.org/svn/fpc/trunk
Repository Root: http://svn2.freepascal.org/svn/fpc
Repository UUID: 3ad0048d-3df7-0310-abae-a5850022a9f2
Revision: 14549
Node Kind: directory
Schedule: normal
Last Changed Author: jonas
Last Changed Rev: 14549
Last Changed Date: 2010-01-05 20:53:43 +0100 (Út, 05 led 2010)

22:35 myname at tux64:~/fpc/bugreports/20100105$

----

Thanks in advance for any info.

bflm



More information about the fpc-pascal mailing list