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 2019/09/23 15:50:00 UTC

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

Eric Milles created GROOVY-9255:
-----------------------------------

             Summary: 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


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)