Harbs created FLEX-35345: ---------------------------- Summary: incorrect output for super call in getter Key: FLEX-35345 URL: https://issues.apache.org/jira/browse/FLEX-35345 Project: Apache Flex Issue Type: Bug Components: FalconJX Affects Versions: Apache FalconJX 0.8.0 Reporter: Harbs
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); }; -- This message was sent by Atlassian JIRA (v6.4.14#64029)