mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 07:34:28 +02:00
Merge branch 'FixInheritedClass' into 'main'
Fix for inherited external class, with full path of the class. See merge request freepascal.org/fpc/source!561
This commit is contained in:
commit
e99a59bf09
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user