* check added

This commit is contained in:
pierre 2003-01-22 16:12:43 +00:00
parent 2584bd9df4
commit 6263453375

39
tests/webtbs/tw2332.pp Normal file
View File

@ -0,0 +1,39 @@
{ Source provided for Free Pascal Bug Report 2332 }
{ Submitted by "Sergey Kosarevsky" on 2003-01-21 }
{ e-mail: netsurfer@au.ru }
{$static on }
Type tObject=Object
Constructor Init;
Function GetVMT:Pointer;Static;
Destructor Done;Virtual;
End;
Function tObject.GetVMT:Pointer;
Begin
Exit(TypeOf(Self));
End;
Constructor tObject.Init;
Begin
End;
Destructor tObject.Done;
Begin
End;
Var O:tObject;
Begin
O.Init;
WriteLn(Longint(TypeOf(tObject)));
WriteLn(Longint(O.GetVMT));
WriteLn(Longint(tObject.GetVMT));
if (O.GetVMT<>TypeOf(tObject)) or (TypeOf(tObject)<>tObject.GetVMT) then
begin
writeln('Error with typeof');
halt(1);
end;
End.