PlayScriptRedux / playscript

PlayScript is an ActionScript compatible compiler and Flash compatible runtime that runs in the Mono/.NET environment
Other
17 stars 9 forks source link

Variable definitions outside package scope #109

Open sushihangover opened 8 years ago

sushihangover commented 8 years ago

Valid ActionScript:

package {
import flash.display.Sprite;
public class Main extends Sprite {
    public function Main() {
        once();
        once();
    }
    public function once():void {
        if (!deprecationNotified) {
            deprecationNotified = true;
            trace("The method 'XXX' is deprecated");
        }
    }
}
}
var deprecationNotified:Boolean = false;

Output: (only one trace message)

[trace] The method 'XXX' is deprecated

Found: Starling transformCoords.as