[Issue 15089] Marks wrong line as where error occurs.
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Sep 20 11:20:54 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=15089
ag0aep6g at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
CC| |ag0aep6g at gmail.com
--- Comment #1 from ag0aep6g at gmail.com ---
Thanks for reporting. You reduced/edited the code a bit too much. It doesn't
actually show the problem anymore. But don't worry, I got you.
Here's reduced code that still shows the wrong error message:
----
enum Pieces {Rook} /* line 1 */
immutable int color = 0b10000000;
byte piece = Pieces.Rook ^ color;
----
test.d(1): Error: cannot implicitly convert expression (128) of type int to
byte
----
For reference, this originated at Stack Overflow:
http://stackoverflow.com/questions/32681660/compiler-thinks-enum-values-are-starting-at-129
--
More information about the Digitalmars-d-bugs
mailing list