Bug in ^^
Brett at gmail.com
Tue Sep 17 16:50:25 UTC 2019
On Tuesday, 17 September 2019 at 13:59:54 UTC, jmh530 wrote:
> On Tuesday, 17 September 2019 at 13:48:02 UTC, Brett wrote:
>> Um, duh, but the problem why are they ints?
> They are ints because that is how enums work in the D language.
> See 17.3 .
>  https://dlang.org/spec/enum.html#named_enums
Then why does
>> enum x = 100000000000000000;
>> enum y = 10^^17;
x store 10000000000000000?
If it were an int then it would wrap, it doesn't.
Did you try the code?
enum x = 100000000000000000;
enum y = 10^^17;
ulong xx = x;
ulong yy = y;
You seem to either make stuff up, misunderstand the compiler, or
trust the docs to much. I have code that proves I'm right, why is
it so hard for you to accept it?
You can make your claims, but it is meaningless if they are not
More information about the Digitalmars-d