Selaa lähdekoodia

Respect DenyPackageUnit flag.

pmodules.pas, proc_package:
  * check all contained units that are not already part of a package for their uf_package_deny flag and report an error for each that has it set

git-svn-id: branches/svenbarth/packages@31991 -
svenbarth 9 vuotta sitten
vanhempi
commit
08329518c9
1 muutettua tiedostoa jossa 11 lisäystä ja 0 poistoa
  1. 11 0
      compiler/pmodules.pas

+ 11 - 0
compiler/pmodules.pas

@@ -1476,6 +1476,17 @@ type
          { All units are read, now give them a number }
          current_module.updatemaps;
 
+         hp:=tmodule(loaded_units.first);
+         while assigned(hp) do
+           begin
+             if (hp<>current_module) and not assigned(hp.package) then
+               begin
+                 if (hp.flags and uf_package_deny) <> 0 then
+                   message1(package_e_unit_deny_package,hp.realmodulename^);
+               end;
+             hp:=tmodule(hp.next);
+           end;
+
          {Insert the name of the main program into the symbol table.}
          if current_module.realmodulename^<>'' then
            tabstractunitsymtable(current_module.localsymtable).insertunit(cunitsym.create(current_module.realmodulename^,current_module));