You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Daniel Sun (Jira)" <ji...@apache.org> on 2020/08/09 00:48:00 UTC

[jira] [Resolved] (GROOVY-9255) trait property throws MissingPropertyException when read using qualified super expression

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

Daniel Sun resolved GROOVY-9255.
--------------------------------
    Fix Version/s: 3.0.6
                   4.0.0-alpha-1
       Resolution: Fixed

> trait property throws MissingPropertyException when read using qualified super expression
> -----------------------------------------------------------------------------------------
>
>                 Key: GROOVY-9255
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9255
>             Project: Groovy
>          Issue Type: Bug
>            Reporter: Eric Milles
>            Assignee: Eric Milles
>            Priority: Minor
>             Fix For: 4.0.0-alpha-1, 3.0.6
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Consider the following:
> {code:groovy}
> trait T {
>   String string = 'value'
> }
> class C implements T {
>   void meth() {
>     println T.super.string
>   }
> }
> new C().meth()
> {code}
> Executing this script results in "MissingProipertyException: No such property: super for class: T".  The property can be read using "string", "this.string", "getString()", "this.getString()" and "T.super.getString()".  And the property can be written using property notation, setter call, as well as "T.super.string = 'whatever'".
> {{org.codehaus.groovy.transform.trait.SuperCallTraitTransformer}} lacks a transformation for property read access.



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