[
https://issues.apache.org/jira/browse/GROOVY-7995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15655979#comment-15655979
]
ASF GitHub Bot commented on GROOVY-7995:
----------------------------------------
Github user blindpirate closed the pull request at:
https://github.com/apache/groovy/pull/460
> 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)