View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0020503||FPC||Compiler||public||2011-10-17 23:22||2018-04-10 12:31|
|Reporter||Luiz Americo||Assigned To|
|Summary||0020503: Generics does not support parameterized method|
|Description||See the attached example. Based on info found in http://interactiveasp.net/blogs/spgilmore/archive/2009/12/23/using-generics-in-delphi.aspx|
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
|Fixed in Revision||32439|
|has duplicate||0023708||closed||Sven Barth||Delphi Compatible Syntax for Generics|
|has duplicate||0024254||resolved||Sven Barth||Generics methods/class methods syntax error|
|has duplicate||0026508||resolved||Sven Barth||Generics in Records|
|related to||0012958||resolved||Sven Barth||Pretty generic functions|
|related to||0027206||resolved||Sven Barth||[Patch] Christmas gift by FreeSparta : Generics.Collections|
|related to||0029052||resolved||Sven Barth||can't compile generic function|
testGenerics.lpr (341 bytes)
||Wow. The status was changed. Is there any chance that the bug will be fixed in the not so distant future?|
||It seems the Generic bugs aren't high on the list..|
It seems some generics bugs are complicated?
Would be the proper answer.
Unlikely. Besides, look at when this was reported 2011..
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.
||RC1 3.0 was released yet this is still not fixed? Will this ever move PAST acknowledged?|
This is fixed AFAIK in latest trunk. Well sort of.
TRecord = record
class procedure Test<T>; static;
class procedure TRecord.Test<T>;
TRecord.Test<Integer>; // Error: Illegal expression
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.
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.
||Any news on this? This still isn't fixed.|
|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|