mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-16 11:29:17 +02:00
fcl-passc: fixed GetDeclaration of specialize param types
This commit is contained in:
parent
f689746372
commit
9f16b0a0f4
@ -2262,13 +2262,18 @@ end;
|
||||
function TInlineSpecializeExpr.GetDeclaration(full: Boolean): TPasTreeString;
|
||||
var
|
||||
i: Integer;
|
||||
aParam: TPasElement;
|
||||
begin
|
||||
Result:='specialize '+NameExpr.GetDeclaration(false)+'<';
|
||||
for i:=0 to Params.Count-1 do
|
||||
begin
|
||||
if i>0 then
|
||||
Result:=Result+',';
|
||||
Result:=Result+TPasElement(Params[i]).GetDeclaration(false);
|
||||
aParam:=TPasElement(Params[i]);
|
||||
if aParam is TPasMembersType then
|
||||
Result:=Result+aParam.FullName
|
||||
else
|
||||
Result:=Result+aParam.GetDeclaration(false);
|
||||
end;
|
||||
Result:=Result+'>';
|
||||
if full then ;
|
||||
@ -2328,13 +2333,18 @@ end;
|
||||
function TPasSpecializeType.GetDeclaration(full: boolean): TPasTreeString;
|
||||
var
|
||||
i: Integer;
|
||||
aParam: TPasElement;
|
||||
begin
|
||||
Result:='specialize '+DestType.Name+'<';
|
||||
for i:=0 to Params.Count-1 do
|
||||
begin
|
||||
if i>0 then
|
||||
Result:=Result+',';
|
||||
Result:=Result+TPasElement(Params[i]).GetDeclaration(false);
|
||||
aParam:=TPasElement(Params[i]);
|
||||
if aParam is TPasMembersType then
|
||||
Result:=Result+aParam.FullName
|
||||
else
|
||||
Result:=Result+aParam.GetDeclaration(false);
|
||||
end;
|
||||
If Full and (Name<>'') then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user