fix #1669
This commit is contained in:
parent
f0da75b732
commit
ac7b484868
|
|
@ -648,6 +648,10 @@ namespace CodeFormatters
|
|||
if (trimedstr.StartsWith("."))
|
||||
comm = trimedstr;
|
||||
}
|
||||
else if (sn is simple_property)
|
||||
{
|
||||
comm = RemoveOverSpaces(comm).Replace(" ;", ";");
|
||||
}
|
||||
if (comm.StartsWith(" "))
|
||||
add_space_before = true;
|
||||
if (comm != "()")
|
||||
|
|
|
|||
19
TestSuite/formatter_tests/input/property6.pas
Normal file
19
TestSuite/formatter_tests/input/property6.pas
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
type
|
||||
T = class
|
||||
fX: byte;
|
||||
|
||||
property A0 : byte write ; abstract ;
|
||||
property B0 : byte read ; abstract ;
|
||||
property C0 : byte read write ; abstract ;
|
||||
|
||||
property A1 : byte write fX ; virtual ;
|
||||
property B1 : byte read fX ; virtual ;
|
||||
property C1 : byte read fX write fX ; virtual ;
|
||||
|
||||
property A3 : byte write begin end ; virtual ;
|
||||
property B3 : byte read 0 ; virtual ;
|
||||
property C3 : byte read 0 write begin end ; virtual ;
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
||||
19
TestSuite/formatter_tests/should/property6.pas
Normal file
19
TestSuite/formatter_tests/should/property6.pas
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
type
|
||||
T = class
|
||||
fX: byte;
|
||||
|
||||
property A0: byte write; abstract;
|
||||
property B0: byte read; abstract;
|
||||
property C0: byte read write; abstract;
|
||||
|
||||
property A1: byte write fX; virtual;
|
||||
property B1: byte read fX; virtual;
|
||||
property C1: byte read fX write fX; virtual;
|
||||
|
||||
property A3: byte write begin end; virtual;
|
||||
property B3: byte read 0; virtual;
|
||||
property C3: byte read 0 write begin end; virtual;
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
||||
Loading…
Reference in a new issue