You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jo...@apache.org on 2016/05/06 18:00:45 UTC

[3/4] git commit: [flex-falcon] [refs/heads/develop] - externc: fixed issue where typedefs were incorrectly emitted as static variables

externc: fixed issue where typedefs were incorrectly emitted as static variables


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/86de6a65
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/86de6a65
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/86de6a65

Branch: refs/heads/develop
Commit: 86de6a65773b5e1198c57b4fa0022ae5bc4bce3e
Parents: 84b7e80
Author: Josh Tynjala <jo...@gmail.com>
Authored: Fri May 6 10:56:32 2016 -0700
Committer: Josh Tynjala <jo...@gmail.com>
Committed: Fri May 6 10:56:32 2016 -0700

----------------------------------------------------------------------
 .../internal/codegen/externals/pass/AddMemberPass.java  | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/86de6a65/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/externals/pass/AddMemberPass.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/externals/pass/AddMemberPass.java b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/externals/pass/AddMemberPass.java
index 9308ff0..732b9e9 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/externals/pass/AddMemberPass.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/externals/pass/AddMemberPass.java
@@ -82,9 +82,15 @@ public class AddMemberPass extends AbstractCompilerPass
                 else if (first.isGetProp())
                 {
                     JSDocInfo jsDocInfo = first.getJSDocInfo();
-                    if (jsDocInfo != null
-                        && (jsDocInfo.getParameterCount() > 0
-                            || jsDocInfo.getReturnType() != null))
+                    if (jsDocInfo != null && jsDocInfo.hasTypedefType())
+                    {
+                        // this is a typedef, and not a member. it was
+                        // already handled during the collect types pass.
+                        continue;
+                    }
+                    else if(jsDocInfo != null 
+                            && (jsDocInfo.getParameterCount() > 0
+                                || jsDocInfo.getReturnType() != null))
                     {
                         // instance or static method that isn't declared as a
                         // function, but has @param or @returns