blob: 86af9c9226e8b0f605a8f5a988c7c1a5d67e0083 [file] [edit]
40 columns |
### The code for formatting function declarations is the same across top-level
### and local functions. This just tests that local function declaration
### statements work as expected.
>>>
main() {
int localFunction(String parameter) { body; }
}
<<< 3.7
main() {
int localFunction(String parameter) {
body;
}
}
>>> Force blank line after non-empty local function.
{
a() {;}
b();
c() {;}d(){;}
}
<<< 3.7
{
a() {
;
}
b();
c() {
;
}
d() {
;
}
}
>>> Do not force blank line after empty local function.
{ a() {} b() {} }
<<< 3.7
{
a() {}
b() {}
}
>>> Do not force blank line after expression body local function.
{ a() => null; b() => null; }
<<< 3.7
{
a() => null;
b() => null;
}
>>> Don't force a blank line after a function and comment at the end of a block.
{
a() {;}
// comment
}
<<< 3.7
{
a() {
;
}
// comment
}