Thread overview
[Issue 17148] implicit conversion to void[] breaks type system
[Issue 17148] implicit conversion to void[] violates type system
Feb 05, 2017
anonymous4
Feb 05, 2017
anonymous4
Mar 24, 2022
Dennis
Dec 17, 2022
Iain Buclaw
Jun 14
Dlang Bot
[Issue 17148] Copying from const(void)[] to void[] breaks immutable
Jun 17
Dlang Bot
February 05, 2017
https://issues.dlang.org/show_bug.cgi?id=17148

anonymous4 <dfj1esp02@sneakemail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=2095,
                   |                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=12560

--
February 05, 2017
https://issues.dlang.org/show_bug.cgi?id=17148

anonymous4 <dfj1esp02@sneakemail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|implicit conversion to      |implicit conversion to
                   |void[] violates type system |void[] breaks type system

--
March 24, 2022
https://issues.dlang.org/show_bug.cgi?id=17148

Dennis <dkorpel@live.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dkorpel@live.nl

--- Comment #1 from Dennis <dkorpel@live.nl> ---
If you mark `f` `@safe` it results in an error:

Error: cannot copy `void[]` to `void[]` in `@safe` code

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

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P2

--
June 14
https://issues.dlang.org/show_bug.cgi?id=17148

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

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

--- Comment #2 from Dlang Bot <dlang-bot@dlang.rocks> ---
@ntrel created dlang/dmd pull request #16583 "Fix Bugzilla 17148 - Copying from const(void)[] to void[] breaks immu…" fixing this issue:

- Fix Bugzilla 17148 - Copying from const(void)[] to void[] breaks immutable

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

--
June 14
https://issues.dlang.org/show_bug.cgi?id=17148

Nick Treleaven <nick@geany.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nick@geany.org
            Summary|implicit conversion to      |Copying from const(void)[]
                   |void[] breaks type system   |to void[] breaks immutable

--
June 14
https://issues.dlang.org/show_bug.cgi?id=17148

--- Comment #3 from Nick Treleaven <nick@geany.org> ---
> Probably void[] shouldn't be writable

Assuming only slice assignment can write to it, I think we can just disallow copying from const(void)[]. That's what the pull does.

--
June 17
https://issues.dlang.org/show_bug.cgi?id=17148

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

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

--- Comment #4 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #16583 "Fix Bugzilla 17148 - Copying from const(void)[] to void[] breaks immu…" was merged into master:

- e93d798c2bccffed4c66bd797e10e32cdab22d82 by Nick Treleaven:
  Fix Bugzilla 17148 - Copying from const(void)[] to void[] breaks immutable

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

--