View previous topic :: View next topic |
Author |
Message |
vektorboson
Joined: 14 Sep 2006 Posts: 44
|
Posted: Sat Nov 07, 2009 12:18 pm Post subject: code reformatter error |
|
|
The code reformatter chokes on the following code:
Code: |
static if(is(foo()))
{
}
|
It chokes on the parentheses of foo().
---------------------
Another one:
Code: |
void bar()
{
int[] arr;
foreach(inout int a; arr)
{
}
}
|
Here the formatter chokes on the "inout int"
---------------------
Yet another one:
Code: |
class Foo
{
void foo()
{
};
}
|
Here it's the superfluous semicolon at the end of foo().
---------------------
I've got one more!
Code: |
void foo()
{
mixin T!();
}
|
Here the formatter has a problem with "mixin T!();". |
|
Back to top |
|
|
asterite
Joined: 01 Jun 2006 Posts: 235 Location: Buenos Aires, Argentina
|
Posted: Thu Nov 19, 2009 8:21 am Post subject: Re: code reformatter error |
|
|
vektorboson wrote: | The code reformatter chokes on the following code:
Code: |
static if(is(foo()))
{
}
|
It chokes on the parentheses of foo().
|
And it's ok that it chokes because that's not allowed. I don't know why the parser allows it, though.
http://www.digitalmars.com/d/2.0/expression.html#IsExpression
vektorboson wrote: |
---------------------
Another one:
Code: |
void bar()
{
int[] arr;
foreach(inout int a; arr)
{
}
}
|
Here the formatter chokes on the "inout int"
|
Fixed!
vektorboson wrote: |
---------------------
Yet another one:
Code: |
class Foo
{
void foo()
{
};
}
|
Here it's the superfluous semicolon at the end of foo().
|
Fixed!
vektorboson wrote: |
---------------------
I've got one more!
Code: |
void foo()
{
mixin T!();
}
|
Here the formatter has a problem with "mixin T!();". |
Fixed!
Thanks for these bug reports. I uploaded a new version with these fixes. |
|
Back to top |
|
|
|