This is an automated email from the ASF dual-hosted git repository.
joshtynjala 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 a3dd80ca8 IdentifierNode: needs null check before calling
findProperty() in resolve() because getDependency() could return null for
import nodes
a3dd80ca8 is described below
commit a3dd80ca8bc0ed4a62e9abd2825f65ae242e1418
Author: Josh Tynjala <[email protected]>
AuthorDate: Wed Apr 26 15:21:50 2023 -0700
IdentifierNode: needs null check before calling findProperty() in resolve()
because getDependency() could return null for import nodes
Null values for DependencyType crash for DependencyGraph/DependencyTypeSet
---
.../org/apache/royale/compiler/internal/tree/as/IdentifierNode.java | 5 ++++-
1 file changed, 4 insertions(+), 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 3ba32a108..f96da286f 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
@@ -380,7 +380,10 @@ public class IdentifierNode extends ExpressionNodeBase
implements IIdentifierNod
if (qualifier == null)
{
DependencyType dt = getDependencyType();
- result = asScope.findProperty(project, name, dt, isTypeRef());
+ if (dt != null)
+ {
+ result = asScope.findProperty(project, name, dt,
isTypeRef());
+ }
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