Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-6697

Setting property in trait using "super" doesn't work

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.0-beta-2, 2.4.0-rc-1
    • Fix Version/s: 2.4.1
    • Component/s: groovy-runtime
    • Labels:
    • Environment:
      Ubuntu 13.10. JDK 1.7.0_51-b13

      Description

      trait A {
        String foo
        def yell() { foo.toUpperCase() + "!!" }
      }
      
      class C implements A {
        void setBar(String foo) {
          // This fails with "Caught: groovy.lang.MissingPropertyException: No such property: super for class: A"
          //A.super.foo = foo
         
          // This work
          A.super.setFoo(foo)
        }
      }
      

        Attachments

          Activity

            People

            • Assignee:
              melix C├ędric Champeau
              Reporter:
              will_lp will lp
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: