This commit is contained in:
parent
fa4e50837e
commit
bdd2da1adf
|
|
@ -1952,7 +1952,8 @@ namespace CodeFormatters
|
|||
else
|
||||
already_off = false;
|
||||
visit_node(_class_members.access_mod);
|
||||
if (first_decl != null && !(_class_members.members[0] is short_func_definition))
|
||||
if (first_decl != null && !(_class_members.members[0] is short_func_definition) &&
|
||||
_class_members.access_mod.source_context.end_position.line_num == _class_members.source_context.begin_position.line_num)
|
||||
sb.Append(" ");
|
||||
if (!already_off)
|
||||
IncOffset();
|
||||
|
|
|
|||
11
TestSuite/formatter_tests/input/class3.pas
Normal file
11
TestSuite/formatter_tests/input/class3.pas
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
type
|
||||
t1 = class
|
||||
internal i1: integer;
|
||||
private
|
||||
i2: integer;
|
||||
protected
|
||||
i3: integer;
|
||||
public
|
||||
end;
|
||||
|
||||
begin end.
|
||||
11
TestSuite/formatter_tests/should/class3.pas
Normal file
11
TestSuite/formatter_tests/should/class3.pas
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
type
|
||||
t1 = class
|
||||
internal i1: integer;
|
||||
private
|
||||
i2: integer;
|
||||
protected
|
||||
i3: integer;
|
||||
public
|
||||
end;
|
||||
|
||||
begin end.
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
type
|
||||
TExample = class
|
||||
private
|
||||
private
|
||||
fX: integer;
|
||||
|
||||
public
|
||||
public
|
||||
property X: integer
|
||||
read fX
|
||||
write
|
||||
|
|
|
|||
Loading…
Reference in a new issue