mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-11-28 20:03:53 +01:00
[svn r127] Updated the lphobos build scripts a little. Created a new rebuild profile.
Removed some potentially very long logging lines. Added support for inner classes.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
module innerclass1;
|
||||
|
||||
class Outer
|
||||
{
|
||||
int i;
|
||||
class Inner
|
||||
{
|
||||
int func()
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
Outer o = new Outer;
|
||||
{
|
||||
o.i = 42;
|
||||
{
|
||||
auto i = o.new Inner;
|
||||
{
|
||||
int x = i.func();
|
||||
assert(x == 42);
|
||||
}
|
||||
}
|
||||
}
|
||||
printf("SUCCESS\n");
|
||||
}
|
||||
Reference in New Issue
Block a user