parser bug?
Charles Hixson via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Oct 23 11:15:14 PDT 2014
The code:
void go (ulong recNum)
{ assert (buf[0] == (fh.sizeof + recNo * buf.length) & 0x7f);
if (dirty)
yields the error message:
ells$ dmd test.d
test.d(78): Error: buf[0] == fh.sizeof + recNo * buf.length must be
parenthesized when next to operator &
And I'll swear it looks parenthesized to me.
void go (ulong recNum)
{ ubyte tst = (fh.sizeof + recNo * buf.length) & 0x7f;
assert (buf[0] == tst);
if (dirty)
compiles without error.
Any idea what's going on?
More information about the Digitalmars-d-learn
mailing list