https://issues.dlang.org/show_bug.cgi?id=5153

Andrej Mitrovic <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected],
                   |                            |[email protected]

--- Comment #1 from Andrej Mitrovic <[email protected]> ---
It's not a wrong diagnostic, but maybe it can be improved somehow. The issue is
that after construction the compiler will attempt another construction. E.g.:

-----
struct Foo
{
    this(Foo* x_) { }
    this(int x_) { }
}

void main()
{
    // calls two ctors
    Foo f = new Foo(0);
}
-----

Maybe this can be considered dangerous behavior. I'll CC Kenji for thoughts.

--

Reply via email to