Ary Borenszweig wrote:
>> int i;
>> assert(foo() > 3);
>> for(int j = foo(); j > 3; j--) i = j;
>> auto k = i; // Compiles at the moment...
>>
>> Would C# swallow that?
>
> Of course not:
>
> int foo() {
> return rand() % 10;
> }My mistake. For some reason I was assuming 'foo' was pure. int i; int j = foo(); assert(j > 3); for(; j > 3; j--) i = j; auto k = i; Would C# allow this? -- Michiel Helvensteijn
