mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-04-04 19:09:03 +02:00
[svn r30] * Fixed static function-local variables.
* Fixed CondExp - bool ? true : false
This commit is contained in:
13
test/staticvars.d
Normal file
13
test/staticvars.d
Normal file
@@ -0,0 +1,13 @@
|
||||
module staticvars;
|
||||
|
||||
int func()
|
||||
{
|
||||
static int i;
|
||||
return i++;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
assert(func() == 0);
|
||||
assert(func() == 1);
|
||||
}
|
||||
Reference in New Issue
Block a user