bugfixes
authorMatthias Kramm <kramm@quiss.org>
Mon, 16 Mar 2009 22:12:44 +0000 (23:12 +0100)
committerMatthias Kramm <kramm@quiss.org>
Mon, 16 Mar 2009 22:12:44 +0000 (23:12 +0100)
implemented resolving of interfaces/superclasses after
pass 1. Made exceptions work with late binding.

lib/as3/ok/switchtrycatch.as [new file with mode: 0644]

diff --git a/lib/as3/ok/switchtrycatch.as b/lib/as3/ok/switchtrycatch.as
new file mode 100644 (file)
index 0000000..f21475e
--- /dev/null
@@ -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");
+                }
+            }
+        }
+    }
+}