You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Pascal Schumacher (JIRA)" <ji...@apache.org> on 2016/02/22 21:56:18 UTC
[jira] [Updated] (GROOVY-7595) .@ continues to call setter inside
closure
[ https://issues.apache.org/jira/browse/GROOVY-7595?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pascal Schumacher updated GROOVY-7595:
--------------------------------------
Fix Version/s: (was: 2.3.9)
> .@ continues to call setter inside closure
> ------------------------------------------
>
> Key: GROOVY-7595
> URL: https://issues.apache.org/jira/browse/GROOVY-7595
> Project: Groovy
> Issue Type: Bug
> Components: groovy-runtime
> Affects Versions: 2.4.4, 2.4.5
> Environment: @CompileStatic
> Reporter: Timothy Overly
>
> I have a closure that wraps updates to an object:
> {code:java}
> setFoo(Foo foo){
> doUpdate {
> this.@foo = foo
> }
> }
> {code}
> This causes a stack overflow because it keeps recursively calling setFoo.
> I have tried:
> 1. making foo private/public
> 2. owner.@foo
> 3. delegate.@foo
> Notes:
> 1. This does not cause this overflow in 2.3.x
> 2. The setFoo is part of an interface
> 3. Class is @CompileStatic
> 4. It being in a closure may/may not affect it
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)