Thread overview
[Issue 19256] std.json: JSONValue allows violating constness
Sep 21, 2018
FeepingCreature
Sep 21, 2018
FeepingCreature
Dec 16, 2018
Walter Bright
Dec 16, 2018
Walter Bright
Dec 16, 2018
FeepingCreature
May 17, 2019
Dlang Bot
Dec 17, 2022
Iain Buclaw
September 21, 2018
https://issues.dlang.org/show_bug.cgi?id=19256

FeepingCreature <default_357-line@yahoo.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|enhancement                 |normal

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

--- Comment #1 from FeepingCreature <default_357-line@yahoo.de> ---
See also bug 12885. https://issues.dlang.org/show_bug.cgi?id=12885

This bug is still relevant, as it happens in @safe code, not just @system - std.json violates @trusted by allowing bad things to happen.

--
December 16, 2018
https://issues.dlang.org/show_bug.cgi?id=19256

Walter Bright <bugzilla@digitalmars.com> changed:

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

--
December 16, 2018
https://issues.dlang.org/show_bug.cgi?id=19256

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com

--- Comment #2 from Walter Bright <bugzilla@digitalmars.com> ---
Is this a duplicate of 12885 then?

--
December 16, 2018
https://issues.dlang.org/show_bug.cgi?id=19256

--- Comment #3 from FeepingCreature <default_357-line@yahoo.de> ---
I'd call it a consequence or subset of 12885, in that fixing 12885 also fixes this.

But if 12885 was closed wontfix, this one would still need a separate fix.

--
May 17, 2019
https://issues.dlang.org/show_bug.cgi?id=19256

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

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

--- Comment #4 from Dlang Bot <dlang-bot@dlang.rocks> ---
@FeepingCreature updated dlang/phobos pull request #6716 "Fix issue 19256: prevent JSONValue const conversion" fixing this issue:

- std.json: Fix issue 19256, prevent auto JSONValue = const(JSONValue)
  Reorder JSONValue's union members to make dmd realize that JSONValue contains
const references and disallows reassigning const(JSONValue) to JSONValue, which
would break constness.
  This works around https://issues.dlang.org/show_bug.cgi?id=12885 .

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

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

Iain Buclaw <ibuclaw@gdcproject.org> changed:

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

--
October 27
https://issues.dlang.org/show_bug.cgi?id=19256

--- Comment #5 from FeepingCreature <default_357-line@yahoo.de> ---
Fixed by https://github.com/dlang/dmd/pull/16594 when `-preview=fixImmutableConv` is enabled.

--