http://d.puremagic.com/issues/show_bug.cgi?id=4816
Nicolas Sicard <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from Nicolas Sicard <[email protected]> 2010-12-10 15:14:50 PST --- This code won't compile (D v2.050) either. I think it is the same bug. import std.stdio; string process(alias callback)(string s) if (is(typeof(callback(s)))) { return s; } void main() { void fun(string s) { write(s); } writeln(process!fun("Hello world!")); // OK enum dlg1 = (string s) { write(s); }; writeln(process!dlg1("Hello world!")); // OK auto dlg2 = (string s) { write(s); }; writeln(process!dlg2("Hello world!")); // ERROR } Error message: test.d(18): Error: template instance process!(dlg2) does not match template declaration process(alias callback) if (is(typeof(callback(s)))) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
