mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 13:39:33 +02:00
* tobject.inheritsfrom(nil) has to return false (mantis #15690)
git-svn-id: trunk@14870 -
This commit is contained in:
parent
870edaf916
commit
b1d2ab5450
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
|
||||
|
@ -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
6
tests/webtbs/tw15690.pp
Normal file
@ -0,0 +1,6 @@
|
||||
{$mode objfpc}
|
||||
|
||||
begin
|
||||
if tobject.inheritsfrom(nil) then
|
||||
halt(1);
|
||||
end.
|
Loading…
Reference in New Issue
Block a user