Testcase:
```d
// RUN: dmd -c test.d
import std.string;
import std.traits;
void foo()
{
static if (isNumeric!string) {}
}
```
When both std.string and std.traits are imported, dmd 2.072 and 2.073 error with:
```
isnum.d(6): Error: std.traits.isNumeric(T) at /Library/D/dmd/src/phobos/std/traits.d(5350) conflicts with std.string.isNumeric(S)(S s, bool bAllowSep = false) if (isSomeString!S || isRandomAccessRange!S && hasSlicing!S && isSomeChar!(ElementType!S) && !isInfinite!S) at /Library/D/dmd/src/phobos/std/string.d(5844)
```
dmd 2.070 and 2.071 compile it fine.
I am not sure whether this is a bug or not.
Thanks,
Johan
Comment #1 by issues.dlang — 2017-02-16T23:53:49Z
It's a side effect of std.string.isNumeric being templatized in 2.072 to work with ranges rather than just strings. Before, it wasn't a template, so there was no ambiguity. Now it is a template, so the two symbols are ambiguous. It's unfortunate that it's caused problems, but it's not a bug. The only fix would be to change one of their names, but that would then break any code that used them. That being said, having a symbol that's an eponymous template have the same name as a symbol that's a function is bad planning, because they won't overload. Any code that imports both will have to either import one with a different name, or it will need to use the full import path when using them.
Comment #2 by b2.temp — 2017-04-27T19:45:22Z
option 1/
Renaming with deprecation is not like breaking:
bool isNumber(S)(S s, bool bAllowSep = false) {}
deprecated("use isNumber instead, ...") alias isNumeric = isNumber;
option 2/
there's a simple fix, but it's not particularly nice:
bool isNumeric(S, T = void)(S s){return false;}
enum isNumeric(S) = true;
static assert(isNumeric!string);
static assert(!isNumeric("sdf"));