Krzysztof Kowalczyk created GROOVY-7995:
-------------------------------------------

             Summary: 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


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.3.4#6332)

Reply via email to