October 20, 2013 [Issue 11305] New: Operations with array length cannot be used as a condition | ||||
---|---|---|---|---|
| ||||
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: nobody@puremagic.com ReportedBy: verylonglogin.reg@gmail.com --- Comment #0 from Denis Shelomovskij <verylonglogin.reg@gmail.com> 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: ------- |
Copyright © 1999-2021 by the D Language Foundation