Mercurial > projects > dstress
view run/n/nested_class_03_A.d @ 1619:bebc7472a832
Fix #7.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sat, 07 Nov 2009 18:55:30 +0100 |
parents | b17e092dd992 |
children |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ John C <johnch_atms@hotmail.com> // @date@ 2005-06-09 // @uri@ news:d88vta$vak$1@digitaldaemon.com module dstress.run.n.nested_class_03_A; interface Inner{ int value(); } class Outer{ int x; Inner test(){ return new class Inner { int y; this(){ y=x; } int value(){ return y; } }; } } int main(){ Outer o = new Outer(); o.x=2; assert(o.test().value() == o.x); return 0; }