Jump to page: 1 2
Thread overview
[Issue 17906] Deprecated Language features should be allowed without a deprecation in a deprecated scope
[Issue 17906] Deprecated functions should not cause deprecated warnings for using deprecated features
Mar 21, 2018
Mathias Lang
Mar 21, 2018
FeepingCreature
Mar 21, 2018
Mathias Lang
Mar 21, 2018
FeepingCreature
[Issue 17906] Use of delete should be allowed without a deprecation in a deprecated scope
Mar 21, 2018
Seb
Mar 21, 2018
Seb
Mar 22, 2018
Seb
Mar 22, 2018
Seb
Mar 22, 2018
Seb
Mar 25, 2018
Walter Bright
Nov 23, 2022
RazvanN
March 21, 2018
https://issues.dlang.org/show_bug.cgi?id=17906

Mathias Lang <mathias.lang@sociomantic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mathias.lang@sociomantic.co
                   |                            |m

--- Comment #1 from Mathias Lang <mathias.lang@sociomantic.com> ---
Yeah, put simply, the following code:
```
deprecated void main ()
{
    Object o = new Object;
    delete o;
}
```

should compile with `dmd -de test.d` (DMD v2.079)

Currently this is done for other deprecated symbols: deprecated functions can call other deprecated functions, use deprecated types, and a deprecated aggregate can have fields of deprecated types... So it should be done for language deprecations as well.

--
March 21, 2018
https://issues.dlang.org/show_bug.cgi?id=17906

--- Comment #2 from FeepingCreature <default_357-line@yahoo.de> ---
That's also true, but my example refers specifically to deprecated functions using deprecated types. However, I labelled the bug report wrong, and your example actually fits it better. :)

--
March 21, 2018
https://issues.dlang.org/show_bug.cgi?id=17906

--- Comment #3 from Mathias Lang <mathias.lang@sociomantic.com> ---
Could you paste the message generated ? In your example, I would expect a deprecation to be generated for the import, but not on the actual function declaration.

--
March 21, 2018
https://issues.dlang.org/show_bug.cgi?id=17906

--- Comment #4 from FeepingCreature <default_357-line@yahoo.de> ---
Huh, seems like you're right. Not sure if this was fixed or it always worked that way. Either way, good to know!

I guess this bug report is about Mathias Lang's problem now.

--
March 21, 2018
https://issues.dlang.org/show_bug.cgi?id=17906

Seb <greensunny12@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |greensunny12@gmail.com
            Summary|Deprecated functions should |Use of delete should be
                   |not cause deprecated        |allowed without a
                   |warnings for using          |deprecation in a deprecated
                   |deprecated features         |scope

--
March 21, 2018
https://issues.dlang.org/show_bug.cgi?id=17906

Seb <greensunny12@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #5 from Seb <greensunny12@gmail.com> ---
> I guess this bug report is about Mathias Lang's problem now.

PR https://github.com/dlang/dmd/pull/8066

(and changed the title accordingly)

--
March 22, 2018
https://issues.dlang.org/show_bug.cgi?id=17906

Seb <greensunny12@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Use of delete should be     |Deprecated Language
                   |allowed without a           |features should be allowed
                   |deprecation in a deprecated |without a deprecation in a
                   |scope                       |deprecated scope

--
March 22, 2018
https://issues.dlang.org/show_bug.cgi?id=17906

Seb <greensunny12@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |18647


Referenced Issues:

https://issues.dlang.org/show_bug.cgi?id=18647
[Issue 18647] Use of delete should be allowed without a deprecation in a
deprecated scope
--
March 22, 2018
https://issues.dlang.org/show_bug.cgi?id=17906

--- Comment #6 from Seb <greensunny12@gmail.com> ---
Copying Mathias's from GH (in case it gets lost)

The bug report was more general (before you changed the title).
I took delete as an example, because it's what hits me, but I'm pretty sure it
affects other deprecations.
For example:

---
deprecated void main ()
{
    int i, o;
    switch (i)
    {
    case 1:
        o = 1;
    case 2:
        o = 2;
        break;
    default:
    }
}
---

--
March 25, 2018
https://issues.dlang.org/show_bug.cgi?id=17906

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=18647

--
« First   ‹ Prev
1 2