[Issue 11401] ElementType returns constructor instead of type

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Nov 3 13:44:32 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=11401


Andrei Alexandrescu <andrei at erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrei at erdani.com


--- Comment #1 from Andrei Alexandrescu <andrei at erdani.com> 2013-11-03 13:44:30 PST ---
Turns out it's a compiler bug, not a library one. I reduced the code to:

struct RowRange
{
    BasicNode front()
    {
        return BasicNode.init;
    }
}

struct BasicNode { ushort id; }

void main()
{
    alias E1 = typeof(RowRange.init.front());
    static assert(is(typeof(E1.id)),
        E1.stringof~" is expected to have a 'id' member");
    alias E2 = typeof(RowRange.init.front);
    static assert(is(typeof(E2.id)),
        E2.stringof~" is expected to have a 'id' member");
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list