Browse Source

pastojs: class in implementation

git-svn-id: trunk@35920 -
Mattias Gaertner 8 years ago
parent
commit
1279451c0f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/pastojs/src/fppas2js.pp

+ 1 - 1
packages/pastojs/src/fppas2js.pp

@@ -7430,7 +7430,7 @@ begin
       Call.Expr:=CreateMemberExpression([FBuiltInNames[pbivnRTL],FBuiltInNames[pbifnCreateClass]]);
 
     // add parameter: owner. For top level class, the module is the owner.
-    if El.Parent is TImplementationSection then
+    if (El.Parent<>nil) and (El.Parent.ClassType=TImplementationSection) then
       OwnerName:=AContext.GetLocalName(El.Parent)
     else
       OwnerName:=AContext.GetLocalName(El.GetModule);