mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 16:59:11 +02:00
Fix (hopefully last) regression introduced due to the reworking specialization of routine bodies.
pgenutil.pas: * process_abstractrecorddef & generate_specialization_procs: also check for a forward def is the other module is still compiling (thus an access to tprocdef.forwarddef should still be possible); this might happen due to circular references like in tests/test/tgeneric91.pp git-svn-id: trunk@33872 -
This commit is contained in:
parent
77318be022
commit
fd98ec56e9
@ -1563,7 +1563,7 @@ uses
|
|||||||
continue;
|
continue;
|
||||||
{ and the body is available already (which is implicitely the
|
{ and the body is available already (which is implicitely the
|
||||||
case if the generic routine is part of another unit) }
|
case if the generic routine is part of another unit) }
|
||||||
if (hmodule=current_module) and tprocdef(tprocdef(hp).genericdef).forwarddef then
|
if ((hmodule=current_module) or (hmodule.state=ms_compile)) and tprocdef(tprocdef(hp).genericdef).forwarddef then
|
||||||
begin
|
begin
|
||||||
result:=false;
|
result:=false;
|
||||||
continue;
|
continue;
|
||||||
@ -1617,7 +1617,7 @@ uses
|
|||||||
{ we need to check for a forward declaration only if the
|
{ we need to check for a forward declaration only if the
|
||||||
generic was declared in the same unit (otherwise there
|
generic was declared in the same unit (otherwise there
|
||||||
should be one) }
|
should be one) }
|
||||||
if (hmodule=current_module) and tprocdef(def.genericdef).forwarddef then
|
if ((hmodule=current_module) or (hmodule.state=ms_compile)) and tprocdef(def.genericdef).forwarddef then
|
||||||
begin
|
begin
|
||||||
readdlist.add(def);
|
readdlist.add(def);
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user