Browse Source

* Patch from Simone Tacconi to fix alias type getdeclaration. Fixes issue #41116

Michaël Van Canneyt 6 months ago
parent
commit
5b3b041b96
1 changed files with 5 additions and 3 deletions
  1. 5 3
      packages/fcl-passrc/src/pastree.pp

+ 5 - 3
packages/fcl-passrc/src/pastree.pp

@@ -1935,12 +1935,14 @@ begin
   for i:=0 to List.Count-1 do
   for i:=0 to List.Count-1 do
     begin
     begin
     if i>0 then
     if i>0 then
-      Result:=Result+',';
+      if length(T.Constraints)>0 then
+        Result:=Result+';'
+      else
+        Result:=Result+',';
     T:=TPasGenericTemplateType(List[i]);
     T:=TPasGenericTemplateType(List[i]);
     Result:=Result+T.Name;
     Result:=Result+T.Name;
     if length(T.Constraints)>0 then
     if length(T.Constraints)>0 then
       begin
       begin
-      Result:=Result+':';
       for j:=0 to length(T.Constraints)-1 do
       for j:=0 to length(T.Constraints)-1 do
         begin
         begin
         if j>0 then
         if j>0 then
@@ -2146,7 +2148,7 @@ begin
       begin
       begin
       if i>0 then
       if i>0 then
         Result:=Result+',';
         Result:=Result+',';
-      Result:=Result+Constraints[i].GetDeclaration(false);
+      Result:=Result+Constraints[i].GetDeclaration(True);
       end;
       end;
     end;
     end;
 end;
 end;