You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2020/04/25 05:49:16 UTC

[royale-compiler] 04/04: try to fix differences in createjs and js where params without jsdoc had appended to the name and the n could be different

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

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

commit ce1c52bc38e70413a4befb8ff904c424055c8df3
Author: Alex Harui <ah...@apache.org>
AuthorDate: Fri Apr 24 22:48:50 2020 -0700

    try to fix differences in createjs and js where params without jsdoc had  appended to the name and the n could be different
---
 .../compiler/internal/codegen/typedefs/utils/FunctionUtils.java     | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/compiler-externc/src/main/java/org/apache/royale/compiler/internal/codegen/typedefs/utils/FunctionUtils.java b/compiler-externc/src/main/java/org/apache/royale/compiler/internal/codegen/typedefs/utils/FunctionUtils.java
index 50b884b..c2456dd 100644
--- a/compiler-externc/src/main/java/org/apache/royale/compiler/internal/codegen/typedefs/utils/FunctionUtils.java
+++ b/compiler-externc/src/main/java/org/apache/royale/compiler/internal/codegen/typedefs/utils/FunctionUtils.java
@@ -97,7 +97,11 @@ public class FunctionUtils
                 {
                     for (Node param : paramNode.children())
                     {
-                        sb.append(param.getString());
+                    	String name = param.getString();
+                    	int c = name.indexOf("$jscomp$");
+                    	if (c != -1)
+                    		name = name.substring(0, c);
+                        sb.append(name);
                         if (!outputJS)
                         	sb.append(":Object");
                         if (index < len - 1)