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 2020/08/06 18:56:00 UTC

[jira] [Assigned] (GROOVY-9256) trait qualified-super expressions fail when inside closure

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

Eric Milles reassigned GROOVY-9256:
-----------------------------------

    Assignee: Eric Milles

> trait qualified-super expressions fail when inside closure
> ----------------------------------------------------------
>
>                 Key: GROOVY-9256
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9256
>             Project: Groovy
>          Issue Type: Bug
>            Reporter: Eric Milles
>            Assignee: Eric Milles
>            Priority: Minor
>
> Consider the following:
> {code:groovy}
> trait T {
>   String string = 'value'
> }
> class C implements T {
>   void meth() {
>     { ->
>       T.super.setString('other')
>       println T.super.getString()
>     }()
>   }
> }
> new C().meth()​
> {code}
> The addition of a closure within the method causes a breakdown of the qualified-super method or property access.  "MissingPropertyException: No such property: super for class: T"



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