mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 13:49:39 +02:00
* fully compare typenodes and rttinodes in their docompare() methods
(mantis #21551) git-svn-id: trunk@20630 -
This commit is contained in:
parent
bd19a16be9
commit
26754a3f9f
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -12297,6 +12297,7 @@ tests/webtbs/tw2131.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw21443.pp svneol=native#text/plain
|
tests/webtbs/tw21443.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2145.pp svneol=native#text/plain
|
tests/webtbs/tw2145.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw21472.pp svneol=native#text/pascal
|
tests/webtbs/tw21472.pp svneol=native#text/pascal
|
||||||
|
tests/webtbs/tw21551.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2158.pp svneol=native#text/plain
|
tests/webtbs/tw2158.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2159.pp svneol=native#text/plain
|
tests/webtbs/tw2159.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2163.pp svneol=native#text/plain
|
tests/webtbs/tw2163.pp svneol=native#text/plain
|
||||||
|
@ -1185,7 +1185,10 @@ implementation
|
|||||||
function ttypenode.docompare(p: tnode): boolean;
|
function ttypenode.docompare(p: tnode): boolean;
|
||||||
begin
|
begin
|
||||||
docompare :=
|
docompare :=
|
||||||
inherited docompare(p);
|
inherited docompare(p) and
|
||||||
|
(typedef=ttypenode(p).typedef) and
|
||||||
|
(allowed=ttypenode(p).allowed) and
|
||||||
|
(helperallowed=ttypenode(p).helperallowed);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -1267,7 +1270,8 @@ implementation
|
|||||||
docompare :=
|
docompare :=
|
||||||
inherited docompare(p) and
|
inherited docompare(p) and
|
||||||
(rttidef = trttinode(p).rttidef) and
|
(rttidef = trttinode(p).rttidef) and
|
||||||
(rttitype = trttinode(p).rttitype);
|
(rttitype = trttinode(p).rttitype) and
|
||||||
|
(rttidatatype = trttinode(p).rttidatatype);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
19
tests/webtbs/tw21551.pp
Normal file
19
tests/webtbs/tw21551.pp
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{ %opt=-O2 }
|
||||||
|
{$mode delphi}
|
||||||
|
|
||||||
|
type
|
||||||
|
tc1 = class
|
||||||
|
end;
|
||||||
|
|
||||||
|
tc2 = class
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
c: tobject;
|
||||||
|
begin
|
||||||
|
c:=tc2.create;
|
||||||
|
if (c is tc1) or
|
||||||
|
(c is tc2) then
|
||||||
|
halt(0);
|
||||||
|
halt(1);
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user