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

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


The following commit(s) were added to refs/heads/develop by this push:
     new 67ab4ff  handle nodes that aren't properties of a type.  Fixes #71
67ab4ff is described below

commit 67ab4ffee5344776a745ecb86edab8961128cd1d
Author: Alex Harui <aha...@apache.org>
AuthorDate: Mon Jan 14 16:32:17 2019 -0800

    handle nodes that aren't properties of a type.  Fixes #71
---
 .../org/apache/royale/compiler/internal/tree/as/IdentifierNode.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/IdentifierNode.java
 
b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/IdentifierNode.java
index a218644..9f38cef 100644
--- 
a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/IdentifierNode.java
+++ 
b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/IdentifierNode.java
@@ -392,7 +392,7 @@ public class IdentifierNode extends ExpressionNodeBase 
implements IIdentifierNod
             if (qualifier == null)
             {
                 result = asScope.findProperty(project, name, 
getDependencyType(), isTypeRef());
-                if (result != null && name.equals("graphics") && 
((ITypeDefinition)(result.getParent())).isInstanceOf("mx.core.UIComponent", 
project))
+                if (result != null && name.equals("graphics") && 
(result.getParent() instanceof ITypeDefinition) && 
((ITypeDefinition)(result.getParent())).isInstanceOf("mx.core.UIComponent", 
project))
                        result = asScope.findProperty(project, 
"royalegraphics", getDependencyType(), isTypeRef());
                 // ASVariableTests_localVarSameNameAsPrivateMethod
                 if (isLegacyCodegen(project) && result != null && 
getParent().getNodeID() == ASTNodeID.FunctionCallID && result instanceof 
VariableDefinition)

Reply via email to