Show
Ignore:
Timestamp:
11/25/08 06:08:11 (22 months ago)
Author:
Chuck.Esterbrook
Message:

Fixed: Cannot use for expressions on non-generic enumerables.
ticket:85

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • cobra/trunk/Tests/240-generics/100-use-generics-collections/610-for-expr-generic-list.cobra

    r1264 r1780  
    4747                words = for word in words where word <> 'asdf'   # assign for expr back to source variable 
    4848                assert words == ['aoeu'] 
     49 
     50                # okay sneak in a non-generic for expr 
     51                ie as System.Collections.IEnumerable = [1, 2, 3] 
     52                assert [2, 4, 6] == for i in ie get 2*(i to int) 
     53                assert [4, 6] == for i in ie where (i to int) > 1 get 2*(i to int)