Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2014-06

Bug in generics

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Yann Mérignac

Hi,

I have found a bug with generics. It exists in 2.6.4 but not in 2.7.1 (rev 27862). I searched in bug tracker but can't find a corresponding bug report. Should I report it or consider it's fixed ?

Program :
------------------------------------
program genbug_002;

{$mode objfpc}{$h+}
uses
  Classes, SysUtils;
type
  { TAbstractVector }
  TAbstractVector = class
  end;
  { TGenVector }
  generic TGenVector<_TItem_> = class(TAbstractVector)  // ERROR
  end;
  TStringVector = class(specialize TGenVector<String>)
  end;
begin
end.
------------------------------------

Error message :
------------------------------------
Free Pascal Compiler version 2.6.4 [2014/03/03] for i386 Copyright (c) 1993-2014 by Florian Klaempfl and others Target OS: Linux for i386
Compiling genbug_002.pas
genbug_002.pas(14,54) Error: Identifier not found "TAbstractVector" genbug_002.pas(14,54) Error: class type expected, but got "<erroneous type>" genbug_002.pas(25) Fatal: There were 2 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)
------------------------------------

Reply by email

Sven Barth
to Yann Mérignac
"Yann Mérignac" wrote
Hi, I have found a bug with generics. It exists in 2.6.4 but not in 2.7.1

(rev 27862). I searched in bug tracker but can't find a corresponding bug report. Should I report it or consider it's fixed ?

If it's fixed in 2.7.1 you don't need to report it. No generic fixes are backmerged to the 2.6.x series.

Regards,
Sven

Reply by email

Yann Mérignac
to Sven Barth

Ok
Thanks.

2014-06-06 17:06 GMT+02:00 Sven Barth :

Show quoted text 19 lines
Am 06.06.2014 14:31 schrieb "Yann Mérignac" : > > Hi, > > I have found a bug with generics. It exists in 2.6.4 but not in 2.7.1 (rev 27862). I searched in bug tracker but can't find a corresponding bug report. Should I report it or consider it's fixed ? If it's fixed in 2.7.1 you don't need to report it. No generic fixes are backmerged to the 2.6.x series. Regards, Sven _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply by email