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

Martin Nowak <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|x86                         |All
                 OS|Mac OS X                    |All

--- Comment #2 from Martin Nowak <[email protected]> ---
According to Andrej it's supposed to be a warning only.
https://github.com/D-Programming-Language/dmd/pull/5185#issuecomment-168821489

But the changed code triggers an error due to a disabled constructor.

----
cat > bug.d << EOF
struct S {
    this(string r = ".") {
    }
}

void test() {
    S s;
}
EOF

dmd -c -w bug
----
bug.d(2): Warning: constructor bug.S.this default constructor for structs only
allowed with @disable, no body, and no parameters
bug.d(7): Error: variable bug.test.s default construction is disabled for type
S
----

--

Reply via email to