[Issue 19256] std.json: JSONValue allows violating constness

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri May 17 05:14:44 UTC 2019


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

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

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

--- Comment #4 from Dlang Bot <dlang-bot at 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

--


More information about the Digitalmars-d-bugs mailing list