X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fas3%2Fok%2Fforward2.as;fp=lib%2Fas3%2Fok%2Fforward2.as;h=f17c47181d3d65ae80e29833d3ccca3d1bd21c6d;hb=7f7a24c64b3fff28b9230b018ef035e96595d7f5;hp=0000000000000000000000000000000000000000;hpb=8231432d717d724382faa96bae05b7713b081c64;p=swftools.git diff --git a/lib/as3/ok/forward2.as b/lib/as3/ok/forward2.as new file mode 100644 index 0000000..f17c471 --- /dev/null +++ b/lib/as3/ok/forward2.as @@ -0,0 +1,37 @@ +package { + import flash.events.Event; + import flash.display.MovieClip + + public class Main extends flash.display.MovieClip + { + public function test1(e:Event=null) + { + try { + var a:Array = new Array + throw new Error(); + } catch (e:Error) { + if(e instanceof Error) + trace("ok 1/2"); + } + var b = a[0]; // to trigger forward variable resolving + } + public function test2() + { + var e:Event; + try { + var a:Array = new Array + throw new Error(); + } catch (e:Error) { + if(e instanceof Error) + trace("ok 2/2"); + } + var b = a[0]; // to trigger forward variable resolving + } + + public function Main() { + test1(); + test2(); + trace("[exit]"); + } + } +}