http://d.puremagic.com/issues/show_bug.cgi?id=8575
Summary: Lambda expression causes compilation error with template function Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: zan77...@nifty.com --- Comment #0 from SHOO <zan77...@nifty.com> 2012-08-21 09:05:50 PDT --- This code doesn't work! ------------ template tfunc(fun...) { auto tfunc(U)(U r) { return r; } } void bar(T)(T x) { // import std.functional; x.tfunc!(unaryFun!"a"); // <- OK x.tfunc!(a=>a); // <- NG } void test() { bar(uint.init); } void main() { bar(int.init); } ------------ RESULT ------------ $ dmd -run main Error: function main.bar!(uint).bar.tfunc!(__lambda2).tfunc!(int).tfunc is a nested function and cannot be accessed from main.bar!(int).bar ------------ -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------