mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 02:45:58 +02:00
* Patch from Simone Tacconi to fix GetDeclaration for specialize types. Fixes issue #41095
This commit is contained in:
parent
5f9ea00b38
commit
74614c02c6
@ -2380,6 +2380,7 @@ function TPasSpecializeType.GetDeclaration(full: boolean): TPasTreeString;
|
|||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
aParam: TPasElement;
|
aParam: TPasElement;
|
||||||
|
lTmp : String;
|
||||||
begin
|
begin
|
||||||
Result:='specialize '+DestType.Name+'<';
|
Result:='specialize '+DestType.Name+'<';
|
||||||
for i:=0 to Params.Count-1 do
|
for i:=0 to Params.Count-1 do
|
||||||
@ -2390,8 +2391,13 @@ begin
|
|||||||
if aParam is TPasMembersType then
|
if aParam is TPasMembersType then
|
||||||
Result:=Result+aParam.FullName
|
Result:=Result+aParam.FullName
|
||||||
else
|
else
|
||||||
Result:=Result+aParam.GetDeclaration(false);
|
begin
|
||||||
|
lTmp:=aParam.GetDeclaration(aParam is TPasUnresolvedTypeRef);
|
||||||
|
lTmp[1]:=Upcase(lTmp[1]);
|
||||||
|
Result:=Result+lTmp;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
Result:=Result+'>';
|
||||||
If Full and (Name<>'') then
|
If Full and (Name<>'') then
|
||||||
begin
|
begin
|
||||||
Result:=Name+' = '+Result;
|
Result:=Name+' = '+Result;
|
||||||
|
Loading…
Reference in New Issue
Block a user