www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16188] New: [Home]

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

          Issue ID: 16188
           Summary: [Home]
           Product: D
           Version: D2
          Hardware: All
               URL: http://dlang.org/
                OS: All
            Status: NEW
          Severity: regression
          Priority: P3
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: changlon gmail.com

ICE for DMD 2.071:

//==============================================================================

class DB
{
}

//==============================================================================

Query where(alias pred, Query)(Query )
{
    auto p = Where!();
    pred(p); // record predicate
}

struct Where()
{
    auto opDispatch(string name)()
    {
        alias FieldType = typeof(getMember);
WhereField!FieldType;
    }
}

struct WhereField(FieldType)
{
}void main()
{
    auto db = DB;
db.where!(p => p.name );
}

=============================
..\test.d(30): Error: type DB has no value
..\test.d(11): Error: type Where!() has no value

object.Error (0): Access Violation
----------------
0x004EC058

--
Jun 20 2016