Details
Description
Boo should pick up a closure's missing parameter types from its context.
Declaration context:
closure as callable(int) as bool = { i | i > 3 }
Assignment context:
closure as callable(int) as bool
closure = { i | i > 3}
Event subscribe context:
event MyEvent as callable(int) as void
MyEvent += { i | print i }
Cast context:
closure = { i | i > 3 } as Predicate[of int]
Method invocation context:
list = List[of int]()
list.FindAll({ i | i > 3})
This functionality should be combined together with overload resolution and type inference for generic method invocations. This will make Boo's type inference capabilities on par with C# 3.0.
Issue Links
- depends upon
-
BOO-814
Type inference for generic method invocations
-
| 1. | Type inference for closures when passed as arguments to overloaded methods | |
|
Unassigned |
Activity
Avishay Lavie
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Assignee | Avishay Lavie [ avish ] |
Avishay Lavie
made changes -
| Status | Open [ 1 ] | In Progress [ 3 ] |
Avishay Lavie
made changes -
Avishay Lavie
made changes -
| Status | In Progress [ 3 ] | Resolved [ 5 ] |
| Fix Version/s | 0.9 [ 13816 ] | |
| Resolution | Fixed [ 1 ] |
Landed in revision 3117.