You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Erik de Bruin (JIRA)" <ji...@apache.org> on 2013/11/13 19:43:21 UTC

[jira] [Comment Edited] (FLEX-33887) "super" not converted to goog.base call when used in customer setter

    [ https://issues.apache.org/jira/browse/FLEX-33887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13821617#comment-13821617 ] 

Erik de Bruin edited comment on FLEX-33887 at 11/13/13 6:42 PM:
----------------------------------------------------------------

The test 'testMethod_overrideSetterSuperCall' test this AS code:

{code}
public class B 
{
  public function B() {}; 

  override public function set foo(value:Object):void 
  {
    super.foo = value;
  };
}
{code}

And checks that it produces this JS code:

{code}
/**
 * @constructor
 */
org.apache.flex.B = function() {
};


/**
 * @expose
 * @param {Object} value
 * @override
 */
org.apache.flex.B.prototype.set_foo = function(value) {
  goog.base(this, 'set_foo', value);
};
{code}



was (Author: erik@ixsoftware.nl):
The test 'testMethod_overrideSetterSuperCall' test this AS code:

public class B 
{
  public function B() {}; 

  override public function set foo(value:Object):void 
  {
    super.foo = value;
  };
}

And checks that it produces this JS code:

/**
 * @constructor
 */
org.apache.flex.B = function() {
};


/**
 * @expose
 * @param {Object} value
 * @override
 */
org.apache.flex.B.prototype.set_foo = function(value) {
  goog.base(this, 'set_foo', value);
};


> "super" not converted to goog.base call when used in customer setter
> --------------------------------------------------------------------
>
>                 Key: FLEX-33887
>                 URL: https://issues.apache.org/jira/browse/FLEX-33887
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: FlexJS
>         Environment: Mac OS X
>            Reporter: Peter Ent
>            Assignee: Erik de Bruin
>              Labels: compiler
>
> I created a custom ActionScript class extending org.apache.flex.html.staticControls.supportClasses.DataItemRenderer.
> I added an override to the data setter function:
> override public function set data(value:Object):void
> {
>     super.data = value;
> ...
> }
> When this class was compiled into JavaScript, the super.data=value statement produced the following error:
> ListsTests/bin/js-debug/products/ProductItemRenderer.js:54: ERROR - Parse error. identifier is a reserved word
> 	super.set_data(value);



--
This message was sent by Atlassian JIRA
(v6.1#6144)