fpc/tests/webtbs/tw23270.pp
2012-11-09 20:46:30 +00:00

24 lines
411 B
ObjectPascal

{$MODE DELPHI}
type
TSmallWrapper<TValue> = record
Value: TValue;
end;
TWrapper<T> = class
strict private
class var FSmallWrapper: TSmallWrapper<PInteger>;
public
class procedure Z; static;
end;
class procedure TWrapper<T>.Z;
begin
FSmallWrapper.Value := New(PInteger);
Dispose(FSmallWrapper.Value); { Error: pointer type expected, but ... }
end;
begin
TWrapper<Byte>.Z;
end.