* allow conversion from niln to not-yet-fully-resolved classrefdefs

(mantis #22593)

git-svn-id: trunk@22025 -
This commit is contained in:
Jonas Maebe 2012-08-07 09:56:08 +00:00
parent 6529307d9e
commit a63a603cc1
3 changed files with 28 additions and 1 deletions

1
.gitattributes vendored
View File

@ -12777,6 +12777,7 @@ tests/webtbs/tw2250.pp svneol=native#text/plain
tests/webtbs/tw22502.pp svneol=native#text/plain
tests/webtbs/tw22561.pp svneol=native#text/plain
tests/webtbs/tw2259.pp svneol=native#text/plain
tests/webtbs/tw22593.pp svneol=native#text/plain
tests/webtbs/tw2260.pp svneol=native#text/plain
tests/webtbs/tw2266.pp svneol=native#text/plain
tests/webtbs/tw2267.pp svneol=native#text/plain

View File

@ -1560,7 +1560,8 @@ implementation
if assigned(def_to.typesym) and
(tclassrefdef(def_to).pointeddef.typ=forwarddef) then
begin
if (def_from.typesym=def_to.typesym) then
if (def_from.typesym=def_to.typesym) or
(fromtreetype=niln) then
eq:=te_equal;
end
else

25
tests/webtbs/tw22593.pp Normal file
View File

@ -0,0 +1,25 @@
{ %norun }
{$ifdef fpc}
{$mode objfpc}
{$endif}
type
tc = class
end;
tcc = class of tc;
tc3 = class;
tc2 = class
constructor create(c: tcc = nil; c3: tc3 = nil);
end;
tc3 = class
end;
constructor tc2.create(c: tcc = nil; c3: tc3 = nil);
begin
end;
begin
end.