Bug 14545 – can't deprecate default construction

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-05-04T17:17:01Z
Last change time
2024-12-13T18:42:42Z
Assigned to
No Owner
Creator
Martin Nowak
Moved to GitHub: dmd#18986 →

Comments

Comment #0 by code — 2015-05-04T17:17:01Z
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.
Comment #1 by robert.schadek — 2024-12-13T18:42:42Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18986 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB