Sfoglia il codice sorgente

fcl-passrc: paswrite: prepare 'type' section for types only when type has parent like module interface section etc.

git-svn-id: trunk@36787 -
maciej-izak 8 anni fa
parent
commit
ddc7631e09
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      packages/fcl-passrc/src/paswrite.pp

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

@@ -150,7 +150,8 @@ end;
 
 procedure TPasWriter.WriteType(AType: TPasType);
 begin
-  PrepareDeclSection('type');
+  if AType.Parent is TPasSection  then
+    PrepareDeclSection('type');
   if AType.ClassType = TPasUnresolvedTypeRef then
     wrt(AType.Name)
   else if AType.ClassType = TPasClassType then