joshtynjala commented on issue #100: Literal string to identify package public 
namespace
URL: https://github.com/apache/royale-compiler/issues/100#issuecomment-560481906
 
 
   I tried compiling the following code with the Apache Flex SDK 4.16.1 and AIR 
SDK 32.0.0.89, and they don't behave the same. The Flex SDK compiles 
successfully, but ASC 2.0 reports an error.
   
   ```actionscript
   package
   {
        import flash.display.MovieClip;
   
        public class FlashPackageAsNamespace extends MovieClip
        {
                public function FlashPackageAsNamespace()
                {
                        namespace dispns = 'flash.display'
                        new dispns::Sprite
                }
        }
   }
   ```
   
   Error reported by ASC 2.0:
   
   > FlashPackageAsNamespace.as:10
   > Error: Call to a possibly undefined method Sprite.
   >                        new dispns::Sprite
   
   The Royale compiler behaves similarly to ASC 2.0, which obviously makes 
sense since it was originally forked from ASC 2.0.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to