Răsfoiți Sursa

* fix for #23915, use inheritsfrom instead of classtype = xxx because
more types now have derivatives. As suggested by Daniel Gaspary.

git-svn-id: trunk@23734 -

marco 12 ani în urmă
părinte
comite
48a8509097
1 a modificat fișierele cu 3 adăugiri și 3 ștergeri
  1. 3 3
      packages/fcl-passrc/src/paswrite.pp

+ 3 - 3
packages/fcl-passrc/src/paswrite.pp

@@ -127,11 +127,11 @@ end;
 
 procedure TPasWriter.WriteElement(AElement: TPasElement);
 begin
-  if AElement.ClassType = TPasModule then
+  if AElement.InheritsFrom(TPasModule) then
     WriteModule(TPasModule(AElement))
-  else if AElement.ClassType = TPasSection then
+  else if AElement.InheritsFrom(TPasSection) then
     WriteSection(TPasSection(AElement))
-  else if AElement.ClassType = TPasVariable then
+  else if AElement.InheritsFrom(TPasVariable) then
     WriteVariable(TPasVariable(AElement))
   else if AElement.InheritsFrom(TPasType) then
     WriteType(TPasType(AElement))