digitalmars.D.bugs - [Issue 8217] New: static nested class can reference outer scope by template instantiation
- d-bugmail puremagic.com (34/34) Jun 10 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8217
http://d.puremagic.com/issues/show_bug.cgi?id=8217 Summary: static nested class can reference outer scope by template instantiation Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: accepts-invalid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: timon.gehr gmx.ch --- Comment #0 from timon.gehr gmx.ch 2012-06-10 13:39:50 PDT --- class D{ int x; template bar(){ int foo(){ return x; } } static class C{ int foo(){ return bar!().foo(); } } } C does not have a reference to the enclosing context, therefore the call to bar!().foo is invalid. DMD 2.059 accepts the code. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 10 2012