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

incorrect output for super call in getter

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

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

    Description

      COMPILE::JS
      public function get defaultPrevented():Boolean

      { return wrappedEvent ? wrappedEvent.defaultPrevented : super.isDefaultPrevented(); }

      COMPILE::JS
      override public function isDefaultPrevented():Boolean

      { return defaultPrevented; }

      compiles to:

      org.apache.flex.events.KeyboardEvent.prototype.get__defaultPrevented = function() {
      return this.wrappedEvent ? this.wrappedEvent.defaultPrevented : org.apache.flex.events.KeyboardEvent.superClass_.get__defaultPrevented.apply(this);
      };
      org.apache.flex.events.KeyboardEvent.prototype.isDefaultPrevented = function() {
      return this.defaultPrevented;
      };

      In case the problem was not obvious, the first function should have looked like this:
      return this.wrappedEvent ? this.wrappedEvent.defaultPrevented : org.apache.flex.events.KeyboardEvent.superClass_.isDefaultPrevented.apply(this);

      instead of using (the non-existent) get__defaultPrevented function.

      Reversing the functions to use super in the normal function behaves as I’d expect:
      COMPILE::JS
      public function get defaultPrevented():Boolean

      { return isDefaultPrevented(); }

      COMPILE::JS
      override public function isDefaultPrevented():Boolean

      { return wrappedEvent ? wrappedEvent.defaultPrevented : super.isDefaultPrevented(); }

      Compiles to:

      org.apache.flex.events.KeyboardEvent.prototype.get__defaultPrevented = function() {
      return this.isDefaultPrevented();
      };
      org.apache.flex.events.KeyboardEvent.prototype.isDefaultPrevented = function() {
      return this.wrappedEvent ? this.wrappedEvent.defaultPrevented : org.apache.flex.events.KeyboardEvent.superClass_.isDefaultPrevented.apply(this);
      };

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            harbs Harbs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment