[Issue 17196] New: [Reg 2.074] isUnsigned!bool now true

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Feb 18 06:16:32 PST 2017


https://issues.dlang.org/show_bug.cgi?id=17196

          Issue ID: 17196
           Summary: [Reg 2.074] isUnsigned!bool now true
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: code at dawg.eu

cat > bug.d << CODE
import std.traits : isUnsigned;

void pack(T)(in T value) if (is(T == bool))
{
}

void pack(T)(in T value) if (isUnsigned!T)
{
}

void test()
{
    pack(true);
}
CODE
dmd -c -o- bug.d
----
bug.d(13): Error: bug.pack called with argument types (bool) matches both:
bug.d(3):     bug.pack!bool.pack(const(bool) value)
and:
bug.d(7):     bug.pack!bool.pack(const(bool) value)
----

Caused by https://github.com/dlang/phobos/pull/5038, this breaks the
msgpack-d-0.9.6.

--


More information about the Digitalmars-d-bugs mailing list