* avoid a crash when processing synthetic methods of specialised classes:

these are generated after the other specialisation methods (via
    add_synthetic_method_implementations, rather than via
    generate_specialization_procs)
   o fixes crash in tests/test/jvm/tw20212.pp

git-svn-id: trunk@34036 -
This commit is contained in:
Jonas Maebe 2016-06-30 15:33:54 +00:00
parent ec5dea1092
commit 95f28e5e0c

View File

@ -1563,7 +1563,11 @@ 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) or (hmodule.state=ms_compile)) and tprocdef(tprocdef(hp).genericdef).forwarddef then
if ((hmodule=current_module) or (hmodule.state=ms_compile)) and
{ may not be assigned in case it's a synthetic procdef that
still needs to be generated }
assigned(tprocdef(hp).genericdef) and
tprocdef(tprocdef(hp).genericdef).forwarddef then
begin
result:=false;
continue;