[Issue 19432] New: Cannot initialize ulong with decimal value above signed long range

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Nov 25 12:14:16 UTC 2018


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

          Issue ID: 19432
           Summary: Cannot initialize ulong with decimal value above
                    signed long range
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: johanengelen at weka.io

Initialization of an ulong with a decimal within range, but outside long range,
gives a "Error: signed integer overflow" compiler error.
Testcase:
```
enum a = 18446744073709551615; // 2^^64 - 1
ulong b = 18446744073709551615; // 2^^64 - 1
```

--


More information about the Digitalmars-d-bugs mailing list