This is an automated email from the ASF dual-hosted git repository.

gregdove 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 54c322b  Fixes #197. Similar to #196
54c322b is described below

commit 54c322b5be5203756b201875747dc93a9eef8e24
Author: greg-dove <[email protected]>
AuthorDate: Thu Nov 18 22:05:22 2021 +1300

    Fixes #197. Similar to #196
---
 .../compiler/internal/codegen/mxml/royale/MXMLRoyaleEmitter.java    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleEmitter.java
 
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleEmitter.java
index 7744ebc..ff78da9 100644
--- 
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleEmitter.java
+++ 
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleEmitter.java
@@ -3113,7 +3113,8 @@ public class MXMLRoyaleEmitter extends MXMLEmitter 
implements
        if (!makingSimpleArray)
        {
             MXMLDescriptorSpecifier ps = getCurrentDescriptor("ps");
-            if (ps.hasObject || ps.parent == null) //('ps.parent == null' was 
added to allow a top level fx:Object definition, they were not being output 
without that)
+                       //GD - hasArray below allows a dataProvider with 
<fx:Object's>
+            if (ps.hasObject || ps.hasArray || ps.parent == null) 
//('ps.parent == null' was added to allow a top level fx:Object definition, 
they were not being output without that)
             {
                emitInstance(node);
                return;
@@ -3156,7 +3157,8 @@ public class MXMLRoyaleEmitter extends MXMLEmitter 
implements
         {
             final IASNode child = node.getChild(i);
             ASTNodeID nodeID = child.getNodeID();
-            if (nodeID == ASTNodeID.MXMLArrayID || nodeID == 
ASTNodeID.MXMLInstanceID || nodeID == ASTNodeID.MXMLStateID)
+                       //a single <fx:Object> inside an array also makes it 
non-simple (@todo test mixed simple and non-simple)
+            if (nodeID == ASTNodeID.MXMLArrayID || nodeID == 
ASTNodeID.MXMLInstanceID || nodeID == ASTNodeID.MXMLObjectID || nodeID == 
ASTNodeID.MXMLStateID)
             {
                 isSimple = false;
                 break;

Reply via email to