as3: improved inner function handling, factor static class code into class initializa...
[swftools.git] / lib / as3 / err / innerfunctionassign.as
1 package {
2     import flash.display.MovieClip
3     import flash.events.Event
4
5     public class Main extends flash.display.MovieClip {
6
7         /* this test is just to showcase a problem with slotted functions
8            in conjunction with inner function assignment.
9            What (I think) the compiler should do is just to prevent inner
10            functions from being assigned. */
11         public function Main() {
12             function f0() {
13                 trace("error");
14             }
15             f0 = function(s:String) {
16                 trace(s);
17             }
18             f0("ok 1/2");
19             function() {f0("ok 2/2");}()
20         }
21     }
22 }