www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12902] New: [ICE] Assertion failure '!ae->lengthVar' in

https://issues.dlang.org/show_bug.cgi?id=12902

          Issue ID: 12902
           Summary: [ICE] Assertion failure '!ae->lengthVar' in
                    'expression.c' when using `opDollar`
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: ice
          Severity: major
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: verylonglogin.reg gmail.com

This code ICEs the compiler:
---
struct S
{
    void opDollar() { }
    void opIndex() { }
    void opIndexAssign() { }
    void opSliceAssign() { }
}

void main()
{
    S s;
    s[] = s[$];
}
---
Assertion failure: '!ae->lengthVar' on line 13938 in file 'expression.c'
---

--
Jun 12 2014