File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2691,7 +2691,7 @@ class Formatter(Sink)
26912691 void format (const ShortenedFunctionBody shortenedFunctionBody)
26922692 {
26932693 debug (verbose) writeln(" ShortenedFunctionBody" );
2694- put(" => " );
2694+ put(" => " );
26952695 format(shortenedFunctionBody.expression);
26962696 put(" ;" );
26972697 }
@@ -4349,4 +4349,22 @@ do
43494349 {
43504350 }
43514351}}, ` a == b && c == d` );
4352+ testFormatNode! (FunctionDeclaration)(q{void foo () => writeln(" Hello" );});
4353+ testFormatNode! (VariableDeclaration)(q{// / Documentation for this variable
4354+ // / which is even multilined.
4355+ int x;});
4356+ testFormatNode! (EnumDeclaration)(q{enum Foo {
4357+ x, // / Documentation for x
4358+ y, // / Documentation for y
4359+ z, // / Documentation for z
4360+ }}, " enum Foo
4361+
4362+ {
4363+ x, /// Documentation for x
4364+
4365+ y, /// Documentation for y
4366+
4367+ z /// Documentation for z
4368+
4369+ }" );
43524370}
You can’t perform that action at this time.
0 commit comments