http://d.puremagic.com/issues/show_bug.cgi?id=5710
Summary: cannot use delegates as parameters to non-global template Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: dsim...@yahoo.com --- Comment #0 from David Simcha <dsim...@yahoo.com> 2011-03-06 06:26:40 PST --- This pretty severely impacts the usability of template alias parameters for lambda functions. class Foo { uint doStuff(alias fun)(uint a, uint b) { return fun(a, b); } } void main() { auto foo = new Foo; uint add(uint a, uint b) { return a + b; } foo.doStuff!add(1, 2); } test9.d(10): Error: template instance cannot use local 'add' as parameter to non-global template doStuff(alias fun) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------