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 9356c8a62ff42b0a068825b165b4f4c6196c74df
Author: Josh Tynjala <[email protected]>
AuthorDate: Tue Mar 31 12:03:25 2026 -0700

    MXMLDeferredInstanceNode: added missing dependency on 
mx.core.DeferredInstanceFromFunction that prevented it from being emitted in 
JavaScript
---
 RELEASE_NOTES.md                                                       | 1 +
 .../royale/compiler/internal/tree/mxml/MXMLDeferredInstanceNode.java   | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index c1b0d5a48..ad2c64bc2 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -71,6 +71,7 @@ Apache Royale Compiler 1.0.0
 - compiler: Added `${mainClass}` token to HTML template replacement.
 - compiler: Fixed resolution of `[InstanceType]` classes when they are in a 
package.
 - compiler: JS target doesn't call `start()` for MXML classes, similar to AS3 
classes.
+- compiler: Fixed `mx.core.DeferredInstanceFromFunction` not getting emitted 
when targeting JavaScript.
 - debugger: Added missing isolate ID to SWF load and unload events.
 - debugger: Fixed debugger targeting the current JDK version instead of the 
intended minimum JDK version.
 - debugger: Fixed localized messages appearing as unprocessed tokens.
diff --git 
a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLDeferredInstanceNode.java
 
b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLDeferredInstanceNode.java
index 14ecde0f5..e8b57e538 100644
--- 
a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLDeferredInstanceNode.java
+++ 
b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLDeferredInstanceNode.java
@@ -123,6 +123,9 @@ class MXMLDeferredInstanceNode extends MXMLInstanceNode 
implements IMXMLDeferred
 
         setClassReference(project, 
project.getDeferredInstanceFromFunctionClass());
 
+        // Add an expression dependency on that class.
+        
builder.addExpressionDependency(project.getDeferredInstanceFromFunctionClass());
+
         // Determine whether the the default property is being set to a single 
Array tag.
         boolean isSingleArrayTag = false;
         int n = contentUnits.size();

Reply via email to