[Issue 12414] New: Assertion failure in 'template.c' on inout+foreach+template tuple parameter

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Mar 19 09:19:34 PDT 2014


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

           Summary: Assertion failure in 'template.c' on
                    inout+foreach+template tuple parameter
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: ice
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: verylonglogin.reg at gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2014-03-19 20:19:33 MSK ---
This code should compile:
---
void t(T...)(T) { }

void f1(inout int i)
{
    const c = i;
    t(c);
}

void f2(inout(int)[] arr)
{
    foreach(ref e; arr)
        t(e);
}
---
Assertion failure: '0' on line 1503 in file 'template.c'
---

-- 
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