https://issues.dlang.org/show_bug.cgi?id=15240
Rainer Schuetze <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #2 from Rainer Schuetze <[email protected]> --- Sorry, I reduced the issue too far. The actual case where it happened is in https://github.com/D-Programming-Language/phobos/pull/3764. This is similar to this which fails: enum check(R) = is(what) && is(R == what); @property bool isDir(R)(R name) if (check!R) { return true; } @property bool isDir(R)(R name) if (!check!R) { return false; } void foo() { isDir!int(0); } On the other hand, it compiles if check is declared as: template check(R) { static if (is(what) && is(R == what)) enum check = true; else enum check = false; } But that's documented special behaviour of "&&" for "static if", so I'll close this. --
