Bug 22255 – JSONValue.opBinaryRight!"in" is const

Status
RESOLVED
Resolution
FIXED
Severity
trivial
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-08-30T10:40:54Z
Last change time
2021-08-30T11:33:14Z
Keywords
pull
Assigned to
No Owner
Creator
giacomo.ratto

Comments

Comment #0 by giacomo.ratto — 2021-08-30T10:40:54Z
The following code fails to compile: JSONValue j = [ "foo": "bar" ]; if (JSONValue* f = "foo" in j) // Error: cannot convert `const(JSONValue)*` to `JSONValue*` *f = "baz"; making the method inout would solve the problem: https://github.com/dlang/phobos/pull/8218
Comment #1 by dlang-bot — 2021-08-30T10:46:09Z
@giacomo618 updated dlang/phobos pull request #8218 "Make JSONValue.opBinaryRight!"in" inout " fixing this issue: - fix Issue 22255 - JSONValue.opBinaryRight!in is const https://github.com/dlang/phobos/pull/8218
Comment #2 by dlang-bot — 2021-08-30T11:33:14Z
dlang/phobos pull request #8218 "Make JSONValue.opBinaryRight!"in" inout " was merged into master: - f294f29e661376b262d79ac9b5828648a70bcbba by giacomo.ratto00: fix Issue 22255 - JSONValue.opBinaryRight!in is const https://github.com/dlang/phobos/pull/8218