Browse Source

WPO: handle classes defined in localsymtables

Can happen since the support for anonymous methods
Jonas Maebe 1 year ago
parent
commit
a512273976
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compiler/optvirt.pas

+ 1 - 1
compiler/optvirt.pas

@@ -590,7 +590,7 @@ unit optvirt;
         objparentsymtab:=objdef.symtable;
         mainsymtab:=objparentsymtab.defowner.owner;
         classprefix:='';
-        while mainsymtab.symtabletype in [recordsymtable,objectsymtable] do
+        while mainsymtab.symtabletype in [recordsymtable,objectsymtable,localsymtable] do
           begin
             classprefix:=mainsymtab.name^+'.'+classprefix;
             mainsymtab:=mainsymtab.defowner.owner;