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 8f40ae2960703a91878c42f5fee1a7ccb1befc34
Author: Josh Tynjala <[email protected]>
AuthorDate: Mon Mar 16 13:55:47 2026 -0700

    MXMLClassReferenceNodeBase: an fx:DesignLayer may have children in MXML 
without [DefaultProperty] metadata
    
    Similar to MX containers allowing UI components as children without 
[DefaultProperty].
---
 .../tree/mxml/MXMLClassReferenceNodeBase.java         | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git 
a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLClassReferenceNodeBase.java
 
b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLClassReferenceNodeBase.java
index e452e09e2..e931018dd 100644
--- 
a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLClassReferenceNodeBase.java
+++ 
b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLClassReferenceNodeBase.java
@@ -47,6 +47,7 @@ import org.apache.royale.compiler.internal.tree.as.NodeBase;
 import org.apache.royale.compiler.mxml.IMXMLTagAttributeData;
 import org.apache.royale.compiler.mxml.IMXMLTagData;
 import org.apache.royale.compiler.mxml.IMXMLTextData;
+import org.apache.royale.compiler.mxml.IMXMLTypeConstants;
 import org.apache.royale.compiler.mxml.IMXMLUnitData;
 import org.apache.royale.compiler.parsing.MXMLTokenTypes;
 import org.apache.royale.compiler.problems.ICompilerProblem;
@@ -115,6 +116,12 @@ abstract class MXMLClassReferenceNodeBase extends 
MXMLNodeBase implements IMXMLC
      */
     private boolean isDeferredInstantiationUIComponent = false;
 
+    /**
+     * A flag that keeps track of whether the node represents a design layer
+     * (i.e., an mx.core.DesignLayer).
+     */
+    private boolean isDesignLayer = false;
+
     private String containerInterface;
     private String uiComponentInterface;
 
@@ -267,6 +274,11 @@ abstract class MXMLClassReferenceNodeBase extends 
MXMLNodeBase implements IMXMLC
         return isDeferredInstantiationUIComponent;
     }
 
+    private boolean isDesignLayer()
+    {
+        return isDesignLayer;
+    }
+
     /**
      * Sets the definition of the ActionScript class to which this node refers.
      */
@@ -293,6 +305,8 @@ abstract class MXMLClassReferenceNodeBase extends 
MXMLNodeBase implements IMXMLC
 
         uiComponentInterface = project.getUIComponentInterface();
 
+        isDesignLayer = 
classReference.isInstanceOf(IMXMLTypeConstants.DesignLayer, project);
+
         // Keep track of whether the class implements 
mx.core.IDeferredInstantiationUIComponent
         // because that affects code generation.
         String deferredInstantiationUIComponentInterface = 
project.getDeferredInstantiationUIComponentInterface();
@@ -492,7 +506,7 @@ abstract class MXMLClassReferenceNodeBase extends 
MXMLNodeBase implements IMXMLC
         else
         {
             IDefinition definition = 
builder.getFileScope().resolveTagToDefinition(childTag);
-            if (definition instanceof ClassDefinition)
+            if (definition instanceof IClassDefinition)
             {
                 // Handle child tags that are instance tags.
                 IClassDefinition classDefinition = (IClassDefinition) 
definition;
@@ -533,7 +547,8 @@ abstract class MXMLClassReferenceNodeBase extends 
MXMLNodeBase implements IMXMLC
                     }
                     else
                     {
-                        if (isContainer() && 
classDefinition.isInstanceOf(uiComponentInterface, builder.getProject()))
+                        if (isDesignLayer()
+                                || (isContainer() && 
classDefinition.isInstanceOf(uiComponentInterface, builder.getProject())))
                         {
                             // This tag is not part of the default property 
value.
                             processNonDefaultPropertyContentUnit(builder, 
info, tag);

Reply via email to