flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [3/6] git commit: [flex-falcon] [refs/heads/develop] - handle not having XML and XMLList definitions (for native JS scenarios)
Date Fri, 16 Oct 2015 23:33:45 GMT
handle not having XML and XMLList definitions (for native JS scenarios)


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

Branch: refs/heads/develop
Commit: 0ce1a51442a1167f14d58d41605bc4b19a9f75e7
Parents: 19cde1d
Author: Alex Harui <aharui@apache.org>
Authored: Thu Oct 15 15:31:21 2015 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Thu Oct 15 15:31:21 2015 -0700

----------------------------------------------------------------------
 .../apache/flex/compiler/internal/tree/as/IdentifierNode.java  | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/0ce1a514/compiler/src/org/apache/flex/compiler/internal/tree/as/IdentifierNode.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/tree/as/IdentifierNode.java b/compiler/src/org/apache/flex/compiler/internal/tree/as/IdentifierNode.java
index 8250bdd..2b153fb 100644
--- a/compiler/src/org/apache/flex/compiler/internal/tree/as/IdentifierNode.java
+++ b/compiler/src/org/apache/flex/compiler/internal/tree/as/IdentifierNode.java
@@ -106,8 +106,10 @@ public class IdentifierNode extends ExpressionNodeBase implements IIdentifierNod
      */
     public static boolean isXMLish(IDefinition def, ICompilerProject project)
     {
-        return def == project.getBuiltinType(IASLanguageConstants.BuiltinType.XML) ||
-               def == project.getBuiltinType(IASLanguageConstants.BuiltinType.XMLLIST);
+        IDefinition xmlDef = project.getBuiltinType(IASLanguageConstants.BuiltinType.XML);
+        IDefinition xmlListDef = project.getBuiltinType(IASLanguageConstants.BuiltinType.XMLLIST);
+        return (xmlDef != null && def == xmlDef) ||
+               (xmlListDef != null && def == xmlListDef);
     }
 
     /**


Mime
View raw message