Thread overview
[Issue 20033] alias this does not support `deprecated` attribute
[Issue 20033] Deprecation not triggered with foreach + alias this
Jul 07
Dlang Bot
Jul 10
Dlang Bot
Aug 03
Dlang Bot
Aug 05
Dlang Bot
July 07
https://issues.dlang.org/show_bug.cgi?id=20033

--- Comment #2 from Dlang Bot <dlang-bot@dlang.rocks> ---
@Geod24 created vibe-d/vibe.d pull request #2334 "Collection of code cleanup" mentioning this issue:

- Do not use deprecated alias this in Vibe.d code

  The `alias byKeyValue this` has been deprecated since v0.8.1 (released
2017-08-30).
  However, thanks to issue 20033 the deprecation never triggered for user code.
  This fixes Vibe.d code not to use the deprecated code.
  However, removing the symbol is likely to break user code as the compiler
does
  not show any deprecation message at the moment.

https://github.com/vibe-d/vibe.d/pull/2334

--
July 08
https://issues.dlang.org/show_bug.cgi?id=20033

Mathias LANG <pro.mathias.lang@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Deprecation not triggered   |alias this does not support
                   |with foreach + alias this   |`deprecated` attribute

--- Comment #3 from Mathias LANG <pro.mathias.lang@gmail.com> ---
Actually, after looking at the code, it simply does not support `deprecated`.

E.g. adding the following line to `main` does not trigger any deprecation:
```
    auto i = Test.init.front();
```

--
July 10
https://issues.dlang.org/show_bug.cgi?id=20033

--- Comment #4 from Dlang Bot <dlang-bot@dlang.rocks> ---
vibe-d/vibe.d pull request #2334 "Collection of code cleanup" was merged into master:

- d909845cf5e4131671090bad5f53eacfdfc17978 by Geod24:
  Do not use deprecated alias this in Vibe.d code

  The `alias byKeyValue this` has been deprecated since v0.8.1 (released
2017-08-30).
  However, thanks to issue 20033 the deprecation never triggered for user code.
  This fixes Vibe.d code not to use the deprecated code.
  However, removing the symbol is likely to break user code as the compiler
does
  not show any deprecation message at the moment.

https://github.com/vibe-d/vibe.d/pull/2334

--
August 03
https://issues.dlang.org/show_bug.cgi?id=20033

Dlang Bot <dlang-bot@dlang.rocks> changed:

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

--- Comment #5 from Dlang Bot <dlang-bot@dlang.rocks> ---
@Geod24 created dlang/dmd pull request #10267 " Fix issue 20033 - Deprecation do not trigger on `alias this`" fixing this issue:

- Fix issue 20033 - Deprecation do not trigger on `alias this`

  Before this change, `deprecated` on `alias this` was accepted by the parser
  but silently ignored in semantic - as `Dsymbol` is never `deprecated`,
  it is done through `Declaration` and derivatives
  (`Dsymbol` does not have `storage_class`).

  This fixes `alias this` to correctly trigger a deprecation message on usage.

https://github.com/dlang/dmd/pull/10267

--
August 05
https://issues.dlang.org/show_bug.cgi?id=20033

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #10267 " Fix issue 20033 - Deprecation do not trigger on `alias this`" was merged into master:

- c4f9506ab766bf4f3a747b45e7e646b64be96de6 by Geod24:
  Fix issue 20033 - Deprecation do not trigger on `alias this`

  Before this change, `deprecated` on `alias this` was accepted by the parser
  but silently ignored in semantic - as `Dsymbol` is never `deprecated`,
  it is done through `Declaration` and derivatives
  (`Dsymbol` does not have `storage_class`).

  This fixes `alias this` to correctly trigger a deprecation message on usage.

https://github.com/dlang/dmd/pull/10267

--