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-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 45b49b3  Reflection: getQualifiedSuperclassName() can also find the 
superclass of a Class object, not just an instance of that class
45b49b3 is described below

commit 45b49b38d26301889ce82280e9277a2ec9413150
Author: Josh Tynjala <[email protected]>
AuthorDate: Wed Sep 8 15:30:36 2021 -0700

    Reflection: getQualifiedSuperclassName() can also find the superclass of a 
Class object, not just an instance of that class
    
    That's how getQualifiedSuperclassName() works in SWF, so JS should work the 
same, as documented.
---
 .../royale/org/apache/royale/reflection/getQualifiedSuperclassName.as   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/getQualifiedSuperclassName.as
 
b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/getQualifiedSuperclassName.as
index 8b33fc0..447674c 100755
--- 
a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/getQualifiedSuperclassName.as
+++ 
b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/getQualifiedSuperclassName.as
@@ -39,7 +39,7 @@ COMPILE::SWF
         }
         COMPILE::JS
         {
-            var constructorAsObject:Object = value["constructor"];
+            var constructorAsObject:Object = (value is Class) ? value : 
value["constructor"];
             value = constructorAsObject.superClass_;
             if (value == null || value.ROYALE_CLASS_INFO == null)
                 return null;

Reply via email to