On Tuesday, 9 July 2013 at 00:06:11 UTC, Artur Skawina wrote:
That plus a non-existing this._input, results in a bit (too much)
magic, and the first test passes. The other one fails because of
the '$' (ie opDollar() call).

artur

In any case, it is now filed:
http://d.puremagic.com/issues/show_bug.cgi?id=10597

I reduced it to this (imo) neat usecase:

//----
struct R
{
    void opIndex(int);
    int opDollar();
}
R r;

void foo()
{
    static assert(is(typeof(r[0]))); //ok
    static assert(is(typeof(r[$]))); //ok
}

static assert(is(typeof(r[0]))); //ok
static assert(is(typeof(r[$]))); //fails (!)
//----

Thanks again for the help :)

Reply via email to