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

           Summary: ICE on testing opSlice in static if
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-valid-code
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: dsim...@yahoo.com


--- Comment #0 from David Simcha <dsim...@yahoo.com> 2011-07-07 06:17:40 PDT ---
void main() {
    double[] x;
    auto y = Result(0, x.length);

    static if(is(typeof(x[] = y[]))) {}  // This line needs to be there.
}

static struct Result {
    this(size_t current, size_t pastLast) {}
    auto opSlice() { return this; }
}

Error message:

Assertion failure: 't1n && t2n' on line 9612 in file 'expression.c'

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

Reply via email to