| 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; } |
| } |
| <<< |
| main() { |
| int localFunction(String parameter) { |
| body; |
| } |
| } |
| >>> Force blank line after non-empty local function. |
| { |
| a() {;} |
| b(); |
| |
| |
| c() {;}d(){;} |
| |
| |
| } |
| <<< |
| { |
| a() { |
| ; |
| } |
| |
| b(); |
| |
| c() { |
| ; |
| } |
| |
| d() { |
| ; |
| } |
| } |
| >>> Do not force blank line after empty local function. |
| { a() {} b() {} } |
| <<< |
| { |
| a() {} |
| b() {} |
| } |
| >>> Do not force blank line after expression body local function. |
| { a() => null; b() => null; } |
| <<< |
| { |
| a() => null; |
| b() => null; |
| } |