www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13081] New: ICE with alias this and opSlice

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

          Issue ID: 13081
           Summary: ICE with alias this and opSlice
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Keywords: ice, industry
          Severity: regression
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: briancschott gmail.com

Code:
-------
struct Cube(StorageT)
{
    StorageT datastore;
    alias datastore this;
    auto seed()
    {
        this[] = node.data ? value : node.data;
    }
}

class SparseDataStore {    auto opSlice() {} }
void main() { Cube!SparseDataStore; }
-------

Output with 2.065

test.d(7): Error: undefined identifier node
test.d(7): Error: undefined identifier value
test.d(7): Error: undefined identifier node
test.d(12): Error: template instance test.Cube!(SparseDataStore) error
instantiating

Output with 2.066-devel-10f3bf1:

dmd: statement.c:750: ErrorStatement::ErrorStatement(): Assertion
`global.gaggedErrors || global.errors' failed.
Aborted (core dumped)

--
Jul 08 2014