http://d.puremagic.com/issues/show_bug.cgi?id=11305
Summary: Operations with array length cannot be used as a
condition
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: rejects-valid
Severity: minor
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Denis Shelomovskij <[email protected]> 2013-10-20
15:56:05 MSD ---
As a result of compiler rewrite we get this:
---
void main()
{
int[] arr;
if(++arr.length) { } // Error: assignment cannot be used as a condition,
perhaps == was meant?
}
---
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------