You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cat > enh.d << CODE
struct Foo
{
deprecated("use foo() instead")
this();
}
CODE
dmd -c enh
----
Error: constructor enh.Foo.this default constructor for structs only allowed with @disable and no body
----
There is no mean to deprecate default construction of a struct before finally disabling it.
We should enhance the compiler so that the above declaration is valid and using `Foo foo;` would emit a deprecation warning.
The text was updated successfully, but these errors were encountered:
Martin Nowak (@MartinNowak) reported this on 2015-05-04T17:17:01Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=14545
Description
cat > enh.d << CODE struct Foo { deprecated("use foo() instead") this(); } CODE dmd -c enh ---- Error: constructor enh.Foo.this default constructor for structs only allowed with @disable and no body ---- There is no mean to deprecate default construction of a struct before finally disabling it. We should enhance the compiler so that the above declaration is valid and using `Foo foo;` would emit a deprecation warning.The text was updated successfully, but these errors were encountered: