[Issue 11955] Aliased types not accepted in foreach over range of tuple

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jan 20 06:04:06 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=11955


yebblies <yebblies at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, rejects-valid
                 CC|                            |yebblies at gmail.com
           Platform|x86                         |All
         AssignedTo|nobody at puremagic.com        |yebblies at gmail.com
            Summary|win32 foreach "size_t"      |Aliased types not accepted
                   |degrades to "uint"          |in foreach over range of
                   |                            |tuple
         OS/Version|Windows                     |All
           Severity|blocker                     |normal


--- Comment #3 from yebblies <yebblies at gmail.com> 2014-01-21 01:04:02 EST ---
struct T11955(T...) { T field; alias field this; }

alias X11955 = uint;

struct S11955
{
    enum empty = false;
    T11955!(uint, uint) front;
    void popFront() {}
}

void main()
{
    foreach(X11955 i, v; S11955()) {}
}

The argument type 'X11955' has not had semantic run on it, so checking the
implicit conversion from agg.front[0] to it fails.

https://github.com/D-Programming-Language/dmd/pull/3127

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


More information about the Digitalmars-d-bugs mailing list