Mercurial > projects > ldc
view test/innerclass1.d @ 277:90a8c798b0db trunk
[svn r298] Eliminated the dmd/link.c source file entirely in favor of a llvm::sys based approach to the same functionality.
author | lindquist |
---|---|
date | Fri, 20 Jun 2008 22:09:04 +0200 |
parents | d9d5d59873d8 |
children |
line wrap: on
line source
module innerclass1; extern(C) int printf(char*, ...); 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"); }