-
-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
std.json: JSONValue allows violating constness #10350
Labels
Comments
default_357-line (@FeepingCreature) commented on 2018-09-21T09:03:49ZSee 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. |
bugzilla (@WalterBright) commented on 2018-12-16T10:33:14ZIs this a duplicate of 12885 then? |
default_357-line (@FeepingCreature) commented on 2018-12-16T13:36:22ZI'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. |
dlang-bot commented on 2019-05-17T05:14:44Z@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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
default_357-line (@FeepingCreature) reported this on 2018-09-21T08:50:32Z
Transfered from https://issues.dlang.org/show_bug.cgi?id=19256
CC List
Description
The text was updated successfully, but these errors were encountered: