[Issue 8131] New: Delegate type inference with templates is absolutely *horrible*
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon May 21 23:35:45 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8131
Summary: Delegate type inference with templates is absolutely
*horrible*
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: wfunction at hotmail.com
--- Comment #0 from wfunction at hotmail.com 2012-05-21 23:37:25 PDT ---
The code:
import std.range;
void f(R)(R, void delegate(ElementType!R)) { }
void main() { f([1], (int x) { }); }
gives:
Error: template f does not match any function template declaration
Error: template f(R) cannot deduce template function from argument types
!()(int[],void function(int x) pure nothrow @safe)
but it should obviously be able to infer the types...
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list