joshtynjala commented on issue #100: Literal string to identify package public 
namespace
URL: https://github.com/apache/royale-compiler/issues/100#issuecomment-560555288
 
 
   As best I can tell, Adobe actually intended for ASC 2.0 to be unable to 
allow a namespace defined in ActionScript code to access a package.
   
   Inside the compiler code, all namespaces have a "kind", and there are 
several of these kinds. There's a kind for namespaces defined in ActionScript 
code, a kind for protected, a kind for private, a kind for packages, and some 
others.
   
   The code that determines if two namespaces are equal requires that the 
"kind" of both namespaces is also equal. So, a namespace defined in 
ActionScript code (`ABCConstants.CONSTANT_Namespace`) can never be equal to a 
package namespace (`ABCConstants.CONSTANT_PackageNs`).
   
   To me this does not seem like something that should have a special 
exception. It seems like the Adobe engineers designed it to work this way on 
purpose. In fact, there are a number of differences between ASC 2.0 and the 
original Flex SDK compiler that makes ASC 2.0 more strict, much like this.
   
   Just out of curiosity, have you discovered a use for this behavior that 
would otherwise be impossible by importing the type instead?

----------------------------------------------------------------
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