[ 
https://issues.apache.org/jira/browse/GROOVY-9229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Sun resolved GROOVY-9229.
--------------------------------
    Fix Version/s: 3.0.0-beta-4
         Assignee: Eric Milles
       Resolution: Fixed

Fixed by 
https://github.com/apache/groovy/commit/2572c62f06621330babf0f008c1a4021242f41ef

Thanks!

> Add @ClosureParams to closure input parameter of Sql.withInstance(...)
> ----------------------------------------------------------------------
>
>                 Key: GROOVY-9229
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9229
>             Project: Groovy
>          Issue Type: Improvement
>          Components: SQL processing
>    Affects Versions: 2.5.8
>            Reporter: Mauro Molinari
>            Assignee: Eric Milles
>            Priority: Minor
>             Fix For: 3.0.0-beta-4
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The various overloadings of {{Sql.withInstance}} do not specify the input 
> parameter type of the closure, which is {{groovy.sql.Sql}}. Hence, if you 
> want even minimal help from the IDE you won't get anything, unless you 
> declare the input type in your closure declaration:
> Example:
> {code:groovy}
> Sql.withInstance(url, user, pass) { sql ->
>   sql.connec| <= invoke code assist here
> }
> {code}
> The IDE does not give any help and, if the surrounding code is type checked, 
> you'll even get a compilation error.
> Required workaround:
> {code:groovy}
> Sql.withInstance(url, user, pass) { Sql sql ->
>   sql.connec| <= invoke code assist here
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to