mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-04-21 11:19:02 +02:00
[svn r391] Fix classes nested inside functions for real.
This commit is contained in:
39
tests/mini/nested6a.d
Normal file
39
tests/mini/nested6a.d
Normal file
@@ -0,0 +1,39 @@
|
||||
module nested6a;
|
||||
extern(C) int printf(char*, ...);
|
||||
|
||||
void main()
|
||||
{
|
||||
int i = 42;
|
||||
|
||||
printf("main() %d\n", i++);
|
||||
|
||||
class C
|
||||
{
|
||||
int j;
|
||||
void func()
|
||||
{
|
||||
int k;
|
||||
printf("C.func() %d\n", i++);
|
||||
|
||||
class C2
|
||||
{
|
||||
int l;
|
||||
void func2()
|
||||
{
|
||||
printf("C2.func2() %d\n", i++);
|
||||
}
|
||||
int m;
|
||||
}
|
||||
|
||||
{
|
||||
scope c2 = new C2;
|
||||
c2.func2();
|
||||
}
|
||||
int n;
|
||||
}
|
||||
int o;
|
||||
}
|
||||
|
||||
scope c = new C;
|
||||
c.func();
|
||||
}
|
||||
Reference in New Issue
Block a user