digitalmars.D.bugs - [Issue 19297] New: JSONValue of signed and unsigned equal values is
- d-bugmail puremagic.com (22/22) Oct 10 2018 https://issues.dlang.org/show_bug.cgi?id=19297
https://issues.dlang.org/show_bug.cgi?id=19297 Issue ID: 19297 Summary: JSONValue of signed and unsigned equal values is not equal Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: phobos Assignee: nobody puremagic.com Reporter: default_357-line yahoo.de Repro: assert(JSONValue([].length) == JSONValue(0)); JSONValue treats them as two different types because one is signed and one is unsigned. Which is of course nonsense and against spec. JSON doesn't even have unsigned types; strictly speaking you're supposed to just use doubles for ints, like JS does. But if there have to be integers in JSONValue, they should work with doubles, and they *certainly* should work with *themselves*. --
Oct 10 2018