Преглед на файлове

* ignore program module when resolving unit names during ppu load

git-svn-id: trunk@5749 -
peter преди 18 години
родител
ревизия
6562e40a3e
променени са 1 файла, в които са добавени 5 реда и са изтрити 1 реда
  1. 5 1
      compiler/fmodule.pas

+ 5 - 1
compiler/fmodule.pas

@@ -787,7 +787,11 @@ implementation
             hp:=tmodule(loaded_units.first);
             while assigned(hp) do
               begin
-                if hp.modulename^=derefmap[id].modulename^ then
+                { only check for units. The main program is also
+                  as a unit in the loaded_units list. We simply need
+                  to ignore this entry (PFV) }
+                if hp.is_unit and
+                   (hp.modulename^=derefmap[id].modulename^) then
                   break;
                 hp:=tmodule(hp.next);
               end;