You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2021/05/10 15:42:00 UTC

[jira] [Assigned] (GROOVY-2686) Can't call a Closure in a Closure's Delegete

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

Eric Milles reassigned GROOVY-2686:
-----------------------------------

    Assignee: Eric Milles

> Can't call a Closure in a Closure's Delegete
> --------------------------------------------
>
>                 Key: GROOVY-2686
>                 URL: https://issues.apache.org/jira/browse/GROOVY-2686
>             Project: Groovy
>          Issue Type: Sub-task
>          Components: groovy-runtime
>    Affects Versions: 1.5.4
>            Reporter: John Wilson
>            Assignee: Eric Milles
>            Priority: Major
>
> def c = {foo()}
> c.delegate = [foo: {println "bar"}]
> c()
> Gives a MissingMethodException when trying to call foo() in the closure



--
This message was sent by Atlassian Jira
(v8.3.4#803005)