http://d.puremagic.com/issues/show_bug.cgi?id=9555
Summary: Type deduction for new lambda syntax literals breaks with templates Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: m.stras...@gmail.com --- Comment #0 from Dicebot <m.stras...@gmail.com> 2013-02-21 03:06:35 PST --- Simple motivating example: --- test.d --- import std.functional; void main() { auto deleg = toDelegate(a => a > 2); } ------ --- shell --- $ rdmd test.d test.d(5): Error: template std.functional.toDelegate does not match any function template declaration. Candidates are: /usr/include/dmd/phobos/std/functional.d(722): std.functional.toDelegate(F)(auto ref F fp) if (isCallable!(F)) test.d(5): Error: template std.functional.toDelegate(F)(auto ref F fp) if (isCallable!(F)) cannot deduce template function from argument types !()(void) ------ Type of lambda was deduced as "void" here. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------