View Issue Details

IDProjectCategoryView StatusLast Update
0020503FPCCompilerpublic2018-04-10 12:31
ReporterLuiz Americo Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status acknowledgedResolutionopen 
Summary0020503: Generics does not support parameterized method
DescriptionSee the attached example. Based on info found in http://interactiveasp.net/blogs/spgilmore/archive/2009/12/23/using-generics-in-delphi.aspx

Gives:

testGenerics.lpr(11,34) Fatal: Syntax error, ";" expected but "<" found

Tested with Free Pascal Compiler 2.7.1 [2011/10/17] for i386 Win32 for i386
Tagsgenerics
Fixed in Revision32439
FPCOldBugId0
FPCTarget
Attached Files

Relationships

has duplicate 0023708 closedSven Barth Delphi Compatible Syntax for Generics 
has duplicate 0024254 resolvedSven Barth Generics methods/class methods syntax error 
has duplicate 0026508 resolvedSven Barth Generics in Records 
related to 0012958 resolvedSven Barth Pretty generic functions 
related to 0027206 resolvedSven Barth [Patch] Christmas gift by FreeSparta : Generics.Collections 
related to 0029052 resolvedSven Barth can't compile generic function 

Activities

2011-10-17 23:22

 

testGenerics.lpr (341 bytes)

Dmitriy Pomerantsev

2015-03-13 14:10

reporter   ~0081916

Wow. The status was changed. Is there any chance that the bug will be fixed in the not so distant future?

Fiji

2015-04-28 16:35

reporter   ~0083300

It seems the Generic bugs aren't high on the list..

Thaddy de Koning

2015-04-28 18:16

reporter   ~0083302

Last edited: 2015-04-28 18:18

View 3 revisions

It seems some generics bugs are complicated?
Would be the proper answer.

Fiji

2015-04-28 20:24

reporter   ~0083303

Last edited: 2015-04-28 20:52

View 2 revisions

Unlikely. Besides, look at when this was reported 2011..

Sven Barth

2015-05-08 14:43

manager   ~0083522

And it's also a complicated feature with a complicated syntax. It is *in progress*, but not today, not tomorrow, not next week. It will be done when it is done.

Regards,
Sven

Fiji

2015-09-01 14:41

reporter   ~0085621

RC1 3.0 was released yet this is still not fixed? Will this ever move PAST acknowledged?

Fiji

2015-10-16 17:54

reporter   ~0086625

Last edited: 2015-10-16 17:58

View 2 revisions

This is fixed AFAIK in latest trunk. Well sort of.

type
  TRecord = record
    class procedure Test<T>; static;
  end;

class procedure TRecord.Test<T>;
begin

end;

begin
  TRecord.Test<Integer>; // Error: Illegal expression
end.

Sven Barth

2015-10-23 14:57

manager   ~0086825

No, it's not yet fixed. I still need around a handful commits, but in my local version it's fully working already.

And before you ask: no, this won't be in 3.0.0 as this a feature with too many changes.

Regards,
Sven

Sven Barth

2015-11-21 20:22

manager   ~0087463

Generic routines themselves are now supported, but as mentioned in my announcement mail nested generics (e.g. a generic method inside a generic class) don't work yet.

Regards,
Sven

Pascal Riekenberg

2018-04-10 12:31

reporter   ~0107732

Any news on this? This still isn't fixed.

Issue History

Date Modified Username Field Change
2011-10-17 23:22 Luiz Americo New Issue
2011-10-17 23:22 Luiz Americo File Added: testGenerics.lpr
2011-10-17 23:22 Luiz Americo FPCOldBugId => 0
2011-10-18 00:06 Jonas Maebe Severity minor => feature
2011-12-11 11:55 Paul Ishenin Tag Attached: generics
2012-06-04 12:46 Sven Barth Status new => acknowledged
2012-06-14 17:44 Sven Barth Relationship added related to 0012958
2013-01-20 22:10 Sven Barth Relationship added has duplicate 0023708
2013-04-10 16:55 Sven Barth Relationship added has duplicate 0024254
2014-07-20 13:35 Sven Barth Relationship added has duplicate 0026508
2015-01-06 14:04 Sven Barth Relationship added related to 0027206
2015-03-13 14:10 Dmitriy Pomerantsev Note Added: 0081916
2015-04-28 16:35 Fiji Note Added: 0083300
2015-04-28 18:16 Thaddy de Koning Note Added: 0083302
2015-04-28 18:17 Thaddy de Koning Note Edited: 0083302 View Revisions
2015-04-28 18:18 Thaddy de Koning Note Edited: 0083302 View Revisions
2015-04-28 20:24 Fiji Note Added: 0083303
2015-04-28 20:52 Fiji Note Edited: 0083303 View Revisions
2015-05-08 14:43 Sven Barth Note Added: 0083522
2015-09-01 14:41 Fiji Note Added: 0085621
2015-10-16 17:54 Fiji Note Added: 0086625
2015-10-16 17:58 Fiji Note Edited: 0086625 View Revisions
2015-10-23 14:57 Sven Barth Note Added: 0086825
2015-11-20 22:41 Sven Barth Relationship added related to 0029052
2015-11-21 20:22 Sven Barth Note Added: 0087463
2015-11-21 20:22 Sven Barth Fixed in Revision => 32439
2018-04-10 12:31 Pascal Riekenberg Note Added: 0107732