From cf2ede9f5b6da1f0d143c3fb825b88a3bb183811 Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Mon, 16 Mar 2009 23:12:44 +0100 Subject: [PATCH] bugfixes implemented resolving of interfaces/superclasses after pass 1. Made exceptions work with late binding. --- lib/as3/ok/switchtrycatch.as | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lib/as3/ok/switchtrycatch.as diff --git a/lib/as3/ok/switchtrycatch.as b/lib/as3/ok/switchtrycatch.as new file mode 100644 index 0000000..f21475e --- /dev/null +++ b/lib/as3/ok/switchtrycatch.as @@ -0,0 +1,25 @@ +package { + import flash.display.MovieClip; + public class Main extends flash.display.MovieClip { + function Main() { + var x:int; + for(x=0;x<3;x++) { + switch(String(x*x)) { + case "0": + trace("ok 1/5");break; + case "1": + try { + trace("ok 2/5"); + throw new Error(); + } catch(e:Error) { + trace("ok 3/5"); + } + case "4": + trace("ok 4/5"); + case "fallthrough": + trace("ok 5/5"); + } + } + } + } +} -- 1.7.10.4