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 72d51849a FunctionObjectNode: fix missing resolve() override that
should return the definition of the function node
72d51849a is described below
commit 72d51849a65bb63aa9fc2587425d8c05774ac73d
Author: Josh Tynjala <[email protected]>
AuthorDate: Wed Jun 18 14:35:42 2025 -0700
FunctionObjectNode: fix missing resolve() override that should return the
definition of the function node
This fixes an issue where FunctionCallNode calls resolve() and gets null
instead of the IFunctionDefinition so it doesn't find the return type.
---
.../royale/compiler/internal/tree/as/FunctionObjectNode.java | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git
a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/FunctionObjectNode.java
b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/FunctionObjectNode.java
index 634265b21..938d7acb4 100644
---
a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/FunctionObjectNode.java
+++
b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/FunctionObjectNode.java
@@ -23,6 +23,7 @@ import java.util.Collection;
import java.util.EnumSet;
import org.apache.royale.compiler.constants.IASLanguageConstants;
+import org.apache.royale.compiler.definitions.IDefinition;
import org.apache.royale.compiler.definitions.ITypeDefinition;
import org.apache.royale.compiler.internal.scopes.ASScope;
import org.apache.royale.compiler.internal.semantics.PostProcessStep;
@@ -111,6 +112,16 @@ public class FunctionObjectNode extends ExpressionNodeBase
implements IFunctionO
// ExpressionNodeBase overrides
//
+ @Override
+ public IDefinition resolve(ICompilerProject project)
+ {
+ if (functionNode != null)
+ {
+ return functionNode.getDefinition();
+ }
+ return null;
+ }
+
@Override
public ITypeDefinition resolveType(ICompilerProject project)
{