[Issue 13995] Alias type stringof decay to alias type stringof

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Jan 17 23:22:01 PST 2015


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

--- Comment #5 from deadalnix <deadalnix at gmail.com> ---
Johnatan, I made the sample code short so the problematic behavior can be
demonstrated. I tried to explain where it causes problem, but apparently, I
haven't been clear enough, so let me expand myself on the subject.

Consider the sample code :

module a;

struct S(E) {
    import std.bitmanip;
    mixin(bitfield!(
        E, "e", 10,
        uint, "", 6,
    ));
}

module b;

enum A { A, B }

import a;

S!A s;

There is absolutely no way to make that work (even when modifying bitfield)
given the current behavior of stringof.

--


More information about the Digitalmars-d-bugs mailing list