October 03, 2014
https://issues.dlang.org/show_bug.cgi?id=9078

monarchdodra@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |monarchdodra@gmail.com

--- Comment #3 from monarchdodra@gmail.com ---
I just hit this again today. It's pretty bad, and it's not very clear either what is going on. Can we do anything to fix this.

In particular, I was writting a "functor" style object, but with an opCall that takes no arguments. The reduced example is:

struct A
{
    int opCall()
    {
    }
}

void main() {
    auto a = A(); // !!!
}

Using "A()" fails to compile.

In particular, once you've defined the opCall, it simply becomes *impossible* to declare an instance of your struct, unless you define a constructor, or use A.init.

That's all pretty bad.

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=9078

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P3

--