Fix for inherited external class, with full path of the class.

This commit is contained in:
Henrique Gottardi Werlang 2023-12-16 08:39:50 -03:00
parent cafaa9f5b8
commit 6329e074e6

View File

@ -16041,6 +16041,14 @@ var
end; end;
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 var
aResolver: TPas2JSResolver; aResolver: TPas2JSResolver;
DelaySrc: TJSSourceElements; DelaySrc: TJSSourceElements;
@ -16154,7 +16162,7 @@ begin
if Ancestor=nil then if Ancestor=nil then
AncestorPath:='null' AncestorPath:='null'
else if AncestorIsExternal then else if AncestorIsExternal then
AncestorPath:=TPasClassType(Ancestor).ExternalName AncestorPath:=GetFullClassPath(TPasClassType(Ancestor))
else else
AncestorPath:=CreateReferencePath(Ancestor,AContext,rpkPathAndName); AncestorPath:=CreateReferencePath(Ancestor,AContext,rpkPathAndName);
Call.AddArg(CreatePrimitiveDotExpr(AncestorPath,El)); Call.AddArg(CreatePrimitiveDotExpr(AncestorPath,El));