groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Harvey <>
Subject Resolving Closures as functional interfaces
Date Thu, 17 Aug 2017 06:39:14 GMT
Java 8 gave some good concrete types for functional programming, but Groovy
does not interlope well with these new types. Consider the following

And the following code:

It would seem obvious that this should reference the handle(Function) method
- it takes an argument and returns a value. However, it uses the
handle(Runnable) method. More examples of a breakdown, in terms of the most
logical resolution:

I have a sneaking suspicion that something on the parrot branch will have
this fixed. If not, how would this be fixed? It's my understanding that
methods are picked at runtime, so maybe a change to metaclass? I would love
some direction on this.


View this message in context:
Sent from the Groovy Dev mailing list archive at

View raw message