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

harbs pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 9d80aed11874165ab11096c2e2168df413f9260a
Author: Harbs <[email protected]>
AuthorDate: Mon Jul 6 00:38:46 2020 +0300

    Removed XML coercions
---
 frameworks/projects/XML/src/main/royale/XML.as     | 9 +++++++--
 frameworks/projects/XML/src/main/royale/XMLList.as | 8 ++++++--
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/frameworks/projects/XML/src/main/royale/XML.as 
b/frameworks/projects/XML/src/main/royale/XML.as
index 5acf21e..2dd7cf5 100644
--- a/frameworks/projects/XML/src/main/royale/XML.as
+++ b/frameworks/projects/XML/src/main/royale/XML.as
@@ -584,11 +584,12 @@ package
                                        _value = '';
                                }
                        }
+                       initializeClass();
                        if(!_class_initialized)
                        {
                                Object.defineProperty(XML.prototype,"0",
                                                {
-                                                       "get": 
function():XML{return this as XML},
+                                                       "get": 
function():*{return this},
                                                        "set": 
function():void{},
                                                        enumerable: true,
                                                        configurable: true
@@ -597,6 +598,10 @@ package
                                _class_initialized = true;
                        }
                }
+               private static function initializeClass():void
+               {
+                       
+               }
 
                private static var _class_initialized:Boolean = false;
                
@@ -2047,7 +2052,7 @@ package
                 * @param name
                 * @return
                 *
-                * royaleignorecoercion XML
+                * @royaleignorecoercion XML
                 */
                public function processingInstructions(name:String = 
"*"):XMLList
                {
diff --git a/frameworks/projects/XML/src/main/royale/XMLList.as 
b/frameworks/projects/XML/src/main/royale/XMLList.as
index ea88105..ba21f25 100644
--- a/frameworks/projects/XML/src/main/royale/XMLList.as
+++ b/frameworks/projects/XML/src/main/royale/XMLList.as
@@ -954,6 +954,9 @@ package
                {
                        return _targetProperty;
                }
+               /**
+                * @royaleignorecoercion QName
+                */
                private function xmlFromProperty(r:XML):XML
                {
                        if (_targetProperty == null || _targetProperty == '*' 
||  (_targetProperty is QName && QName(_targetProperty).localName == '*')) {
@@ -963,7 +966,7 @@ package
                        var str:String = _targetProperty as String;
                        ret = new XML();
                        ret.setParent(r);
-                       if (str && str.charAt(0)=='@' ||  (_targetProperty is 
QName && QName(_targetProperty).isAttribute)) {
+                       if (str && str.charAt(0)=='@' ||  (_targetProperty is 
QName && (_targetProperty as QName).isAttribute)) {
                                if (r.child(_targetProperty).length()) return 
null; //2.c.iv,2
                                ret.setName(_targetProperty);
                                // not needed, derived from the QName 
ret.setNodeKind('attribute');
@@ -1049,9 +1052,10 @@ package
                }
 
                /**
+                * [[Put]] from the e4X spec
                 *
+                * @royaleignorecoercion XML
                 * @royaleignorecoercion XMLList
-                * [[Put]] from the e4X spec
                 */
                public function setChild(elementName:*, elements:Object):Object
                {

Reply via email to