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 |