[Issue 12961] New: Removing private import for std.conv from std.traits causes dmd test suite failure

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Jun 22 13:33:30 PDT 2014


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

          Issue ID: 12961
           Summary: Removing private import for std.conv from std.traits
                    causes dmd test suite failure
           Product: D
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: jmdavisProg at gmx.com

In https://github.com/D-Programming-Language/phobos/pull/2260 I'm removing the
deprecated

alias unsigned = std.conv.unsigned;

from std.traits, and that works fine. However, if I remove the import for
std.conv (which was there just to enable that alias), then the dmd test suit
fails

../src/dmd -m64 -Irunnable   -odtest_results/runnable
-oftest_results/runnable/testaa2_0 runnable/testaa2.d
runnable/testaa2.d(242): Error: associative array key type S does not have
'const int opCmp(ref const S)' member function

The are no imports for std.conv or std.traits in that file. The only
module-level import is std.math. std.math _does_ import std.traits, but it does
so privately. Adding an import to std.conv in test3825x (the failing test)
makes it so that it passes again (in spite of the fact that it isn't using
anything from std.conv).

I'm going to leave the import for std.conv in std.traits for the moment, since
I have no idea what other impacts removing it will have, but there's definitely
something bizarre going on here. Removing the import for std.conv from
std.traits should have no impact on anything outside of std.traits.

--


More information about the Digitalmars-d-bugs mailing list