* tobject.inheritsfrom(nil) has to return false (mantis )

git-svn-id: trunk@14870 -
This commit is contained in:
Jonas Maebe 2010-02-06 18:14:26 +00:00
parent 870edaf916
commit b1d2ab5450
3 changed files with 16 additions and 4 deletions

1
.gitattributes vendored
View File

@ -10276,6 +10276,7 @@ tests/webtbs/tw15530.pp svneol=native#text/pascal
tests/webtbs/tw15607.pp svneol=native#text/plain
tests/webtbs/tw15619.pp svneol=native#text/plain
tests/webtbs/tw1567.pp svneol=native#text/plain
tests/webtbs/tw15690.pp svneol=native#text/plain
tests/webtbs/tw15693.pp svneol=native#text/plain
tests/webtbs/tw1573.pp svneol=native#text/plain
tests/webtbs/tw1592.pp svneol=native#text/plain

View File

@ -409,10 +409,15 @@
vmt: PVmt;
begin
vmt:=PVmt(self);
while assigned(vmt) and (vmt <> PVmt(aclass)) do
vmt := vmt^.vParent;
InheritsFrom := (vmt = PVmt(aclass));
if assigned(aclass) then
begin
vmt:=PVmt(self);
while assigned(vmt) and (vmt <> PVmt(aclass)) do
vmt := vmt^.vParent;
InheritsFrom := (vmt = PVmt(aclass));
end
else
inheritsFrom := False;
end;
class function TObject.stringmessagetable : pstringmessagetable;

6
tests/webtbs/tw15690.pp Normal file
View File

@ -0,0 +1,6 @@
{$mode objfpc}
begin
if tobject.inheritsfrom(nil) then
halt(1);
end.