From 1279451c0f0d8b110a8adb4be72c8b4052f76beb Mon Sep 17 00:00:00 2001 From: Mattias Gaertner Date: Sun, 23 Apr 2017 14:18:16 +0000 Subject: [PATCH] pastojs: class in implementation git-svn-id: trunk@35920 - --- packages/pastojs/src/fppas2js.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pastojs/src/fppas2js.pp b/packages/pastojs/src/fppas2js.pp index 991b7646ec..9d0683e4aa 100644 --- a/packages/pastojs/src/fppas2js.pp +++ b/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);