https://issues.dlang.org/show_bug.cgi?id=16140
Issue ID: 16140 Summary: while(auto x = y) does not behave like if(auto x = y) Product: D Version: D2 Hardware: x86 OS: Mac OS X Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: meapineap...@gmail.com While loops ought to support the same syntax as conditionals for assigning the result of an expression to a value scoped to that loop. void main(){ if(auto value = 1){} // compiles while(auto value = 1){} // expression expected, not 'auto' } --