From 6329e074e63e3233b5963945ed64bc56be025103 Mon Sep 17 00:00:00 2001 From: Henrique Gottardi Werlang Date: Sat, 16 Dec 2023 08:39:50 -0300 Subject: [PATCH] Fix for inherited external class, with full path of the class. --- packages/pastojs/src/fppas2js.pp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/pastojs/src/fppas2js.pp b/packages/pastojs/src/fppas2js.pp index 51fa46b71a..65ad62bc07 100644 --- a/packages/pastojs/src/fppas2js.pp +++ b/packages/pastojs/src/fppas2js.pp @@ -16041,6 +16041,14 @@ var end; end; + function GetFullClassPath(const ClassType: TPasClassType): String; + begin + Result := ClassType.ExternalName; + + if ClassType.Parent is TPasClassType then + Result := GetFullClassPath(TPasClassType(ClassType.Parent)) + '.' + Result; + end; + var aResolver: TPas2JSResolver; DelaySrc: TJSSourceElements; @@ -16154,7 +16162,7 @@ begin if Ancestor=nil then AncestorPath:='null' else if AncestorIsExternal then - AncestorPath:=TPasClassType(Ancestor).ExternalName + AncestorPath:=GetFullClassPath(TPasClassType(Ancestor)) else AncestorPath:=CreateReferencePath(Ancestor,AContext,rpkPathAndName); Call.AddArg(CreatePrimitiveDotExpr(AncestorPath,El));