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

aharui 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 b0c159d  use classname or id for fxcomponent
b0c159d is described below

commit b0c159d1c1fbf35d2245e2c2723a9e94d6090dc9
Author: Alex Harui <aha...@apache.org>
AuthorDate: Fri Feb 2 12:29:26 2018 -0800

    use classname or id for fxcomponent
---
 .../compiler/internal/as/codegen/MXMLClassDirectiveProcessor.java   | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/MXMLClassDirectiveProcessor.java
 
b/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/MXMLClassDirectiveProcessor.java
index 700ec29..2be2699 100644
--- 
a/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/MXMLClassDirectiveProcessor.java
+++ 
b/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/MXMLClassDirectiveProcessor.java
@@ -4833,7 +4833,11 @@ public class MXMLClassDirectiveProcessor extends 
ClassDirectiveProcessor
             inDecl = true;
             context = context.parentContext;    // up-level to parent 
context's properties list
             context.startUsing(IL.PROPERTIES);
-            context.addInstruction(OP_pushstring, node.getID());
+            String id = node.getID();
+            if (id == null)
+               id = node.getClassName();
+            assert (id != null) : "id should never be null, as always added";
+               context.addInstruction(OP_pushstring, id);
         }
         // Resolve the outer document, and if it doesn't resolve to the 
contingent
         // definition, that means there is already an existing definition 
declared

-- 
To stop receiving notification emails like this one, please contact
aha...@apache.org.

Reply via email to