Thread overview
[Issue 14854] @disable this inconsistent between structs and classes
May 14, 2018
Nick Treleaven
Jul 08, 2018
Tiberiu Lepadatu
Jul 09, 2018
Jonathan M Davis
Mar 04, 2019
Dlang Bot
Mar 05, 2019
Dlang Bot
Mar 06, 2019
Dlang Bot
Dec 17, 2022
Iain Buclaw
Mar 30, 2023
Dlang Bot
Mar 31, 2023
RazvanN
May 14, 2018
https://issues.dlang.org/show_bug.cgi?id=14854

Nick Treleaven <nick@geany.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |trivial
                 CC|                            |nick@geany.org

--
July 08, 2018
https://issues.dlang.org/show_bug.cgi?id=14854

Tiberiu Lepadatu <tiberiulepadatu14@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tiberiulepadatu14@gmail.com

--- Comment #1 from Tiberiu Lepadatu <tiberiulepadatu14@gmail.com> ---
Hello!
So the solution that you suggest is to make the compiler give an error when the
@disabled is used?
If so, do you think that this will impact some code somewhere else?
I think that I will be able to write a fix for this.

--
July 09, 2018
https://issues.dlang.org/show_bug.cgi?id=14854

--- Comment #2 from Jonathan M Davis <issues.dlang@jmdavisProg.com> ---
My suggestion is to make it an error when @disable is used on a function with a body - just like happens right now when you do it with @disable this() {} on a struct. I can't think of any reason why this would be a problem. Certainly, I don't see why it would ever make sense to declare an @disabled function with a body. By definition, it's unreachable.

However, it will need to be done as a deprecation first in case anyone does have code that has @disable on a function with a body (like in the example here with a class).

--
March 04, 2019
https://issues.dlang.org/show_bug.cgi?id=14854

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

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

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
@tibi77 created dlang/dmd pull request #9413 "Fix Issue 14854 - @disable this inconsistent between structs and classes" fixing this issue:

- Fix Issue 14854 - @disable this inconsistent between structs and classes

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

--
March 05, 2019
https://issues.dlang.org/show_bug.cgi?id=14854

--- Comment #4 from Dlang Bot <dlang-bot@dlang.rocks> ---
@tibi77 created dlang/phobos pull request #6893 "Remove redundant body of @disable functions. Issue 14854 DMD" mentioning this issue:

- Remove redundant body of @disable functions. Issue 14854 DMD

https://github.com/dlang/phobos/pull/6893

--
March 06, 2019
https://issues.dlang.org/show_bug.cgi?id=14854

--- Comment #5 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/phobos pull request #6893 "Remove redundant body of @disable functions. Issue 14854 DMD" was merged into master:

- 336047098929c141f2fdd7b00c25d0aec3abedda by Lepadatu Tiberiu:
  Remove redundant body of @disable functions. Issue 14854 DMD

https://github.com/dlang/phobos/pull/6893

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=14854

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3

--
March 30, 2023
https://issues.dlang.org/show_bug.cgi?id=14854

--- Comment #6 from Dlang Bot <dlang-bot@dlang.rocks> ---
@Mai-Lapyst created dlang/dmd pull request #15052 "Fix issue 14854 - @disable this inconsistent between structs and classes" fixing this issue:

- Fix issue 14854 - @disable this inconsistent between structs and classes

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

--
March 31, 2023
https://issues.dlang.org/show_bug.cgi?id=14854

RazvanN <razvan.nitu1305@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |razvan.nitu1305@gmail.com
         Resolution|---                         |WONTFIX

--- Comment #7 from RazvanN <razvan.nitu1305@gmail.com> ---
Closing as per: https://github.com/dlang/dmd/pull/15052#pullrequestreview-1366507833

--