mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-03-21 19:41:49 +01:00
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
This commit is contained in:
17
tests/mini/sync3.d
Normal file
17
tests/mini/sync3.d
Normal file
@@ -0,0 +1,17 @@
|
||||
module tangotests.sync3;
|
||||
|
||||
void main()
|
||||
{
|
||||
int i = foo();
|
||||
}
|
||||
|
||||
int foo()
|
||||
{
|
||||
int res;
|
||||
synchronized
|
||||
{
|
||||
scope(exit) res--;
|
||||
res++;
|
||||
return res;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user