Skip to content

Commit 6ad2fbb

Browse files
LaurentTreguierdlang-bot
authored andcommitted
Fix #287 - Extra space after import in delegate
1 parent 3917c32 commit 6ad2fbb

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

src/dfmt/formatter.d

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1444,7 +1444,6 @@ private:
14441444
&& !assumeSorted(astInformation.funLitEndLocations).equalRange(
14451445
tokens[index].index).empty)
14461446
{
1447-
write(" ");
14481447
return;
14491448
}
14501449

tests/allman/issue0287.d.ref

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
alias foo = typeof({ import std.math; });
2+
alias bar = typeof({ write("aaa"); });
3+
alias baz = typeof({ });

tests/issue0287.d

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
alias foo = typeof({import std.math;});
2+
alias bar = typeof({write("aaa");});
3+
alias baz = typeof({});

tests/otbs/issue0287.d.ref

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
alias foo = typeof({ import std.math; });
2+
alias bar = typeof({ write("aaa"); });
3+
alias baz = typeof({ });

0 commit comments

Comments
 (0)