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

Can not set property from sub class

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-JSR-2
    • 1.0-JSR-5
    • None
    • None
    • WinXp

    Description

      When I assign a value to a property of the superclass in a subclass the assignment has no affect:

      class Class1 {
      @Property prop
      }

      class Class2 extends Class1 {
      void method()

      { prop = "hallo" // this does not work, null is printed // setProp("hallo") // this works }

      public static void main(String[] args)

      { def class2 = new Class2() class2.method() println(class2.prop) }

      }

      Attachments

        Issue Links

          Activity

            People

              blackdrag Jochen Theodorou
              tof Christof Vollrath
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: