You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2020/11/24 03:33:20 UTC

[GitHub] [royale-asjs] greg-dove commented on issue #946: Compiler gets internal error on * in some contexts

greg-dove commented on issue #946:
URL: https://github.com/apache/royale-asjs/issues/946#issuecomment-732632280


   I can look into this in a couple of weeks as a compiler issue.
   
   For now, I am hoping we can find a workaround...
   Firstly (and this would be normal, regardless, with Royale because the XML support also relies quite a bit on the compiler 'knowing' that it is XML)
   Can you please check what the type (as the compiler could understand it) of evt.result is.
   
   If it is typed as Object or * (untyped), can you please try using an intermediate variable or in-place casting.
   
   e.g.
   var xml:XML = evt.result as XML;
   var resp : XMLList = XMLList( xml.*::response );
   
   or maybe
   var resp : XMLList = XMLList(XML(evt.result).*::response );
   
   This response e4x query is a 'multi-QName' lookup iirc, and I think I did something to get that working in the past for a client project, but I didn't see any unit tests that I added for that specifically, so I can't say for sure it will work, but hopefully it might (fingers crossed).
   
   Let me know how you get on....


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org