Mercurial > projects > ldc
view test/innerclass1.d @ 206:cd2c9f4010e4 trunk
[svn r222] Forgot to remove volatile ATTENTION.
Fixed a few comment types.
Forgot to add makefile for the basic GC.
author | lindquist |
---|---|
date | Tue, 13 May 2008 18:07:03 +0200 |
parents | 7f9a0a58394b |
children | d9d5d59873d8 |
line wrap: on
line source
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"); }