Deprecating a module
Dicebot via Digitalmars-d
digitalmars-d at puremagic.com
Thu Apr 24 03:14:35 PDT 2014
On Thursday, 24 April 2014 at 06:13:31 UTC, Jon Giddy wrote:
> The file uses a static module constructor to display a run-time
> warning. Since the file simply imports the new module, there
> isn't anywhere to hang a deprecated attribute, to trigger a
> compile-time warning/error.
I don't know of a single way to do true deprecation (controllable
by -w* switches) but you can emulate it by placing module-global
static assert or pragma(msg).
We could make this work without changing the language by
respecting `deprecated static this() {}` in such module by the
way.
More information about the Digitalmars-d
mailing list