www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21882] New: [ICE][dip1021] src/dmd/escape.d(1850): Assertion

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

          Issue ID: 21882
           Summary: [ICE][dip1021] src/dmd/escape.d(1850): Assertion
                    failure
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ibuclaw gdcproject.org

Reduced test compiled with: -preview=dip1021
---
void byCodeUnit()
{   
    struct ByCodeUnitImpl
    {   
        auto opIndex(size_t ) {}
    }
    isRandomAccessRange!ByCodeUnitImpl;
}

enum isRandomAccessRange(R) = lvalueOf!R[1];
ref T lvalueOf(T)();
---

Going to make another reduction that works with -dip1000 but not -dip1021.

--
Apr 30