www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12103] New: TypeTuple loop variable as template alias argument doesn't work

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12103

           Summary: TypeTuple loop variable as template alias argument
                    doesn't work
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: peter.alexander.au gmail.com



14:41:32 PST ---
See this:

template id(alias a) { alias id = a; }

void main() {
    import std.typetuple;
    alias TypeTuple!(() => 0, () => 1) fs;
    foreach (i, f; fs)
        assert(id!f() == i, i.stringof);
}

In both iterations, id!f aliases ()=>0, so the assertion fails on the second
iteration.

Expected behaviour: id!f aliases ()=>1 on the second iteration, and passes the
assertion.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 07 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12103


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, rejects-valid



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

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 10 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12103




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/77e3ea11637a4ac989139682252734ea0f2e6798
fix Issue 12103 - TypeTuple loop variable as template alias argument doesn't
work

https://github.com/D-Programming-Language/dmd/commit/78096898bac8cfb5e2fb8f18fd3b59b15322ed7c


Issue 12103 - TypeTuple loop variable as template alias argument doesn't work

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 16 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12103


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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