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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3.0-beta-2, 2.4.0-rc-1
    • 2.4.1
    • groovy-runtime
    • 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

            melix Cédric Champeau
            will_lp will lp
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: