www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6264] New: ICE on testing opSlice in static if

reply d-bugmail puremagic.com writes:
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: nobody puremagic.com
        ReportedBy: dsimcha yahoo.com



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: -------
Jul 07 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6264


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
                 CC|                            |yebblies gmail.com



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

The static if(is(typeof( is unnecessary.  The compiler will assert rather than
give an error.

This was caused by the fix to bug 5284.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 09 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6264


yebblies <yebblies gmail.com> changed:

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



https://github.com/D-Programming-Language/dmd/commit/0d100fb86205ff839e50b49625e821cb1052a43b

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