flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [43/50] git commit: [flex-falcon] [refs/heads/dual] - i guess some identifers are not functions
Date Thu, 13 Apr 2017 17:44:14 GMT
i guess some identifers are not functions


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

Branch: refs/heads/dual
Commit: f0315f6fa3985d51d15ffbe540ae37f173b43d1c
Parents: a8f7a5c
Author: Alex Harui <aharui@apache.org>
Authored: Fri Mar 31 07:30:55 2017 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Fri Mar 31 07:30:55 2017 -0700

----------------------------------------------------------------------
 .../compiler/internal/codegen/js/jx/FieldEmitter.java | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/f0315f6f/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/FieldEmitter.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/FieldEmitter.java
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/FieldEmitter.java
index 07d23a3..ef62ad2 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/FieldEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/FieldEmitter.java
@@ -120,12 +120,16 @@ public class FieldEmitter extends JSSubEmitter implements
             	{
             		// assume this is a call to static method in the class
             		// otherwise it would be a memberaccessexpression?
-            		FunctionDefinition fd = (FunctionDefinition)fcn.getNameNode().resolve(getProject());
-            		IASNode m = fd.getNode();
-            		if (m != null)
+            		IDefinition d = (IDefinition)fcn.getNameNode().resolve(getProject());
+            		if (d instanceof FunctionDefinition)
             		{
-	            		// re-emit it to collect static initializer class references in usedNames
-	            		getEmitter().stringifyNode(m);
+            			FunctionDefinition fd = (FunctionDefinition)d;
+                		IASNode m = fd.getNode();
+                		if (m != null)
+                		{
+    	            		// re-emit it to collect static initializer class references in usedNames
+    	            		getEmitter().stringifyNode(m);
+                		}
             		}
             	}
             }


Mime
View raw message