added more test cases
authorMatthias Kramm <kramm@quiss.org>
Sun, 8 Mar 2009 21:37:45 +0000 (22:37 +0100)
committerMatthias Kramm <kramm@quiss.org>
Sun, 8 Mar 2009 21:37:45 +0000 (22:37 +0100)
lib/as3/err/callpackageinternal.as [new file with mode: 0644]
lib/as3/err/double_namespace.as [new file with mode: 0644]
lib/as3/err/interface6.as [new file with mode: 0644]
lib/as3/err/static1.as [new file with mode: 0644]

diff --git a/lib/as3/err/callpackageinternal.as b/lib/as3/err/callpackageinternal.as
new file mode 100644 (file)
index 0000000..f646683
--- /dev/null
@@ -0,0 +1,10 @@
+package some.other.module {
+    function getmsg() {
+        trace("error");
+    }
+}
+
+package {
+    import some.other.module.*;
+    getmsg();
+}
diff --git a/lib/as3/err/double_namespace.as b/lib/as3/err/double_namespace.as
new file mode 100644 (file)
index 0000000..c62dd6b
--- /dev/null
@@ -0,0 +1,10 @@
+package my.namespaces { 
+    public namespace ns1 = "http://www.some.other/namespace";
+    public namespace ns2 = "http://www.swftools.org/";
+
+    public class Test {
+        ns1 ns2 static function test() {
+        }
+    }
+}
+    
diff --git a/lib/as3/err/interface6.as b/lib/as3/err/interface6.as
new file mode 100644 (file)
index 0000000..f7098c3
--- /dev/null
@@ -0,0 +1,10 @@
+package {
+    interface A {
+        var x;
+
+        // error: interface can not have top-level code
+        if(x==0) {
+        } else {
+        }
+    }
+}
diff --git a/lib/as3/err/static1.as b/lib/as3/err/static1.as
new file mode 100644 (file)
index 0000000..a865bd8
--- /dev/null
@@ -0,0 +1,9 @@
+package package1 {
+    public class A {
+        public var x;
+        public static function f() 
+        {
+            x = 3; //error: this member is not static
+        }
+    }
+}