[fpc-devel] Re: Testing for..in feature

Vincent Snijders vsnijders at vodafonevast.nl
Wed Nov 4 13:59:37 CET 2009


Marco van de Voort schreef:
> In our previous episode, Paul Ishenin said:
>>> Yet another bug:
>>>
>>> ---
> {$apptype console}
>>> type T = (a1, b1=5);
>>> var
>>>   ch: T;
>>> begin
>>>   for ch in T do Writeln(ch);
>>> end.
> 
> 
> CodeGear Delphi for Win32 compiler version 20.0
> Copyright (c) 1983,2008 CodeGear
> testx.dpr(6) Error: E2029 '(' expected but 'DO' found
> testx.dpr(7) Error: E2430 for-in statement cannot operate on collection type 'T'
> 
> Since I suspected that D2009 doesn't work on sparse enums, I tried, and the
> above is the result.

Does it work on not sparse enums?

Vincent



More information about the fpc-devel mailing list