[Issue 17190] New: [REG2.072] isNumeric!string conflict std.traits std.string
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Feb 16 15:18:59 PST 2017
https://issues.dlang.org/show_bug.cgi?id=17190
Issue ID: 17190
Summary: [REG2.072] isNumeric!string conflict std.traits
std.string
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: jbc.engelen at gmail.com
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
--
More information about the Digitalmars-d-bugs
mailing list