[jira] [Resolved] (GROOVY-7995) Short syntax of closure call invokes wrong closure if wrapped in another closure and @CompileStatic is applied

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[jira] [Resolved] (GROOVY-7995) Short syntax of closure call invokes wrong closure if wrapped in another closure and @CompileStatic is applied

JIRA jira@apache.org

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

John Wagenleitner resolved GROOVY-7995.
---------------------------------------
       Resolution: Fixed
         Assignee: John Wagenleitner
    Fix Version/s: 2.4.13

Thanks for reporting the issue.

> Short syntax of closure call invokes wrong closure if wrapped in another closure and @CompileStatic is applied
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-7995
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7995
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static compilation
>    Affects Versions: 2.4.7
>            Reporter: Krzysztof Kowalczyk
>            Assignee: John Wagenleitner
>             Fix For: 2.4.13
>
>
> The following would fail:
> {code}
> ‚Äčimport groovy.transform.CompileStatic
> @CompileStatic
> class Foo {
>      Closure c = { "ok" }
>      Closure wrap = {
>          c()
>      }
>      def run(){
>          wrap()
>      }
> }
> assert new Foo().run()‚Äč == "ok"  // stack overflow
> {code}
> It works fine without CompileStatic or if invokation is done by c.call()



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
Loading...