This is an automated email from the ASF dual-hosted git repository.

joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit 26ec68f2593fc495053fcec1e695212d32a56c55
Author: Josh Tynjala <[email protected]>
AuthorDate: Mon Feb 28 11:14:46 2022 -0800

    SuperCallEmitter: remove unnecessary space character from JS output
---
 .../royale/compiler/internal/codegen/js/jx/SuperCallEmitter.java      | 2 +-
 .../compiler/internal/codegen/js/royale/TestRoyaleExpressions.java    | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/SuperCallEmitter.java
 
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/SuperCallEmitter.java
index 3472752..98ad1c2 100644
--- 
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/SuperCallEmitter.java
+++ 
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/SuperCallEmitter.java
@@ -280,7 +280,7 @@ public class SuperCallEmitter extends JSSubEmitter
                if (usingApply)
                {
                 writeToken(ASEmitterTokens.COMMA);
-                writeToken(ASEmitterTokens.SQUARE_OPEN);
+                write(ASEmitterTokens.SQUARE_OPEN);
                }
 
             int len = anodes.length;
diff --git 
a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleExpressions.java
 
b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleExpressions.java
index 388c1ec..155d923 100644
--- 
a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleExpressions.java
+++ 
b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleExpressions.java
@@ -138,7 +138,7 @@ public class TestRoyaleExpressions extends 
TestGoogExpressions
     {
         IFunctionNode node = getMethod("function foo(){if (a) super.foo(a, b, 
c);}");
         asBlockWalker.visitFunction(node);
-        assertOut("RoyaleTest_A.prototype.foo = function() {\n  if (a)\n    
RoyaleTest_A.superClass_.foo.apply(this, [ a, b, c] );\n}");
+        assertOut("RoyaleTest_A.prototype.foo = function() {\n  if (a)\n    
RoyaleTest_A.superClass_.foo.apply(this, [a, b, c] );\n}");
     }
     
     @Test
@@ -147,7 +147,7 @@ public class TestRoyaleExpressions extends 
TestGoogExpressions
         IFunctionNode node = (IFunctionNode)getNode("import 
custom.TestProxy;import custom.custom_namespace;use namespace 
custom_namespace;public class RoyaleTest_A extends TestProxy { custom_namespace 
function foo(){if (a) super.setProperty(a, b);}}",
                                                IFunctionNode.class, 
WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n 
*/\nRoyaleTest_A.prototype.http_$$ns_apache_org$2017$custom$namespace__foo = 
function() {\n  if (a)\n    
RoyaleTest_A.superClass_.http_$$ns_apache_org$2017$custom$namespace__setProperty.apply(this,
 [ a, b] );\n}");
+        assertOut("/**\n 
*/\nRoyaleTest_A.prototype.http_$$ns_apache_org$2017$custom$namespace__foo = 
function() {\n  if (a)\n    
RoyaleTest_A.superClass_.http_$$ns_apache_org$2017$custom$namespace__setProperty.apply(this,
 [a, b] );\n}");
     }
 
     @Test

Reply via email to