if(arr) now a warning
Daniel Murphy via Digitalmars-d
digitalmars-d at puremagic.com
Fri Apr 10 00:45:12 PDT 2015
"H. S. Teoh via Digitalmars-d" wrote in message
news:mailman.1397.1428640119.3111.digitalmars-d at puremagic.com...
> Are you sure?
Pretty sure.
> My original failing code was:
>
> while (!lex.empty &&
> (op = T.matchOp(lex.front, OpType.infix)) &&
> op.precedence >= minprec)
> {
> ...
> }
>
> where op is a pointer type.
Maybe an 'assignment cannot be used as a condition' error? Nothing to do
with pointer types as boolean conditions.
eg if (x = call()) -> if ((x = call()) != null)
Do you have a complete example that gives the error you're talking about?
More information about the Digitalmars-d
mailing list