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
Comment #1 by ag0aep6g — 2016-06-21T18:27:38Z
Reduced further:
----
void where() { Where().name; }
struct Where
{
void opDispatch(string name)()
{
alias FieldType = typeof(getMember);
WhereField!FieldType;
}
}
struct WhereField(FieldType) {}
----
Doesn't segfault with 2.068.2 and earlier.