fpc/tests/webtbs/tw21654.pp
svenbarth 5b1b194b47 * pdecvar.pas, read_record_fields: don't generate BSS-data for generic static fields (doesn't fix any specific bug, but we don't need space reserved for the field)
* pgenutil.pas, generate_specialization: fix a stupid "don't iterate upwards if deleting/extracting" mistake (twice!); this fixes Mantis  and Mantis  (tests added)

git-svn-id: trunk@21251 -
2012-05-08 07:31:37 +00:00

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.