mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 17:29:21 +02:00
* Patch from Simone Tacconi to fix alias type getdeclaration. Fixes issue #41115
This commit is contained in:
parent
5b3b041b96
commit
33c1e3e537
@ -891,6 +891,18 @@ begin
|
|||||||
IncIndent;
|
IncIndent;
|
||||||
IncDeclSectionLevel;
|
IncDeclSectionLevel;
|
||||||
WriteMembers(AType.Members,visPublic);
|
WriteMembers(AType.Members,visPublic);
|
||||||
|
if AType.Variants<>nil then
|
||||||
|
begin
|
||||||
|
temp:='case ';
|
||||||
|
if (AType.VariantEl is TPasVariable) then
|
||||||
|
temp:=Temp+AType.VariantEl.Name+' : '+TPasVariable(AType.VariantEl).VarType.Name
|
||||||
|
else if (AType.VariantEl<>Nil) then
|
||||||
|
temp:=temp+AType.VariantEl.Name;
|
||||||
|
temp:=temp+' of';
|
||||||
|
AddLn(Temp);
|
||||||
|
For I:=0 to AType.Variants.Count-1 do
|
||||||
|
AddLn(TPasVariant(AType.Variants[i]).GetDeclaration(True));
|
||||||
|
end;
|
||||||
DecDeclSectionLevel;
|
DecDeclSectionLevel;
|
||||||
DecIndent;
|
DecIndent;
|
||||||
Add('end');
|
Add('end');
|
||||||
|
Loading…
Reference in New Issue
Block a user