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

--- Comment #5 from Jack Stouffer <j...@jackstouffer.com> ---
(In reply to Kenji Hara from comment #3)
> (In reply to Jack Stouffer from comment #2)
> > It could at least be made to work with string literals and manifest
> > constants, right?
> 
> I think it's not good to implement vulnerable behavior. It would just bloat
> compiler maintenance cost.

But this is already the behavior for everything but module declarations:

-----
struct A
{
    deprecated(""~"") int a;
}

void main()
{
    A s;
    s.a = 4;
}
-----

$ dmd -run test.d

Deprecation: variable test.A.a is deprecated -

> By the way, do you have a concrete situation you would like to use
> contatenation, manifest constant, or other compile time constructed message
> for module deprecation?

Yes, in Phobos we are trying to enforce Phobos style guides via dscanner, and
we need this in order to make every line in Phobos less than 120 characters.

--

Reply via email to