mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-18 20:39:43 +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;
|
||||
{ and the body is available already (which is implicitely the
|
||||
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
|
||||
result:=false;
|
||||
continue;
|
||||
@ -1617,7 +1617,7 @@ uses
|
||||
{ we need to check for a forward declaration only if the
|
||||
generic was declared in the same unit (otherwise there
|
||||
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
|
||||
readdlist.add(def);
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user