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

commit 6994db7c5fefe529aeb7e308d29eb61389250bf2
Author: Josh Tynjala <[email protected]>
AuthorDate: Mon Jan 12 13:44:25 2026 -0800

    ExpressionNodeBase: fix assertion error for getDependencyType() with 
IFunctionTypeExpressionNode
---
 .../royale/compiler/internal/tree/as/ExpressionNodeBase.java       | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git 
a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/ExpressionNodeBase.java
 
b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/ExpressionNodeBase.java
index 4567d4fcd..232b56105 100644
--- 
a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/ExpressionNodeBase.java
+++ 
b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/ExpressionNodeBase.java
@@ -32,6 +32,7 @@ import org.apache.royale.compiler.projects.ICompilerProject;
 import org.apache.royale.compiler.tree.ASTNodeID;
 import org.apache.royale.compiler.tree.as.IASNode;
 import org.apache.royale.compiler.tree.as.IExpressionNode;
+import org.apache.royale.compiler.tree.as.IFunctionTypeExpressionNode;
 import org.apache.royale.compiler.tree.as.IScopedNode;
 
 /**
@@ -485,6 +486,12 @@ public abstract class ExpressionNodeBase extends 
FixedChildrenNode implements IE
                 return DependencyType.SIGNATURE;
         }
 
+        IFunctionTypeExpressionNode funcTypeExprContainingReference = 
(IFunctionTypeExpressionNode) 
getAncestorOfType(IFunctionTypeExpressionNode.class);
+        if (funcTypeExprContainingReference != null)
+        {
+            return DependencyType.EXPRESSION;
+        }
+
         // Identifier nodes that are the type annotation of a definition
         // are signature dependencies unless they are inside of a FunctionNode.
         if (parent instanceof BaseTypedDefinitionNode && this == 
((BaseTypedDefinitionNode)parent).getTypeNode())

Reply via email to