Forbid dynamic arrays in boolean evaluation contexts
Jonathan M Davis
jmdavisProg at gmx.com
Mon Mar 25 10:35:30 PDT 2013
On Monday, March 25, 2013 13:32:36 Jonathan M Davis wrote:
> However, the problem here is that cast(bool)arr returns whether
> arr.ptr is null rather than arr.length == 0, which is inconsistent with
> almost everything else that goes on with arrays, and so it's error-prone.
Actually, that should be that returns whether arr !s null rather than
arr.length != 0, but you get the idea.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list