TBits component bug

Hi,

I am using Delphi 7 and the latest PascalScript. Here are examples showing a bug in TBits component:

var
a : TBits;
begin
a:=TBits.Create;
a.Size:=10; {Access violation at runtime}
end.

var
a : TBits;
begin
a:=TBits.Create;
a.Bits[10]:=true;
Writeln(IntToStr(a.Size)); {returns 0 instead of 11}
end.

Regards,
Dmitry.

TBits is a class, not component, sorry.
Please someone let me know if this bug is Delphi7-specific. I am planning to upgrade to Delphi XE2.

Dmitry.

Hello,
Thanks, the issue was logged as #51152

As a workaround please modify uPSR_classes.pas file

procedure TBITSSIZE_R(Self: TBITS; var T: INTEGER); begin T := Self.SIZE;end;
procedure TBITSSIZE_W(Self: TBITS; T: INTEGER); begin Self.SIZE := T; end;

Ok, thanks.