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 43d54ff70efb5ed1ac600836763be2bd7945a29c
Author: Josh Tynjala <[email protected]>
AuthorDate: Tue Sep 2 09:49:39 2025 -0700

    MXMLClassDefinitionNode: allow mx:Component as a child of the root when 
using MXML 2006 dialect (closes #241)
    
    MXML 2006 didn't have a fx:Declarations tag, which was added in MXML 2009
---
 .../royale/compiler/internal/tree/mxml/MXMLClassDefinitionNode.java  | 5 +++++
 1 file changed, 5 insertions(+)

diff --git 
a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLClassDefinitionNode.java
 
b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLClassDefinitionNode.java
index e4d16f973..990deb2e6 100644
--- 
a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLClassDefinitionNode.java
+++ 
b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLClassDefinitionNode.java
@@ -287,6 +287,11 @@ public class MXMLClassDefinitionNode extends 
MXMLClassReferenceNodeBase
             childNode = new MXMLBindingNode(this);
             this.setHasDataBindings(); // we must have some, if we made this 
node
         }
+        else if (fileScope.isComponentTag(childTag)
+                && 
builder.getMXMLDialect().isEqualToOrBefore(MXMLDialect.MXML_2006))
+        {
+            childNode = new MXMLComponentNode(this);
+        }
         else
         {
             super.processChildTag(builder, tag, childTag, info);

Reply via email to