Is it intentional that a non-static opCall overrides the default constructor of a struct?

struct Foo
{
    int a;

    void opCall(string b) { }
}

void main()
{
    auto f = Foo(3); // line 14
    f("asd");
}

The above code gives the following error:

main.d(14): Error: function main.Foo.opCall (string b) is not callable using argument types (int)

--
/Jacob Carlborg

Reply via email to