Commit again r36573 reverted by r36601 -,-

git-svn-id: trunk@36607 -
This commit is contained in:
maciej-izak 2017-06-27 12:44:46 +00:00
parent 54a8a73ca7
commit b35522d947

View File

@ -215,6 +215,7 @@ procedure TPasWriter.WriteClass(AClass: TPasClassType);
var
i: Integer;
Member: TPasElement;
InterfacesListPrefix: string;
LastVisibility, CurVisibility: TPasMemberVisibility;
begin
PrepareDeclSection('type');
@ -227,7 +228,19 @@ begin
okInterface: wrt('interface');
end;
if Assigned(AClass.AncestorType) then
wrtln('(' + AClass.AncestorType.Name + ')')
wrt('(' + AClass.AncestorType.Name);
if AClass.Interfaces.Count > 0 then
begin
if Assigned(AClass.AncestorType) then
InterfacesListPrefix:=', '
else
InterfacesListPrefix:='(';
wrt(InterfacesListPrefix + TPasType(AClass.Interfaces[0]).Name);
for i := 1 to AClass.Interfaces.Count - 1 do
wrt(', ' + TPasType(AClass.Interfaces[i]).Name);
end;
if Assigned(AClass.AncestorType) or (AClass.Interfaces.Count > 0) then
wrtln(')')
else
wrtln;
IncIndent;