www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13374] New: Wrong template overload resolution when passing


          Issue ID: 13374
           Summary: Wrong template overload resolution when passing
                    function to alias/string parameter
           Product: D
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: thecybershadow gmail.com

///// test.d /////
void f(alias a)()

void f(string s)()

void x(int i) {}

void main()

Compiler attempts to evaluate x despite that it's impossible and its return
type is not convertible to a string. But even if x took no arguments and
returned a string, there needs to be a way to pass the function by alias, not
by its evaluation result.

Introduced in https://github.com/D-Programming-Language/dmd/pull/599

Aug 24 2014