mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-03-28 22:59:03 +01:00
[svn r132] Added some tests. some will fail at the moment.
This commit is contained in:
15
test/classes11.d
Normal file
15
test/classes11.d
Normal file
@@ -0,0 +1,15 @@
|
||||
module classes11;
|
||||
|
||||
void main()
|
||||
{
|
||||
static class C
|
||||
{
|
||||
void func()
|
||||
{
|
||||
printf("Hello world\n");
|
||||
}
|
||||
}
|
||||
|
||||
scope c = new C;
|
||||
c.func();
|
||||
}
|
||||
19
test/nested5.d
Normal file
19
test/nested5.d
Normal file
@@ -0,0 +1,19 @@
|
||||
module nested5;
|
||||
|
||||
void main()
|
||||
{
|
||||
int i = 42;
|
||||
|
||||
printf("Hello world %d\n", i++);
|
||||
|
||||
class C
|
||||
{
|
||||
void func()
|
||||
{
|
||||
printf("Hello world %d\n", i++);
|
||||
}
|
||||
}
|
||||
|
||||
scope c = new C;
|
||||
c.func();
|
||||
}
|
||||
32
test/nested6.d
Normal file
32
test/nested6.d
Normal file
@@ -0,0 +1,32 @@
|
||||
module nested6;
|
||||
|
||||
void main()
|
||||
{
|
||||
int i = 42;
|
||||
|
||||
printf("Hello world %d\n", i++);
|
||||
|
||||
class C
|
||||
{
|
||||
void func()
|
||||
{
|
||||
printf("Hello world %d\n", i++);
|
||||
|
||||
class C2
|
||||
{
|
||||
void func2()
|
||||
{
|
||||
printf("Hello world %d\n", i++);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
scope c2 = new C2;
|
||||
c2.func2();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
scope c = new C;
|
||||
c.func();
|
||||
}
|
||||
Reference in New Issue
Block a user