mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 09:28:13 +02:00

* pgenutil.pas, generate_specialization: fix a stupid "don't iterate upwards if deleting/extracting" mistake (twice!); this fixes Mantis #21550 and Mantis #21654 (tests added) git-svn-id: trunk@21251 -
34 lines
493 B
ObjectPascal
34 lines
493 B
ObjectPascal
program test;
|
|
|
|
{$mode objfpc}
|
|
|
|
Type
|
|
|
|
{ TMyGeneric }
|
|
|
|
Generic TMyGeneric<T> = Class
|
|
Private
|
|
bValue: Integer; Static;
|
|
Function GetValue: Integer;
|
|
Public
|
|
Property Value: Integer Read GetValue;
|
|
Constructor Create(Const aValue: Integer);
|
|
End;
|
|
|
|
{ TMyGeneric }
|
|
|
|
Function TMyGeneric.GetValue: Integer;
|
|
Begin
|
|
Result := bValue;
|
|
end;
|
|
|
|
Constructor TMyGeneric.Create(Const aValue: Integer);
|
|
Begin
|
|
bValue := aValue;
|
|
End;
|
|
|
|
Type TMyClass = Specialize TMyGeneric<TObject>;
|
|
|
|
begin
|
|
end.
|