Bladeren bron

fcl-passrc: resolver: fixed unit without implementation

git-svn-id: trunk@47758 -
Mattias Gaertner 4 jaren geleden
bovenliggende
commit
508d4baa68
2 gewijzigde bestanden met toevoegingen van 3 en 1 verwijderingen
  1. 2 1
      packages/fcl-passrc/src/pasresolver.pp
  2. 1 0
      packages/fcl-passrc/src/pasuseanalyzer.pas

+ 2 - 1
packages/fcl-passrc/src/pasresolver.pp

@@ -5830,7 +5830,8 @@ begin
     begin
     // unit
     FinishSection(CurModule.InterfaceSection);
-    FinishSection(CurModule.ImplementationSection);
+    if CurModule.ImplementationSection<>nil then
+      FinishSection(CurModule.ImplementationSection);
     if CurModule.FinalizationSection<>nil then
       // finalization section finished -> resolve
       ResolveImplBlock(CurModule.FinalizationSection);

+ 1 - 0
packages/fcl-passrc/src/pasuseanalyzer.pas

@@ -2680,6 +2680,7 @@ begin
   {$IFDEF VerbosePasAnalyzer}
   writeln('TPasAnalyzer.EmitSectionHints ',GetElModName(Section));
   {$ENDIF}
+  if Section=nil then exit;
   // initialization, program or library sections
   aModule:=Section.GetModule;
   UsesClause:=Section.UsesClause;