Issue Details (XML | Word | Printable)

Key: BOO-994
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Avishay Lavie
Reporter: Cedric Vivier
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Boo

Generic extension methods

Created: 10/Apr/08 05:01 AM   Updated: 22/Jan/09 09:22 AM   Resolved: 10/Nov/08 02:39 PM
Component/s: None
Affects Version/s: 0.8.1, 0.9
Fix Version/s: 0.9

Time Tracking:
Not Specified

Issue Links:
dependent
 

Testcase included: yes


 Description  « Hide

Support generic extension methods (such as the ones in System.Linq.Enumerable)

Currently it doesn't get resolved :

cedric@laptop:~/dev/workspace/boo/boo$ cat tests/testcases/regression/BOO-994-1.boo 
"""
2
4
"""
import System.Collections.Generic
import System.Linq from System.Core

l = List[of int]()
l.Add(1)
l.Add(2)
doublel = l.Select[of int, int]({i as int|return i*2})

for n in doublel:
        print n

cedric@laptop:~/dev/workspace/boo/boo$ booc tests/testcases/regression/BOO-994-1.boo 
Boo Compiler version 0.8.1.2896 (CLR v2.0.50727.42)
tests/testcases/regression/BOO-994-1.boo(12,13): BCE0019: 'Select' is not a member of 'System.Collections.Generic.List`1[[System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]'. 
1 error(s).


Miika Makinen added a comment - 10/Nov/08 12:23 AM

Would really much like to see this fixed... map/reduce is neat.


Avishay Lavie added a comment - 10/Nov/08 09:39 AM

'Tis underway. Soon, my child. Soon.


Avishay Lavie added a comment - 10/Nov/08 02:39 PM

Landed in revision 3072.