That's interesting.
What about the various cases, like no-arg closures?

On Wed, Feb 13, 2019 at 7:37 AM Paolo Di Tommaso <paolo.ditomm...@gmail.com>
wrote:

> Nice!
>
> On Wed, Feb 13, 2019 at 2:50 AM Daniel Sun <realblue...@hotmail.com>
> wrote:
>
>> Hi all
>>
>>        I've been developing a project with Groovy 3. When I try to specify
>> the generics type for closure, I have to use annotation..., which is quite
>> verbose... e.g.
>> ```
>> public <V> V withSql(@ClosureParams(value= SimpleType.class,
>> options="groovy.sql.Sql") Closure<V> closure)
>> ```
>>
>>        I propose make the above code groovier, e.g.
>> ```
>> public <V> V withSql(Closure<groovy.sql.Sql -> V> closure)
>> ```
>>
>>        Any thoughts?
>>
>>
>> Cheers,
>> Daniel.Sun
>>
>>
>>
>> --
>> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
>>
>

-- 
Guillaume Laforge
Apache Groovy committer
Developer Advocate @ Google Cloud Platform

Blog: http://glaforge.appspot.com/
Twitter: @glaforge <http://twitter.com/glaforge>

Reply via email to