Comment #0 by dlang-bugzilla — 2014-08-24T23:53:17Z
///// test.d /////
void f(alias a)()
{
}
void f(string s)()
{
}
void x(int i) {}
void main()
{
f!x();
}
//////////////////
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
Comment #1 by dlang-bugzilla — 2014-08-25T00:42:19Z
> 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.
Even with -property, the compiler still attempts to evaluate it while complaining that "Error: not a property x".