Help me investigate a bug to file it.

monarch_dodra monarchdodra at gmail.com
Wed Jul 10 12:36:06 PDT 2013


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 :)


More information about the Digitalmars-d-learn mailing list