This commit is contained in:
Hackerpilot 2016-01-13 20:52:26 -08:00
parent 8847c6155b
commit 9fc36fe587
4 changed files with 41 additions and 0 deletions

View file

@ -781,6 +781,11 @@ private:
indents.pop();
write(" ");
}
else if (currentIs(tok!":"))
{
writeToken();
newline();
}
else if (!currentIs(tok!"{") && !currentIs(tok!"comment"))
{
if (indents.topIs(tok!"if") || indents.topIs(tok!"version"))

View file

@ -0,0 +1,13 @@
version (Foo)
{
version (D_Version2)
{
public import core.memory;
}
else:
}
version (Bar)
int foo();
else:
int foo(int);

13
tests/issue0204.d Normal file
View file

@ -0,0 +1,13 @@
version (Foo)
{
version(D_Version2)
{
public import core.memory;
}
else:
}
version (Bar)
int foo ();
else:
int foo(int);

View file

@ -0,0 +1,10 @@
version (Foo) {
version (D_Version2) {
public import core.memory;
} else:
}
version (Bar)
int foo();
else:
int foo(int);