Ticket #331 (assigned enhancement)
Bind to C# extension methods
Reported by: | Charles | Owned by: | hopscc |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Cobra Compiler | Version: | 0.9.4 |
Keywords: | extension methods | Cc: |
Description
Cobra has its own extension methods feature supported back in .NET 2.0. C# added these for .NET 3.0 (or 3.5, I forget) and uses a different declaration technique.
Cobra should be enhanced to bind method calls to C# extension methods. There are numerous .NET libraries that use these.
I don't think any of the other tickets about extension methods cover this.
Here is a test case:
@ref 'System.Core' use System.Linq class P def main list = [1, 2, 3, 4, 5, 6] assert list.elementAt(3) == 4 assert list.select(do(x) = x * 2) == [2, 4, 6, 8, 10, 12] assert list.sum == 21
Change History
Note: See
TracTickets for help on using
tickets.