Hi,
Is there a way to specify the return type of a closure in groovy++?
http://gppconsole.appspot.com/script/17001
@Typed package test
def r = { "hello" }
def x = r() // type of x inferred from Closure return type
assert x.toUpperCase() == 'HELLO'
If I want to explicitly declare the return type of a closure, would it
be like this?
Closure<T> closure = { ... return T; }
What is the difference between Function0 and Closure?
How does groovy++ handle closures that can return different return
types?