Harbs opened a new issue #200:
URL: https://github.com/apache/royale-compiler/issues/200


   The following code (inside a class called `RuntimeOptions`):
   ```
   private static var _client:String;
   public static function get client():String{init();return _client;}
   public static function set client(value:String):void{init();_client = value;}
   ```
   when I use the following two compiler options:
   `-export-public-symbols=false -prevent-rename-public-symbols=false`
   
   is output as:
   ```
   /**
    * @private
    * @type {string}
    */
   RuntimeOptions._client;
   .....
   /**
    * @type {string}
    */
   RuntimeOptions.client;
   
   
   RuntimeOptions.get__client = function() {
     RuntimeOptions.init();
     return RuntimeOptions._client;
   };
   
   
   RuntimeOptions.set__client = function(value) {
     RuntimeOptions.init();
     RuntimeOptions._client = value;
   };
   ```
   which gets minified to something like this:
   `client:{get:function(){lV();return zU},set:function(a){lV();zU=a}},`
   
   The problem is that `RuntimeOptions.client` is minimized to `pO` and that's 
what is used everywhere in the app and it's always undefined.
   
   I'm not sure if there's a solution to this problem, but if not, static 
getters/setters should probably get `@nocollapse` on the variable declaration 
even if `-prevent-rename-public-symbols=false`.


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to