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...
Also another issue, likely to be related: The code import std.range; void f(R)(R, void delegate(ElementType!(R))) { } void main() { f([1], delegate void(x) { }); } says Error: undefined identifier R, did you mean template f(R)? Error: ElementType!(_error_) is used as a type Error: template f does not match any function template declaration Error: template f(R) cannot deduce template function from argument types !()(int[],void) even though 'R' and 'ElementType' are clearly both defined.
Still happens on git HEAD (db18e36a1c060fff056ecfa88cf792edc8ef8c1d).
Still happens on git HEAD (v2.084.0-395-gcb3a72613).
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18441 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB