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 2018/09/20 05:47:51 UTC

[GitHub] Harbs commented on issue #297: Compiler doesn't seem to catch all dependencies

Harbs commented on issue #297: Compiler doesn't seem to catch all dependencies
URL: https://github.com/apache/royale-asjs/issues/297#issuecomment-423047760
 
 
   FWIW, the simplest way to resolve these dependencies is to delay static instantiations until all classes are loaded.
   
   So, we add a new file loaded after all others (i.e. `static_inst.js`) with the following for the test case:
   ````
   /**
    * @private
    */
   Main._myStaticClass = new StaticClass();
   
   /**
    * @export
    * @type {AnotherStaticClass}
    */
   StaticClass.another = new AnotherStaticClass();
   ````
   Done like this, all statics would be be removed from the main class file (and possibly just declared) and order should not matter.
   
   The only case that I can think of which might cause issues is dependencies on static instantiations within constructors.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services