flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erikdebr...@apache.org
Subject svn commit: r1430858 - in /flex/whiteboard/mschmalle/falconjx: compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/goog/TestGoogEmiter.java compiler.jx/src/org/apache/flex/compiler/internal/js/codegen/goog/JSGoogEmitter.java
Date Wed, 09 Jan 2013 13:48:46 GMT
Author: erikdebruin
Date: Wed Jan  9 13:48:45 2013
New Revision: 1430858

URL: http://svn.apache.org/viewvc?rev=1430858&view=rev
Log:
- fixed an issue where 'every' Method got an automatic 'goog.base' (super) call

Modified:
    flex/whiteboard/mschmalle/falconjx/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/goog/TestGoogEmiter.java
    flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/internal/js/codegen/goog/JSGoogEmitter.java

Modified: flex/whiteboard/mschmalle/falconjx/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/goog/TestGoogEmiter.java
URL: http://svn.apache.org/viewvc/flex/whiteboard/mschmalle/falconjx/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/goog/TestGoogEmiter.java?rev=1430858&r1=1430857&r2=1430858&view=diff
==============================================================================
--- flex/whiteboard/mschmalle/falconjx/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/goog/TestGoogEmiter.java
(original)
+++ flex/whiteboard/mschmalle/falconjx/compiler.jx.tests/src/org/apache/flex/compiler/internal/js/codegen/goog/TestGoogEmiter.java
Wed Jan  9 13:48:45 2013
@@ -54,7 +54,7 @@ public class TestGoogEmiter extends Test
                 + "return \"Don't \" + _privateVar + value; }";
         IFileNode node = getFileNode(code);
         visitor.visitFile(node);
-        assertOutDebug("goog.provide('com.example.components.MyTextButton');\n\ngoog.require('spark.components.Button');\n\n/**\n
* @constructor\n * @extends {spark.components.Button}\n */\ncom.example.components.MyTextButton
= function() {\n\tgoog.base(this);\n\tif (foo() != 42) {\n\t\tbar();\n\t}\n}\ngoog.inherits(com.example.components.MyTextButton,
spark.components.Button);\n\n/**\n * @private\n * @type {string}\n */\ncom.example.components.MyTextButton.prototype._privateVar
= \"do \";\n\n/**\n * @type {number}\n */\ncom.example.components.MyTextButton.prototype.publicProperty
= 100;\n\n/**\n * @param {string} value\n * @return {string}\n */\ncom.example.components.MyTextButton.prototype.myFunction
= function(value) {\n\tgoog.base(this);\n\treturn \"Don't \" + _privateVar + value;\n};\n\n");
+        assertOutDebug("goog.provide('com.example.components.MyTextButton');\n\ngoog.require('spark.components.Button');\n\n/**\n
* @constructor\n * @extends {spark.components.Button}\n */\ncom.example.components.MyTextButton
= function() {\n\tgoog.base(this);\n\tif (foo() != 42) {\n\t\tbar();\n\t}\n}\ngoog.inherits(com.example.components.MyTextButton,
spark.components.Button);\n\n/**\n * @private\n * @type {string}\n */\ncom.example.components.MyTextButton.prototype._privateVar
= \"do \";\n\n/**\n * @type {number}\n */\ncom.example.components.MyTextButton.prototype.publicProperty
= 100;\n\n/**\n * @param {string} value\n * @return {string}\n */\ncom.example.components.MyTextButton.prototype.myFunction
= function(value) {\n\treturn \"Don't \" + _privateVar + value;\n};\n\n");
     }
 
     @Test

Modified: flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/internal/js/codegen/goog/JSGoogEmitter.java
URL: http://svn.apache.org/viewvc/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/internal/js/codegen/goog/JSGoogEmitter.java?rev=1430858&r1=1430857&r2=1430858&view=diff
==============================================================================
--- flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/internal/js/codegen/goog/JSGoogEmitter.java
(original)
+++ flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/internal/js/codegen/goog/JSGoogEmitter.java
Wed Jan  9 13:48:45 2013
@@ -500,7 +500,7 @@ public class JSGoogEmitter extends JSEmi
         IClassNode cnode = (IClassNode) node.getAncestorOfType(IClassNode.class);
     	
         IExpressionNode bnode = cnode.getBaseClassExpressionNode();
-        if (bnode != null)
+        if (bnode != null && node.isConstructor())
         {
             if (!hasBody(node))
                 write("\t");



Mime
View raw message