fpc/tests/webtbs/tw23299.pp
2012-12-29 10:01:54 +00:00

27 lines
483 B
ObjectPascal

{$MODE DELPHI}
type
TSmallWrapper<TValue> = record
Value: TValue;
end;
TWrapper<T> = class
strict private
class var FSmallWrapper: TSmallWrapper<Integer>;
public
class procedure Z; static;
end;
class procedure TWrapper<T>.Z;
begin
FSmallWrapper.Value := 0;
Inc(FSmallWrapper.Value);
Dec(FSmallWrapper.Value);
FSmallWrapper.Value := Succ(FSmallWrapper.Value);
FSmallWrapper.Value := Pred(FSmallWrapper.Value);
end;
begin
TWrapper<Byte>.Z;
end.