Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-35116

private setter not accessible from class using this

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Apache FalconJX 0.6.0
    • Apache FalconJX 0.8.0
    • FalconJX
    • None

    Description

      try this (see class A below)

      var a:A = new A();
      a.test()

      Expected result: No run time error

      Actual result:
      ReferenceError: Error #1074: Illegal write to read-only property hello on A.

      package
      {
      public class A
      {
      private var _hello:String;
      public function A()
      {
      }

      public function get hello():String

      { return _hello; }

      private function set hello(value:String):void

      { _hello = value; // do something }

      public function test():void

      { this.hello = "bye"; }

      }
      }


      BTW, changing test() to do hello = "bye" works fine.

      Attachments

        Activity

          People

            aharui Alex Harui
            yishayw Yishay Weiss
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: