struct Foo{
int _a;
this(int a){ _a = a; }
int opCall(int b){ return b * b; }
}
Foo f;
int rt = f(33); //Error: cannot implicitly convert expression ((Foo __ctmp1294 = 0;
//, __ctmp1294).this(33)) of type Foo to int
I can’t find enough information on opCall in TDPL or the website.
I need both the this() and opCall(), but, when the this() is present, the above code doesn’t work. Do I have to get rid of the constructor?
The above code should work, but doesn’t due to bug #6036.